feat(hjgl): 完善管线预制与焊接业务

同步管线组件、材料和焊口关联数据,优化预制组件打印及焊接相关查询,减少业务台账与实际关联信息不一致。
This commit is contained in:
2026-09-16 15:49:02 +08:00
parent d090c174b9
commit 7b5b060ffc
13 changed files with 179 additions and 195 deletions
@@ -61,10 +61,6 @@
<f:DropDownList ID="drpWeldingDailyCode" Label="日报编号" runat="server" AutoSelectFirstItem="true"
ShowRedStar="true" Required="true" EnableEdit="true" LabelWidth="100px">
</f:DropDownList>
<f:DropDownList ID="drpFlowingSection" Label="流水段" AutoPostBack="true"
runat="server" LabelWidth="80px"
Width="180px" LabelAlign="Left">
</f:DropDownList>
<f:ToolbarFill ID="ToolbarFill1" runat="server">
</f:ToolbarFill>
<f:Button ID="btnNew" Text="新增" Icon="Add" runat="server" OnClick="btnNew_Click" Hidden="true">
@@ -86,8 +82,6 @@
</f:Button>
<f:Button ID="btnAccept" Text="验收" ToolTip="验收" Icon="Accept" runat="server" OnClick="btnAccept_Click">
</f:Button>
<f:Button ID="btnImportQRCode" Text="导入二维码信息" ToolTip="导入二维码信息" Icon="PackageIn" runat="server" OnClick="btnImportQRCode_Click">
</f:Button>
<f:Button ID="btnImportComponentJoint" Text="导入组件焊口信息" ToolTip="导入组件焊口信息" Icon="PackageIn" runat="server" OnClick="btnImportComponentJoint_Click">
</f:Button>
<f:Button ID="btnBatchAdd" Text="批量增加" Icon="TableAdd" Hidden="true"
@@ -145,13 +139,6 @@
HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<%-- <f:TemplateField ColumnID="tfImageUrl1" Width="180px" HeaderText="组件二维码" HeaderTextAlign="Center"
TextAlign="Left">
<ItemTemplate>
<asp:Label ID="lbImageUrl" runat="server" Text='<%# ConvertImageUrlByImage(Eval("QRCode"),Eval("PipelineComponentId")) %>'></asp:Label>
</ItemTemplate>
</f:TemplateField>--%>
<f:LinkButtonField Width="100px" TextAlign="Center" CommandName="PreviewQRCode" Text="二维码" EnableAjax="false" />
<f:RenderField Width="200px" ColumnID="DrawingName" DataField="DrawingName" SortField="DrawingName"
FieldType="String" HeaderText="预制图纸名称" HeaderTextAlign="Center"
TextAlign="Left">
@@ -166,7 +153,7 @@
FieldType="String" HeaderText="备注" HeaderTextAlign="Center"
TextAlign="Left">
</f:RenderField>
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_print" Text="预览打印" />
<f:LinkButtonField Width="120px" TextAlign="Center" CommandName="cmd_print" Text="预览打印" EnableAjax="false" />
</Columns>
<PageItems>
@@ -24,14 +24,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
HJGL_PipelineComponentService.InitMainItemDownList(drpState, true);
HJGL_PipelineComponentService.InitMainItemDownProductionStateList(drpProductionState, true);
var pipeline = (from x in Funs.DB.HJGL_Pipeline
where x.ProjectId == this.CurrUser.LoginProjectId
select x.FlowingSection).Distinct().ToList();
this.drpFlowingSection.DataTextField = "Value";
this.drpFlowingSection.DataValueField = "Value";
this.drpFlowingSection.DataSource = pipeline;
this.drpFlowingSection.DataBind();
Funs.FineUIPleaseSelect(drpFlowingSection);
}
}
@@ -298,7 +290,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (tvControlItem.SelectedNode == null) return;
string strSql = @" SELECT distinct com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,com.Remark,
com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,com.IsPrint,
com.QRCode,com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
com.State,com.ProductionState,pipe.PlanStartDate,pipe.FlowingSection,com.DrawingName,com.ReceiveDate,
person.PersonName
FROM HJGL_Pipeline_Component com
LEFT JOIN HJGL_Pipeline pipe ON pipe.PipelineId =com.PipelineId
@@ -352,11 +344,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
listStr.Add(new SqlParameter("@ProductionState", drpProductionState.SelectedValue.ToString()));
}
if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.SelectedValue != Const._Null)
{
strSql += " AND pipe.FlowingSection =@FlowingSection";
listStr.Add(new SqlParameter("@FlowingSection", drpFlowingSection.SelectedValue.ToString()));
}
// 过滤组件编号值为"裕-量"的行
strSql += " AND com.PipelineComponentCode != @ExcludeYuliang";
listStr.Add(new SqlParameter("@ExcludeYuliang", "裕-量"));
@@ -448,7 +435,7 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
}
else
{
ShowNotify("请查看组件是否上传二维码!", MessageBoxIcon.Question);
ShowNotify("未找到可打印的组件!", MessageBoxIcon.Question);
return false;
}
BLL.FastReportService.AddFastreportTable(tb);
@@ -459,7 +446,11 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
if (File.Exists(rootPath + initTemplatePath))
{
PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath)));
}
else
{
ShowNotify("打印模板不存在!", MessageBoxIcon.Warning);
return false;
}
return true;
@@ -549,24 +540,11 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
protected void Grid1_RowCommand(object sender, GridCommandEventArgs e)
{
if (e.CommandName == "PreviewQRCode")
if (e.CommandName == "cmd_print")
{
var ID = e.RowID;
var q = HJGL_PipelineComponentService.GetPipelineComponentById(ID);
string path = "";
if (!string.IsNullOrEmpty(q.QRCode))
{
path = BLL.CreateQRCodeService.CreateCode_Simple(q.QRCode, ID);
if (!string.IsNullOrEmpty(path))
{
string filepath = Funs.SGGLUrl + path.Replace("\\", "//");
ClientScript.RegisterStartupScript(ClientScript.GetType(), "myscript", "<script type='text/javascript'>window.open('" + filepath + "');</script>");
}
}
string[] pipelineComponentIds = { e.RowID };
Print(pipelineComponentIds);
}
}
protected void btnSearch_Click(object sender, EventArgs e)
{
@@ -603,22 +581,6 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
}
#endregion
/// <summary>
/// 搜索
/// </summary>
/// <param name="sender"></param>
/// <param name="e"></param>
public string ConvertImageUrlByImage(object str, object id)
{
string path = string.Empty;
if (!string.IsNullOrEmpty(str.ToString()))
{
path = BLL.CreateQRCodeService.CreateCode_Simple(str.ToString(), id.ToString());
path = HttpUtility.HtmlDecode(BLL.UploadAttachmentService.ShowImage("../../", path));
}
return path;
}
public string ConvertState(object state)
{
string StateName = string.Empty;
@@ -650,12 +612,6 @@ if (!string.IsNullOrEmpty(drpFlowingSection.SelectedValue) && drpFlowingSection.
return StateName;
}
protected void btnImportQRCode_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - ")));
}
protected void btnImportComponentJoint_Click(object sender, EventArgs e)
{
PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineComponentJointIn.aspx?", "导入 - ")));
@@ -149,15 +149,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.DropDownList drpWeldingDailyCode;
/// <summary>
/// drpFlowingSection 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.DropDownList drpFlowingSection;
/// <summary>
/// ToolbarFill1 控件。
/// </summary>
@@ -230,15 +221,6 @@ namespace FineUIPro.Web.HJGL.PreDesign
/// </remarks>
protected global::FineUIPro.Button btnAccept;
/// <summary>
/// btnImportQRCode 控件。
/// </summary>
/// <remarks>
/// 自动生成的字段。
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
/// </remarks>
protected global::FineUIPro.Button btnImportQRCode;
/// <summary>
/// btnImportComponentJoint 控件。
/// </summary>
@@ -78,7 +78,7 @@ namespace FineUIPro.Web.HJGL.PreDesign
if (!string.IsNullOrEmpty(Request.Params["PipelineComponentId"]))
{
pipeline.PipelineComponentId = Request.Params["PipelineComponentId"];
BLL.HJGL_PipelineComponentService.UpdatePipelineComponent(pipeline);
BLL.HJGL_PipelineComponentService.UpdatePipelineComponentBasicInfo(pipeline);
}
else
{
@@ -98,4 +98,4 @@ namespace FineUIPro.Web.HJGL.PreDesign
}
}
}
}
}