From ced7b82085b576fee3d78862cec53f078a16cad2 Mon Sep 17 00:00:00 2001 From: wendy <408182087@qq.com> Date: Mon, 8 Sep 2025 11:30:40 +0800 Subject: [PATCH] =?UTF-8?q?20250908=20=E7=84=8A=E6=8E=A5=E7=BB=9F=E8=AE=A1?= =?UTF-8?q?=E5=88=86=E6=9E=90=E8=A1=A8?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- CreateModel.bat | 2 +- .../版本日志/SGGLDB_V2025-09-08-001-bwj.sql | 84 ++++ SGGL/BLL/Common/Const.cs | 4 + SGGL/BLL/ProjectData/WorkAreaService.cs | 2 + SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 9 + .../HJGL/WeldingReport/ShowColumn.aspx.cs | 1 + .../WeldingReport/WeldingStatistical.aspx | 147 +++++++ .../WeldingReport/WeldingStatistical.aspx.cs | 401 ++++++++++++++++++ .../WeldingStatistical.aspx.designer.cs | 188 ++++++++ SGGL/FineUIPro.Web/ProjectData/WorkArea.aspx | 4 + .../ProjectData/WorkArea.aspx.cs | 4 +- .../ProjectData/WorkAreaEdit.aspx | 93 ++-- .../ProjectData/WorkAreaEdit.aspx.cs | 2 + .../ProjectData/WorkAreaEdit.aspx.designer.cs | 41 +- SGGL/FineUIPro.Web/common/Menu_CQMS.xml | 2 +- SGGL/FineUIPro.Web/common/Menu_HJGL.xml | 3 +- SGGL/Model/Model.cs | 24 ++ 17 files changed, 947 insertions(+), 64 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2025-09-08-001-bwj.sql create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/WeldingStatistical.aspx create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/WeldingStatistical.aspx.cs create mode 100644 SGGL/FineUIPro.Web/HJGL/WeldingReport/WeldingStatistical.aspx.designer.cs diff --git a/CreateModel.bat b/CreateModel.bat index f5e367c..f3db9c1 100644 --- a/CreateModel.bat +++ b/CreateModel.bat @@ -27,7 +27,7 @@ REM -------------- @echo. @call "%VS100COMNTOOLS%"vsvars32.bat -SqlMetal /views /server:.\SQL2012 /database:SGGLDB_TCC /code:%Model_ROOT%\Model.cs /namespace:Model +SqlMetal /views /server:.\SQL2022 /database:SGGLDB_HBAZ /code:%Model_ROOT%\Model.cs /namespace:Model @ECHO pause diff --git a/DataBase/版本日志/SGGLDB_V2025-09-08-001-bwj.sql b/DataBase/版本日志/SGGLDB_V2025-09-08-001-bwj.sql new file mode 100644 index 0000000..c0fc5d7 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-09-08-001-bwj.sql @@ -0,0 +1,84 @@ + +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('0F3ECADA-F108-4C24-979C-67CA49E3726B','ͳƷ','HJGL/WeldingReport/WeldingStatistical.aspx',5,'F3B157B7-9BEE-4150-80CB-087828F1C51D','Menu_HJGL',0,1,1) +go + +alter table ProjectData_WorkArea add CompletionDate datetime +go + + +CREATE PROC [dbo].[sp_rpt_WeldingStatistical] + @AreaNo nVARCHAR(50) = NULL, + @installationId nVARCHAR(50) = NULL, + @startTime datetime = NULL, + @endTime datetime = NULL, + @projectId NVARCHAR(50) = NULL, + @IsStandard NVARCHAR(50) = NULL + +AS +/*ͳƷ*/ + SELECT WorkArea.WorkAreaId, + WorkArea.ProjectId, + WorkArea.WorkAreaCode AS baw_areano,-- + Unit.UnitCode AS bsu_unitcode,--λ + Unit.UnitName AS bsu_unitname, --λ + Installation.InstallationCode, --װô + Installation.InstallationName, --װ + ISNULL(total_jot.total_jot,0) AS total_jot, --ܺ + CAST(ISNULL(total_jot.total_din,0) AS DECIMAL(19,2)) AS total_din,--ܴ + + --ʩ Ż㼯ʩٴԶ + (select top 1 ProjectData_TeamGroup.TeamGroupName from PW_JointInfo + left join PW_IsoInfo on PW_IsoInfo.ISO_ID = PW_JointInfo.ISO_ID + left join BS_Welder on BS_Welder.WED_ID = PW_JointInfo.JOT_CellWelder + left join ProjectData_TeamGroup on ProjectData_TeamGroup.TeamGroupId= BS_Welder.TeamGroupId + where PW_IsoInfo.WorkAreaId = WorkArea.WorkAreaId and PW_JointInfo.DReportID is not null and BS_Welder.TeamGroupId is not null) as TeamGroup, + + CAST(ISNULL(finished_total_jot_bq.finished_total_din_bq ,0) AS DECIMAL(19,2)) AS finished_total_din_bq, --ɴ + (CAST(ISNULL(total_jot.total_din,0)-ISNULL(finished_total_jot_bq.finished_total_din_bq ,0) AS DECIMAL(19,2))) as RemainingDain, --ʣܴ-ɴ + getdate() as CurrentDate,-- + WorkArea.CompletionDate, -- + (DATEDIFF(DAY, getdate(), WorkArea.CompletionDate)+1) as RemainingConPeriod,--ʣ๤ + CEILING(case when (DATEDIFF(DAY, getdate(), WorkArea.CompletionDate)+1)>0 then + (ISNULL(total_jot.total_din,0)-ISNULL(finished_total_jot_bq.finished_total_din_bq ,0))/(DATEDIFF(DAY, getdate(), WorkArea.CompletionDate)+1) + else '0' end) as AvgDayCompletedDin,--վӦɴ + (getdate()-1) as CurrentCompleted, -- + (cast(isnull(finished_current_day_din.finished_current_day_din,0) as decimal(19,2))) as finished_current_day_din --ɴ +FROM ProjectData_WorkArea AS WorkArea +LEFT JOIN Base_Unit AS Unit ON WorkArea.UnitId =Unit.UnitId +LEFT JOIN Project_Installation AS Installation ON Installation.InstallationId = WorkArea.InstallationId +LEFT JOIN (SELECT COUNT(*) total_jot ,pw_isoinfo.WorkAreaId ,SUM(JOT_Size) AS total_din + ,SUM(JOT_DoneDin) AS finished_total_din + FROM pw_jointinfo + LEFT JOIN pw_isoinfo ON pw_jointinfo.ISO_ID = pw_isoinfo.ISO_ID + WHERE (pw_isoinfo.Is_Standard=@IsStandard OR @IsStandard IS NULL) + GROUP BY pw_isoinfo.WorkAreaId) AS total_jot ON total_jot.WorkAreaId = WorkArea.WorkAreaId + +LEFT JOIN (SELECT COUNT(*) finished_total_jot_bq ,pw_isoinfo.WorkAreaId ,SUM(JOT_DoneDin) AS finished_total_din_bq + FROM pw_jointinfo + LEFT JOIN pw_isoinfo ON pw_jointinfo.ISO_ID = pw_isoinfo.ISO_ID + LEFT JOIN BO_WeldReportMain ON BO_WeldReportMain.dreportid = pw_jointinfo.dreportid + WHERE pw_jointinfo.DReportID is not null + and (jot_welddate >= @startTime OR @startTime IS NULL) and (jot_welddate <=@endTime OR @endTime IS NULL) AND + (pw_isoinfo.Is_Standard=@IsStandard OR @IsStandard IS NULL) + GROUP BY pw_isoinfo.WorkAreaId) AS finished_total_jot_bq ON finished_total_jot_bq.WorkAreaId = WorkArea.WorkAreaId +--ɴ +LEFT JOIN (SELECT pw_isoinfo.WorkAreaId ,SUM(JOT_DoneDin) AS finished_current_day_din + FROM pw_jointinfo + LEFT JOIN pw_isoinfo ON pw_jointinfo.ISO_ID = pw_isoinfo.ISO_ID + LEFT JOIN BO_WeldReportMain ON BO_WeldReportMain.dreportid = pw_jointinfo.dreportid + WHERE pw_jointinfo.DReportID is not null + and (CONVERT(varchar(10), jot_welddate, 23) = CONVERT(varchar(10), GETDATE()-1, 23) ) AND + (pw_isoinfo.Is_Standard=@IsStandard OR @IsStandard IS NULL) + GROUP BY pw_isoinfo.WorkAreaId) AS finished_current_day_din ON finished_current_day_din.WorkAreaId = WorkArea.WorkAreaId +WHERE + (WorkArea.ProjectId=@projectId OR @projectId IS NULL ) AND + (WorkArea.WorkAreaId=@areano OR @AreaNo IS NULL ) AND + (WorkArea.InstallationId=@installationId OR @installationId IS NULL) +ORDER BY Unit.UnitCode ,Installation.InstallationCode + +GO + + + + diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 094b0d1..d7a88e2 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -6177,6 +6177,10 @@ namespace BLL #region 焊接报表 /// + /// 焊接统计分析表 + /// + public const string WeldingStatisticalMenuId = "0F3ECADA-F108-4C24-979C-67CA49E3726B"; + /// /// 单位工区进度分析 /// public const string UnitAreaAnalyzeMenuId = "66A76F90-96A7-4C1F-B8D9-125DDEACEF52"; diff --git a/SGGL/BLL/ProjectData/WorkAreaService.cs b/SGGL/BLL/ProjectData/WorkAreaService.cs index 53df7d6..761ca0d 100644 --- a/SGGL/BLL/ProjectData/WorkAreaService.cs +++ b/SGGL/BLL/ProjectData/WorkAreaService.cs @@ -39,6 +39,7 @@ namespace BLL WorkAreaCode = WorkArea.WorkAreaCode, WorkAreaName = WorkArea.WorkAreaName, Remark = WorkArea.Remark, + CompletionDate=WorkArea.CompletionDate, }; db.ProjectData_WorkArea.InsertOnSubmit(newWorkArea); @@ -61,6 +62,7 @@ namespace BLL newWorkArea.WorkAreaName = WorkArea.WorkAreaName; newWorkArea.InstallationId = WorkArea.InstallationId; newWorkArea.SupervisorUnitId = WorkArea.SupervisorUnitId; + newWorkArea.CompletionDate = WorkArea.CompletionDate; db.SubmitChanges(); } } diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 84192b7..65ac010 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1746,6 +1746,7 @@ + @@ -11839,6 +11840,13 @@ WelderPerformance.aspx + + WeldingStatistical.aspx + ASPXCodeBehind + + + WeldingStatistical.aspx + AccidentHandle.aspx ASPXCodeBehind @@ -19738,6 +19746,7 @@ +