diff --git a/DataBase/版本日志/SUBQHSE_V2026-03-11-xiaj.sql b/DataBase/版本日志/SUBQHSE_V2026-03-11-xiaj.sql index df77bc43..2a6ab548 100644 --- a/DataBase/版本日志/SUBQHSE_V2026-03-11-xiaj.sql +++ b/DataBase/版本日志/SUBQHSE_V2026-03-11-xiaj.sql @@ -1,5 +1,11 @@ - +--ֳֶΡ״̬ +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Administrative_CarManager' AND COLUMN_NAME = 'InOutState') +BEGIN + ALTER TABLE Administrative_CarManager ADD InOutState char(1); + EXEC sp_addextendedproperty 'MS_Description', N'״̬(0˳1ڳ)','SCHEMA', N'dbo','TABLE', N'Administrative_CarManager','COLUMN', N'InOutState' +END +GO IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'HSSEData_HSSE' AND COLUMN_NAME = 'LargerClosedNum') @@ -21,3 +27,151 @@ END GO + + +update Sys_Menu +set MenuName='ȫ',SortIndex=115 +where MenuName='Ϣ' and MenuId='66DFD649-FBC2-463F-BD1A-04095D713C8E' +GO + + +update Sys_Menu +set SortIndex=05 +where MenuId='16092FE7-938B-4713-8084-4FBFA030F386' +GO + + + +--ȫ +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '79116536-BE80-4323-A46F-10222601D5B5') +BEGIN +INSERT INTO dbo.Sys_Menu (MenuId, MenuName,Url, SortIndex, SuperMenu, MenuType, IsOffice, IsEnd, IsUsed) +VALUES (N'79116536-BE80-4323-A46F-10222601D5B5', N'', N'BaseInfo/ActivityType.aspx', 150, '8A2CEE72-2793-49C6-9E2E-E83B2676E2DD', 'Menu_SysSet', 1,1, 1); +END +-- +IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '79116536-BE80-4323-A46F-10222601D5B5') +BEGIN +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'475413A5-7551-4732-9603-6C8EAE5D69F5', N'79116536-BE80-4323-A46F-10222601D5B5', N'', 1); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'A8E7C65C-4BAC-48EC-B577-8626091334F2', N'79116536-BE80-4323-A46F-10222601D5B5', N'޸', 2); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'1CFD4BA8-3808-4CF0-8343-DA94457A5E7E', N'79116536-BE80-4323-A46F-10222601D5B5', N'ɾ', 3); +INSERT INTO [dbo].[Sys_ButtonToMenu] ([ButtonToMenuId], [MenuId], [ButtonName], [SortIndex]) +VALUES (N'CE1C1EFF-86A6-4DA5-85E0-3F1FC6A80821', N'79116536-BE80-4323-A46F-10222601D5B5', N'', 4); +END +GO + + + + +--ȫ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Base_ActivityType') AND type = N'U') +BEGIN +CREATE TABLE [dbo].[Base_ActivityType]( + [ActivityTypeId] [nvarchar](50) NOT NULL, + [ActivityTypeCode] [nvarchar](50) NULL, + [ActivityTypeName] [nvarchar](50) NULL, + [Remark] [nvarchar](500) NULL, + CONSTRAINT [PK_Base_ActivityType] PRIMARY KEY CLUSTERED +( + [ActivityTypeId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ActivityType', @level2type=N'COLUMN',@level2name=N'ActivityTypeId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ActivityType', @level2type=N'COLUMN',@level2name=N'ActivityTypeCode' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ActivityType', @level2type=N'COLUMN',@level2name=N'ActivityTypeName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ActivityType', @level2type=N'COLUMN',@level2name=N'Remark' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_ActivityType' +END + +GO + +--ʼȫ +IF NOT EXISTS (SELECT * FROM Base_ActivityType WHERE ActivityTypeId = 'b8fc5fc8-7a40-4f0b-acf3-cee5f79322ed') +BEGIN +INSERT [dbo].[Base_ActivityType] ([ActivityTypeId], [ActivityTypeCode], [ActivityTypeName], [Remark]) +VALUES (N'b8fc5fc8-7a40-4f0b-acf3-cee5f79322ed', N'001', N'', N'') +INSERT [dbo].[Base_ActivityType] ([ActivityTypeId], [ActivityTypeCode], [ActivityTypeName], [Remark]) +VALUES (N'734ab4ff-5ec0-4ee2-bafa-b46b984f57ba', N'002', N'ȫ»', N'') +INSERT [dbo].[Base_ActivityType] ([ActivityTypeId], [ActivityTypeCode], [ActivityTypeName], [Remark]) +VALUES (N'e00606a2-977f-40f7-9e13-5cb049927cae', N'003', N'ж', N'') +END +GO + + + + +--ȫid +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'InformationProject_PromotionalActivities' AND COLUMN_NAME = 'ActivityTypeId') +BEGIN + ALTER TABLE InformationProject_PromotionalActivities ADD ActivityTypeId nvarchar(50); + EXEC sp_addextendedproperty 'MS_Description', N'ȫ','SCHEMA', N'dbo','TABLE', N'InformationProject_PromotionalActivities','COLUMN', N'ActivityTypeId'; +END +GO + + +--Σ󹤳̷ֶΡ״̬ 0ˡ1С2ɡ +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Solution_LargerHazard' AND COLUMN_NAME = 'ApprovalState') +BEGIN + ALTER TABLE Solution_LargerHazard ADD ApprovalState char(1); + EXEC sp_addextendedproperty 'MS_Description', N'״̬(0ˡ1С2)','SCHEMA', N'dbo','TABLE', N'Solution_LargerHazard','COLUMN', N'ApprovalState' +END +GO + + +--Σ󹤳̷ʷݡ״̬߼ +--ҵ״̬Ϊδʼ״̬ĬΪˣҵ״̬Ϊҵк깤״̬ĬΪ +--update Solution_LargerHazard set ApprovalState='0' where ApprovalState is null and States = '1' +--GO +update Solution_LargerHazard set ApprovalState='2' where ApprovalState is null and States <>'0' +GO + + +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'HSSEData_HSSE' AND COLUMN_NAME = 'AwaitApprovalNum') +BEGIN + ALTER TABLE HSSEData_HSSE ADD AwaitApprovalNum int; + ALTER TABLE HSSEData_HSSE ADD PendingApprovalNum int; + ALTER TABLE HSSEData_HSSE ADD CompletedApprovalNum int; + ALTER TABLE HSSEData_HSSE ADD SuperAwaitApprovalNum int; + ALTER TABLE HSSEData_HSSE ADD SuperPendingApprovalNum int; + ALTER TABLE HSSEData_HSSE ADD SuperCompletedApprovalNum int; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳̴˸','SCHEMA', N'dbo','TABLE', N'HSSEData_HSSE','COLUMN', N'AwaitApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳и','SCHEMA', N'dbo','TABLE', N'HSSEData_HSSE','COLUMN', N'PendingApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳ɸ','SCHEMA', N'dbo','TABLE', N'HSSEData_HSSE','COLUMN', N'CompletedApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳̴˸','SCHEMA', N'dbo','TABLE', N'HSSEData_HSSE','COLUMN', N'SuperAwaitApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳и','SCHEMA', N'dbo','TABLE', N'HSSEData_HSSE','COLUMN', N'SuperPendingApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳ɸ','SCHEMA', N'dbo','TABLE', N'HSSEData_HSSE','COLUMN', N'SuperCompletedApprovalNum'; +END +GO + +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Project_HSSEData_HSSE' AND COLUMN_NAME = 'AwaitApprovalNum') +BEGIN + ALTER TABLE Project_HSSEData_HSSE ADD AwaitApprovalNum int; + ALTER TABLE Project_HSSEData_HSSE ADD PendingApprovalNum int; + ALTER TABLE Project_HSSEData_HSSE ADD CompletedApprovalNum int; + ALTER TABLE Project_HSSEData_HSSE ADD SuperAwaitApprovalNum int; + ALTER TABLE Project_HSSEData_HSSE ADD SuperPendingApprovalNum int; + ALTER TABLE Project_HSSEData_HSSE ADD SuperCompletedApprovalNum int; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳̴˸','SCHEMA', N'dbo','TABLE', N'Project_HSSEData_HSSE','COLUMN', N'AwaitApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳и','SCHEMA', N'dbo','TABLE', N'Project_HSSEData_HSSE','COLUMN', N'PendingApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳ɸ','SCHEMA', N'dbo','TABLE', N'Project_HSSEData_HSSE','COLUMN', N'CompletedApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳̴˸','SCHEMA', N'dbo','TABLE', N'Project_HSSEData_HSSE','COLUMN', N'SuperAwaitApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳и','SCHEMA', N'dbo','TABLE', N'Project_HSSEData_HSSE','COLUMN', N'SuperPendingApprovalNum'; + EXEC sp_addextendedproperty 'MS_Description', N'Σ󹤳ɸ','SCHEMA', N'dbo','TABLE', N'Project_HSSEData_HSSE','COLUMN', N'SuperCompletedApprovalNum'; +END +GO + + +--ȥҵĿ +ALTER TABLE [Supervise_UnitHazardRegister] +DROP CONSTRAINT [FK_UnitHazardRegister_Project]; +GO +--ҵ鲹ֶΡ鵥λ +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Supervise_UnitHazardRegister' AND COLUMN_NAME = 'InspectionUnit') +BEGIN + ALTER TABLE Supervise_UnitHazardRegister ADD InspectionUnit nvarchar(50); + EXEC sp_addextendedproperty 'MS_Description', N'鵥λ','SCHEMA', N'dbo','TABLE', N'Supervise_UnitHazardRegister','COLUMN', N'InspectionUnit' +END +GO + diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 5edb7082..175f3343 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -132,6 +132,7 @@ + diff --git a/SGGL/BLL/BaseInfo/ActivityTypeService.cs b/SGGL/BLL/BaseInfo/ActivityTypeService.cs new file mode 100644 index 00000000..936d59bf --- /dev/null +++ b/SGGL/BLL/BaseInfo/ActivityTypeService.cs @@ -0,0 +1,96 @@ +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 活动类型 + /// + public static class ActivityTypeService + { + /// + /// 根据主键获取活动类型 + /// + /// + /// + public static Model.Base_ActivityType GetActivityTypeById(string ActivityTypeId) + { + return Funs.DB.Base_ActivityType.FirstOrDefault(e => e.ActivityTypeId == ActivityTypeId); + } + + /// + /// 添加活动类型 + /// + /// + public static void AddActivityType(Model.Base_ActivityType ActivityType) + { + Model.Base_ActivityType newActivityType = new Model.Base_ActivityType + { + ActivityTypeId = ActivityType.ActivityTypeId, + ActivityTypeCode = ActivityType.ActivityTypeCode, + ActivityTypeName = ActivityType.ActivityTypeName, + Remark = ActivityType.Remark + }; + Funs.DB.Base_ActivityType.InsertOnSubmit(newActivityType); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改活动类型 + /// + /// + public static void UpdateActivityType(Model.Base_ActivityType ActivityType) + { + Model.Base_ActivityType newActivityType = Funs.DB.Base_ActivityType.FirstOrDefault(e => e.ActivityTypeId == ActivityType.ActivityTypeId); + if (newActivityType != null) + { + newActivityType.ActivityTypeCode = ActivityType.ActivityTypeCode; + newActivityType.ActivityTypeName = ActivityType.ActivityTypeName; + newActivityType.Remark = ActivityType.Remark; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 根据主键删除活动类型 + /// + /// + public static void DeleteActivityTypeById(string ActivityTypeId) + { + Model.Base_ActivityType ActivityType = Funs.DB.Base_ActivityType.FirstOrDefault(e => e.ActivityTypeId == ActivityTypeId); + if (ActivityType != null) + { + Funs.DB.Base_ActivityType.DeleteOnSubmit(ActivityType); + Funs.DB.SubmitChanges(); + } + } + + /// + ///获取活动类型下拉选择项 + /// + /// + public static List GetActivityTypeList() + { + return (from x in Funs.DB.Base_ActivityType orderby x.ActivityTypeCode select x).ToList(); + } + + #region 活动类型下拉框 + /// + /// 活动类型下拉框 + /// + /// 下拉框名字 + /// 是否显示请选择 + public static void InitActivityTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "ActivityTypeId"; + dropName.DataTextField = "ActivityTypeName"; + dropName.DataSource = GetActivityTypeList(); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + #endregion + } +} diff --git a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs index e821fcfa..3c7dee69 100644 --- a/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs +++ b/SGGL/BLL/CQMS/Comprehensive/MajorPlanApprovalService.cs @@ -225,6 +225,7 @@ namespace BLL States = majorPlanApproval.States, TrainPersonNum = majorPlanApproval.TrainPersonNum, OperativesNum = majorPlanApproval.OperativesNum, + ApprovalState = "2", IsSuperLargerHazard = majorPlanApproval.SchemeType == "超危大工程" ? true : false, }; @@ -252,6 +253,7 @@ namespace BLL newLargerHazard.States = majorPlanApproval.States; newLargerHazard.TrainPersonNum = majorPlanApproval.TrainPersonNum; newLargerHazard.OperativesNum = majorPlanApproval.OperativesNum; + newLargerHazard.ApprovalState = "2"; newLargerHazard.IsSuperLargerHazard = majorPlanApproval.SchemeType == "超危大工程" ? true : false; db.SubmitChanges(); } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 8ced9896..9fe42db7 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -1130,6 +1130,10 @@ namespace BLL /// 移交专业 /// public const string TransferMajorMenuId = "D0850615-BF32-4CFA-84CA-EEA261676EA8"; + /// + /// 活动类型 + /// + public const string ActivityTypeMenuId = "79116536-BE80-4323-A46F-10222601D5B5"; #endregion #region 质量基础信息 @@ -3197,6 +3201,11 @@ namespace BLL /// 专项检查明细导入模板 /// public const string CheckSpecialDetailTemplateUrl = "File\\Excel\\DataIn\\专项检查明细导入模板.xls"; + /// + /// 企业大检查明细导入模板 + /// + public const string UnitHazardRegisterDetailTemplateUrl = "File\\Excel\\DataIn\\企业大检查明细导入模板.xls"; + /// /// 综合检查导入模板 /// @@ -3457,6 +3466,11 @@ namespace BLL /// 资料收发文登记记录导入模板原始虚拟路径 /// public const string CQMS_DataReceivingDocTempUrl = "File\\Excel\\DataIn\\资料收发文登记记录导入模板.xls"; + /// + /// 现场车辆管理导入模板 + /// + public const string CarManagerTemplateUrl = "File\\Excel\\DataIn\\现场车辆管理导入模板.xls"; + /// /// 培训记录导入模板原始虚拟路径 diff --git a/SGGL/BLL/HSSE/Administrative/CarManagerService.cs b/SGGL/BLL/HSSE/Administrative/CarManagerService.cs index 2c5c7807..a92064cf 100644 --- a/SGGL/BLL/HSSE/Administrative/CarManagerService.cs +++ b/SGGL/BLL/HSSE/Administrative/CarManagerService.cs @@ -40,7 +40,8 @@ namespace BLL Remark = carManager.Remark, CompileMan = carManager.CompileMan, CompileDate = carManager.CompileDate, - States = carManager.States + States = carManager.States, + InOutState = carManager.InOutState, }; Funs.DB.Administrative_CarManager.InsertOnSubmit(newCarManager); Funs.DB.SubmitChanges(); @@ -66,7 +67,8 @@ namespace BLL newCarManager.Remark = carManager.Remark; newCarManager.CompileMan = carManager.CompileMan; newCarManager.CompileDate = carManager.CompileDate; - newCarManager.States = carManager.States; + newCarManager.States = carManager.States; + newCarManager.InOutState = carManager.InOutState; Funs.DB.SubmitChanges(); } } diff --git a/SGGL/BLL/HSSE/InformationProject/PromotionalActivitiesService.cs b/SGGL/BLL/HSSE/InformationProject/PromotionalActivitiesService.cs index 7edd1b4d..557fdbf2 100644 --- a/SGGL/BLL/HSSE/InformationProject/PromotionalActivitiesService.cs +++ b/SGGL/BLL/HSSE/InformationProject/PromotionalActivitiesService.cs @@ -64,7 +64,8 @@ namespace BLL AttachUrl = promotionalActivities.AttachUrl, CompileMan = promotionalActivities.CompileMan, CompileDate = System.DateTime.Now, - States = promotionalActivities.States + States = promotionalActivities.States, + ActivityTypeId = promotionalActivities.ActivityTypeId }; Funs.DB.InformationProject_PromotionalActivities.InsertOnSubmit(newPromotionalActivities); Funs.DB.SubmitChanges(); @@ -93,6 +94,7 @@ namespace BLL newPromotionalActivities.CompileMan = promotionalActivities.CompileMan; newPromotionalActivities.CompileDate = promotionalActivities.CompileDate; newPromotionalActivities.States = promotionalActivities.States; + newPromotionalActivities.ActivityTypeId = promotionalActivities.ActivityTypeId; Funs.DB.SubmitChanges(); } } diff --git a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs index d305c919..3db04d45 100644 --- a/SGGL/BLL/HSSE/Solution/LargerHazardService.cs +++ b/SGGL/BLL/HSSE/Solution/LargerHazardService.cs @@ -45,7 +45,8 @@ namespace BLL TrainPersonNum = largerHazard.TrainPersonNum, IsSuperLargerHazard = largerHazard.IsSuperLargerHazard, Descriptions = largerHazard.Descriptions, - OperativesNum = largerHazard.OperativesNum + OperativesNum = largerHazard.OperativesNum, + ApprovalState = largerHazard.ApprovalState, }; db.Solution_LargerHazard.InsertOnSubmit(newLargerHazard); @@ -88,7 +89,8 @@ namespace BLL newLargerHazard.IsSuperLargerHazard = largerHazard.IsSuperLargerHazard; newLargerHazard.Descriptions = largerHazard.Descriptions; newLargerHazard.IsUpdate = null; - newLargerHazard.OperativesNum = largerHazard.OperativesNum; + newLargerHazard.OperativesNum = largerHazard.OperativesNum; + newLargerHazard.ApprovalState = largerHazard.ApprovalState; db.SubmitChanges(); //判断是否有数据 有数据则更新 没有数据则添加 var majorPlanApproval = BLL.MajorPlanApprovalService.GetMajorPlanApprovalById(largerHazard.HazardId); diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index 06d3b907..1933990f 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -1519,6 +1519,40 @@ namespace BLL } } + /// + /// ݵλIdȡûѡλְԱ + /// + /// + public static List GetIsOfficeUserListByUnitId(string unitId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + List list = new List(); + list = (from x in db.Sys_User + where x.UnitId == unitId && x.IsOffice == true && x.IsPost == true + orderby x.UserName + select x).ToList(); + return list; + } + } + + /// + /// û + /// + /// + /// Ƿʾѡ + public static void InitIsOfficeUserUnitIdDropDownList(FineUIPro.DropDownList dropName, string unitId, bool isShowPlease) + { + dropName.DataValueField = "UserId"; + dropName.DataTextField = "UserName"; + dropName.DataSource = BLL.UserService.GetIsOfficeUserListByUnitId(unitId); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + /// /// û /// diff --git a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs index 595ef5b8..4530ff62 100644 --- a/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/HSSEData_HSSEService.cs @@ -122,6 +122,12 @@ namespace BLL SuperConstructionNum = newtable.SuperConstructionNum, SuperFinishedNum = newtable.SuperFinishedNum, SuperArgumentNum = newtable.SuperArgumentNum, + AwaitApprovalNum = newtable.AwaitApprovalNum, + PendingApprovalNum = newtable.PendingApprovalNum, + CompletedApprovalNum = newtable.CompletedApprovalNum, + SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum, + SuperPendingApprovalNum = newtable.SuperPendingApprovalNum, + SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum, State = newtable.State, CreateDate = newtable.CreateDate, CreateMan = newtable.CreateMan @@ -250,6 +256,12 @@ namespace BLL item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum; item.SuperOperativesNum = dataHsse.SuperOperativesNum; item.SuperArgumentNum = dataHsse.SuperArgumentNum; + item.AwaitApprovalNum = dataHsse.AwaitApprovalNum; + item.PendingApprovalNum = dataHsse.PendingApprovalNum; + item.CompletedApprovalNum = dataHsse.CompletedApprovalNum; + item.SuperAwaitApprovalNum = dataHsse.SuperAwaitApprovalNum; + item.SuperPendingApprovalNum = dataHsse.SuperPendingApprovalNum; + item.SuperCompletedApprovalNum = dataHsse.SuperCompletedApprovalNum; item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption; item.TotalWorkingHour = dataHsse.TotalWorkingHour; item.TrainPersonNum = dataHsse.TrainPersonNum; @@ -375,6 +387,12 @@ namespace BLL item.SuperArgumentNum = dataHsse.SuperArgumentNum; item.SuperTrainPersonNum = dataHsse.SuperTrainPersonNum; item.SuperOperativesNum = dataHsse.SuperOperativesNum; + item.AwaitApprovalNum = dataHsse.AwaitApprovalNum; + item.PendingApprovalNum = dataHsse.PendingApprovalNum; + item.CompletedApprovalNum = dataHsse.CompletedApprovalNum; + item.SuperAwaitApprovalNum = dataHsse.SuperAwaitApprovalNum; + item.SuperPendingApprovalNum = dataHsse.SuperPendingApprovalNum; + item.SuperCompletedApprovalNum = dataHsse.SuperCompletedApprovalNum; item.TotalEnergyConsumption = dataHsse.TotalEnergyConsumption; item.TotalWorkingHour = dataHsse.TotalWorkingHour; item.TrainPersonNum = dataHsse.TrainPersonNum; @@ -551,6 +569,12 @@ namespace BLL SuperTrainPersonNum = projectData.Sum(x => x.SuperTrainPersonNum), SuperConstructionNum = projectData.Sum(x => x.SuperConstructionNum), SuperFinishedNum = projectData.Sum(x => x.SuperFinishedNum), + AwaitApprovalNum = projectData.Sum(x => x.AwaitApprovalNum), + PendingApprovalNum = projectData.Sum(x => x.PendingApprovalNum), + CompletedApprovalNum = projectData.Sum(x => x.CompletedApprovalNum), + SuperAwaitApprovalNum = projectData.Sum(x => x.SuperAwaitApprovalNum), + SuperPendingApprovalNum = projectData.Sum(x => x.SuperPendingApprovalNum), + SuperCompletedApprovalNum = projectData.Sum(x => x.SuperCompletedApprovalNum), CreateMan = Const.sysglyId, CreateDate = DateTime.Now }; @@ -640,7 +664,7 @@ namespace BLL var licensesTask = HSSEData_HSSEService.GetLicensesAsync(); var licensesCloseTask = HSSEData_HSSEService.GetLicensesCloseAsync(); var generalHiddenRectificationOutputsTask = HSSEData_HSSEService.GetGeneralHiddenRectificationOutputsAsync(); - var largerHiddenRectificationOutputsTask = HSSEData_HSSEService.GetLargerHiddenRectificationOutputsAsync(); + var largerHiddenRectificationOutputsTask = HSSEData_HSSEService.GetLargerHiddenRectificationOutputsAsync(); var majorHiddenRectificationOutputsTask = HSSEData_HSSEService.GetMajorHiddenRectificationOutputsAsync(); // 等待所有异步方法执行完成 @@ -880,7 +904,13 @@ namespace BLL SuperOperativesNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperOperativesNum), SuperConstructionNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperConstructionNum), SuperFinishedNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperFinishedNum), - SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum) + SuperArgumentNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperArgumentNum), + AwaitApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.AwaitApprovalNum), + PendingApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.PendingApprovalNum), + CompletedApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.CompletedApprovalNum), + SuperAwaitApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperAwaitApprovalNum), + SuperPendingApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperPendingApprovalNum), + SuperCompletedApprovalNum = largeEngineeringOutputsTask.Result.Sum(x => x.SuperCompletedApprovalNum), }; #region 添加项目统计数据 @@ -936,7 +966,13 @@ namespace BLL SuperOperativesNum = g.Sum(x => x.SuperOperativesNum), SuperConstructionNum = g.Sum(x => x.SuperConstructionNum), SuperFinishedNum = g.Sum(x => x.SuperFinishedNum), - SuperArgumentNum = g.Sum(x => x.SuperArgumentNum) + SuperArgumentNum = g.Sum(x => x.SuperArgumentNum), + AwaitApprovalNum = g.Sum(x => x.AwaitApprovalNum), + PendingApprovalNum = g.Sum(x => x.PendingApprovalNum), + CompletedApprovalNum = g.Sum(x => x.CompletedApprovalNum), + SuperAwaitApprovalNum = g.Sum(x => x.SuperAwaitApprovalNum), + SuperPendingApprovalNum = g.Sum(x => x.SuperPendingApprovalNum), + SuperCompletedApprovalNum = g.Sum(x => x.SuperCompletedApprovalNum), } ); foreach (var projectid in BeUnderConstructionList) @@ -1041,7 +1077,13 @@ namespace BLL SuperOperativesNum = largeEngineeringOutputs?.SuperOperativesNum ?? 0, SuperConstructionNum = largeEngineeringOutputs?.SuperConstructionNum ?? 0, SuperFinishedNum = largeEngineeringOutputs?.SuperFinishedNum ?? 0, - SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0 + SuperArgumentNum = largeEngineeringOutputs?.SuperArgumentNum ?? 0, + AwaitApprovalNum = largeEngineeringOutputs?.AwaitApprovalNum ?? 0, + PendingApprovalNum = largeEngineeringOutputs?.PendingApprovalNum ?? 0, + CompletedApprovalNum = largeEngineeringOutputs?.CompletedApprovalNum ?? 0, + SuperAwaitApprovalNum = largeEngineeringOutputs?.SuperAwaitApprovalNum ?? 0, + SuperPendingApprovalNum = largeEngineeringOutputs?.SuperPendingApprovalNum ?? 0, + SuperCompletedApprovalNum = largeEngineeringOutputs?.SuperCompletedApprovalNum ?? 0, }; Project_HSSEData_HSSEService.AddProject_HSSEData_HSSE(projectHsseData); } @@ -1167,7 +1209,13 @@ namespace BLL table.SuperOperativesNum = newtable.SuperOperativesNum; table.SuperConstructionNum = newtable.SuperConstructionNum; table.SuperFinishedNum = newtable.SuperFinishedNum; - table.SuperArgumentNum = newtable.SuperArgumentNum; + table.SuperArgumentNum = newtable.SuperArgumentNum; + table.AwaitApprovalNum = newtable.AwaitApprovalNum; + table.PendingApprovalNum = newtable.PendingApprovalNum; + table.CompletedApprovalNum = newtable.CompletedApprovalNum; + table.SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum; + table.SuperPendingApprovalNum = newtable.SuperPendingApprovalNum; + table.SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum; table.State = newtable.State; table.CreateMan = newtable.CreateMan; table.CreateDate = newtable.CreateDate; @@ -4136,6 +4184,12 @@ namespace BLL SuperConstructionNum = gg.Count(x => x.States == "2" && x.IsSuperLargerHazard == true), SuperFinishedNum = gg.Count(x => x.States == "3" && x.IsSuperLargerHazard == true), SuperArgumentNum = gg.Count(x => x.IsArgument == true && x.IsSuperLargerHazard == true), + AwaitApprovalNum = gg.Count(x => x.ApprovalState == "0" && x.IsSuperLargerHazard == false), + PendingApprovalNum = gg.Count(x => x.ApprovalState == "1" && x.IsSuperLargerHazard == false), + CompletedApprovalNum = gg.Count(x => x.ApprovalState == "2" && x.IsSuperLargerHazard == false), + SuperAwaitApprovalNum = gg.Count(x => x.ApprovalState == "0" && x.IsSuperLargerHazard == true), + SuperPendingApprovalNum = gg.Count(x => x.ApprovalState == "1" && x.IsSuperLargerHazard == true), + SuperCompletedApprovalNum = gg.Count(x => x.ApprovalState == "2" && x.IsSuperLargerHazard == true), }).ToList(); return query; } @@ -4376,6 +4430,12 @@ namespace BLL x.SuperConstructionNum, x.SuperFinishedNum, x.SuperArgumentNum, + x.AwaitApprovalNum, + x.PendingApprovalNum, + x.CompletedApprovalNum, + x.SuperAwaitApprovalNum, + x.SuperPendingApprovalNum, + x.SuperCompletedApprovalNum, x.State, x.CreateDate, x.CreateMan diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs index ee6144d8..a4bee192 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs @@ -207,7 +207,13 @@ namespace BLL SuperOperativesNum = newtable.SuperOperativesNum, SuperConstructionNum = newtable.SuperConstructionNum, SuperFinishedNum = newtable.SuperFinishedNum, - SuperArgumentNum = newtable.SuperArgumentNum + SuperArgumentNum = newtable.SuperArgumentNum, + AwaitApprovalNum = newtable.AwaitApprovalNum, + PendingApprovalNum = newtable.PendingApprovalNum, + CompletedApprovalNum = newtable.CompletedApprovalNum, + SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum, + SuperPendingApprovalNum = newtable.SuperPendingApprovalNum, + SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum, }; db.Project_HSSEData_HSSE.InsertOnSubmit(table); db.SubmitChanges(); @@ -347,7 +353,15 @@ namespace BLL table.SuperTrainPersonNum = newtable.SuperTrainPersonNum; table.SuperOperativesNum = newtable.SuperOperativesNum; table.SuperConstructionNum = newtable.SuperConstructionNum; - table.SuperFinishedNum = newtable.SuperFinishedNum; + table.SuperFinishedNum = newtable.SuperFinishedNum; + table.ArgumentNum = newtable.ArgumentNum; + table.SuperArgumentNum = newtable.SuperArgumentNum; + table.AwaitApprovalNum = newtable.AwaitApprovalNum; + table.PendingApprovalNum = newtable.PendingApprovalNum; + table.CompletedApprovalNum = newtable.CompletedApprovalNum; + table.SuperAwaitApprovalNum = newtable.SuperAwaitApprovalNum; + table.SuperPendingApprovalNum = newtable.SuperPendingApprovalNum; + table.SuperCompletedApprovalNum = newtable.SuperCompletedApprovalNum; db.SubmitChanges(); } } @@ -623,7 +637,15 @@ namespace BLL table.SuperTrainPersonNum = GetSuperTrainPersonNum(projectid); table.SuperOperativesNum = GetSuperOperativesNum(projectid); table.SuperConstructionNum = GetSuperConstructionNum(projectid); - table.SuperFinishedNum = GetSuperFinishedNum(projectid); + table.SuperFinishedNum = GetSuperFinishedNum(projectid); + table.ArgumentNum = GetArgumentNum(projectid); + table.SuperArgumentNum = GetSuperArgumentNum(projectid); + table.AwaitApprovalNum = GetAwaitApprovalNum(projectid); + table.PendingApprovalNum = GetPendingApprovalNum(projectid); + table.CompletedApprovalNum = GetCompletedApprovalNum(projectid); + table.SuperAwaitApprovalNum = GetSuperAwaitApprovalNum(projectid); + table.SuperPendingApprovalNum = GetSuperPendingApprovalNum(projectid); + table.SuperCompletedApprovalNum = GetSuperCompletedApprovalNum(projectid); } if (IsReportByToday(projectid)) @@ -1589,6 +1611,106 @@ namespace BLL return result; } + /// + /// 获取危大工程论证个数 + /// + /// + public static int GetArgumentNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.IsArgument == true && x.IsSuperLargerHazard == false && + x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取超危大工程论证个数 + /// + /// + public static int GetSuperArgumentNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.IsArgument == true && x.IsSuperLargerHazard == true && + x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取危大工程待审核个数 + /// + /// + public static int GetAwaitApprovalNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.ApprovalState == "0" && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取超危大工程待审核个数 + /// + /// + public static int GetSuperAwaitApprovalNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.ApprovalState == "0" && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取危大工程审核中个数 + /// + /// + public static int GetPendingApprovalNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.ApprovalState == "1" && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取超危大工程审核中个数 + /// + /// + public static int GetSuperPendingApprovalNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.ApprovalState == "1" && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取危大工程已完成个数 + /// + /// + public static int GetCompletedApprovalNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.ApprovalState == "2" && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + /// + /// 获取超危大工程已完成个数 + /// + /// + public static int GetSuperCompletedApprovalNum(string projectid) + { + var result = (from x in Funs.DB.Solution_LargerHazard + where x.ProjectId == projectid && x.ApprovalState == "2" && x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime + select x).Count(); + return result; + } + + + /// /// 获取超危大工程审批完成数 /// @@ -1765,7 +1887,15 @@ namespace BLL x.SuperCompletedNum, x.SuperTrainPersonNum, x.SuperConstructionNum, - x.SuperFinishedNum + x.SuperFinishedNum, + x.ArgumentNum, + x.SuperArgumentNum, + x.AwaitApprovalNum, + x.PendingApprovalNum, + x.CompletedApprovalNum, + x.SuperAwaitApprovalNum, + x.SuperPendingApprovalNum, + x.SuperCompletedApprovalNum, }; } diff --git a/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx b/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx new file mode 100644 index 00000000..64d05c8c --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx @@ -0,0 +1,159 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ActivityType.aspx.cs" Inherits="FineUIPro.Web.BaseInfo.ActivityType" %> + + + + + + + 活动类型 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx.cs new file mode 100644 index 00000000..6e303c4a --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx.cs @@ -0,0 +1,277 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.BaseInfo +{ + public partial class ActivityType : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + ////权限按钮方法 + this.GetButtonPower(); + ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); + // 绑定表格 + BindGrid(); + } + } + + /// + /// 绑定数据 + /// + private void BindGrid() + { + var q = from x in Funs.DB.Base_ActivityType orderby x.ActivityTypeCode select x; + Grid1.RecordCount = q.Count(); + // 2.获取当前分页数据 + var table = GetPagedDataTable(Grid1.PageIndex, Grid1.PageSize); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 分页 + /// + /// + private List GetPagedDataTable(int pageIndex, int pageSize) + { + List source = (from x in BLL.Funs.DB.Base_ActivityType orderby x.ActivityTypeCode select x).ToList(); + List paged = new List(); + + int rowbegin = pageIndex * pageSize; + int rowend = (pageIndex + 1) * pageSize; + if (rowend > source.Count()) + { + rowend = source.Count(); + } + + for (int i = rowbegin; i < rowend; i++) + { + paged.Add(source[i]); + } + + return paged; + } + + /// + /// 过滤表头 + /// + /// + /// + protected void Grid1_FilterChange(object sender, EventArgs e) + { + BindGrid(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + Grid1.PageIndex = e.NewPageIndex; + BindGrid(); + } + #endregion + + #region 分页下拉选择 + /// + /// 分页下拉选择 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + Grid1.PageSize = Convert.ToInt32(ddlPageSize.SelectedValue); + BindGrid(); + } + #endregion + + #region 删除 + /// + /// 删除 + /// + /// + /// + protected void btnDelete_Click(object sender, EventArgs e) + { + var ActivityType = BLL.ActivityTypeService.GetActivityTypeById(hfFormID.Text); + if (ActivityType != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, ActivityType.ActivityTypeCode, ActivityType.ActivityTypeId, BLL.Const.ActivityTypeMenuId, BLL.Const.BtnDelete); + + BLL.ActivityTypeService.DeleteActivityTypeById(hfFormID.Text); + // 重新绑定表格,并模拟点击[新增按钮] + BindGrid(); + PageContext.RegisterStartupScript("onNewButtonClick();"); + } + } + + /// + /// 右键删除事件 + /// + /// + /// + protected void btnMenuDelete_Click(object sender, EventArgs e) + { + this.DeleteData(); + } + + /// + /// 删除方法 + /// + private void DeleteData() + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + var ActivityType = BLL.ActivityTypeService.GetActivityTypeById(rowID); + if (ActivityType != null) + { + BLL.LogService.AddSys_Log(this.CurrUser, ActivityType.ActivityTypeCode, ActivityType.ActivityTypeId, BLL.Const.ActivityTypeMenuId, BLL.Const.BtnDelete); + BLL.ActivityTypeService.DeleteActivityTypeById(rowID); + } + } + + BindGrid(); + PageContext.RegisterStartupScript("onNewButtonClick();"); + } + } + #endregion + + #region 编辑 + /// + /// 右键编辑事件 + /// + /// + /// + protected void btnMenuEdit_Click(object sender, EventArgs e) + { + this.EditData(); + } + + /// + /// 编辑数据方法 + /// + private void EditData() + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + string Id = Grid1.SelectedRowID; + var ActivityType = BLL.ActivityTypeService.GetActivityTypeById(Id); + if (ActivityType != null) + { + this.txtActivityTypeCode.Text = ActivityType.ActivityTypeCode; + this.txtActivityTypeName.Text = ActivityType.ActivityTypeName; + this.txtRemark.Text = ActivityType.Remark; + hfFormID.Text = Id; + this.btnDelete.Enabled = true; + } + } + #endregion + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + string strRowID = hfFormID.Text; + Model.Base_ActivityType ActivityType = new Model.Base_ActivityType + { + ActivityTypeCode = this.txtActivityTypeCode.Text.Trim(), + ActivityTypeName = this.txtActivityTypeName.Text.Trim(), + Remark = txtRemark.Text.Trim() + }; + if (string.IsNullOrEmpty(strRowID)) + { + ActivityType.ActivityTypeId = SQLHelper.GetNewID(typeof(Model.Base_ActivityType)); + BLL.ActivityTypeService.AddActivityType(ActivityType); + BLL.LogService.AddSys_Log(this.CurrUser, ActivityType.ActivityTypeCode, ActivityType.ActivityTypeId, BLL.Const.ActivityTypeMenuId, BLL.Const.BtnAdd); + } + else + { + ActivityType.ActivityTypeId = strRowID; + BLL.ActivityTypeService.UpdateActivityType(ActivityType); + BLL.LogService.AddSys_Log(this.CurrUser, ActivityType.ActivityTypeCode, ActivityType.ActivityTypeId, BLL.Const.ActivityTypeMenuId, BLL.Const.BtnModify); + } + this.SimpleForm1.Reset(); + // 重新绑定表格,并点击当前编辑或者新增的行 + BindGrid(); + PageContext.RegisterStartupScript(String.Format("F('{0}').selectRow('{1}');", Grid1.ClientID, ActivityType.ActivityTypeId)); + } + #endregion + + #region 验证费用类别名称、编号是否存在 + /// + /// 验证费用类别名称、编号是否存在 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + var q = Funs.DB.Base_ActivityType.FirstOrDefault(x => x.ActivityTypeCode == this.txtActivityTypeCode.Text.Trim() && (x.ActivityTypeId != hfFormID.Text || (hfFormID.Text == null && x.ActivityTypeId != null))); + if (q != null) + { + ShowNotify("输入的类别编号已存在!", MessageBoxIcon.Warning); + } + + var q2 = Funs.DB.Base_ActivityType.FirstOrDefault(x => x.ActivityTypeName == this.txtActivityTypeName.Text.Trim() && (x.ActivityTypeId != hfFormID.Text || (hfFormID.Text == null && x.ActivityTypeId != null))); + if (q2 != null) + { + ShowNotify("输入的类别名称已存在!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.ActivityTypeMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnAdd)) + { + this.btnNew.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnModify)) + { + this.btnMenuEdit.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnDelete)) + { + this.btnDelete.Hidden = false; + this.btnMenuDelete.Hidden = false; + } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnSave.Hidden = false; + } + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx.designer.cs new file mode 100644 index 00000000..bb0e3eb3 --- /dev/null +++ b/SGGL/FineUIPro.Web/BaseInfo/ActivityType.aspx.designer.cs @@ -0,0 +1,197 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.BaseInfo +{ + + + public partial class ActivityType + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.SimpleForm SimpleForm1; + + /// + /// hfFormID 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hfFormID; + + /// + /// txtActivityTypeCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtActivityTypeCode; + + /// + /// txtActivityTypeName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtActivityTypeName; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDelete; + + /// + /// ToolbarFill1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill1; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuEdit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuEdit; + + /// + /// btnMenuDelete 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDelete; + } +} diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/专项检查明细导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/专项检查明细导入模板.xls index 2d227a2f..e5d2a234 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/专项检查明细导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/专项检查明细导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/企业大检查明细导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/企业大检查明细导入模板.xls new file mode 100644 index 00000000..e4add055 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/企业大检查明细导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/现场车辆管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/现场车辆管理导入模板.xls new file mode 100644 index 00000000..5aa8c669 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/现场车辆管理导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 3e942c2d..4768a7d1 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -234,6 +234,7 @@ + @@ -965,6 +966,7 @@ + @@ -2426,6 +2428,7 @@ + @@ -6621,6 +6624,13 @@ AccidentType.aspx + + ActivityType.aspx + ASPXCodeBehind + + + ActivityType.aspx + BaseFactory.aspx ASPXCodeBehind @@ -11244,6 +11254,13 @@ CarManagerEdit.aspx + + CarManagerIn.aspx + ASPXCodeBehind + + + CarManagerIn.aspx + CarManagerView.aspx ASPXCodeBehind @@ -20260,6 +20277,13 @@ UnitHazardRegister.aspx + + UnitHazardRegisterDetailIn.aspx + ASPXCodeBehind + + + UnitHazardRegisterDetailIn.aspx + UnitHazardRegisterEdit.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HSSE/Administrative/CarManager.aspx b/SGGL/FineUIPro.Web/HSSE/Administrative/CarManager.aspx index 2717ad18..3d3b3e9a 100644 --- a/SGGL/FineUIPro.Web/HSSE/Administrative/CarManager.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Administrative/CarManager.aspx @@ -4,109 +4,126 @@ - + 现场车辆管理
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + +