diff --git a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs index 8c509ae5..cf722bdc 100644 --- a/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs +++ b/SGGL/BLL/HJGL/WeldingManage/PipelineService.cs @@ -80,6 +80,16 @@ namespace BLL { return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.PipelineId == pipelineId); } + + /// + /// 根据流水段获取管线信息 + /// + /// + /// + public static Model.HJGL_Pipeline GetPipelineByFlowingSection(string flowingSection) + { + return Funs.DB.HJGL_Pipeline.FirstOrDefault(e => e.FlowingSection == flowingSection); + } /// /// 根据管线id获取管线状态 /// diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx index 63e63a0e..607a9290 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx @@ -48,124 +48,62 @@ + + - - - - - - - - - + - - - - - - - - - - - - - - - - - - - + Icon="TableGo" EnableAjax="false" EnablePostBack="true"> + EnableCollapse="true" runat="server" BoxFlex="1" DataKeyNames="PipelineCode" AllowCellEditing="true" + AllowColumnLocking="true" EnableColumnLines="true" ClicksToEdit="2" DataIDField="PipelineCode" + AllowSorting="true" SortField="PipelineCode" SortDirection="ASC" OnSort="Grid1_Sort" + AllowPaging="true" IsDatabasePaging="true" PageSize="15" OnPageIndexChange="Grid1_PageIndexChange"> - - - <%-- - --%> - + + + + - - - - - - - - - - - - - <%-- - - - - --%> - - - + - + - - - - @@ -186,22 +124,6 @@ - - - - "); - - } - } - } - - } protected void btnSearch_Click(object sender, EventArgs e) { BindGrid(); @@ -514,17 +344,7 @@ namespace FineUIPro.Web.HJGL.PreDesign #endregion - #region 关闭弹出窗口及刷新页面 - /// - /// 关闭弹出窗口 - /// - /// - /// - protected void Window1_Close(object sender, WindowCloseEventArgs e) - { - //this.InitTreeMenu();//加载树 - this.BindGrid(); - } + #region 刷新页面 /// /// 查询 @@ -538,40 +358,9 @@ namespace FineUIPro.Web.HJGL.PreDesign protected void btnTreeFind_Click1(object sender, EventArgs e) { this.InitTreeMenu(); - } #endregion - /// - /// 搜索 - /// - /// - /// - 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; - if (state != null) - { - if (!string.IsNullOrEmpty(state.ToString())) - { - string txt = HJGL_PipelineComponentService.GetState().FirstOrDefault(x => x.Value == state.ToString()).Text; - return txt; - - } - } - return StateName; - } public string ConvertProductionState(object state) { string StateName = string.Empty; @@ -579,95 +368,13 @@ namespace FineUIPro.Web.HJGL.PreDesign { if (!string.IsNullOrEmpty(state.ToString())) { - - string txt = HJGL_PipelineComponentService.GetProductionState().FirstOrDefault(x => x.Value == state.ToString()).Text; - return txt; } } - return StateName; } - protected void btnImportQRCode_Click(object sender, EventArgs e) - { - PageContext.RegisterStartupScript(Window3.GetShowReference(String.Format("PrePipelineQRCodeIn.aspx?", "导入 - "))); - } - protected void btnSinglePreview_Click(object sender, EventArgs e) - { - //string httpUrl = @"FileUpload\HJGL_DataImport\095e9691-99c2-4f70-8e67-e70c8fa6be9c\2022-06\管道焊接工作记录.pdf"; - //var newurl = Funs.SGGLUrl + httpUrl.Replace(Funs.RootPath, ""); - var id = Grid1.SelectedRowID; - if (string.IsNullOrEmpty(id)) - { - ShowNotify("请选择相对应的管道预制加工图", MessageBoxIcon.Warning); - return; - } - var SingleName = (from x in Funs.DB.HJGL_Pipeline_Component where x.PipelineComponentId == id select (x.DrawingName)).FirstOrDefault(); - var filemodel = BLL.HJGL_DataImportService.GetLatestFileByFileName(SingleName, "3", this.CurrUser.LoginProjectId); - if (filemodel != null) - { - string httpUrl = filemodel.FilePath; - PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("~/AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -"))); - - } - else - { - ShowNotify("请上传相关管道预制加工图", MessageBoxIcon.Warning); - return; - } - - - } - - protected void btnAccept_Click(object sender, EventArgs e) - { - if (Grid1.SelectedRowIDArray.Length > 0) - { - - foreach (var item in Grid1.SelectedRowIDArray) - { - var model = HJGL_PipelineComponentService.GetPipelineComponentById(item); - if (model.ProductionState == 2) - { - BLL.APIPipelineComponentService.GetComponentConfirmArrival(PipelineComponentId: item, this.CurrUser.PersonId, ""); ; - - } - } - ShowNotify("操作成功", MessageBoxIcon.Success); - BindGrid(); - } - else - { - ShowNotify("请选择需要验收的数据", MessageBoxIcon.Warning); - - } - } - protected void btnRectification_Click(object sender, EventArgs e) - { - if (Grid1.SelectedRowIDArray.Length > 0) - { - - foreach (var item in Grid1.SelectedRowIDArray) - { - var model = HJGL_PipelineComponentService.GetPipelineComponentById(item); - if (model.State == HJGL_PipelineComponentService.StatePenRec) - { - model.State = HJGL_PipelineComponentService.StateRec; - HJGL_PipelineComponentService.UpdatePipelineComponent(model); - - } - } - ShowNotify("操作成功", MessageBoxIcon.Success); - BindGrid(); - } - else - { - ShowNotify("请选择需要整改的数据", MessageBoxIcon.Warning); - - } - } protected void btnOut_Click(object sender, EventArgs e) { @@ -676,21 +383,20 @@ namespace FineUIPro.Web.HJGL.PreDesign var q = (from x in GridDataTable.AsEnumerable() select new { + 管线号 = x.Field("PipelineCode"), 组件编号 = x.Field("PipelineComponentCode"), - 物流箱号 = x.Field("BoxNumber"), - 组件状态 = ConvertState(x.Field("State")), - 生产状态 = ConvertProductionState(x.Field("ProductionState")), - 管线计划安装日期 = x.Field("PlanStartDate"), - 预制图纸名称 = x.Field("DrawingName"), - 验收人 = x.Field("PersonName"), - 验收时间 = x.Field("ReceiveDate"), + 预制散件材料描述 = !string.IsNullOrWhiteSpace(x.Field("matdef")) ? x.Field("matdef") : "-", + 数量 = x.Field("Number"), + 所在包装编号 = x.Field("PackagingCode"), + 车次 = x.Field("TrainNumber"), + 流水段 = x.Field("FlowingSection") }); - string path = Funs.RootPath + @"File\Excel\Temp\PrePipeline.xlsx"; - path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HH-mm}", DateTime.Now) + ".xlsx"); + string path = Funs.RootPath + @"File\Excel\Temp\PrePipelineInstallList.xlsx"; + path = path.Replace(".xlsx", string.Format("{0:yyyy-MM-dd-HHmm}", DateTime.Now) + ".xlsx"); MiniExcel.SaveAs(path, q); - string fileName = "组件信息.xlsx"; + string fileName = $"安装清单({(string.Format("{0:yyyy-MM-dd-HHmm}", DateTime.Now))}).xlsx"; FileInfo info = new FileInfo(path); long fileSize = info.Length; System.Web.HttpContext.Current.Response.Clear(); @@ -702,9 +408,6 @@ namespace FineUIPro.Web.HJGL.PreDesign System.Web.HttpContext.Current.Response.Close(); File.Delete(path); } - - } - } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs index c4bfb7fb..e7f9d40b 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/InstallList.aspx.designer.cs @@ -113,6 +113,15 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::FineUIPro.Toolbar Toolbar3; + /// + /// txtPipelineCode2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPipelineCode2; + /// /// txtPipelineComponentCode 控件。 /// @@ -122,87 +131,6 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::FineUIPro.TextBox txtPipelineComponentCode; - /// - /// drpState 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpState; - - /// - /// drpProductionState 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpProductionState; - - /// - /// drpWeldingDailyCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpWeldingDailyCode; - - /// - /// drpFlowingSection 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpFlowingSection; - - /// - /// ToolbarFill1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarFill ToolbarFill1; - - /// - /// btnNew 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNew; - - /// - /// btnSearch 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSearch; - - /// - /// btnDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnDelete; - - /// - /// Toolbar4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar4; - /// /// ToolbarFill2 控件。 /// @@ -213,58 +141,13 @@ namespace FineUIPro.Web.HJGL.PreDesign protected global::FineUIPro.ToolbarFill ToolbarFill2; /// - /// btnRectification 控件。 + /// btnSearch 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Button btnRectification; - - /// - /// btnAccept 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnAccept; - - /// - /// btnImportQRCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnImportQRCode; - - /// - /// btnBatchAdd 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnBatchAdd; - - /// - /// btnSinglePreview 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSinglePreview; - - /// - /// btnPrint 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnPrint; + protected global::FineUIPro.Button btnSearch; /// /// btnOut 控件。 @@ -284,24 +167,6 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected global::FineUIPro.Grid Grid1; - /// - /// lbstate 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label lbstate; - - /// - /// lbProductionState 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label lbProductionState; - /// /// ToolbarSeparator1 控件。 /// @@ -328,41 +193,5 @@ namespace FineUIPro.Web.HJGL.PreDesign /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - - /// - /// Window2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window2; - - /// - /// Window3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window3; - - /// - /// Window4 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window4; } }