diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-08-20-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-08-20-phf.sql new file mode 100644 index 00000000..f5292dd8 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-08-20-phf.sql @@ -0,0 +1,21 @@ +--±²˵ +insert into Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +values('9E4B28DF-8C8E-49F8-AB15-270BBDC73449','HSE±()','HSSE/Manager/ManagerMonthCNew.aspx',4,'03235B30-960D-4FCF-99F7-97773A2EE108','Menu_HSSE',0,1,1) +; +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('9C646F93-1748-44E7-83B9-392415442AD9','9E4B28DF-8C8E-49F8-AB15-270BBDC73449','',1); +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('BD82E934-B195-4A31-A357-DC2FBD3441EF','9E4B28DF-8C8E-49F8-AB15-270BBDC73449','޸',2); +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('6F77EA4D-1D58-4617-A07F-78F2DECF07BB','9E4B28DF-8C8E-49F8-AB15-270BBDC73449','ɾ',3); +insert into Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +values('63209F98-49D2-49BB-9FF7-46C5A6C9BD53','9E4B28DF-8C8E-49F8-AB15-270BBDC73449','',4); + +alter table Manager_MonthReportC +add StartDate datetime null; + +alter table Manager_MonthReportC +add EndDate datetime null; + +alter table Manager_MonthReportC +add TotalHseManhoursYear int null; \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_WH_V2024-08-21-phf.sql b/DataBase/版本日志/SGGLDB_WH_V2024-08-21-phf.sql new file mode 100644 index 00000000..f833e770 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2024-08-21-phf.sql @@ -0,0 +1,16 @@ + +--增加索引 +CREATE NONCLUSTERED INDEX [t_d_EmployInOutRecord_ProjectId_Index] +ON [dbo].[t_d_EmployInOutRecord] ([ProjectId]) +INCLUDE ([ManHours]); + +CREATE NONCLUSTERED INDEX [SitePerson_Person_Pid_Wid_IsUsed_Intime_Index] +ON [dbo].[SitePerson_Person] ([ProjectId],[WorkPostId],[IsUsed],[InTime],[OutTime]); + +CREATE NONCLUSTERED INDEX [Sys_CodeRecords_ProjectId_MenuId_Index] +ON [dbo].[Sys_CodeRecords] ([ProjectId],[MenuId]) +INCLUDE ([DataId],[UnitId],[CompileDate],[SortIndex],[RuleCodes],[Digit],[Code],[OwnerRuleCodes],[OwerDigit],[OwnerCode]); + +CREATE NONCLUSTERED INDEX [Sys_FlowOperate_OperaterId_IsClosed_Index] +ON [dbo].[Sys_FlowOperate] ([OperaterId],[IsClosed]) +INCLUDE ([DataId]); diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index e1e1433b..72881450 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -6061,5 +6061,10 @@ namespace BLL /// 检查表尾项管理 /// public const string InspectTailTerm = "B6A6EA7D-EDAB-40C8-920D-A106731D0E08"; + + /// + /// HSSE管理月报新 + /// + public const string ManagerMonthCNewMenuId = "9E4B28DF-8C8E-49F8-AB15-270BBDC73449"; } } \ No newline at end of file diff --git a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs index 157168e1..3d02faf6 100644 --- a/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs +++ b/SGGL/BLL/HSSE/EduTrain/EduTrain_TrainRecordService.cs @@ -159,5 +159,15 @@ namespace BLL { return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate >= startTime && x.TrainStartDate <= endTime && x.ProjectId == projectId select x.TrainPersonNum).Sum(); } + + public static List GetTrainingsByTrainDate(DateTime endTime, string projectId) + { + return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate <= endTime && x.ProjectId == projectId select x).ToList(); + } + + public static int? GetTrainPersonCount(DateTime endTime, string projectId) + { + return (from x in Funs.DB.EduTrain_TrainRecord where x.TrainStartDate <= endTime && x.ProjectId == projectId select x.TrainPersonNum).Sum(); + } } } diff --git a/SGGL/BLL/HSSE/Manager/ManagerMonthC/MonthReportCService.cs b/SGGL/BLL/HSSE/Manager/ManagerMonthC/MonthReportCService.cs index be75da67..0592fe71 100644 --- a/SGGL/BLL/HSSE/Manager/ManagerMonthC/MonthReportCService.cs +++ b/SGGL/BLL/HSSE/Manager/ManagerMonthC/MonthReportCService.cs @@ -227,6 +227,10 @@ namespace BLL Question = monthReport.Question, SubcontractManHours = monthReport.SubcontractManHours, AccidentDef = monthReport.AccidentDef, + + StartDate=monthReport.StartDate, + EndDate=monthReport.EndDate, + TotalHseManhoursYear = monthReport.TotalHseManhoursYear }; db.Manager_MonthReportC.InsertOnSubmit(newMonthReport); @@ -245,7 +249,7 @@ namespace BLL Model.Manager_MonthReportC newMonthReport = db.Manager_MonthReportC.First(e => e.MonthReportId == monthReport.MonthReportId); newMonthReport.MonthReportCode = monthReport.MonthReportCode; newMonthReport.ProjectId = monthReport.ProjectId; - newMonthReport.Months = monthReport.Months; + //newMonthReport.Months = monthReport.Months; newMonthReport.MonthReportDate = monthReport.MonthReportDate; newMonthReport.ReportMan = monthReport.ReportMan; newMonthReport.HseManhours = monthReport.HseManhours; @@ -298,6 +302,9 @@ namespace BLL newMonthReport.SubcontractManHours = monthReport.SubcontractManHours; newMonthReport.AccidentDef = monthReport.AccidentDef; + newMonthReport.StartDate = monthReport.StartDate; + newMonthReport.EndDate = monthReport.EndDate; + newMonthReport.TotalHseManhoursYear = monthReport.TotalHseManhoursYear; db.SubmitChanges(); } diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 7efa2411..29220861 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1195,6 +1195,8 @@ + + @@ -12782,6 +12784,20 @@ ManagerMonthC.aspx + + ManagerMonthCEdit.aspx + ASPXCodeBehind + + + ManagerMonthCEdit.aspx + + + ManagerMonthCNew.aspx + ASPXCodeBehind + + + ManagerMonthCNew.aspx + ManagerMonth_SeDin.aspx ASPXCodeBehind @@ -19216,7 +19232,7 @@ - + - + diff --git a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml index ae13b67f..4f1a95f9 100644 --- a/SGGL/FineUIPro.Web/common/Menu_HSSE.xml +++ b/SGGL/FineUIPro.Web/common/Menu_HSSE.xml @@ -1,167 +1,194 @@  - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/Model/HSSE/MonthReportCHSEDay.cs b/SGGL/Model/HSSE/MonthReportCHSEDay.cs index b27e6492..7e155e1a 100644 --- a/SGGL/Model/HSSE/MonthReportCHSEDay.cs +++ b/SGGL/Model/HSSE/MonthReportCHSEDay.cs @@ -81,5 +81,15 @@ namespace Model get; set; } + + /// + /// 年度累计安全人工时 + /// + public int TotalHseManhoursYear + { + get; + set; + } + } } diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 2c31023c..d5035afe 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -245071,6 +245071,12 @@ namespace Model private string _AccidentDef; + private System.Nullable _StartDate; + + private System.Nullable _EndDate; + + private System.Nullable _TotalHseManhoursYear; + private EntitySet _Manager_AccidentSortC; private EntitySet _Manager_CheckDetailSortC; @@ -245353,6 +245359,12 @@ namespace Model partial void OnPhotoContentsChanged(); partial void OnAccidentDefChanging(string value); partial void OnAccidentDefChanged(); + partial void OnStartDateChanging(System.Nullable value); + partial void OnStartDateChanged(); + partial void OnEndDateChanging(System.Nullable value); + partial void OnEndDateChanged(); + partial void OnTotalHseManhoursYearChanging(System.Nullable value); + partial void OnTotalHseManhoursYearChanged(); #endregion public Manager_MonthReportC() @@ -247369,6 +247381,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StartDate", DbType="DateTime")] + public System.Nullable StartDate + { + get + { + return this._StartDate; + } + set + { + if ((this._StartDate != value)) + { + this.OnStartDateChanging(value); + this.SendPropertyChanging(); + this._StartDate = value; + this.SendPropertyChanged("StartDate"); + this.OnStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_EndDate", DbType="DateTime")] + public System.Nullable EndDate + { + get + { + return this._EndDate; + } + set + { + if ((this._EndDate != value)) + { + this.OnEndDateChanging(value); + this.SendPropertyChanging(); + this._EndDate = value; + this.SendPropertyChanged("EndDate"); + this.OnEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_TotalHseManhoursYear", DbType="Int")] + public System.Nullable TotalHseManhoursYear + { + get + { + return this._TotalHseManhoursYear; + } + set + { + if ((this._TotalHseManhoursYear != value)) + { + this.OnTotalHseManhoursYearChanging(value); + this.SendPropertyChanging(); + this._TotalHseManhoursYear = value; + this.SendPropertyChanged("TotalHseManhoursYear"); + this.OnTotalHseManhoursYearChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Manager_AccidentCSort_Manager_MonthReport", Storage="_Manager_AccidentSortC", ThisKey="MonthReportId", OtherKey="MonthReportId", DeleteRule="NO ACTION")] public EntitySet Manager_AccidentSortC { @@ -404018,7 +404090,7 @@ namespace Model } } - [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkName", DbType="NVarChar(506)")] + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_UnitWorkName", DbType="NVarChar(500)")] public string UnitWorkName { get