feat(HJGL): 焊接任务打印功能支持多模板选择

- 为组件打印新增60x162标签模板选项
  - 为焊口打印新增80x42标签模板选项
  - API接口返回数据增加焊口位置和焊点坐标字段
  - 优化打印模板选择逻辑,支持A4和标签模板切换
This commit is contained in:
2026-03-11 16:20:22 +08:00
parent 24cbcc97f8
commit b9548a967d
9 changed files with 490 additions and 53 deletions
@@ -1243,8 +1243,21 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\组件打印.frx";
// 根据选择的打印模板加载不同的模板文件
string templateValue = ddlPrintTemplate.SelectedValue;
if (templateValue == "60x162")
{
initTemplatePath = "File\\Fastreport\\组件打印_60x162.frx";
}
else if (templateValue == "A4")
{
initTemplatePath = "File\\Fastreport\\组件打印.frx";
}
else
{
// 默认使用60x162模板
initTemplatePath = "File\\Fastreport\\组件打印_60x162.frx";
}
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
@@ -1325,6 +1338,7 @@ namespace FineUIPro.Web.HJGL.WeldingManage
WeldJointId = x.WeldJointId,
Spec = x.Specification,
SortIndex = x.WeldJointCode.Replace(x.PipelineCode + "/", ""),
WeldJointPoint=x.WeldJointPoint
}).OrderBy(x => x.pipelineCode).ThenBy(x => x.SortIndex).ToList();
var tb = LINQToDataTable(result);
if (tb != null && tb.Rows.Count > 0)
@@ -1334,7 +1348,23 @@ namespace FineUIPro.Web.HJGL.WeldingManage
BLL.FastReportService.AddFastreportTable(tb);
string initTemplatePath = "";
string rootPath = Server.MapPath("~/");
initTemplatePath = "File\\Fastreport\\焊口打印.frx";
// 根据选择的打印模板加载不同的模板文件
string templateValue = ddlPrintJointTemplate.SelectedValue;
if (templateValue == "80x42")
{
initTemplatePath = "File\\Fastreport\\焊口打印_80x42.frx";
}
else if (templateValue == "A4")
{
initTemplatePath = "File\\Fastreport\\焊口打印.frx";
}
else
{
// 默认使用80x42模板
initTemplatePath = "File\\Fastreport\\焊口打印_80x42.frx";
}
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));