From 75b7d0559617d32e00f7ea3c964dd3cfecb9be2b Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Fri, 26 Sep 2025 15:51:57 +0800 Subject: [PATCH] =?UTF-8?q?20250926=20=E6=8E=92=E4=BA=A7=E8=AE=A1=E5=88=92?= =?UTF-8?q?=E7=94=9F=E4=BA=A7=E7=9C=8B=E6=9D=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../版本日志/SGGLDB_V2025-09-26-001-bwj.sql | 67 ++++ .../File/Excel/DataOut/排产计划导出模板.xlsx | Bin 9725 -> 9770 bytes .../PreDesign/ProductionSchedulingPlan.aspx | 305 +++++++++++------- .../ProductionSchedulingPlan.aspx.cs | 53 ++- .../ProductionSchedulingPlan.aspx.designer.cs | 63 +++- 5 files changed, 357 insertions(+), 131 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2025-09-26-001-bwj.sql diff --git a/DataBase/版本日志/SGGLDB_V2025-09-26-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-09-26-001-bwj.sql new file mode 100644 index 00000000..086c3d85 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-09-26-001-bwj.sql @@ -0,0 +1,67 @@ +CREATE PROCEDURE [dbo].[Sp_HJGL_ProductionPlanStatistics] + @projectId nvarchar(50)=null +AS +select distinct unitWork.UnitWorkId, +unitWork.UnitWorkCode, +unitWork.UnitWorkName, +unitWork.ProjectId, +pipeline.FlowingSection, +isnull(total.TotalDia,0) as TotalDia,--Ԥܴ +p.PlanStartDate,--ƻʼ +p.PlanEndDate,--ƻ +p.Days as TotalDays,-- +(case when p.PlanEndDate>= getdate() then (p.Days-(DATEDIFF(day,p.PlanStartDate,GETDATE()))) else '' end) as RemainingDays,--ʣ +(case when p.Days>0 then cast(isnull(total.TotalDia,0)/p.Days as decimal(18,2)) else 0 end) as AvgDayCompleteDia, --ƽÿӦɹ +ISNULL(currentDay.CurrentDayCompletedDia,0) as CurrentDayCompletedDia, --ɹ +cast(case when (case when p.PlanEndDate>= getdate() then (p.Days-(DATEDIFF(day,p.PlanStartDate,GETDATE()))) else 0 end)>0 then +(isnull(total.TotalDia,0)-isnull(totalCompleted.totalCompletedDia,0))/ (case when p.PlanEndDate>= getdate() then (p.Days-(DATEDIFF(day,p.PlanStartDate,GETDATE()))) else 0 end) else 0 end as decimal(18,2)) as NextDayComplete, --Ӧ +isnull(totalCompleted.totalCompletedDia,0) as totalCompletedDia, --ۼ +cast(cast((case when isnull(total.TotalDia,0)>0 then +(isnull(totalCompleted.totalCompletedDia,0) / isnull(total.TotalDia,0)*100) else 0 end) as decimal(18,2)) as varchar(10))+'%' as CompletedRate, --ɰٷֱ +welder.WelderCount, --ǰ +warningWelder.WarningWelderCount --Ԥ +FROM WBS_UnitWork AS unitWork +LEFT JOIN (select FlowingSection,UnitWorkId from HJGL_Pipeline where PipeArea='1' and FlowingSection is not null and FlowingSection!='') as pipeline on pipeline.UnitWorkId = unitWork.UnitWorkId +left join HJGL_ProductionSchedulingPlan p on p.PipelineId = unitWork.UnitWorkId and p.FlowNum = pipeline.FlowingSection +--Ԥܴ +left join (select sum(Size) as TotalDia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as total on total.UnitWorkId = unitWork.UnitWorkId and total.FlowingSection = pipeline.FlowingSection +--ɹ +left join (select sum(Size) as CurrentDayCompletedDia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + left join HJGL_WeldingDaily on HJGL_WeldingDaily.WeldingDailyId = HJGL_WeldJoint.WeldingDailyId + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and HJGL_WeldJoint.WeldingDailyId is not null + and YEAR(HJGL_WeldingDaily.WeldingDate)=YEAR(GETDATE()) + and MONTH(HJGL_WeldingDaily.WeldingDate)=MONTH(GETDATE()) + and DAY(HJGL_WeldingDaily.WeldingDate)=DAY(GETDATE()) + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as currentDay on currentDay.UnitWorkId = unitWork.UnitWorkId and currentDay.FlowingSection = pipeline.FlowingSection + +--ۼ +left join (select sum(Size) as totalCompletedDia,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from HJGL_WeldJoint + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and HJGL_WeldJoint.WeldingDailyId is not null + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as totalCompleted on totalCompleted.UnitWorkId = unitWork.UnitWorkId and totalCompleted.FlowingSection = pipeline.FlowingSection + +--ǰ +left join (select count(*) as WelderCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from Person_Persons + left join HJGL_WeldJoint on HJGL_WeldJoint.BackingWelderId = Person_Persons.PersonId + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and HJGL_WeldJoint.WeldingDailyId is not null + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as welder on welder.UnitWorkId = unitWork.UnitWorkId and welder.FlowingSection = pipeline.FlowingSection + +--Ԥ +left join (select count(*) as WarningWelderCount,HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection from Person_Persons + left join HJGL_WeldJoint on HJGL_WeldJoint.BackingWelderId = Person_Persons.PersonId + left join HJGL_Pipeline on HJGL_Pipeline.PipelineId = HJGL_WeldJoint.PipelineId + where HJGL_Pipeline.PipeArea='1' and HJGL_WeldJoint.JointAttribute='Ԥƿ' + and HJGL_WeldJoint.WeldingDailyId is not null + and PersonId in (select WelderId from Welder_WelderQualify where LimitDate < GETDATE()) + group by HJGL_Pipeline.UnitWorkId,HJGL_Pipeline.FlowingSection) as warningWelder on warningWelder.UnitWorkId = unitWork.UnitWorkId and warningWelder.FlowingSection = pipeline.FlowingSection + +where unitWork.ProjectId = @projectId +and pipeline.FlowingSection is not null \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx b/SGGL/FineUIPro.Web/File/Excel/DataOut/排产计划导出模板.xlsx index 0a4d300ed2ce070fad41b4c89d20280281784fbf..e3e4104bb8a7809d7379dfcf770e1f79272659a4 100644 GIT binary patch delta 1686 zcmV;H25I^IOR7w;847>?ite+b0RRBC1pojP0001ZY%g1S1cE-qCLFGz?(hC+PB^4HgT4|Qr zei~<1Pkx2gtO%k@({W~*-#-6mUexfK6<1b~LrsD;Fg6+j3c`O85;gI%1{N1)N2Y*6 znSrB5oM5DZB%&a!4-cu7G9_4xsRm+<+0zixNDNs99VIrx!IvfCSOyD*&N8I7gN!JR zA;hdW91n#ipkyrzpsvEcF>uio) z@wmG!%7-%Pern=ACDxl#=IepTU4O~lR7OSA?-^wbD{~e=*ywW4`73jpD!HG6;Wp$8z6uJ#^}8k90ssIe2$QB3Ab;C(n=lZ4?@a$eqxS;Bj^lWYGih8mNt-rpdU;kr z7)=1Fl58jW`mO-E20X6Y7bK*!XLq%?>G@NUqcu~Si!#E*3ov43ED~NWBmDi_;>{Q% zZD^U$T$C)r&rIX<+3Q!+jZlv|W6U66D0PH0W8}p5b)2z+YEMX3!c8hvL4OVWs->@` zVl=6Qirf!_VB{B+m$+t_sAD)pn(~;)Ns4IYFq_N>^cFFP_h(mar zU$u_VD)6@&cK1%(qI!xug?|#3(p7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yd`6bWq(82oUl&AGNONlFY^uZ-LD7SXT2k9W$OMc+&Dh-wyImbZKx|b%%z~-^ z0Hqi=h>v{)X(KNCh_H>A_Ys3O;!__nY$FzZ#7P_RxsMpN5m$Z0X&Z6fN1U}0H+{r^ zxQ+PIN05%FUk^Y!s@@)ebR_w90MgOq`vFKtl)D3vPW+&;ce8~251a_H{{WLgAQZE`88ra~J`xr%XS4SjCINq6 zPr@)1#otZ*4oly+whR!PG2)-_B#DU_jc-kRfyT9K+9Kemw;OC?G(NWX++WW*X))XD zD)|8CRc)q-W&|Z*L@kwBPto&oo=#BW12>XawSg%*fJd|P@}dxyiQ2)Vt1Y;oz$cMp zJQH?`HX&Gsu@@WA+-Ff?;&4?v%|nx%90^JRA!Do|aLEJ54KTGm5uK1y^hmpPRSS>; zLj@X4@R(*4e`^Cc?f+b8Cud5n!okK&C%fltDUQQlz4xjY?smIum$x>ee~Moh50md4 z9&cF0s#gl+?V-GpS{dboYnBT9ThQ%1I%NXLazF-oN=7NUUXm*|q>K#T`n^sRjkLLs zZa^k62|MQQCNKHj{c?^P9&LD(w!9G|B=R~{n61NF)J|HNo-l9GH$#%wrYbbLna z0A*|X=Wi;%0Fyx=6tj;VEd~iI`kjiC0RRAzlf@%b0?-SS`wJzLKO`yv(vxZ=Kmi7m zt0W*B5}jtUy#fFL;s*c#7ytkO00000000000054Y<|IV{fs-sHIvYL`7BFW4005c- r000pH000000000000000wv&M+J^@sdz$HBa8k7DdCI)~a00000(AnwL diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx index fcbc9628..f9be7eae 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx @@ -7,11 +7,10 @@ 排产计划 - @@ -44,120 +43,202 @@ - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - <%-- - --%> - - - - - - - - - - - - - - - <%-- - - --%> - - - - - - - - - - - - - <%-- - - --%> - - - - - - - - <%-- - - --%> - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -202,7 +283,7 @@ } function onGridDataLoad(event) { - this.mergeColumns(['FlowNum', 'Material', 'TotalDyne','TotalPriority','PriorityTotalDyne', 'TotalCompletedRate']); + this.mergeColumns(['FlowNum', 'Material', 'TotalDyne', 'TotalPriority', 'PriorityTotalDyne', 'TotalCompletedRate']); } //自动计算天数、平均每天工作量 @@ -230,8 +311,8 @@ } me.updateCellValue(rowId, 'Days', daysDifference + 1);//天数 - me.updateCellValue(rowId, 'AvgDailyWorkload', avgDailyWorkload);//平均每天工作量 - me.updateCellValue(rowId, 'NextDayCompleteDyne', nextDayCompleteDyne);//次日应完成量 + me.updateCellValue(rowId, 'AvgDailyWorkload', avgDailyWorkload.toFixed(2));//平均每天工作量 + me.updateCellValue(rowId, 'NextDayCompleteDyne', nextDayCompleteDyne.toFixed(2));//次日应完成量 } } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs index 0568314b..16e38325 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.cs @@ -23,14 +23,23 @@ namespace FineUIPro.Web.HJGL.PreDesign { public int pageSize = 20; public static DataTable GridDataTable = new DataTable(); + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { this.ddlPageSize.SelectedValue = this.Grid1.PageSize.ToString(); this.InitTreeMenu();//加载树 + BindGrid2();//绑定看板数据 } } + #endregion #region 加载树装置-单位-工作区 /// @@ -185,6 +194,13 @@ namespace FineUIPro.Web.HJGL.PreDesign } #endregion + + #region 树节点展开事件 + /// + /// 树节点展开事件 + /// + /// + /// protected void tvControlItem_TreeNodeExpanded(object sender, TreeNodeEventArgs e) { if (e.Node.Nodes[0].NodeID == "加载流水段...") @@ -194,6 +210,8 @@ namespace FineUIPro.Web.HJGL.PreDesign } } + #endregion + #region 点击TreeView /// /// 点击TreeView @@ -202,16 +220,6 @@ namespace FineUIPro.Web.HJGL.PreDesign /// protected void tvControlItem_NodeCommand(object sender, TreeCommandEventArgs e) { - //if (e.CommandName == "流水段") - //{ - // Model.HJGL_Pipeline pipeline = BLL.PipelineService.GetPipelineByFlowingSection(this.tvControlItem.SelectedNode.Text); - // this.hdUnitWorkId.Text = string.Empty; - // if (pipeline != null) - // { - // this.hdUnitWorkId.Text = this.tvControlItem.SelectedNode.ParentNode.NodeID; - // SaveProductionSchedulingPlan(); - // } - //} this.BindGrid(); } @@ -912,5 +920,30 @@ namespace FineUIPro.Web.HJGL.PreDesign } } #endregion + + #region 生产看板 + protected void ddlPageSize2_SelectedIndexChanged(object sender, EventArgs e) + { + this.BindGrid2(); + } + + /// + /// 绑定数据 + /// + private void BindGrid2() + { + + List listStr = new List(); + + listStr.Add(new SqlParameter("@projectId", this.CurrUser.LoginProjectId)); + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunProc("Sp_HJGL_ProductionPlanStatistics", parameter); + this.Grid2.RecordCount = tb.Rows.Count; + var table = this.GetPagedDataTable(Grid2, tb); + Grid2.DataSource = table; + Grid2.DataBind(); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs index 04728f3a..3c5b40fb 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/ProductionSchedulingPlan.aspx.designer.cs @@ -93,6 +93,60 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// protected global::FineUIPro.Panel panelCenterRegion; + /// + /// panelCenterTop 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterTop; + + /// + /// Grid2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid2; + + /// + /// ToolbarSeparator2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator2; + + /// + /// ToolbarText2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText2; + + /// + /// ddlPageSize2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize2; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + /// /// Toolbar3 控件。 /// @@ -129,15 +183,6 @@ namespace FineUIPro.Web.HJGL.PreDesign { /// protected global::FineUIPro.Button btnOut; - /// - /// Grid1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Grid Grid1; - /// /// txtTotalPriority 控件。 ///