From 5d3273f11904c2d00eb0e7dd3eb1f84c5ef61b15 Mon Sep 17 00:00:00 2001 From: xiaju <1784803958@qq.com> Date: Tue, 4 Mar 2025 18:12:07 +0800 Subject: [PATCH] =?UTF-8?q?=E8=87=AA=E4=B8=BB=E7=AE=A1=E7=90=86=E5=8A=A0?= =?UTF-8?q?=E5=88=86=E9=A1=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- DataBase/版本日志/SGGLDB_V2025-02-13-xiaj.sql | 193 ++-- .../SGGLDB_V2025-02-17-xiaj(岗位培训模块).sql | 7 - DataBase/版本日志/SGGLDB_V2025-02-25-xiaj.sql | 124 +++ .../APIBonusScoreSelfManagementService.cs | 342 +++++++ SGGL/BLL/API/HSSE/APITrainingTaskService.cs | 92 +- SGGL/BLL/BLL.csproj | 9 +- SGGL/BLL/CQMS/Check/CheckControlService.cs | 2 +- SGGL/BLL/Common/AttachFileService.cs | 54 + SGGL/BLL/Common/Const.cs | 36 +- SGGL/BLL/Common/Enums.cs | 63 ++ .../Check/Check_ProjectLeaderCheckService.cs | 4 + .../EduTrain/CompanyTrainingItemService.cs | 48 +- .../HSSE/EduTrain/TrainingPlanItemService.cs | 23 +- SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs | 226 ++++- SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs | 4 +- .../BehavioralSafetyObservationService.cs | 77 -- .../BonusScoreSelfManagementService.cs | 108 ++ .../BLL/HSSE/Examine/BonusScoreTypeService.cs | 115 +++ .../CoConstructionActivitiesService.cs | 77 -- ...rshipJoinHomeworkAnalysisMeetingService.cs | 77 -- .../PersonalSafetyActionPlanService.cs | 77 -- .../SharingOfSafetyExperienceService.cs | 77 -- .../HSSE_Hazard_HazardRegisterService.cs | 158 +-- SGGL/BLL/HSSE/SitePerson/PersonService.cs | 31 +- SGGL/BLL/SysManage/UserService.cs | 2 +- .../AttachFile/webuploader.aspx.cs | 4 + .../CQMS/Check/CheckFineListEdit.aspx.cs | 2 +- .../CQMS/Check/CheckList.aspx.cs | 2 +- .../CQMS/Check/ChecklistEdit.aspx.cs | 2 +- .../CQMS/Check/SpecialCheckList.aspx.cs | 2 +- SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 112 +-- .../MaterialManage/WelderMaterial.aspx.cs | 2 +- .../RepairManage/RepairManageEdit.aspx.cs | 4 +- .../TrustManage/TrustManageEditAdd.aspx.cs | 4 +- .../HJGL/TrustManage/TrustManageSet.aspx.cs | 4 +- .../HSSE/Check/ProjectLeaderCheckEdit.aspx | 12 +- .../HSSE/Check/ProjectLeaderCheckEdit.aspx.cs | 159 ++- .../ProjectLeaderCheckEdit.aspx.designer.cs | 67 +- .../EduTrain/CompanyTrainingItemSave.aspx | 6 + .../EduTrain/CompanyTrainingItemSave.aspx.cs | 8 +- .../CompanyTrainingItemSave.aspx.designer.cs | 9 + .../HSSE/EduTrain/PlanEdit.aspx.cs | 203 ++-- .../BehavioralSafetyObservation.aspx.cs | 306 ------ ...havioralSafetyObservation.aspx.designer.cs | 197 ---- .../BehavioralSafetyObservationEdit.aspx | 73 -- .../BehavioralSafetyObservationEdit.aspx.cs | 165 --- ...oralSafetyObservationEdit.aspx.designer.cs | 143 --- ...ion.aspx => BonusScoreSelfManagement.aspx} | 54 +- ...px.cs => BonusScoreSelfManagement.aspx.cs} | 39 +- ...BonusScoreSelfManagement.aspx.designer.cs} | 15 +- ...aspx => BonusScoreSelfManagementEdit.aspx} | 15 +- ...s => BonusScoreSelfManagementEdit.aspx.cs} | 70 +- ...sScoreSelfManagementEdit.aspx.designer.cs} | 19 +- ...etyExperience.aspx => BonusScoreType.aspx} | 51 +- ...ivities.aspx.cs => BonusScoreType.aspx.cs} | 34 +- ...ner.cs => BonusScoreType.aspx.designer.cs} | 24 +- ...ienceEdit.aspx => BonusScoreTypeEdit.aspx} | 34 +- .../HSSE/Examine/BonusScoreTypeEdit.aspx.cs | 137 +++ ...cs => BonusScoreTypeEdit.aspx.designer.cs} | 42 +- .../Examine/CoConstructionActivities.aspx | 153 --- .../CoConstructionActivitiesEdit.aspx.cs | 165 --- ...LeadershipJoinHomeworkAnalysisMeeting.aspx | 153 --- ...dershipJoinHomeworkAnalysisMeeting.aspx.cs | 306 ------ ...ershipJoinHomeworkAnalysisMeetingEdit.aspx | 73 -- ...hipJoinHomeworkAnalysisMeetingEdit.aspx.cs | 165 --- .../HSSE/Examine/OnePersonPerFile.aspx.cs | 2 +- .../Examine/PersonalSafetyActionPlan.aspx | 153 --- .../PersonalSafetyActionPlan.aspx.designer.cs | 197 ---- .../Examine/PersonalSafetyActionPlanEdit.aspx | 73 -- ...sonalSafetyActionPlanEdit.aspx.designer.cs | 143 --- .../Examine/SharingOfSafetyExperience.aspx.cs | 307 ------ ...SharingOfSafetyExperience.aspx.designer.cs | 197 ---- .../SharingOfSafetyExperienceEdit.aspx.cs | 165 --- ...ingOfSafetyExperienceEdit.aspx.designer.cs | 143 --- .../HiddenRectificationAdd.aspx | 192 ++-- .../HiddenRectificationAdd.aspx.cs | 164 ++- .../HiddenRectificationAdd.aspx.designer.cs | 17 +- .../HSSE/Manager/MonthReportBView.aspx | 2 +- .../HSSE/Manager/MonthReportBView.aspx.cs | 2 +- SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx | 4 +- .../HSSE/BonusScoreSelfManagementItem.cs | 105 ++ .../EduTrain/RetakeCourseProducePlanInfo.cs | 38 + .../PostTraining/PostTrainingStandardInfo.cs | 3 +- SGGL/Model/Model.cs | 947 ++++++++++++++++++ SGGL/Model/Model.csproj | 2 + .../Controllers/CQMS/CheckListController.cs | 2 +- .../Controllers/CQMS/CommenInfoController.cs | 6 +- .../HJGL/ElectrodeRecoveryController.cs | 2 +- .../BonusScoreSelfManagementController.cs | 212 ++++ SGGL/WebAPI/Controllers/UserController.cs | 46 +- SGGL/WebAPI/Filter/TestPermissionAttribute.cs | 55 +- SGGL/WebAPI/WebAPI.csproj | 1 + 92 files changed, 3646 insertions(+), 4595 deletions(-) create mode 100644 DataBase/版本日志/SGGLDB_V2025-02-25-xiaj.sql create mode 100644 SGGL/BLL/API/HSSE/APIBonusScoreSelfManagementService.cs create mode 100644 SGGL/BLL/Common/Enums.cs delete mode 100644 SGGL/BLL/HSSE/Examine/BehavioralSafetyObservationService.cs create mode 100644 SGGL/BLL/HSSE/Examine/BonusScoreSelfManagementService.cs create mode 100644 SGGL/BLL/HSSE/Examine/BonusScoreTypeService.cs delete mode 100644 SGGL/BLL/HSSE/Examine/CoConstructionActivitiesService.cs delete mode 100644 SGGL/BLL/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingService.cs delete mode 100644 SGGL/BLL/HSSE/Examine/PersonalSafetyActionPlanService.cs delete mode 100644 SGGL/BLL/HSSE/Examine/SharingOfSafetyExperienceService.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.designer.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.designer.cs rename SGGL/FineUIPro.Web/HSSE/Examine/{BehavioralSafetyObservation.aspx => BonusScoreSelfManagement.aspx} (80%) rename SGGL/FineUIPro.Web/HSSE/Examine/{PersonalSafetyActionPlan.aspx.cs => BonusScoreSelfManagement.aspx.cs} (84%) rename SGGL/FineUIPro.Web/HSSE/Examine/{LeadershipJoinHomeworkAnalysisMeeting.aspx.designer.cs => BonusScoreSelfManagement.aspx.designer.cs} (93%) rename SGGL/FineUIPro.Web/HSSE/Examine/{CoConstructionActivitiesEdit.aspx => BonusScoreSelfManagementEdit.aspx} (75%) rename SGGL/FineUIPro.Web/HSSE/Examine/{PersonalSafetyActionPlanEdit.aspx.cs => BonusScoreSelfManagementEdit.aspx.cs} (59%) rename SGGL/FineUIPro.Web/HSSE/Examine/{LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.designer.cs => BonusScoreSelfManagementEdit.aspx.designer.cs} (89%) rename SGGL/FineUIPro.Web/HSSE/Examine/{SharingOfSafetyExperience.aspx => BonusScoreType.aspx} (71%) rename SGGL/FineUIPro.Web/HSSE/Examine/{CoConstructionActivities.aspx.cs => BonusScoreType.aspx.cs} (84%) rename SGGL/FineUIPro.Web/HSSE/Examine/{CoConstructionActivities.aspx.designer.cs => BonusScoreType.aspx.designer.cs} (88%) rename SGGL/FineUIPro.Web/HSSE/Examine/{SharingOfSafetyExperienceEdit.aspx => BonusScoreTypeEdit.aspx} (59%) create mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/BonusScoreTypeEdit.aspx.cs rename SGGL/FineUIPro.Web/HSSE/Examine/{CoConstructionActivitiesEdit.aspx.designer.cs => BonusScoreTypeEdit.aspx.designer.cs} (71%) delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/CoConstructionActivities.aspx delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/CoConstructionActivitiesEdit.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx.designer.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx.designer.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.designer.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.cs delete mode 100644 SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.designer.cs create mode 100644 SGGL/Model/APIItem/HSSE/BonusScoreSelfManagementItem.cs create mode 100644 SGGL/Model/HSSE/EduTrain/RetakeCourseProducePlanInfo.cs create mode 100644 SGGL/WebAPI/Controllers/HSSE/BonusScoreSelfManagementController.cs diff --git a/DataBase/版本日志/SGGLDB_V2025-02-13-xiaj.sql b/DataBase/版本日志/SGGLDB_V2025-02-13-xiaj.sql index c93349cf..1e606ee0 100644 --- a/DataBase/版本日志/SGGLDB_V2025-02-13-xiaj.sql +++ b/DataBase/版本日志/SGGLDB_V2025-02-13-xiaj.sql @@ -4,7 +4,7 @@ --1Ŀزֲ˵ update Sys_Menu set IsUsed=0 -where MenuType='Menu_ProjectSet' and MenuName in ('Ŀſ','Ŀ','λ','Ŀ״̬','Ŀ') +where MenuType='Menu_ProjectSet' and MenuName in ('Ŀſ','Ŀ','Ŀ״̬','Ŀ') --2ĿԱԭȫزֲ˵ update Sys_Menu @@ -28,7 +28,7 @@ END GO --HSEЧ -IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '7DD00BEF-821D-4996-ADF8-695139F201B4') +IF NOT EXISTS (SELECT * FROM Sys_Menu WHERE MenuId = '9667D2CB-8AAE-4799-8C94-A051F9846ECE') BEGIN --һһ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) @@ -39,22 +39,18 @@ BEGIN --˿۷ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) VALUES('0BCE76EA-319F-47BF-913A-A32735641F5C','˿۷','HSSE/Examine/MinusScoreSituation.aspx',2,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) - --˰ȫжƻ + --ӷ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) - VALUES('7DD00BEF-821D-4996-ADF8-695139F201B4','˰ȫжƻ','HSSE/Examine/PersonalSafetyActionPlan.aspx',10,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) - --ȫ + VALUES('9667D2CB-8AAE-4799-8C94-A051F9846ECE','ӷ','HSSE/Examine/BonusScoreSelfManagement.aspx',3,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) + --ӷ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) - VALUES('D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','ȫ','HSSE/Examine/SharingOfSafetyExperience.aspx',20,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) - --쵼ԱμӰҵ - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) - VALUES('05F4AC73-1BA2-4FF2-AAED-292DF5E44412','쵼ԱμӰҵ','HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx',30,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) - --һߵԱϵ鹲 - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) - VALUES('D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','һߵԱϵ鹲','HSSE/Examine/CoConstructionActivities.aspx',40,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) - --Ϊȫ۲빵ͨ - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsEnd,IsUsed) - VALUES('5049BB69-A75F-47D4-ABF3-DAA719D05C74','Ϊȫ۲빵ͨ','HSSE/Examine/BehavioralSafetyObservation.aspx',50,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) + VALUES('8526FC57-F2A8-483F-A7EF-724785B9B676','ӷ','HSSE/Examine/BonusScoreType.aspx',100,'89451997-E575-4845-BF8A-444E9CA6A962','Menu_HSSE',1,1) END +GO +DELETE FROM Sys_Menu WHERE MenuId in( '5049BB69-A75F-47D4-ABF3-DAA719D05C74','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','7DD00BEF-821D-4996-ADF8-695139F201B4','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F') + +DELETE FROM Sys_ButtonToMenu WHERE MenuId in( '5049BB69-A75F-47D4-ABF3-DAA719D05C74','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','7DD00BEF-821D-4996-ADF8-695139F201B4','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F') + GO IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'AE58F042-DDAA-4980-A3E8-9A1F36349E45') BEGIN @@ -82,6 +78,32 @@ BEGIN VALUES('DCE4B049-B421-4C32-AA2A-2A4E099E1441','6957A732-BA33-499E-AB32-DB1F73BEA8CE','',4) END GO +IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '8526FC57-F2A8-483F-A7EF-724785B9B676') +BEGIN + --ӷ + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('186FB2FE-E5DC-4DE6-AE85-82601C6CD128','8526FC57-F2A8-483F-A7EF-724785B9B676','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('D75AB4D5-D8E0-43FB-A4C2-3E28E52640A3','8526FC57-F2A8-483F-A7EF-724785B9B676','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('4D8357DA-3875-4EAB-96E7-80874E2C9E72','8526FC57-F2A8-483F-A7EF-724785B9B676','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('74DF5644-CD71-46AF-8E17-EE7BD8A2E579','8526FC57-F2A8-483F-A7EF-724785B9B676','',4) +END +GO +IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '9667D2CB-8AAE-4799-8C94-A051F9846ECE') +BEGIN + --ӷ + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('000A444E-33C0-486D-8AE9-83312C8FD7B6','9667D2CB-8AAE-4799-8C94-A051F9846ECE','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('37DF7EAC-51A0-48F0-8706-7B7F4F42BC5E','9667D2CB-8AAE-4799-8C94-A051F9846ECE','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('43280BEC-8DD0-45A2-AC79-0454E17A795E','9667D2CB-8AAE-4799-8C94-A051F9846ECE','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('AEDA614E-4A1F-48B8-86AE-69A8C5190BE5','9667D2CB-8AAE-4799-8C94-A051F9846ECE','',4) +END +GO IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '0BCE76EA-319F-47BF-913A-A32735641F5C') BEGIN --˿۷ @@ -95,72 +117,6 @@ BEGIN VALUES('E1FA46F3-16AD-4490-88AD-78CEF5C6EEB5','0BCE76EA-319F-47BF-913A-A32735641F5C','',4) END GO -IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '7DD00BEF-821D-4996-ADF8-695139F201B4') -BEGIN - --˰ȫжƻ - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('2BF3A978-509B-4B1D-B753-44CD8022306E','7DD00BEF-821D-4996-ADF8-695139F201B4','',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('3998D101-3D6C-4E2B-9A3E-D017C3AA6ECE','7DD00BEF-821D-4996-ADF8-695139F201B4','޸',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('7C4F9425-CB92-4CCE-9D0E-06704FDC0143','7DD00BEF-821D-4996-ADF8-695139F201B4','ɾ',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('5DE92E82-AD0A-4AF9-8C95-B95D4EA76EE9','7DD00BEF-821D-4996-ADF8-695139F201B4','',4) -END -GO - -IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D5FC7B12-0E81-482C-8B29-A9F43DF05D1F') -BEGIN - --ȫ - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('CBFABD5C-B06F-46F2-A16C-77D786842CCE','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('EE65207D-0B5A-436B-9E05-9E3C83A7534B','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','޸',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('ABCA59A7-EF1B-4048-B49F-DDB9E6EDB6B1','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','ɾ',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('35C610A1-14C8-4EF7-AFC9-0AD6F3E9681C','D5FC7B12-0E81-482C-8B29-A9F43DF05D1F','',4) -END -GO -IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '05F4AC73-1BA2-4FF2-AAED-292DF5E44412') -BEGIN - --쵼ԱμӰҵ - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('E3B77A21-145E-4D49-8717-CE3E01520C82','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('A8DA2937-3EA0-4614-BAF1-2A33D2B75D0A','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','޸',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('2E75AB23-2803-4443-8D32-3496637DFAC1','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','ɾ',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('5CA1D1DB-9277-4935-8B75-2B2D35EEACA3','05F4AC73-1BA2-4FF2-AAED-292DF5E44412','',4) -END -GO -IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = 'D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E') -BEGIN - --һߵԱϵ鹲 - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('00563682-98B7-4A1C-A350-1F8DB70D617F','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('01DE53E4-6F14-404F-9640-D3E3A9CA04EB','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','޸',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('FFEC663E-A4B6-46E4-A828-B1385BDB63C3','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','ɾ',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('11B87F2F-B1FA-455F-860B-C959C9C1AAC4','D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E','',4) -END -GO -IF NOT EXISTS (SELECT * FROM Sys_ButtonToMenu WHERE MenuId = '5049BB69-A75F-47D4-ABF3-DAA719D05C74') -BEGIN - --Ϊȫ۲빵ͨ - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('EB59D454-196F-4E25-9100-9008755A2B6C','5049BB69-A75F-47D4-ABF3-DAA719D05C74','',1) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('42E7228B-E763-4A4D-AEC0-0CD4295173DC','5049BB69-A75F-47D4-ABF3-DAA719D05C74','޸',2) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('BBA6B3D1-27BD-4FFA-9385-0AB018CCFB85','5049BB69-A75F-47D4-ABF3-DAA719D05C74','ɾ',3) - INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) - VALUES('D0E6A314-D55D-4C1E-AA45-F77E05841008','5049BB69-A75F-47D4-ABF3-DAA719D05C74','',4) -END -GO /**************************************ݱ***************************************************************/ @@ -218,6 +174,81 @@ END GO +--ӷ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_BonusScoreSelfManagement') AND type = N'U') +BEGIN + +CREATE TABLE [dbo].[Examine_BonusScoreSelfManagement]( + [Id] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [Code] [nvarchar](50) NULL, + [Name] [nvarchar](200) NULL, + [BonusScoreTypeId] [nvarchar](50) NULL, + [BonusScoreTypeName] [nvarchar](100) NOT NULL, + [Score] [int] NOT NULL, + [PersonId] [nvarchar](50) NULL, + [Content] [nvarchar](1000) NULL, + [Remark] [nvarchar](1000) NULL, + [CompileDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Examine_BonusScoreSelfManagement] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] CHECK CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Base_Project] +ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +ALTER TABLE [dbo].[Examine_BonusScoreSelfManagement] CHECK CONSTRAINT [FK_Examine_BonusScoreSelfManagement_Sys_User] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Id' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'ProjectId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Code' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Name' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӷId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'BonusScoreTypeId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӷ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'BonusScoreTypeName' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Score' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Աid' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'PersonId' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'Content' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @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'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'CompileMan' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement', @level2type=N'COLUMN',@level2name=N'CompileDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӷ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreSelfManagement' +END + +GO + +--ӷ +IF NOT EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'Examine_BonusScoreType') AND type = N'U') +BEGIN + +CREATE TABLE [dbo].[Examine_BonusScoreType]( + [Id] [nvarchar](50) NOT NULL, + [Code] [nvarchar](50) NULL, + [Name] [nvarchar](200) NULL, + [Score] [int] NOT NULL, + [Remark] [nvarchar](1000) NULL, + [CompileDate] [datetime] NULL, + [CompileMan] [nvarchar](50) NULL, + CONSTRAINT [PK_Examine_BonusScoreType] PRIMARY KEY CLUSTERED +( + [Id] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] +ALTER TABLE [dbo].[Examine_BonusScoreType] WITH CHECK ADD CONSTRAINT [FK_Examine_BonusScoreType_Sys_User] FOREIGN KEY([CompileMan]) +REFERENCES [dbo].[Sys_User] ([UserId]) +ALTER TABLE [dbo].[Examine_BonusScoreType] CHECK CONSTRAINT [FK_Examine_BonusScoreType_Sys_User] +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Id' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Code' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Name' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ֵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'Score' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @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'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'CompileMan' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType', @level2type=N'COLUMN',@level2name=N'CompileDate' +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ӷ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Examine_BonusScoreType' +END + --˿۷ diff --git a/DataBase/版本日志/SGGLDB_V2025-02-17-xiaj(岗位培训模块).sql b/DataBase/版本日志/SGGLDB_V2025-02-17-xiaj(岗位培训模块).sql index 5a313601..9a37d09d 100644 --- a/DataBase/版本日志/SGGLDB_V2025-02-17-xiaj(岗位培训模块).sql +++ b/DataBase/版本日志/SGGLDB_V2025-02-17-xiaj(岗位培训模块).sql @@ -1,11 +1,4 @@ ---1˾ѵ̲IJøλ -IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Training_CompanyTrainingItem' AND COLUMN_NAME = 'WorkPostNames') -BEGIN - ALTER TABLE Training_CompanyTrainingItem ADD WorkPostNames nvarchar(max); - ALTER TABLE Training_CompanyTrainingItem ALTER COLUMN WorkPostIds nvarchar(max); -END -GO --λѵ diff --git a/DataBase/版本日志/SGGLDB_V2025-02-25-xiaj.sql b/DataBase/版本日志/SGGLDB_V2025-02-25-xiaj.sql new file mode 100644 index 00000000..2f6704be --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2025-02-25-xiaj.sql @@ -0,0 +1,124 @@ + + +--1˾ѵ̲IJøλ̶ +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Training_CompanyTrainingItem' AND COLUMN_NAME = 'WorkPostNames') +BEGIN + ALTER TABLE Training_CompanyTrainingItem ADD WorkPostNames nvarchar(max); + ALTER TABLE Training_CompanyTrainingItem ALTER COLUMN WorkPostIds nvarchar(max); + ALTER TABLE Training_CompanyTrainingItem ADD Outcome INT DEFAULT(0) ; +END +GO +ALTER TABLE Training_CompanyTrainingItem +DROP COLUMN Effect; + +--2HSEճѲ첹޽̲Id +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'HSSE_Hazard_HazardRegister' AND COLUMN_NAME = 'CompanyTrainingItemId') +BEGIN + ALTER TABLE HSSE_Hazard_HazardRegister ADD CompanyTrainingItemId nvarchar(50); +END +GO +--3HSE쵼鲹ˡ޽̲Id +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Check_ProjectLeaderCheck' AND COLUMN_NAME = 'CompanyTrainingItemId') +BEGIN + ALTER TABLE Check_ProjectLeaderCheck ADD ResponsibleMan nvarchar(50); + ALTER TABLE Check_ProjectLeaderCheck ADD CompanyTrainingItemId nvarchar(50); +END +GO + +--5ѵƻǷѵ𡢼¼Id +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Training_Plan' AND COLUMN_NAME = 'IsRetakeCourse') +BEGIN + --Ƿѵ + ALTER TABLE Training_Plan ADD IsRetakeCourse INT DEFAULT(0) ; + -- + ALTER TABLE Training_Plan ADD CheckType nvarchar(50) ; + --¼Id + ALTER TABLE Training_Plan ADD CheckId nvarchar(50) ; +END +GO + + +/****** Object: View [dbo].[View_Hazard_HazardRegister] Script Date: 2025-2-25 18:12:14 ******/ +SET ANSI_NULLS ON +GO + +SET QUOTED_IDENTIFIER ON +GO + +ALTER VIEW [dbo].[View_Hazard_HazardRegister] AS SELECT Registration.HazardRegisterId, + Registration.HazardCode, + Registration.RegisterDate, + Registration.RegisterDef, + Registration.Rectification, + Registration.Place, + Registration.ResponsibleUnit, + Registration.Observer, + Registration.Risk_Level, + Registration.RectifiedDate, + Registration.ProjectId, + Project.UnitId AS PUnitId, + ProjectUnit.UnitName AS PUnitName, + Registration.states, + Registration.IsEffective, + Registration.ResponsibleMan, + Registration.CheckManId, + Registration.CheckTime, + Registration.RectificationPeriod, + Registration.ImageUrl, + Registration.RectificationImageUrl, + Registration.RectificationTime, + Registration.ConfirmMan, + Registration.ConfirmDate, + Registration.HandleIdea, + Registration.CutPayment, + Registration.ProblemTypes, + Registration.CheckSpecialId, + Registration.CheckItemDetailId, + Registration.SupCheckItemSetId, + Registration.CheckItemSetId, + Registration.SafeSupervisionId, + Registration.SafeSupervisionIsOK, + Project.ProjectName, + Registration.CheckCycle, + ISNULL(WorkArea.UnitWorkName,'') AS WorkAreaName, + Unit.UnitName as ResponsibilityUnitName, + User1.UserName AS ResponsibilityManName, + User1.UserId AS ResponsibilityManId, + ISNULL(User1.Telephone,'') AS ResponsibilityManTel, + User2.UserName AS CheckManName, + ISNULL(User2.Telephone,'') AS CheckManTel, + User2.UnitId AS SendUnitId, + User3.UserName AS ConfirmManName, + ISNULL(User3.Telephone,'') AS ConfirmManTel, + User4.UserName AS ResponsibilityManName2, + ISNULL(User4.Telephone,'') AS ResponsibilityMan2Tel, + (CASE WHEN Registration.states='1' and (Registration.SafeSupervisionIsOK is null OR Registration.SafeSupervisionIsOK=0) THEN '' + WHEN Registration.states='1' and Registration.SafeSupervisionIsOK=1 THEN 'ϸ' + WHEN Registration.states='2' THEN '-' + WHEN Registration.states='3' THEN 'ѱջ' + ELSE '' END ) AS StatesStr, + RegisterTypes.RegisterTypesId, + RegisterTypes.RegisterTypesName, + Registration.DIC_ID, + Registration.CCManIds, + CCManNames = STUFF(( SELECT ',' + UserName FROM Sys_User + where PATINDEX('%,' + RTRIM(Sys_User.UserId) + ',%',',' + Registration.CCManIds + ',')>0 + ORDER BY PATINDEX('%,' + RTRIM(Registration.CCManIds) + ',%',',' + Registration.CCManIds + ',') + FOR XML PATH('')), 1, 1,''), + Registration.Requirements, + Registration.CompanyTrainingItemId +FROM dbo.HSSE_Hazard_HazardRegister AS Registration +LEFT JOIN dbo.Base_Project AS Project ON Project.ProjectId = Registration.ProjectId +LEFT JOIN dbo.Base_Unit AS ProjectUnit ON Project.UnitId = ProjectUnit.UnitId +LEFT JOIN dbo.WBS_UnitWork AS WorkArea ON WorkArea.UnitWorkId = Registration.Place +LEFT JOIN dbo.HSSE_Hazard_HazardRegisterTypes AS RegisterTypes ON RegisterTypes.RegisterTypesId = Registration.RegisterTypesId +LEFT JOIN dbo.Base_Unit AS Unit ON Unit.UnitId = Registration.ResponsibleUnit +LEFT JOIN dbo.Sys_User AS User1 ON User1.UserId = Registration.ResponsibleMan +LEFT JOIN dbo.Sys_User AS User2 ON User2.UserId = Registration.CheckManId +LEFT JOIN dbo.Sys_User AS User3 ON User3.UserId = Registration.ConfirmMan +LEFT JOIN dbo.Sys_User AS User4 ON User4.UserId = Registration.ResponsibleMan2 + + +GO + + diff --git a/SGGL/BLL/API/HSSE/APIBonusScoreSelfManagementService.cs b/SGGL/BLL/API/HSSE/APIBonusScoreSelfManagementService.cs new file mode 100644 index 00000000..d9cbd896 --- /dev/null +++ b/SGGL/BLL/API/HSSE/APIBonusScoreSelfManagementService.cs @@ -0,0 +1,342 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Text; +using System.Threading.Tasks; +using EmitMapper; +using EmitMapper.MappingConfiguration; + +namespace BLL +{ + /// + /// 自主管理加分项 + /// + public static class APIBonusScoreSelfManagementService + { + #region 根据projectId、trainTypeId、TrainStates获取培训计划列表 + /// + /// 根据projectId、trainTypeId、TrainStates获取培训计划列表 + /// + /// + /// + public static List getTrainingPlanListByProjectIdTrainTypeIdTrainStates(string projectId, string trainTypeId, string states) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = (from x in db.Training_Plan + where x.ProjectId == projectId && (x.States == states || states == null) && x.TrainTypeId == trainTypeId + orderby x.TrainStartDate descending + select new Model.TrainingPlanItem + { + PlanId = x.PlanId, + PlanCode = x.PlanCode, + PlanName = x.PlanName, + ProjectId = x.ProjectId, + TrainTypeId = x.TrainTypeId, + TrainTypeName = db.Base_TrainType.First(y => y.TrainTypeId == x.TrainTypeId).TrainTypeName, + TrainLevelId = x.TrainLevelId, + TrainLevelName = db.Base_TrainLevel.First(y => y.TrainLevelId == x.TrainLevelId).TrainLevelName, + DesignerName = db.Sys_User.First(y => y.UserId == x.DesignerId).UserName, + DesignerId = x.DesignerId, + DesignerDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.DesignerDate), + TeachHour = x.TeachHour ?? 0, + TeachAddress = x.TeachAddress, + TeachMan = x.TeachMan, + TrainStartDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate), + States = x.States, + QRCodeUrl = x.QRCodeUrl.Replace('\\', '/'), + }).ToList(); + return getDataLists; + } + } + #endregion + + #region 根据培训ID获取培训计划详细 + /// + /// 根据培训ID获取培训计划详细 + /// + /// + /// + public static Model.TrainingPlanItem getTrainingPlanByTrainingId(string planId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = from x in db.Training_Plan + where x.PlanId == planId + select new Model.TrainingPlanItem + { + PlanId = x.PlanId, + PlanCode = x.PlanCode, + PlanName = x.PlanName, + ProjectId = x.ProjectId, + TrainTypeId = x.TrainTypeId, + TrainTypeName = db.Base_TrainType.First(y => y.TrainTypeId == x.TrainTypeId).TrainTypeName, + TrainLevelId = x.TrainLevelId, + TrainLevelName = db.Base_TrainLevel.First(y => y.TrainLevelId == x.TrainLevelId).TrainLevelName, + TeachHour = x.TeachHour ?? 0, + TeachAddress = x.TeachAddress, + TrainStartDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate), + TeachMan = x.TeachMan, + UnitIds = x.UnitIds, + WorkPostId = x.WorkPostId, + TrainContent = x.TrainContent, + UnitNames = UnitService.getUnitNamesUnitIds(x.UnitIds), + WorkPostNames = WorkPostService.getWorkPostNamesWorkPostIds(x.WorkPostId), + DesignerId = x.DesignerId, + DesignerName = db.Sys_User.First(y => y.UserId == x.DesignerId).UserName, + DesignerDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TrainStartDate), + States = x.States, + QRCodeUrl = x.QRCodeUrl.Replace('\\', '/'), + }; + return getDataLists.FirstOrDefault(); + } + } + #endregion + + #region 根据TrainingPlanId获取培训教材类型列表 + /// + /// 根据TrainingPlanId获取培训教材类型列表 + /// + /// + /// 培训计划人员 + public static List getTrainingPlanItemListByTrainingPlanId(string trainingPlanId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var getDataLists = (from x in db.Training_PlanItem + join y in db.Training_CompanyTraining on x.CompanyTrainingId equals y.CompanyTrainingId + join z in db.Training_CompanyTrainingItem on x.CompanyTrainingItemId equals z.CompanyTrainingItemId + where x.PlanId == trainingPlanId + orderby y.CompanyTrainingCode + select new Model.TrainingPlanItemItem + { + PlanItemId = x.PlanItemId, + PlanId = x.PlanId, + CompanyTrainingId = x.CompanyTrainingId, + CompanyTrainingName = y.CompanyTrainingName, + CompanyTrainingCode = y.CompanyTrainingCode, + CompanyTrainingItemId = x.CompanyTrainingItemId, + CompanyTrainingItemCode = z.CompanyTrainingItemCode, + CompanyTrainingItemName = z.CompanyTrainingItemName, + }).ToList(); + return getDataLists; + } + } + #endregion + + #region 保存培训计划 + /// + /// 保存TrainingPlan + /// + /// 培训计划记录 + /// 培训人员list + /// 培训教材类型list + public static void SaveTrainingPlan(Model.TrainingPlanItem trainingPlan) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + Model.Training_Plan newTrainingPlan = new Model.Training_Plan + { + PlanId = trainingPlan.PlanId, + PlanCode = trainingPlan.PlanCode, + ProjectId = trainingPlan.ProjectId, + DesignerId = trainingPlan.DesignerId, + PlanName = trainingPlan.PlanName, + TrainContent = trainingPlan.TrainContent, + TrainStartDate = Funs.GetNewDateTime(trainingPlan.TrainStartDate), + TeachHour = trainingPlan.TeachHour, + TeachMan = trainingPlan.TeachMan, + TeachAddress = trainingPlan.TeachAddress, + TrainTypeId = trainingPlan.TrainTypeId, + UnitIds = trainingPlan.UnitIds, + WorkPostId = trainingPlan.WorkPostId, + States = trainingPlan.States, + }; + + if (!string.IsNullOrEmpty(trainingPlan.TrainLevelId)) + { + newTrainingPlan.TrainLevelId = trainingPlan.TrainLevelId; + } + + if (newTrainingPlan.TrainStartDate.HasValue && newTrainingPlan.TeachHour.HasValue) + { + double dd = (double)((decimal)newTrainingPlan.TeachHour.Value); + newTrainingPlan.TrainEndDate = newTrainingPlan.TrainStartDate.Value.AddHours(dd); + } + + List trainingTasks = trainingPlan.TrainingTasks; + List trainingPlanItems = trainingPlan.TrainingPlanItems; + + var isUpdate = db.Training_Plan.FirstOrDefault(x => x.PlanId == newTrainingPlan.PlanId); + if (isUpdate == null) + { + newTrainingPlan.DesignerDate = DateTime.Now; + string unitId = string.Empty; + var user = UserService.GetUserByUserId(newTrainingPlan.DesignerId); + if (user != null) + { + unitId = user.UnitId; + } + newTrainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, newTrainingPlan.ProjectId, unitId); + if (string.IsNullOrEmpty(newTrainingPlan.PlanId)) + { + newTrainingPlan.PlanId = SQLHelper.GetNewID(); + } + db.Training_Plan.InsertOnSubmit(newTrainingPlan); + db.SubmitChanges(); + + CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, newTrainingPlan.ProjectId, null, newTrainingPlan.PlanId, newTrainingPlan.DesignerDate); + } + else + { + if (newTrainingPlan.States == "0" || newTrainingPlan.States == "1") + { + isUpdate.PlanName = newTrainingPlan.PlanName; + isUpdate.TrainContent = newTrainingPlan.TrainContent; + isUpdate.TrainStartDate = newTrainingPlan.TrainStartDate; + isUpdate.TeachHour = newTrainingPlan.TeachHour; + isUpdate.TrainEndDate = newTrainingPlan.TrainEndDate; + isUpdate.TeachMan = newTrainingPlan.TeachMan; + isUpdate.TeachAddress = newTrainingPlan.TeachAddress; + isUpdate.TrainTypeId = newTrainingPlan.TrainTypeId; + isUpdate.TrainLevelId = newTrainingPlan.TrainLevelId; + isUpdate.UnitIds = newTrainingPlan.UnitIds; + isUpdate.WorkPostId = newTrainingPlan.WorkPostId; + isUpdate.States = newTrainingPlan.States; + db.SubmitChanges(); + } + ////删除培训任务 + var tasks = from x in db.Training_Task where x.PlanId == newTrainingPlan.PlanId select x; + if (tasks.Count() > 0) + { + var taskItems = from x in db.Training_TaskItem where x.PlanId == newTrainingPlan.PlanId select x; + if (tasks.Count() > 0) + { + db.Training_TaskItem.DeleteAllOnSubmit(taskItems); + db.SubmitChanges(); + } + db.Training_Task.DeleteAllOnSubmit(tasks); + db.SubmitChanges(); + } + + ////删除培训教材类型 + var planItem = (from x in db.Training_PlanItem where x.PlanId == newTrainingPlan.PlanId select x).ToList(); + if (planItem.Count() > 0) + { + db.Training_PlanItem.DeleteAllOnSubmit(planItem); + db.SubmitChanges(); + } + } + + if (trainingTasks.Count() > 0) + { + ////新增培训人员明细 + foreach (var item in trainingTasks) + { + if (!string.IsNullOrEmpty(item.PersonId)) + { + Model.Training_Task newTrainDetail = new Model.Training_Task + { + TaskId = SQLHelper.GetNewID(), + ProjectId = newTrainingPlan.ProjectId, + PlanId = newTrainingPlan.PlanId, + UserId = item.PersonId, + TaskDate = DateTime.Now, + States = Const.State_0, ////未生成培训教材明细 + }; + db.Training_Task.InsertOnSubmit(newTrainDetail); + db.SubmitChanges(); + } + } + } + if (trainingPlanItems.Count() > 0) + { + ////新增培训教材类型明细 + foreach (var item in trainingPlanItems) + { + if (!string.IsNullOrEmpty(item.CompanyTrainingId) || !string.IsNullOrEmpty(item.CompanyTrainingItemId)) + { + Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem + { + PlanItemId = SQLHelper.GetNewID(), + PlanId = newTrainingPlan.PlanId, + + }; + if (!string.IsNullOrEmpty(item.CompanyTrainingId)) + { + newPlanItem.CompanyTrainingId = item.CompanyTrainingId; + } + if (!string.IsNullOrEmpty(item.CompanyTrainingItemId)) + { + newPlanItem.CompanyTrainingItemId = item.CompanyTrainingItemId; + } + db.Training_PlanItem.InsertOnSubmit(newPlanItem); + db.SubmitChanges(); + } + } + } + } + } + + /// + /// 新增 培训人员明细 + /// + public static void AddTraining_Task(List trainingTasks, string planId, string projectId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + foreach (var item in trainingTasks) + { + if (!string.IsNullOrEmpty(item.PersonId)) + { + Model.Training_Task newTrainDetail = new Model.Training_Task + { + TaskId = SQLHelper.GetNewID(), + ProjectId = projectId, + PlanId = planId, + UserId = item.PersonId, + TaskDate = DateTime.Now, + States = Const.State_0, ////未生成培训教材明细 + }; + + db.Training_Task.InsertOnSubmit(newTrainDetail); + db.SubmitChanges(); + } + } + } + } + + /// + /// 新增 培训教材类型 明细 + /// + public static void AddTraining_PlanItem(List trainingPlanItems, string planId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + foreach (var item in trainingPlanItems) + { + if (!string.IsNullOrEmpty(item.CompanyTrainingId) || !string.IsNullOrEmpty(item.CompanyTrainingItemId)) + { + Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem + { + PlanItemId = SQLHelper.GetNewID(), + PlanId = planId, + + }; + if (!string.IsNullOrEmpty(item.CompanyTrainingId)) + { + newPlanItem.CompanyTrainingId = item.CompanyTrainingId; + } + if (!string.IsNullOrEmpty(item.CompanyTrainingItemId)) + { + newPlanItem.CompanyTrainingItemId = item.CompanyTrainingItemId; + } + db.Training_PlanItem.InsertOnSubmit(newPlanItem); + db.SubmitChanges(); + } + } + } + } + #endregion + } +} diff --git a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs index e7a2d97a..5cd5b786 100644 --- a/SGGL/BLL/API/HSSE/APITrainingTaskService.cs +++ b/SGGL/BLL/API/HSSE/APITrainingTaskService.cs @@ -37,8 +37,8 @@ namespace BLL TrainTypeName = db.Base_TrainType.FirstOrDefault(b => b.TrainTypeId == y.TrainTypeId).TrainTypeName, TrainLevelName = db.Base_TrainLevel.FirstOrDefault(b => b.TrainLevelId == y.TrainLevelId).TrainLevelName, PlanStatesName = y.States == "3" ? "已完成" : "培训中", - - }).ToList(); + + }).ToList(); return getDataLists; } } @@ -66,14 +66,14 @@ namespace BLL TaskId = x.TaskId, PlanId = x.PlanId, PersonId = x.PersonId, - StartTime = x.StartTime, - EndTime = x.EndTime, - LearnTime = x.LearnTime, - VideoProgress = x.VideoProgress, - TrainingItemCode = x.TrainingItemCode, + StartTime = x.StartTime, + EndTime = x.EndTime, + LearnTime = x.LearnTime, + VideoProgress = x.VideoProgress, + TrainingItemCode = x.TrainingItemCode, TrainingItemName = x.TrainingItemName, AttachUrl = x.AttachUrl.Replace('\\', '/'), - }).ToList(); + }).ToList(); return getDataLists; } } @@ -111,7 +111,7 @@ namespace BLL if (person != null && plan.ProjectId == person.ProjectId && plan.UnitIds.Contains(person.UnitId) && (string.IsNullOrEmpty(plan.WorkPostId) || plan.WorkPostId.Contains(person.WorkPostId))) { - var trainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == plan.TrainTypeId); + var trainType = db.Base_TrainType.FirstOrDefault(e => e.TrainTypeId == plan.TrainTypeId); if (trainType != null) { if (!trainType.IsRepeat.HasValue || trainType.IsRepeat == false) @@ -212,50 +212,50 @@ namespace BLL PersonId = x.UserId, PersonName = db.SitePerson_Person.FirstOrDefault(p => p.PersonId == x.UserId).PersonName, TaskDate = string.Format("{0:yyyy-MM-dd HH:mm}", x.TaskDate), - States = x.States, + States = x.States, }).ToList(); return getDataLists; } } - #endregion + #endregion - #region 根据TrainingPlanId获取培训任务教材明细列表 - /// - /// 根据TrainingPlanId获取培训任务教材明细列表 - /// - /// - /// 培训计划人员 - public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime, string VideoProgress) - { - using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) - { - var q = from x in db.Training_TaskItem - where x.TaskItemId == taskItemId - select x; - var item = q.FirstOrDefault(); - if (!item.StartTime.HasValue) - { - item.StartTime = startTime; - } + #region 根据TrainingPlanId获取培训任务教材明细列表 + /// + /// 根据TrainingPlanId获取培训任务教材明细列表 + /// + /// + /// 培训计划人员 + public static Model.Training_TaskItem updateTaskItemLearnTime(string taskItemId, DateTime startTime, DateTime endTime, string VideoProgress) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var q = from x in db.Training_TaskItem + where x.TaskItemId == taskItemId + select x; + var item = q.FirstOrDefault(); + if (!item.StartTime.HasValue) + { + item.StartTime = startTime; + } - if (!item.LearnTime.HasValue) - { - item.LearnTime = 0; - } - if (!string.IsNullOrEmpty(VideoProgress)) - { - item.VideoProgress = int.Parse(VideoProgress); - } - var span = endTime.Subtract(startTime); - item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes; - item.EndTime = endTime; - db.SubmitChanges(); - return item; - } - } - #endregion - } + if (!item.LearnTime.HasValue) + { + item.LearnTime = 0; + } + if (!string.IsNullOrEmpty(VideoProgress)) + { + item.VideoProgress = int.Parse(VideoProgress); + } + var span = endTime.Subtract(startTime); + item.LearnTime = item.LearnTime.Value + (int)span.TotalMinutes; + item.EndTime = endTime; + db.SubmitChanges(); + return item; + } + } + #endregion + } } diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 7a5665da..4adb7f33 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -219,6 +219,7 @@ + @@ -265,6 +266,7 @@ + @@ -553,13 +555,10 @@ + - - - - - + diff --git a/SGGL/BLL/CQMS/Check/CheckControlService.cs b/SGGL/BLL/CQMS/Check/CheckControlService.cs index f070b3fb..f14d4535 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlService.cs @@ -36,7 +36,7 @@ namespace BLL var project = ProjectService.GetProjectByProjectId(list[0].ProjectId); if (project != null) { - proindex = project.ProjectCode + "-QC-TCC-XJ-"; + proindex = project.ProjectCode + "-QC-XJYJ-XJ-"; } } for (int i = list.Count; i > 0; i--) diff --git a/SGGL/BLL/Common/AttachFileService.cs b/SGGL/BLL/Common/AttachFileService.cs index c83c54f4..26a4905b 100644 --- a/SGGL/BLL/Common/AttachFileService.cs +++ b/SGGL/BLL/Common/AttachFileService.cs @@ -199,6 +199,60 @@ namespace BLL } + /// + /// 判断文件类型是否支持的预览 + /// + /// + /// + public static bool IsSupportFileType(string FiletExtension) + { + bool result = false; + List list = new List(); + list.Add(".doc"); + list.Add(".docx"); + list.Add(".pdf"); + list.Add(".txt"); + list.Add(".xlsx"); + list.Add(".xls"); + list.Add(".png"); + list.Add(".jpg"); + list.Add(".jpeg"); + foreach (var item in list) + { + if (item == FiletExtension) + { + result = true; + break; + } + } + + return result; + + } + + /// + /// 判断文件类型是否是图片 + /// + /// + /// + public static bool IsImage(string FiletExtension) + { + bool result = false; + List list = new List(); + list.Add(".png"); + list.Add(".jpg"); + list.Add(".jpeg"); + foreach (var item in list) + { + if (item == FiletExtension) + { + result = true; + break; + } + } + return result; + } + /// /// /// diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index e3b524eb..068810f2 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -770,12 +770,16 @@ namespace BLL /// /// 默认用户密码 /// - public const string Password = "TCC.1234"; + public const string Password = "XJYJ.1234"; /// - /// 入场培训类型ID + /// 培训类型——入场培训类型ID /// public const string EntryTrainTypeId = "dfb6a37e-4412-4ba9-ad59-3bc505bc21f7"; + /// + /// 培训类型——检查重修培训 + /// + public const string RetakeCourseTrainTypeId = "2F687916-5E31-4DF3-97A3-E33E108C8070"; /// /// 微信订阅模板ID @@ -783,6 +787,11 @@ namespace BLL //public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglA56Ux1q0sZF0WCFLfK70Cs"; public const string WX_TemplateID = "rG2tJ2ByE9I4SziW-zKglF9s6bk6eyV0WVrT5tqFq8I"; + /// + /// 培训级别——其它 + /// + public const string OtherTrainLevelId = "de14948e-d3cb-436b-a962-80f1490ee9a9"; + #endregion #region 按钮描述 @@ -1779,29 +1788,14 @@ namespace BLL public const string MinusScoreSituationMenuId = "0BCE76EA-319F-47BF-913A-A32735641F5C"; /// - /// 个人安全行动计划 + /// 自主管理加分项 /// - public const string PersonalSafetyActionPlanMenuId = "7DD00BEF-821D-4996-ADF8-695139F201B4"; + public const string BonusScoreSelfManagementMenuId = "9667D2CB-8AAE-4799-8C94-A051F9846ECE"; /// - /// 安全经验分享 + /// 自主管理加分项类型 /// - public const string SharingOfSafetyExperienceMenuId = "D5FC7B12-0E81-482C-8B29-A9F43DF05D1F"; - - /// - /// 领导人员参加班组作业分析会 - /// - public const string LeadershipJoinHomeworkAnalysisMeetingMenuId = "05F4AC73-1BA2-4FF2-AAED-292DF5E44412"; - - /// - /// 一线党员联系班组共建活动 - /// - public const string CoConstructionActivitiesMenuId = "D3BADACC-3DA6-4B09-8BD0-1E2DF7B04B6E"; - - /// - /// 行为安全观察与沟通 - /// - public const string BehavioralSafetyObservationMenuId = "5049BB69-A75F-47D4-ABF3-DAA719D05C74"; + public const string BonusScoreTypeMenuId = "8526FC57-F2A8-483F-A7EF-724785B9B676"; #endregion diff --git a/SGGL/BLL/Common/Enums.cs b/SGGL/BLL/Common/Enums.cs new file mode 100644 index 00000000..09df78bd --- /dev/null +++ b/SGGL/BLL/Common/Enums.cs @@ -0,0 +1,63 @@ +using System.Collections.Generic; +using System; +using System.Web.UI.WebControls; +using Microsoft.Office.Interop.Word; + + +namespace BLL +{ + public static class Enums + { + #region 培训考试 + + /// + /// 培训效果 + /// + public enum Outcome + { + 掌握 = 0, + 熟悉 = 1, + 了解 = 2, + } + + /// + /// 培训效果 + /// + public static Dictionary OutcomeMap = new Dictionary + { + { "掌握" ,(int)Outcome.掌握}, + { "熟悉" ,(int)Outcome.熟悉}, + { "了解" ,(int)Outcome.了解} + }; + + /// + /// 培训效果下拉框 + /// + /// + /// + public static void InitOutcomeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "Value"; + dropName.DataTextField = "Key"; + dropName.DataSource = OutcomeMap; + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + + + /// + /// 检查重修计划类型 + /// + public enum RetakeCourseType + { + 日常巡检 = 1, + 专项检查 = 2, + 领导带班检查 = 3, + } + + #endregion + } +} \ No newline at end of file diff --git a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs index 50df3951..41d56205 100644 --- a/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs +++ b/SGGL/BLL/HSSE/Check/Check_ProjectLeaderCheckService.cs @@ -140,6 +140,8 @@ namespace BLL IsHoldMeet = ProjectLeaderCheck.IsHoldMeet, Requirement = ProjectLeaderCheck.Requirement, LeaderNames = ProjectLeaderCheck.LeaderNames, + ResponsibleMan = ProjectLeaderCheck.ResponsibleMan, + CompanyTrainingItemId = ProjectLeaderCheck.CompanyTrainingItemId, CompileMan = ProjectLeaderCheck.CompileMan, CompileDate = ProjectLeaderCheck.CompileDate, }; @@ -166,6 +168,8 @@ namespace BLL newProjectLeaderCheck.IsHoldMeet = ProjectLeaderCheck.IsHoldMeet; newProjectLeaderCheck.Requirement = ProjectLeaderCheck.Requirement; newProjectLeaderCheck.LeaderNames = ProjectLeaderCheck.LeaderNames; + newProjectLeaderCheck.ResponsibleMan = ProjectLeaderCheck.ResponsibleMan; + newProjectLeaderCheck.CompanyTrainingItemId = ProjectLeaderCheck.CompanyTrainingItemId; newProjectLeaderCheck.CompileMan = ProjectLeaderCheck.CompileMan; newProjectLeaderCheck.CompileDate = ProjectLeaderCheck.CompileDate; db.SubmitChanges(); diff --git a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs index b3d5748a..7f42d3fd 100644 --- a/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/CompanyTrainingItemService.cs @@ -1,9 +1,10 @@ -using System.Linq; +using System.Collections.Generic; +using System.Linq; namespace BLL { /// - /// 公司培训明细表 + /// 公司培训明细表——教材库 /// public class CompanyTrainingItemService { @@ -18,7 +19,7 @@ namespace BLL { return db.Training_CompanyTrainingItem.FirstOrDefault(e => e.CompanyTrainingItemId == companyTrainingItemId); } - + /// /// 添加公司培训明细 /// @@ -35,6 +36,9 @@ namespace BLL newModel.CompileDate = model.CompileDate; newModel.WorkPostIds = model.WorkPostIds; newModel.WorkPostNames = model.WorkPostNames; + newModel.Outcome = model.Outcome; + newModel.LearningTime = model.LearningTime; + newModel.TestTrainingIds = model.TestTrainingIds; db.Training_CompanyTrainingItem.InsertOnSubmit(newModel); db.SubmitChanges(); } @@ -55,6 +59,9 @@ namespace BLL newModel.CompileDate = model.CompileDate; newModel.WorkPostIds = model.WorkPostIds; newModel.WorkPostNames = model.WorkPostNames; + newModel.Outcome = model.Outcome; + newModel.LearningTime = model.LearningTime; + newModel.TestTrainingIds = model.TestTrainingIds; db.SubmitChanges(); } } @@ -72,5 +79,40 @@ namespace BLL db.SubmitChanges(); } } + + + /// + /// 教材库下拉框 + /// + /// 下拉框名字 + /// 职务Id + /// 是否显示请选择 + public static void InitCompanyTrainingItemDownList(FineUIPro.DropDownList dropName, string workPostId, bool isShowPlease) + { + dropName.DataValueField = "CompanyTrainingItemId"; + dropName.DataTextField = "CompanyTrainingItemName"; + dropName.DataSource = GetCompanyTrainingItemList(workPostId); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + + /// + /// 获取教材库下拉项 + /// + /// + /// + public static List GetCompanyTrainingItemList(string workPostId) + { + var lst = (from x in Funs.DB.Training_CompanyTrainingItem orderby x.CompanyTrainingItemCode select x).ToList(); + if (!string.IsNullOrWhiteSpace(workPostId)) + { + lst = lst.Where(x => x.WorkPostIds == null || x.WorkPostIds.Contains(workPostId)).ToList(); + } + return lst; + } + } } \ No newline at end of file diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs index 36e60881..973806d8 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanItemService.cs @@ -32,12 +32,33 @@ namespace BLL { PlanItemId = planItem.PlanItemId, PlanId = planItem.PlanId, - TrainingEduId = planItem.TrainingEduId + TrainingEduId = planItem.TrainingEduId, + TrainingEduItemId = planItem.TrainingEduItemId, + CompanyTrainingId = planItem.CompanyTrainingId, + CompanyTrainingItemId = planItem.CompanyTrainingItemId }; db.Training_PlanItem.InsertOnSubmit(newPlanItem); db.SubmitChanges(); } + /// + /// 修改培训任务 + /// + /// + public static void UpdatePlanItem(Model.Training_PlanItem model) + { + Model.Training_PlanItem newItem = db.Training_PlanItem.FirstOrDefault(e => e.PlanItemId == model.PlanItemId); + if (newItem != null) + { + newItem.PlanId = model.PlanId; + newItem.TrainingEduId = model.TrainingEduId; + newItem.TrainingEduItemId = model.TrainingEduItemId; + newItem.CompanyTrainingId = model.CompanyTrainingId; + newItem.CompanyTrainingItemId = model.CompanyTrainingItemId; + db.SubmitChanges(); + } + } + /// /// 根据明细键删除培训计划明细 /// diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs index c933269e..5b517ea4 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingPlanService.cs @@ -1,4 +1,7 @@ -using System; +using Microsoft.Office.Interop.Excel; +using Microsoft.SqlServer.Dts.Runtime; +using Model; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -19,65 +22,81 @@ namespace BLL /// public static Model.Training_Plan GetPlanById(string planId) { - return Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == planId); + return db.Training_Plan.FirstOrDefault(e => e.PlanId == planId); + } + + /// + /// 根据检查Id获取培训计划 + /// + /// + /// + public static Model.Training_Plan GetPlanByCheckId(string checkId) + { + return db.Training_Plan.FirstOrDefault(e => e.CheckId == checkId && e.IsRetakeCourse == 1); } - + /// /// 添加培训计划 /// - /// - public static void AddPlan(Model.Training_Plan trainingPlan) + /// + public static void AddPlan(Model.Training_Plan model) { - Model.Training_Plan newPlan = new Model.Training_Plan + Model.Training_Plan newModel = new Model.Training_Plan { - PlanId = trainingPlan.PlanId, - PlanCode = trainingPlan.PlanCode, - ProjectId = trainingPlan.ProjectId, - DesignerId = trainingPlan.DesignerId, - PlanName = trainingPlan.PlanName, - TrainContent = trainingPlan.TrainContent, - TrainStartDate = trainingPlan.TrainStartDate, - TeachHour = trainingPlan.TeachHour, - TeachMan = trainingPlan.TeachMan, - TeachAddress = trainingPlan.TeachAddress, - TrainTypeId = trainingPlan.TrainTypeId, - TrainLevelId = trainingPlan.TrainLevelId, - DesignerDate =trainingPlan.DesignerDate, - UnitIds = trainingPlan.UnitIds, - WorkPostId = trainingPlan.WorkPostId, - States = trainingPlan.States, - Cycle=trainingPlan.Cycle + PlanId = model.PlanId, + PlanCode = model.PlanCode, + ProjectId = model.ProjectId, + DesignerId = model.DesignerId, + PlanName = model.PlanName, + TrainContent = model.TrainContent, + TrainStartDate = model.TrainStartDate, + TeachHour = model.TeachHour, + TeachMan = model.TeachMan, + TeachAddress = model.TeachAddress, + TrainTypeId = model.TrainTypeId, + TrainLevelId = model.TrainLevelId, + DesignerDate = model.DesignerDate, + UnitIds = model.UnitIds, + WorkPostId = model.WorkPostId, + States = model.States, + Cycle = model.Cycle, + IsRetakeCourse = model.IsRetakeCourse, + CheckType = model.CheckType, + CheckId = model.CheckId }; - db.Training_Plan.InsertOnSubmit(newPlan); + db.Training_Plan.InsertOnSubmit(newModel); db.SubmitChanges(); } /// /// 修改培训计划 /// - /// - public static void UpdatePlan(Model.Training_Plan newTrainingPlan) + /// + public static void UpdatePlan(Model.Training_Plan model) { - Model.Training_Plan isUpdate = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == newTrainingPlan.PlanId); + Model.Training_Plan isUpdate = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == model.PlanId); if (isUpdate != null) { - isUpdate.PlanName = newTrainingPlan.PlanName; - isUpdate.TrainContent = newTrainingPlan.TrainContent; - isUpdate.TrainStartDate = newTrainingPlan.TrainStartDate; - isUpdate.TeachHour = newTrainingPlan.TeachHour; - isUpdate.TrainEndDate = newTrainingPlan.TrainEndDate; - isUpdate.TeachMan = newTrainingPlan.TeachMan; - isUpdate.TeachAddress = newTrainingPlan.TeachAddress; - isUpdate.TrainTypeId = newTrainingPlan.TrainTypeId; - isUpdate.TrainLevelId = newTrainingPlan.TrainLevelId; - isUpdate.DesignerDate = newTrainingPlan.DesignerDate; - isUpdate.UnitIds = newTrainingPlan.UnitIds; - isUpdate.WorkPostId = newTrainingPlan.WorkPostId; - isUpdate.States = newTrainingPlan.States; - isUpdate.Cycle = newTrainingPlan.Cycle; - Funs.DB.SubmitChanges(); + isUpdate.PlanName = model.PlanName; + isUpdate.TrainContent = model.TrainContent; + isUpdate.TrainStartDate = model.TrainStartDate; + isUpdate.TeachHour = model.TeachHour; + isUpdate.TrainEndDate = model.TrainEndDate; + isUpdate.TeachMan = model.TeachMan; + isUpdate.TeachAddress = model.TeachAddress; + isUpdate.TrainTypeId = model.TrainTypeId; + isUpdate.TrainLevelId = model.TrainLevelId; + isUpdate.DesignerDate = model.DesignerDate; + isUpdate.UnitIds = model.UnitIds; + isUpdate.WorkPostId = model.WorkPostId; + isUpdate.States = model.States; + isUpdate.Cycle = model.Cycle; + isUpdate.IsRetakeCourse = model.IsRetakeCourse; + isUpdate.CheckType = model.CheckType; + isUpdate.CheckId = model.CheckId; + db.SubmitChanges(); } } @@ -87,11 +106,11 @@ namespace BLL /// public static void DeletePlanById(string planId) { - Model.Training_Plan plan = Funs.DB.Training_Plan.FirstOrDefault(e => e.PlanId == planId); + Model.Training_Plan plan = db.Training_Plan.FirstOrDefault(e => e.PlanId == planId); if (plan != null) { - Funs.DB.Training_Plan.DeleteOnSubmit(plan); - Funs.DB.SubmitChanges(); + db.Training_Plan.DeleteOnSubmit(plan); + db.SubmitChanges(); } } @@ -103,5 +122,122 @@ namespace BLL { return (from x in db.Training_Plan orderby x.PlanCode select x).ToList(); } + + + /// + /// 检查重修,并生成培训计划、任务 + /// + /// + public static void RetakeCourseProducePlan(RetakeCourseProducePlanInfo info) + { + var plan = GetPlanByCheckId(info.CheckId); + var person = PersonService.GetPersonById(info.PersonId); + var companyTrainingItem = CompanyTrainingItemService.GetCompanyTrainingItemById(info.CompanyTrainingItemId); + var teachHour = companyTrainingItem.LearningTime / 3600; + + string planId = string.Empty; + if (plan != null) + {//编辑培训计划 + planId = plan.PlanId; + Model.Training_Plan planModel = new Model.Training_Plan + { + ProjectId = info.CurrProjectId, + PlanName = info.CheckTypeName, + TrainContent = info.CheckTypeName, + TeachHour = teachHour, + UnitIds = person.UnitId, + WorkPostId = person.WorkPostId, + TrainStartDate = plan.TrainStartDate, + TrainEndDate = info.TrainEndDate, + TeachMan = plan.TeachMan, + TeachAddress = plan.TeachAddress, + TrainTypeId = Const.RetakeCourseTrainTypeId, + TrainLevelId = Const.OtherTrainLevelId, + States = "1", + Cycle = "", + IsRetakeCourse = 1, + CheckType = plan.CheckType, + CheckId = plan.CheckId + }; + UpdatePlan(planModel); + } + else + {//生成培训计划 + planId = SQLHelper.GetNewID(); + string code = ProjectService.GetProjectByProjectId(info.CurrProjectId).ProjectCode + "-"; + string planCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", info.CurrProjectId, code); + + Model.Training_Plan planModel = new Model.Training_Plan + { + PlanId = planId, + PlanCode = planCode, + ProjectId = info.CurrProjectId, + DesignerId = info.CurrUserId, + DesignerDate = DateTime.Now, + PlanName = info.CheckTypeName, + TrainContent = info.CheckTypeName, + TrainStartDate = DateTime.Now, + TrainEndDate = info.TrainEndDate, + TeachHour = teachHour, + //TeachMan = model.TeachMan, + //TeachAddress = model.TeachAddress, + TrainTypeId = Const.RetakeCourseTrainTypeId, + TrainLevelId = Const.OtherTrainLevelId, + UnitIds = person.UnitId, + WorkPostId = person.WorkPostId, + States = "1", + Cycle = "", + IsRetakeCourse = 1, + CheckType = info.CheckType.ToString(), + CheckId = info.CheckId + }; + AddPlan(planModel); + } + + //删除培训明细 + TrainingPlanItemService.DeletePlanItemByPlanId(planId); + //删除任务 + TrainingTaskService.DeleteTaskByPlanId(planId); + + string taskId = SQLHelper.GetNewID(); + //新增培训任务 + Model.Training_Task newTrainDetail = new Model.Training_Task + { + TaskId = taskId, + ProjectId = info.CurrProjectId, + PlanId = planId, + UserId = info.PersonId, + TaskDate = DateTime.Now, + States = Const.State_1, + }; + TrainingTaskService.AddTask(newTrainDetail); + + //新增培训任务明细 + Model.Training_TaskItem newTaskItem = new Model.Training_TaskItem + { + TaskItemId = SQLHelper.GetNewID(), + TaskId = taskId, + PlanId = planId, + PersonId = info.PersonId, + TrainingItemCode = companyTrainingItem.CompanyTrainingItemCode, + TrainingItemName = companyTrainingItem.CompanyTrainingItemName, + AttachUrl = companyTrainingItem.AttachUrl, + CompanyTrainingItemId = info.CompanyTrainingItemId, + //LearnTime = trainingItem.LearningTime, + //VideoProgress = 0, + }; + db.Training_TaskItem.InsertOnSubmit(newTaskItem); + db.SubmitChanges(); + + //新增培训明细 + Model.Training_PlanItem newPlanItem = new Model.Training_PlanItem + { + PlanItemId = SQLHelper.GetNewID(), + PlanId = planId, + CompanyTrainingItemId = info.CompanyTrainingItemId, + CompanyTrainingId = companyTrainingItem.CompanyTrainingId + }; + TrainingPlanItemService.AddPlanItem(newPlanItem); + } } } diff --git a/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs b/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs index 1102811d..077fc56a 100644 --- a/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs +++ b/SGGL/BLL/HSSE/EduTrain/TrainingTaskService.cs @@ -1,4 +1,5 @@ -using System; +using Microsoft.SqlServer.Dts.Runtime; +using System; using System.Collections.Generic; using System.Linq; using System.Text; @@ -41,6 +42,7 @@ namespace BLL Model.Training_Task newTask = new Model.Training_Task { TaskId = task.TaskId, + ProjectId = task.ProjectId, PlanId = task.PlanId, UserId = task.UserId, TaskDate = task.TaskDate, diff --git a/SGGL/BLL/HSSE/Examine/BehavioralSafetyObservationService.cs b/SGGL/BLL/HSSE/Examine/BehavioralSafetyObservationService.cs deleted file mode 100644 index 10445345..00000000 --- a/SGGL/BLL/HSSE/Examine/BehavioralSafetyObservationService.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Linq; - -namespace BLL -{ - /// - /// 行为安全观察与沟通 - /// - public static class BehavioralSafetyObservationService - { - /// - /// 根据主键获取行为安全观察与沟通信息 - /// - /// - /// - public static Model.Examine_BehavioralSafetyObservation GetBehavioralSafetyObservationById(string Id) - { - return Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id); - } - - /// - /// 添加行为安全观察与沟通 - /// - /// - public static void AddBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model) - { - Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation - { - Id = model.Id, - ProjectId = model.ProjectId, - Code = model.Code, - Name = model.Name, - UserId = model.UserId, - DateTime = model.DateTime, - CompileDate = model.CompileDate, - CompileMan = model.CompileMan, - Remark = model.Remark, - Content = model.Content - }; - Funs.DB.Examine_BehavioralSafetyObservation.InsertOnSubmit(newModel); - Funs.DB.SubmitChanges(); - } - - /// - /// 修改 - /// - /// - public static void UpdateBehavioralSafetyObservation(Model.Examine_BehavioralSafetyObservation model) - { - Model.Examine_BehavioralSafetyObservation newModel = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == model.Id); - if (newModel != null) - { - newModel.Code = model.Code; - newModel.Name = model.Name; - newModel.UserId = model.UserId; - newModel.DateTime = model.DateTime; - newModel.Content = model.Content; - newModel.Remark = model.Remark; - Funs.DB.SubmitChanges(); - } - } - - /// - /// 删除 - /// - /// - public static void DeleteBehavioralSafetyObservationById(string Id) - { - Model.Examine_BehavioralSafetyObservation model = Funs.DB.Examine_BehavioralSafetyObservation.FirstOrDefault(e => e.Id == Id); - if (model != null) - { - CommonService.DeleteAttachFileById(Id); - Funs.DB.Examine_BehavioralSafetyObservation.DeleteOnSubmit(model); - Funs.DB.SubmitChanges(); - } - } - } -} diff --git a/SGGL/BLL/HSSE/Examine/BonusScoreSelfManagementService.cs b/SGGL/BLL/HSSE/Examine/BonusScoreSelfManagementService.cs new file mode 100644 index 00000000..3c61e6e0 --- /dev/null +++ b/SGGL/BLL/HSSE/Examine/BonusScoreSelfManagementService.cs @@ -0,0 +1,108 @@ +using Model; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 自主管理加分项 + /// + public static class BonusScoreSelfManagementService + { + /// + /// 根据主键获取自主管理加分项信息 + /// + /// + /// + public static Model.Examine_BonusScoreSelfManagement GetBonusScoreSelfManagementById(string Id) + { + return Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 添加自主管理加分项 + /// + /// + public static void AddBonusScoreSelfManagement(Model.Examine_BonusScoreSelfManagement model) + { + Model.Examine_BonusScoreSelfManagement newModel = new Model.Examine_BonusScoreSelfManagement + { + Id = model.Id, + ProjectId = model.ProjectId, + Code = model.Code, + Name = model.Name, + BonusScoreTypeId = model.BonusScoreTypeId, + BonusScoreTypeName = model.BonusScoreTypeName, + Score = model.Score, + PersonId = model.PersonId, + //DateTime = model.DateTime, + CompileDate = model.CompileDate, + CompileMan = model.CompileMan, + Remark = model.Remark, + Content = model.Content + }; + Funs.DB.Examine_BonusScoreSelfManagement.InsertOnSubmit(newModel); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateBonusScoreSelfManagement(Model.Examine_BonusScoreSelfManagement model) + { + Model.Examine_BonusScoreSelfManagement newModel = Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == model.Id); + if (newModel != null) + { + //newModel.Code = model.Code; + newModel.Name = model.Name; + newModel.BonusScoreTypeId = model.BonusScoreTypeId; + newModel.BonusScoreTypeName = model.BonusScoreTypeName; + newModel.Score = model.Score; + newModel.PersonId = model.PersonId; + //newModel.DateTime = model.DateTime; + newModel.Content = model.Content; + newModel.Remark = model.Remark; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 删除 + /// + /// + public static void DeleteBonusScoreSelfManagementById(string Id) + { + Model.Examine_BonusScoreSelfManagement model = Funs.DB.Examine_BonusScoreSelfManagement.FirstOrDefault(e => e.Id == Id); + if (model != null) + { + CommonService.DeleteAttachFileById(Id); + Funs.DB.Examine_BonusScoreSelfManagement.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + + + /// + /// 获取所有List + /// + /// + public static List GetBonusScoreSelfManagementList(string projectId, string personId, string typeId) + { + var list = (from x in Funs.DB.Examine_BonusScoreSelfManagement orderby x.Code descending select x).ToList(); + if (!string.IsNullOrWhiteSpace(projectId)) + { + list = list.Where(x => x.ProjectId == projectId).ToList(); + } + if (!string.IsNullOrWhiteSpace(personId)) + { + list = list.Where(x => x.PersonId == personId).ToList(); + } + if (!string.IsNullOrWhiteSpace(typeId)) + { + list = list.Where(x => x.BonusScoreTypeId == typeId).ToList(); + } + return list; + } + } +} diff --git a/SGGL/BLL/HSSE/Examine/BonusScoreTypeService.cs b/SGGL/BLL/HSSE/Examine/BonusScoreTypeService.cs new file mode 100644 index 00000000..3c8820bb --- /dev/null +++ b/SGGL/BLL/HSSE/Examine/BonusScoreTypeService.cs @@ -0,0 +1,115 @@ +using Model; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// 自主管理加分项类型 + /// + public static class BonusScoreTypeService + { + /// + /// 根据主键获取自主管理加分项类型信息 + /// + /// + /// + public static Model.Examine_BonusScoreType GetBonusScoreTypeById(string Id) + { + return Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == Id); + } + + /// + /// 根据名称获取自主管理加分项类型信息 + /// + /// + /// + public static Model.Examine_BonusScoreType GetBonusScoreTypeByName(string Name) + { + return Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Name == Name); + } + + /// + /// 添加自主管理加分项类型 + /// + /// + public static void AddBonusScoreType(Model.Examine_BonusScoreType model) + { + Model.Examine_BonusScoreType newModel = new Model.Examine_BonusScoreType + { + Id = model.Id, + Code = model.Code, + Name = model.Name, + Score = model.Score, + CompileDate = model.CompileDate, + CompileMan = model.CompileMan, + Remark = model.Remark + }; + Funs.DB.Examine_BonusScoreType.InsertOnSubmit(newModel); + Funs.DB.SubmitChanges(); + } + + /// + /// 修改 + /// + /// + public static void UpdateBonusScoreType(Model.Examine_BonusScoreType model) + { + Model.Examine_BonusScoreType newModel = Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == model.Id); + if (newModel != null) + { + newModel.Code = model.Code; + newModel.Name = model.Name; + newModel.Score = model.Score; + newModel.Remark = model.Remark; + newModel.CompileDate = model.CompileDate; + newModel.CompileMan = model.CompileMan; + Funs.DB.SubmitChanges(); + } + } + + /// + /// 删除 + /// + /// + public static void DeleteBonusScoreTypeById(string Id) + { + Model.Examine_BonusScoreType model = Funs.DB.Examine_BonusScoreType.FirstOrDefault(e => e.Id == Id); + if (model != null) + { + CommonService.DeleteAttachFileById(Id); + Funs.DB.Examine_BonusScoreType.DeleteOnSubmit(model); + Funs.DB.SubmitChanges(); + } + } + + + /// + /// 获取所有类型List + /// + /// + public static List GetBonusScoreTypeList() + { + return (from x in Funs.DB.Examine_BonusScoreType orderby x.Code select x).ToList(); + } + + + /// + /// 获取类型下拉框 + /// + /// + /// + public static void InitBonusScoreTypeDropDownList(FineUIPro.DropDownList dropName, bool isShowPlease) + { + dropName.DataValueField = "Id"; + dropName.DataTextField = "Name"; + dropName.DataSource = GetBonusScoreTypeList(); + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + + } +} diff --git a/SGGL/BLL/HSSE/Examine/CoConstructionActivitiesService.cs b/SGGL/BLL/HSSE/Examine/CoConstructionActivitiesService.cs deleted file mode 100644 index d4902f19..00000000 --- a/SGGL/BLL/HSSE/Examine/CoConstructionActivitiesService.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Linq; - -namespace BLL -{ - /// - /// 一线党员联系班组共建活动 - /// - public static class CoConstructionActivitiesService - { - /// - /// 根据主键获取一线党员联系班组共建活动信息 - /// - /// - /// - public static Model.Examine_CoConstructionActivities GetCoConstructionActivitiesById(string Id) - { - return Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id); - } - - /// - /// 添加一线党员联系班组共建活动 - /// - /// - public static void AddCoConstructionActivities(Model.Examine_CoConstructionActivities model) - { - Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities - { - Id = model.Id, - ProjectId = model.ProjectId, - Code = model.Code, - Name = model.Name, - UserId = model.UserId, - DateTime = model.DateTime, - CompileDate = model.CompileDate, - CompileMan = model.CompileMan, - Remark = model.Remark, - Content = model.Content - }; - Funs.DB.Examine_CoConstructionActivities.InsertOnSubmit(newModel); - Funs.DB.SubmitChanges(); - } - - /// - /// 修改 - /// - /// - public static void UpdateCoConstructionActivities(Model.Examine_CoConstructionActivities model) - { - Model.Examine_CoConstructionActivities newModel = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == model.Id); - if (newModel != null) - { - newModel.Code = model.Code; - newModel.Name = model.Name; - newModel.UserId = model.UserId; - newModel.DateTime = model.DateTime; - newModel.Content = model.Content; - newModel.Remark = model.Remark; - Funs.DB.SubmitChanges(); - } - } - - /// - /// 删除 - /// - /// - public static void DeleteCoConstructionActivitiesById(string Id) - { - Model.Examine_CoConstructionActivities model = Funs.DB.Examine_CoConstructionActivities.FirstOrDefault(e => e.Id == Id); - if (model != null) - { - CommonService.DeleteAttachFileById(Id); - Funs.DB.Examine_CoConstructionActivities.DeleteOnSubmit(model); - Funs.DB.SubmitChanges(); - } - } - } -} diff --git a/SGGL/BLL/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingService.cs b/SGGL/BLL/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingService.cs deleted file mode 100644 index d890e8f6..00000000 --- a/SGGL/BLL/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingService.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Linq; - -namespace BLL -{ - /// - /// 领导人员参加班组作业分析会 - /// - public static class LeadershipJoinHomeworkAnalysisMeetingService - { - /// - /// 根据主键获取领导人员参加班组作业分析会信息 - /// - /// - /// - public static Model.Examine_LeadershipJoinHomeworkAnalysisMeeting GetLeadershipJoinHomeworkAnalysisMeetingById(string Id) - { - return Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id); - } - - /// - /// 添加领导人员参加班组作业分析会 - /// - /// - public static void AddLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model) - { - Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting - { - Id = model.Id, - ProjectId = model.ProjectId, - Code = model.Code, - Name = model.Name, - UserId = model.UserId, - DateTime = model.DateTime, - CompileDate = model.CompileDate, - CompileMan = model.CompileMan, - Remark = model.Remark, - Content = model.Content - }; - Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.InsertOnSubmit(newModel); - Funs.DB.SubmitChanges(); - } - - /// - /// 修改 - /// - /// - public static void UpdateLeadershipJoinHomeworkAnalysisMeeting(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model) - { - Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == model.Id); - if (newModel != null) - { - newModel.Code = model.Code; - newModel.Name = model.Name; - newModel.UserId = model.UserId; - newModel.DateTime = model.DateTime; - newModel.Content = model.Content; - newModel.Remark = model.Remark; - Funs.DB.SubmitChanges(); - } - } - - /// - /// 删除 - /// - /// - public static void DeleteLeadershipJoinHomeworkAnalysisMeetingById(string Id) - { - Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.FirstOrDefault(e => e.Id == Id); - if (model != null) - { - CommonService.DeleteAttachFileById(Id); - Funs.DB.Examine_LeadershipJoinHomeworkAnalysisMeeting.DeleteOnSubmit(model); - Funs.DB.SubmitChanges(); - } - } - } -} diff --git a/SGGL/BLL/HSSE/Examine/PersonalSafetyActionPlanService.cs b/SGGL/BLL/HSSE/Examine/PersonalSafetyActionPlanService.cs deleted file mode 100644 index 3c1591c4..00000000 --- a/SGGL/BLL/HSSE/Examine/PersonalSafetyActionPlanService.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Linq; - -namespace BLL -{ - /// - /// 个人安全行动计划 - /// - public static class PersonalSafetyActionPlanService - { - /// - /// 根据主键获取个人安全行动计划信息 - /// - /// - /// - public static Model.Examine_PersonalSafetyActionPlan GetPersonalSafetyActionPlanById(string Id) - { - return Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id); - } - - /// - /// 添加个人安全行动计划 - /// - /// - public static void AddPersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model) - { - Model.Examine_PersonalSafetyActionPlan newModel = new Model.Examine_PersonalSafetyActionPlan - { - Id = model.Id, - ProjectId = model.ProjectId, - Code = model.Code, - Name = model.Name, - UserId = model.UserId, - DateTime = model.DateTime, - CompileDate = model.CompileDate, - CompileMan = model.CompileMan, - Remark = model.Remark, - Content = model.Content - }; - Funs.DB.Examine_PersonalSafetyActionPlan.InsertOnSubmit(newModel); - Funs.DB.SubmitChanges(); - } - - /// - /// 修改 - /// - /// - public static void UpdatePersonalSafetyActionPlan(Model.Examine_PersonalSafetyActionPlan model) - { - Model.Examine_PersonalSafetyActionPlan newModel = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == model.Id); - if (newModel != null) - { - newModel.Code = model.Code; - newModel.Name = model.Name; - newModel.UserId = model.UserId; - newModel.DateTime = model.DateTime; - newModel.Content = model.Content; - newModel.Remark = model.Remark; - Funs.DB.SubmitChanges(); - } - } - - /// - /// 删除 - /// - /// - public static void DeletePersonalSafetyActionPlanById(string Id) - { - Model.Examine_PersonalSafetyActionPlan model = Funs.DB.Examine_PersonalSafetyActionPlan.FirstOrDefault(e => e.Id == Id); - if (model != null) - { - CommonService.DeleteAttachFileById(Id); - Funs.DB.Examine_PersonalSafetyActionPlan.DeleteOnSubmit(model); - Funs.DB.SubmitChanges(); - } - } - } -} diff --git a/SGGL/BLL/HSSE/Examine/SharingOfSafetyExperienceService.cs b/SGGL/BLL/HSSE/Examine/SharingOfSafetyExperienceService.cs deleted file mode 100644 index 2642835c..00000000 --- a/SGGL/BLL/HSSE/Examine/SharingOfSafetyExperienceService.cs +++ /dev/null @@ -1,77 +0,0 @@ -using System.Linq; - -namespace BLL -{ - /// - /// 安全经验分享 - /// - public static class SharingOfSafetyExperienceService - { - /// - /// 根据主键获取安全经验分享信息 - /// - /// - /// - public static Model.Examine_SharingOfSafetyExperience GetSharingOfSafetyExperienceById(string Id) - { - return Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id); - } - - /// - /// 添加安全经验分享 - /// - /// - public static void AddSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model) - { - Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience - { - Id = model.Id, - ProjectId = model.ProjectId, - Code = model.Code, - Name = model.Name, - UserId = model.UserId, - DateTime = model.DateTime, - CompileDate = model.CompileDate, - CompileMan = model.CompileMan, - Remark = model.Remark, - Content = model.Content - }; - Funs.DB.Examine_SharingOfSafetyExperience.InsertOnSubmit(newModel); - Funs.DB.SubmitChanges(); - } - - /// - /// 修改 - /// - /// - public static void UpdateSharingOfSafetyExperience(Model.Examine_SharingOfSafetyExperience model) - { - Model.Examine_SharingOfSafetyExperience newModel = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == model.Id); - if (newModel != null) - { - newModel.Code = model.Code; - newModel.Name = model.Name; - newModel.UserId = model.UserId; - newModel.DateTime = model.DateTime; - newModel.Content = model.Content; - newModel.Remark = model.Remark; - Funs.DB.SubmitChanges(); - } - } - - /// - /// 删除 - /// - /// - public static void DeleteSharingOfSafetyExperienceById(string Id) - { - Model.Examine_SharingOfSafetyExperience model = Funs.DB.Examine_SharingOfSafetyExperience.FirstOrDefault(e => e.Id == Id); - if (model != null) - { - CommonService.DeleteAttachFileById(Id); - Funs.DB.Examine_SharingOfSafetyExperience.DeleteOnSubmit(model); - Funs.DB.SubmitChanges(); - } - } - } -} diff --git a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs index 2b9b9162..7da1844e 100644 --- a/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs +++ b/SGGL/BLL/HSSE/HiddenInspection/HSSE_Hazard_HazardRegisterService.cs @@ -37,98 +37,100 @@ namespace BLL /// /// 增加危险观察登记信息 /// - /// 危险观察登记实体 - public static void AddHazardRegister(Model.HSSE_Hazard_HazardRegister hazardRegister) + /// 危险观察登记实体 + public static void AddHazardRegister(Model.HSSE_Hazard_HazardRegister model) { Model.SGGLDB db = Funs.DB; - Model.HSSE_Hazard_HazardRegister newHazardRegister = new Model.HSSE_Hazard_HazardRegister(); - newHazardRegister.HazardRegisterId = hazardRegister.HazardRegisterId; - newHazardRegister.HazardCode = hazardRegister.HazardCode; - newHazardRegister.RegisterDate = DateTime.Now; - newHazardRegister.RegisterDef = hazardRegister.RegisterDef; - newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId; - newHazardRegister.CheckCycle = hazardRegister.CheckCycle; - newHazardRegister.Rectification = hazardRegister.Rectification; - newHazardRegister.Place = hazardRegister.Place; - newHazardRegister.ResponsibleUnit = hazardRegister.ResponsibleUnit; - newHazardRegister.Observer = hazardRegister.Observer; - newHazardRegister.RectifiedDate = hazardRegister.RectifiedDate; - newHazardRegister.AttachUrl = hazardRegister.AttachUrl; - newHazardRegister.ProjectId = hazardRegister.ProjectId; - newHazardRegister.States = hazardRegister.States; - newHazardRegister.IsEffective = hazardRegister.IsEffective; - newHazardRegister.ResponsibleMan = hazardRegister.ResponsibleMan; - newHazardRegister.CheckSpecialId = hazardRegister.CheckSpecialId; - newHazardRegister.CheckManId = hazardRegister.CheckManId; - newHazardRegister.CheckTime = hazardRegister.CheckTime; - newHazardRegister.RectificationPeriod = hazardRegister.RectificationPeriod; - newHazardRegister.ImageUrl = hazardRegister.ImageUrl; - newHazardRegister.RectificationImageUrl = hazardRegister.RectificationImageUrl; - newHazardRegister.RectificationTime = hazardRegister.RectificationTime; - newHazardRegister.ConfirmMan = hazardRegister.ConfirmMan; - newHazardRegister.ConfirmDate = hazardRegister.ConfirmDate; - newHazardRegister.HandleIdea = hazardRegister.HandleIdea; - newHazardRegister.CutPayment = hazardRegister.CutPayment; - newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes; - newHazardRegister.DIC_ID = hazardRegister.DIC_ID; - newHazardRegister.Risk_Level = hazardRegister.Risk_Level; - newHazardRegister.Requirements = hazardRegister.Requirements; - newHazardRegister.ControlId = hazardRegister.ControlId; + Model.HSSE_Hazard_HazardRegister newModel = new Model.HSSE_Hazard_HazardRegister(); + newModel.HazardRegisterId = model.HazardRegisterId; + newModel.HazardCode = model.HazardCode; + newModel.RegisterDate = DateTime.Now; + newModel.RegisterDef = model.RegisterDef; + newModel.RegisterTypesId = model.RegisterTypesId; + newModel.CheckCycle = model.CheckCycle; + newModel.Rectification = model.Rectification; + newModel.Place = model.Place; + newModel.ResponsibleUnit = model.ResponsibleUnit; + newModel.Observer = model.Observer; + newModel.RectifiedDate = model.RectifiedDate; + newModel.AttachUrl = model.AttachUrl; + newModel.ProjectId = model.ProjectId; + newModel.States = model.States; + newModel.IsEffective = model.IsEffective; + newModel.ResponsibleMan = model.ResponsibleMan; + newModel.CheckSpecialId = model.CheckSpecialId; + newModel.CheckManId = model.CheckManId; + newModel.CheckTime = model.CheckTime; + newModel.RectificationPeriod = model.RectificationPeriod; + newModel.ImageUrl = model.ImageUrl; + newModel.RectificationImageUrl = model.RectificationImageUrl; + newModel.RectificationTime = model.RectificationTime; + newModel.ConfirmMan = model.ConfirmMan; + newModel.ConfirmDate = model.ConfirmDate; + newModel.HandleIdea = model.HandleIdea; + newModel.CutPayment = model.CutPayment; + newModel.ProblemTypes = model.ProblemTypes; + newModel.DIC_ID = model.DIC_ID; + newModel.Risk_Level = model.Risk_Level; + newModel.Requirements = model.Requirements; + newModel.ControlId = model.ControlId; + newModel.CheckItemDetailId = model.CheckItemDetailId; + newModel.CompanyTrainingItemId = model.CompanyTrainingItemId; - newHazardRegister.CheckItemDetailId = hazardRegister.CheckItemDetailId; - db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newHazardRegister); + db.HSSE_Hazard_HazardRegister.InsertOnSubmit(newModel); db.SubmitChanges(); } /// /// 修改危险观察登记信息 /// - /// 危险观察登记实体 - public static void UpdateHazardRegister(Model.HSSE_Hazard_HazardRegister hazardRegister) + /// 危险观察登记实体 + public static void UpdateHazardRegister(Model.HSSE_Hazard_HazardRegister model) { Model.SGGLDB db = Funs.DB; - Model.HSSE_Hazard_HazardRegister newHazardRegister = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegister.HazardRegisterId); - if (newHazardRegister != null) + Model.HSSE_Hazard_HazardRegister newModel = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == model.HazardRegisterId); + if (newModel != null) { - newHazardRegister.HazardCode = hazardRegister.HazardCode; - newHazardRegister.RegisterDef = hazardRegister.RegisterDef; - newHazardRegister.Rectification = hazardRegister.Rectification; - newHazardRegister.Place = hazardRegister.Place; - newHazardRegister.ResponsibleUnit = hazardRegister.ResponsibleUnit; - newHazardRegister.Observer = hazardRegister.Observer; - newHazardRegister.RectifiedDate = hazardRegister.RectifiedDate; - newHazardRegister.AttachUrl = hazardRegister.AttachUrl; - newHazardRegister.ProjectId = hazardRegister.ProjectId; - newHazardRegister.States = hazardRegister.States; - newHazardRegister.IsEffective = hazardRegister.IsEffective; - newHazardRegister.ResponsibleMan = hazardRegister.ResponsibleMan; - newHazardRegister.CheckManId = hazardRegister.CheckManId; - //newHazardRegister.CheckTime = hazardRegister.CheckTime; - newHazardRegister.RectificationPeriod = hazardRegister.RectificationPeriod; - newHazardRegister.ImageUrl = hazardRegister.ImageUrl; - newHazardRegister.RectificationImageUrl = hazardRegister.RectificationImageUrl; - newHazardRegister.RectificationTime = hazardRegister.RectificationTime; - newHazardRegister.ConfirmMan = hazardRegister.ConfirmMan; - newHazardRegister.ConfirmDate = hazardRegister.ConfirmDate; - newHazardRegister.HandleIdea = hazardRegister.HandleIdea; - newHazardRegister.CutPayment = hazardRegister.CutPayment; - newHazardRegister.ProblemTypes = hazardRegister.ProblemTypes; - newHazardRegister.DIC_ID = hazardRegister.DIC_ID; - newHazardRegister.CheckItemDetailId = hazardRegister.CheckItemDetailId; - newHazardRegister.RegisterTypesId = hazardRegister.RegisterTypesId; - newHazardRegister.Risk_Level = hazardRegister.Risk_Level; - newHazardRegister.Requirements = hazardRegister.Requirements; + newModel.HazardCode = model.HazardCode; + newModel.RegisterDef = model.RegisterDef; + newModel.Rectification = model.Rectification; + newModel.Place = model.Place; + newModel.ResponsibleUnit = model.ResponsibleUnit; + newModel.Observer = model.Observer; + newModel.RectifiedDate = model.RectifiedDate; + newModel.AttachUrl = model.AttachUrl; + newModel.ProjectId = model.ProjectId; + newModel.States = model.States; + newModel.IsEffective = model.IsEffective; + newModel.ResponsibleMan = model.ResponsibleMan; + newModel.CheckManId = model.CheckManId; + //newModel.CheckTime = model.CheckTime; + newModel.RectificationPeriod = model.RectificationPeriod; + newModel.ImageUrl = model.ImageUrl; + newModel.RectificationImageUrl = model.RectificationImageUrl; + newModel.RectificationTime = model.RectificationTime; + newModel.ConfirmMan = model.ConfirmMan; + newModel.ConfirmDate = model.ConfirmDate; + newModel.HandleIdea = model.HandleIdea; + newModel.CutPayment = model.CutPayment; + newModel.ProblemTypes = model.ProblemTypes; + newModel.DIC_ID = model.DIC_ID; + newModel.CheckItemDetailId = model.CheckItemDetailId; + newModel.RegisterTypesId = model.RegisterTypesId; + newModel.Risk_Level = model.Risk_Level; + newModel.Requirements = model.Requirements; + newModel.CompanyTrainingItemId = model.CompanyTrainingItemId; //把附件表的路径复制过来 - Model.AttachFile file = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId); + Model.AttachFile file = BLL.AttachFileService.GetAttachFile(model.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId); if (file != null) { - newHazardRegister.ImageUrl = file.AttachUrl; + newModel.ImageUrl = file.AttachUrl; } - Model.AttachFile fileR = BLL.AttachFileService.GetAttachFile(hazardRegister.HazardRegisterId + "-R", Const.HSSE_HiddenRectificationListMenuId); + Model.AttachFile fileR = BLL.AttachFileService.GetAttachFile(model.HazardRegisterId + "-R", Const.HSSE_HiddenRectificationListMenuId); if (fileR != null) { - newHazardRegister.RectificationImageUrl = fileR.AttachUrl; + newModel.RectificationImageUrl = fileR.AttachUrl; } db.SubmitChanges(); @@ -142,18 +144,18 @@ namespace BLL public static void DeleteHazardRegisterByHazardRegisterId(string hazardRegisterId) { Model.SGGLDB db = Funs.DB; - Model.HSSE_Hazard_HazardRegister hazardRegister = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId); - if (hazardRegister != null) + Model.HSSE_Hazard_HazardRegister model = db.HSSE_Hazard_HazardRegister.FirstOrDefault(e => e.HazardRegisterId == hazardRegisterId); + if (model != null) { try { - BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.ImageUrl);//删除整改前图片 - BLL.UploadFileService.DeleteFile(Funs.RootPath, hazardRegister.RectificationImageUrl);//删除整改后图片 + BLL.UploadFileService.DeleteFile(Funs.RootPath, model.ImageUrl);//删除整改前图片 + BLL.UploadFileService.DeleteFile(Funs.RootPath, model.RectificationImageUrl);//删除整改后图片 } catch (Exception) { } - db.HSSE_Hazard_HazardRegister.DeleteOnSubmit(hazardRegister); + db.HSSE_Hazard_HazardRegister.DeleteOnSubmit(model); db.SubmitChanges(); } } diff --git a/SGGL/BLL/HSSE/SitePerson/PersonService.cs b/SGGL/BLL/HSSE/SitePerson/PersonService.cs index 8c2c6477..54089071 100644 --- a/SGGL/BLL/HSSE/SitePerson/PersonService.cs +++ b/SGGL/BLL/HSSE/SitePerson/PersonService.cs @@ -441,7 +441,7 @@ namespace BLL newPerson.DepartId = person.DepartId; newPerson.QRCodeAttachUrl = person.QRCodeAttachUrl; newPerson.Password = GetPersonPassWord(person.IdentityCard); - newPerson.ExchangeTime = null; + newPerson.ExchangeTime = null; newPerson.ExchangeTime2 = null; newPerson.RealNameUpdateTime = null; if (!string.IsNullOrEmpty(person.AuditorId)) @@ -654,6 +654,35 @@ namespace BLL } } + /// + /// 表下拉框 + /// + /// + /// + /// + /// + public static void InitPersonByMultiProjectUnitDropDownList(FineUIPro.DropDownList dropName, string projectId, string unitIds, bool isShowPlease) + { + dropName.DataValueField = "PersonId"; + dropName.DataTextField = "PersonName"; + var list = new List(); + var lstUnitId = unitIds.Split(','); + foreach (var item in lstUnitId) + { + if (!string.IsNullOrWhiteSpace(item)) + { + var lst = GetPersonLitsByprojectIdUnitId(projectId, item); + list.AddRange(lst); + } + } + dropName.DataSource = list; + dropName.DataBind(); + if (isShowPlease) + { + Funs.FineUIPleaseSelect(dropName); + } + } + /// /// 表下拉框 /// diff --git a/SGGL/BLL/SysManage/UserService.cs b/SGGL/BLL/SysManage/UserService.cs index fae524e5..9537028d 100644 --- a/SGGL/BLL/SysManage/UserService.cs +++ b/SGGL/BLL/SysManage/UserService.cs @@ -1599,7 +1599,7 @@ namespace BLL public static string getInitialPassword(string unitId, string idCard) { - string prefixValue = "TCC"; + string prefixValue = "XJYJ"; string suffixValue = "1234"; var getUnit = UnitService.GetUnitByUnitId(unitId); if (getUnit != null) diff --git a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs index 6f46f0ac..ee1df326 100644 --- a/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs +++ b/SGGL/FineUIPro.Web/AttachFile/webuploader.aspx.cs @@ -381,6 +381,10 @@ namespace FineUIPro.Web.AttachFile PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", httpUrl, "查看 -"))); } + else if(AttachFileService.IsImage(FiletExtension)) + { + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("../AttachFile/Look.aspx?fileUrl={0}", url, "查看 -"))); + } else { ShowNotify("不支持预览", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs index 066c4d0d..321f1bd0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckFineListEdit.aspx.cs @@ -134,7 +134,7 @@ namespace FineUIPro.Web.CQMS.Check txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); ; QuestionImg = 0; - string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-"; + string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-"; txtDocCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_CheckFine", "DocCode", code); if (!string.IsNullOrEmpty(CheckControlCode)) { diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs index 6dd3d762..40791b60 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs @@ -65,7 +65,7 @@ namespace FineUIPro.Web.CQMS.Check //FilterDataRowItem = FilterDataRowItemImplement; if (!IsPostBack) { - code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-"; + code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-"; this.ProjectId = this.CurrUser.LoginProjectId; GetButtonPower(); diff --git a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs index 964f133e..5433826d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs @@ -301,7 +301,7 @@ namespace FineUIPro.Web.CQMS.Check lblAttach.Enabled = false; QuestionImg = 0; CheckControlService.Init(drpHandleType, State, false); - string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-"; + string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-"; txtDocCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", this.CurrUser.LoginProjectId, code); var mainUnit = BLL.UnitService.GetUnitByProjectIdUnitTypeList(this.CurrUser.LoginProjectId, Const.ProjectUnitType_1)[0]; if (mainUnit != null) diff --git a/SGGL/FineUIPro.Web/CQMS/Check/SpecialCheckList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/SpecialCheckList.aspx.cs index 3e86c55d..47300b51 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/SpecialCheckList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/SpecialCheckList.aspx.cs @@ -63,7 +63,7 @@ namespace FineUIPro.Web.CQMS.Check //FilterDataRowItem = FilterDataRowItemImplement; if (!IsPostBack) { - code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-TCC-XJ-"; + code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-QC-XJYJ-XJ-"; this.ProjectId = this.CurrUser.LoginProjectId; GetButtonPower(); diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index 203c1caa..476c6137 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1927,23 +1927,17 @@ + + + + - - - - - - - - - - @@ -13223,6 +13217,27 @@ PersonListEdit.aspx + + BonusScoreSelfManagement.aspx + ASPXCodeBehind + + + BonusScoreSelfManagement.aspx + + + BonusScoreType.aspx + ASPXCodeBehind + + + BonusScoreType.aspx + + + BonusScoreTypeEdit.aspx + ASPXCodeBehind + + + BonusScoreTypeEdit.aspx + MinusScoreSituation.aspx ASPXCodeBehind @@ -13237,6 +13252,13 @@ BonusScoreSituation.aspx + + BonusScoreSelfManagementEdit.aspx + ASPXCodeBehind + + + BonusScoreSelfManagementEdit.aspx + MinusScoreSituationEdit.aspx ASPXCodeBehind @@ -13251,48 +13273,6 @@ BonusScoreSituationEdit.aspx - - LeadershipJoinHomeworkAnalysisMeeting.aspx - ASPXCodeBehind - - - LeadershipJoinHomeworkAnalysisMeeting.aspx - - - LeadershipJoinHomeworkAnalysisMeetingEdit.aspx - ASPXCodeBehind - - - LeadershipJoinHomeworkAnalysisMeetingEdit.aspx - - - CoConstructionActivities.aspx - ASPXCodeBehind - - - CoConstructionActivities.aspx - - - CoConstructionActivitiesEdit.aspx - ASPXCodeBehind - - - CoConstructionActivitiesEdit.aspx - - - BehavioralSafetyObservation.aspx - ASPXCodeBehind - - - BehavioralSafetyObservation.aspx - - - BehavioralSafetyObservationEdit.aspx - ASPXCodeBehind - - - BehavioralSafetyObservationEdit.aspx - OnePersonPerFile.aspx ASPXCodeBehind @@ -13314,34 +13294,6 @@ StaffHSEInfoArchives.aspx - - SharingOfSafetyExperience.aspx - ASPXCodeBehind - - - SharingOfSafetyExperience.aspx - - - PersonalSafetyActionPlan.aspx - ASPXCodeBehind - - - PersonalSafetyActionPlan.aspx - - - SharingOfSafetyExperienceEdit.aspx - ASPXCodeBehind - - - SharingOfSafetyExperienceEdit.aspx - - - PersonalSafetyActionPlanEdit.aspx - ASPXCodeBehind - - - PersonalSafetyActionPlanEdit.aspx - FinalFileList.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/HJGL/MaterialManage/WelderMaterial.aspx.cs b/SGGL/FineUIPro.Web/HJGL/MaterialManage/WelderMaterial.aspx.cs index d66ce108..b794e874 100644 --- a/SGGL/FineUIPro.Web/HJGL/MaterialManage/WelderMaterial.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/MaterialManage/WelderMaterial.aspx.cs @@ -172,7 +172,7 @@ namespace FineUIPro.Web.HJGL.MaterialManage this.drpEquipment.DataBind(); Funs.FineUIPleaseSelect(this.drpEquipment); this.drpEquipment.SelectedIndex = 0; - string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-HJ-TCC-LL-"; + string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-HJ-XJYJ-LL-"; txtCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_ElectrodeRecovery", "RecoveryCode", this.CurrUser.LoginProjectId, code); diff --git a/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs b/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs index b1bccd4a..e11595c2 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/RepairManage/RepairManageEdit.aspx.cs @@ -847,7 +847,7 @@ namespace FineUIPro.Web.HJGL.RepairManage { - string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; + string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code) + "K"; } } @@ -2410,7 +2410,7 @@ namespace FineUIPro.Web.HJGL.RepairManage } else { - string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; + string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code) + "K"; } diff --git a/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageEditAdd.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageEditAdd.aspx.cs index 8a98b0ab..d74ec3fd 100644 --- a/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageEditAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageEditAdd.aspx.cs @@ -495,7 +495,7 @@ namespace FineUIPro.Web.HJGL.TrustManage { - string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; + string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code); } @@ -814,7 +814,7 @@ namespace FineUIPro.Web.HJGL.TrustManage } else { - string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; + string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code); } } diff --git a/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageSet.aspx.cs b/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageSet.aspx.cs index e6e2aa5e..67a4c9f5 100644 --- a/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageSet.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/TrustManage/TrustManageSet.aspx.cs @@ -137,7 +137,7 @@ namespace FineUIPro.Web.HJGL.TrustManage { - string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; + string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code); } } @@ -361,7 +361,7 @@ namespace FineUIPro.Web.HJGL.TrustManage } else { - string code = "TCC-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; + string code = "XJYJ-" + trustUnit.UnitCode + "-" + workArea.WorkAreaCode + "-" + NDTMethod.DetectionTypeCode + "-"; this.txtCH_TrustCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewTrustCode5ByProjectId", "dbo.CH_Trust", "CH_TrustCode", this.CurrUser.LoginProjectId, code); } } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx index 50dc206f..c0065653 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx @@ -31,6 +31,14 @@ + + + + + + + + - + <%-- - + --%> diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs index a1a7310c..cf880bbf 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.cs @@ -5,6 +5,8 @@ using System.Web; using System.Web.UI; using System.Web.UI.WebControls; using BLL; +using Microsoft.Office.Interop.Excel; +using static BLL.TrainingPlanService; namespace FineUIPro.Web.HSSE.Check { @@ -66,47 +68,42 @@ namespace FineUIPro.Web.HSSE.Check if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - List list = new List(); - List newList = new List(); - list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(this.CurrUser.LoginProjectId, null)); - list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(null, null)); - foreach (var item in list) - { - var user = newList.FirstOrDefault(x => x.UserId == item.UserId); - if (user == null) - { - newList.Add(item); - } - } - drpLeaderIds.DataValueField = "UserId"; - drpLeaderIds.DataTextField = "UserName"; - drpLeaderIds.DataSource = newList; - drpLeaderIds.DataBind(); - Funs.FineUIPleaseSelect(drpLeaderIds); - //UserService.InitFlowOperateControlUserDropDownList(this.drpLeaderIds, this.CurrUser.LoginProjectId, null, true); - UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnits, this.CurrUser.LoginProjectId, null, true); + this.InitDropDownList(); + this.ProjectLeaderCheckId = Request.Params["ProjectLeaderCheckId"]; this.UnitId = Request.Params["UnitId"]; this.MenuId = Const.ProjectLeaderCheckMenuId; if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId)) { - var getProjectLeaderCheck = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(this.ProjectLeaderCheckId); - if (getProjectLeaderCheck != null) + var model = BLL.Check_ProjectLeaderCheckService.GetProjectLeaderCheckById(this.ProjectLeaderCheckId); + if (model != null) { - if (!string.IsNullOrEmpty(getProjectLeaderCheck.UnitIds)) + if (!string.IsNullOrEmpty(model.UnitIds)) { - this.drpUnits.SelectedValueArray = getProjectLeaderCheck.UnitIds.Split(','); + this.drpUnits.SelectedValueArray = model.UnitIds.Split(','); + PersonService.InitPersonByMultiProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, model.UnitIds, false); } - if (!string.IsNullOrEmpty(getProjectLeaderCheck.LeaderIds)) + if (!string.IsNullOrEmpty(model.LeaderIds)) { - this.drpLeaderIds.SelectedValueArray = getProjectLeaderCheck.LeaderIds.Split(','); + this.drpLeaderIds.SelectedValueArray = model.LeaderIds.Split(','); } - this.txtCheckCode.Text = getProjectLeaderCheck.CheckCode; - this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", getProjectLeaderCheck.CheckDate); - this.ckIsHoldMeet.Checked = getProjectLeaderCheck.IsHoldMeet.Value; - this.txtQuestionDef.Text = getProjectLeaderCheck.QuestionDef; - this.txtRequirement.Text = getProjectLeaderCheck.Requirement; - this.txtLeaderName.Text = getProjectLeaderCheck.LeaderNames; + if (!string.IsNullOrEmpty(model.ResponsibleMan)) + { + this.drpResponsibleMan.SelectedValue = model.ResponsibleMan; + //根据人员Id获取职务Id + var user = PersonService.GetPersonById(model.ResponsibleMan); + CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false); + } + if (!string.IsNullOrEmpty(model.CompanyTrainingItemId)) + { + this.drpTrainingItem.SelectedValue = model.CompanyTrainingItemId; + } + this.txtCheckCode.Text = model.CheckCode; + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", model.CheckDate); + this.ckIsHoldMeet.Checked = model.IsHoldMeet.Value; + this.txtQuestionDef.Text = model.QuestionDef; + this.txtRequirement.Text = model.Requirement; + //this.txtLeaderName.Text = model.LeaderNames; } } else @@ -117,6 +114,55 @@ namespace FineUIPro.Web.HSSE.Check } } } + + /// + /// 下拉框加载 + /// + private void InitDropDownList() + { + List list = new List(); + List newList = new List(); + list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(this.CurrUser.LoginProjectId, null)); + list.AddRange(BLL.UserService.GetProjectRoleUserListByProjectId(null, null)); + foreach (var item in list) + { + var user = newList.FirstOrDefault(x => x.UserId == item.UserId); + if (user == null) + { + newList.Add(item); + } + } + drpLeaderIds.DataValueField = "UserId"; + drpLeaderIds.DataTextField = "UserName"; + drpLeaderIds.DataSource = newList; + drpLeaderIds.DataBind(); + Funs.FineUIPleaseSelect(drpLeaderIds); + //UserService.InitFlowOperateControlUserDropDownList(this.drpLeaderIds, this.CurrUser.LoginProjectId, null, true); + UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnits, this.CurrUser.LoginProjectId, null, true); + + PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, string.Empty, false); + } + + /// + /// 责任人下拉加载 + /// + /// + /// + protected void drpResponsibleMan_SelectedIndexChanged(object sender, EventArgs e) + { + //责任人Id + var responsibleManId = this.drpResponsibleMan.SelectedValue; + if (!string.IsNullOrWhiteSpace(responsibleManId)) + { + //根据人员Id获取职务Id + var user = PersonService.GetPersonById(responsibleManId); + if (user != null && !string.IsNullOrWhiteSpace(user.WorkPostId)) + { + CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false); + } + } + } + #endregion #region 保存 @@ -145,7 +191,7 @@ namespace FineUIPro.Web.HSSE.Check return; } - Model.Check_ProjectLeaderCheck newProjectLeaderCheck = new Model.Check_ProjectLeaderCheck + Model.Check_ProjectLeaderCheck model = new Model.Check_ProjectLeaderCheck { ProjectId = this.CurrUser.LoginProjectId, CheckCode = this.txtCheckCode.Text.Trim(), @@ -155,23 +201,53 @@ namespace FineUIPro.Web.HSSE.Check IsHoldMeet = this.ckIsHoldMeet.Checked, QuestionDef = this.txtQuestionDef.Text.Trim(), Requirement = this.txtRequirement.Text.Trim(), - LeaderNames = this.txtLeaderName.Text.Trim(), + //LeaderNames = this.txtLeaderName.Text.Trim(), + CompileDate = DateTime.Now, + CompileMan = this.CurrUser.UserId }; + if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null) + { + model.ResponsibleMan = this.drpResponsibleMan.SelectedValue; + } + model.CompanyTrainingItemId = drpTrainingItem.SelectedValue; if (!string.IsNullOrEmpty(this.ProjectLeaderCheckId)) { - newProjectLeaderCheck.ProjectLeaderCheckId = this.ProjectLeaderCheckId; - BLL.Check_ProjectLeaderCheckService.UpdateProjectLeaderCheck(newProjectLeaderCheck); - BLL.LogService.AddSys_Log(this.CurrUser, newProjectLeaderCheck.CheckCode, newProjectLeaderCheck.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnModify); + model.ProjectLeaderCheckId = this.ProjectLeaderCheckId; + BLL.Check_ProjectLeaderCheckService.UpdateProjectLeaderCheck(model); + BLL.LogService.AddSys_Log(this.CurrUser, model.CheckCode, model.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnModify); } else { this.ProjectLeaderCheckId = SQLHelper.GetNewID(); - newProjectLeaderCheck.ProjectLeaderCheckId = this.ProjectLeaderCheckId; - BLL.Check_ProjectLeaderCheckService.AddProjectLeaderCheck(newProjectLeaderCheck); - BLL.LogService.AddSys_Log(this.CurrUser, newProjectLeaderCheck.CheckCode, newProjectLeaderCheck.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnAdd); + model.ProjectLeaderCheckId = this.ProjectLeaderCheckId; + BLL.Check_ProjectLeaderCheckService.AddProjectLeaderCheck(model); + BLL.LogService.AddSys_Log(this.CurrUser, model.CheckCode, model.ProjectLeaderCheckId, this.MenuId, BLL.Const.BtnAdd); } + Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.SupervisionAndInspection); + + #region 责任人和重修教材非空,生成培训计划 + + if (!string.IsNullOrWhiteSpace(model.ResponsibleMan) && !string.IsNullOrWhiteSpace(model.CompanyTrainingItemId)) + {//责任人和重修教材非空,生成培训计划 + var CheckTypeName = Enums.RetakeCourseType.领导带班检查.ToString(); + Model.RetakeCourseProducePlanInfo info = new Model.RetakeCourseProducePlanInfo + { + CurrProjectId = this.CurrUser.LoginProjectId, + CurrUserId = this.CurrUser.UserId, + CheckId = this.ProjectLeaderCheckId, + CheckType = (int)Enums.RetakeCourseType.领导带班检查, + CheckTypeName = "领导带班检查", + PersonId = model.ResponsibleMan, + CompanyTrainingItemId = model.CompanyTrainingItemId, + //TrainEndDate = model.RectificationPeriod + }; + TrainingPlanService.RetakeCourseProducePlan(info); + } + + #endregion + } #endregion @@ -193,6 +269,11 @@ namespace FineUIPro.Web.HSSE.Check protected void drpUnits_SelectedIndexChanged(object sender, EventArgs e) { + string unitIds = Funs.GetStringByArray(this.drpUnits.SelectedValueArray); + if (!string.IsNullOrWhiteSpace(unitIds)) + { + PersonService.InitPersonByMultiProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, unitIds, false); + } this.drpUnits.SelectedValueArray = Funs.RemoveDropDownListNull(this.drpUnits.SelectedValueArray); } diff --git a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs index 244e3e30..3ec6af79 100644 --- a/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/Check/ProjectLeaderCheckEdit.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.Check { - - - public partial class ProjectLeaderCheckEdit { - +namespace FineUIPro.Web.HSSE.Check +{ + + + public partial class ProjectLeaderCheckEdit + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// txtCheckCode 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCheckCode; - + /// /// txtCheckDate 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtCheckDate; - + /// /// drpUnits 控件。 /// @@ -65,7 +67,25 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnits; - + + /// + /// drpResponsibleMan 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpResponsibleMan; + + /// + /// drpTrainingItem 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpTrainingItem; + /// /// drpLeaderIds 控件。 /// @@ -74,16 +94,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpLeaderIds; - - /// - /// txtLeaderName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtLeaderName; - + /// /// ckIsHoldMeet 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckIsHoldMeet; - + /// /// txtQuestionDef 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtQuestionDef; - + /// /// txtRequirement 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRequirement; - + /// /// Toolbar1 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnAttachUrl 控件。 /// @@ -128,7 +139,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAttachUrl; - + /// /// btnSave 控件。 /// @@ -137,7 +148,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnClose 控件。 /// @@ -146,7 +157,7 @@ namespace FineUIPro.Web.HSSE.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// WindowAtt 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx index b91b6c53..45960161 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx @@ -62,6 +62,12 @@ + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.cs index 326f3c7c..38494e80 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.cs @@ -62,6 +62,8 @@ namespace FineUIPro.Web.HSSE.EduTrain txtCompanyTrainingItemName.Text = model.CompanyTrainingItemName; txtCompileMan.Text = model.CompileMan; hdCompileMan.Text = model.CompileMan; + if (model.Outcome!=null) + drpOutcome.SelectedValue = model.Outcome.ToString(); if (!string.IsNullOrEmpty(model.TestTrainingIds)) { ddTestTraining.Values = model.TestTrainingIds.Split(','); @@ -104,8 +106,6 @@ namespace FineUIPro.Web.HSSE.EduTrain txtCompileDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); } } - - } } @@ -116,6 +116,8 @@ namespace FineUIPro.Web.HSSE.EduTrain RadioButtonList1.DataValueField = "WorkPostId"; RadioButtonList1.DataSource = workPostList; RadioButtonList1.DataBind(); + + Enums.InitOutcomeDropDownList(drpOutcome, false); } #endregion @@ -169,6 +171,8 @@ namespace FineUIPro.Web.HSSE.EduTrain CompanyTrainingItemName = this.txtCompanyTrainingItemName.Text.Trim(), CompileMan = hdCompileMan.Text.Trim() }; + + newModel.Outcome = int.Parse(drpOutcome.SelectedValue); if (!string.IsNullOrEmpty(DropDownBox1.Text)) { newModel.WorkPostIds = String.Join(",", DropDownBox1.Values); diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.designer.cs index 2bf6e5a4..c76b163c 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/CompanyTrainingItemSave.aspx.designer.cs @@ -122,6 +122,15 @@ namespace FineUIPro.Web.HSSE.EduTrain /// protected global::FineUIPro.NumberBox txtLearningTime; + /// + /// drpOutcome 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpOutcome; + /// /// txtCompileMan 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/EduTrain/PlanEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/EduTrain/PlanEdit.aspx.cs index 7371ef13..8536e9ad 100644 --- a/SGGL/FineUIPro.Web/HSSE/EduTrain/PlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/EduTrain/PlanEdit.aspx.cs @@ -60,30 +60,30 @@ namespace FineUIPro.Web.HSSE.EduTrain if (!string.IsNullOrEmpty(PlanId)) { - var trainingPlan = TrainingPlanService.GetPlanById(PlanId); + var trainingPlan = TrainingPlanService.GetPlanById(PlanId); if (trainingPlan != null) { - this.txtPlanCode.Text = trainingPlan.PlanCode; - this.txtPlanName.Text = trainingPlan.PlanName; - this.txtTrainContent.Text = trainingPlan.TrainContent; + this.txtPlanCode.Text = trainingPlan.PlanCode; + this.txtPlanName.Text = trainingPlan.PlanName; + this.txtTrainContent.Text = trainingPlan.TrainContent; this.txtTeachMan.Text = trainingPlan.TeachMan; if (trainingPlan.TeachHour.HasValue) this.txtTeachHour.Text = trainingPlan.TeachHour.Value.ToString("0.##"); - if(trainingPlan.TrainStartDate.HasValue) - this.dpTrainStartDate.SelectedDate = trainingPlan.TrainStartDate ; + if (trainingPlan.TrainStartDate.HasValue) + this.dpTrainStartDate.SelectedDate = trainingPlan.TrainStartDate; if (trainingPlan.TrainEndDate.HasValue) - this.dpTrainEndDate.SelectedDate = trainingPlan.TrainEndDate; + this.dpTrainEndDate.SelectedDate = trainingPlan.TrainEndDate; this.txtTeachAddress.Text = trainingPlan.TeachAddress; if (!string.IsNullOrEmpty(trainingPlan.UnitIds)) - dpUnit.SelectedValueArray = trainingPlan.UnitIds.Split(','); + dpUnit.SelectedValueArray = trainingPlan.UnitIds.Split(','); if (!string.IsNullOrEmpty(trainingPlan.WorkPostId)) dpWorkPost.SelectedValueArray = trainingPlan.WorkPostId.Split(','); if (!string.IsNullOrEmpty(trainingPlan.TrainLevelId)) drpTrainLevel.SelectedValue = trainingPlan.TrainLevelId; if (!string.IsNullOrEmpty(trainingPlan.TrainTypeId)) drpTrainType.SelectedValue = trainingPlan.TrainTypeId; - if(!string.IsNullOrEmpty(trainingPlan.Cycle)) + if (!string.IsNullOrEmpty(trainingPlan.Cycle)) drpCycle.SelectedValue = trainingPlan.Cycle; var planItem = (from x in Funs.DB.Training_PlanItem where x.PlanId == trainingPlan.PlanId select x.CompanyTrainingItemId).ToArray(); @@ -91,27 +91,26 @@ namespace FineUIPro.Web.HSSE.EduTrain { dpCompanyTraining.SelectedValueArray = planItem; } - var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, trainingPlan.UnitIds, trainingPlan.WorkPostId,"", trainingPlan.TrainTypeId,"","").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList(); + var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, trainingPlan.UnitIds, trainingPlan.WorkPostId, "", trainingPlan.TrainTypeId, "", "").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList(); dpSysUser.DataTextField = "PersonName"; dpSysUser.DataValueField = "PersonId"; dpSysUser.DataSource = getDataList; dpSysUser.DataBind(); - var userids =( from x in Funs.DB.Training_Task where x.PlanId == trainingPlan.PlanId select x.UserId).ToArray(); + var userids = (from x in Funs.DB.Training_Task where x.PlanId == trainingPlan.PlanId select x.UserId).ToArray(); if (userids != null && userids.Length > 0) { dpSysUser.SelectedValueArray = userids; } } - } - else - { - string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-"; - txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code); - } + } + else + { + string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-"; + txtPlanCode.Text = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code); + } } } - #endregion /// /// 初始化下拉框 @@ -142,6 +141,7 @@ namespace FineUIPro.Web.HSSE.EduTrain } + #region JQueryFeature public class JQueryFeature @@ -190,13 +190,20 @@ namespace FineUIPro.Web.HSSE.EduTrain return String.Format("Name:{0}+Id:{1}", Name, Id); } } + #endregion + + /// + /// 加载培训教材 + /// + /// + /// + /// private void BoundTree(List myList, string menuId, int depth) { var dt = GetNewTraining(menuId); if (dt.Count() > 0) { - foreach (var dr in dt) { myList.Add(new JQueryFeature(dr.CompanyTrainingId, dr.CompanyTrainingName, depth, false)); @@ -205,10 +212,9 @@ namespace FineUIPro.Web.HSSE.EduTrain } else { - var item = Funs.DB.Training_CompanyTrainingItem.Where(x => x.CompanyTrainingId == menuId); + var item = Funs.DB.Training_CompanyTrainingItem.Where(x => x.CompanyTrainingId == menuId).OrderBy(x => x.CompanyTrainingItemCode); if (item.Count() > 0) { - foreach (var dr in item) { myList.Add(new JQueryFeature(dr.CompanyTrainingItemId, dr.CompanyTrainingItemName, depth, true)); @@ -216,6 +222,7 @@ namespace FineUIPro.Web.HSSE.EduTrain } } } + /// /// 得到菜单方法 /// @@ -227,6 +234,8 @@ namespace FineUIPro.Web.HSSE.EduTrain } + #endregion + #region 提交按钮 /// @@ -235,11 +244,11 @@ namespace FineUIPro.Web.HSSE.EduTrain /// /// protected void btnSubmit_Click(object sender, EventArgs e) - { + { this.SaveData(Const.BtnSubmit); } #endregion - + #region 保存按钮 /// /// 保存按钮 @@ -248,7 +257,6 @@ namespace FineUIPro.Web.HSSE.EduTrain /// protected void btnSave_Click(object sender, EventArgs e) { - this.SaveData(Const.BtnSave); } #endregion @@ -260,20 +268,19 @@ namespace FineUIPro.Web.HSSE.EduTrain /// private void SaveData(string type) { - var db = Funs.DB; Model.Training_Plan trainingPlan = new Model.Training_Plan(); trainingPlan.ProjectId = this.CurrUser.LoginProjectId; - trainingPlan.PlanName = this.txtPlanName.Text; - trainingPlan.PlanCode = this.txtPlanCode.Text; - trainingPlan.TrainContent = this.txtTrainContent.Text; + trainingPlan.PlanName = this.txtPlanName.Text; + trainingPlan.PlanCode = this.txtPlanCode.Text; + trainingPlan.TrainContent = this.txtTrainContent.Text; trainingPlan.TeachMan = this.txtTeachMan.Text; - trainingPlan.TeachHour =decimal.Parse( this.txtTeachHour.Text); + trainingPlan.TeachHour = decimal.Parse(this.txtTeachHour.Text); trainingPlan.TrainStartDate = this.dpTrainStartDate.SelectedDate; trainingPlan.TrainEndDate = this.dpTrainEndDate.SelectedDate; trainingPlan.TeachAddress = this.txtTeachAddress.Text; - trainingPlan.UnitIds = string.Join(",", dpUnit.SelectedValueArray); + trainingPlan.UnitIds = string.Join(",", dpUnit.SelectedValueArray); trainingPlan.WorkPostId = string.Join(",", dpWorkPost.SelectedValueArray); trainingPlan.DesignerId = CurrUser.UserId; trainingPlan.DesignerDate = DateTime.Now; @@ -287,10 +294,10 @@ namespace FineUIPro.Web.HSSE.EduTrain } if (string.IsNullOrEmpty(PlanId)) { - //string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-"; - //trainingPlan.PlanCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code); + //string code = ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId).ProjectCode + "-"; + //trainingPlan.PlanCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Training_Plan", "PlanCode", this.CurrUser.LoginProjectId, code); - //trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId); + //trainingPlan.PlanCode = CodeRecordsService.ReturnCodeByMenuIdProjectId(Const.ProjectTrainingPlanMenuId, CurrUser.LoginProjectId, CurrUser.UnitId); trainingPlan.PlanId = SQLHelper.GetNewID(); TrainingPlanService.AddPlan(trainingPlan); CodeRecordsService.InsertCodeRecordsByMenuIdProjectIdUnitId(Const.ProjectTrainingPlanMenuId, trainingPlan.ProjectId, null, trainingPlan.PlanId, trainingPlan.DesignerDate); @@ -300,6 +307,14 @@ namespace FineUIPro.Web.HSSE.EduTrain { trainingPlan.PlanId = PlanId; TrainingPlanService.UpdatePlan(trainingPlan); + + ////删除培训教材类型 + var planItem = (from x in db.Training_PlanItem where x.PlanId == trainingPlan.PlanId select x).ToList(); + if (planItem.Count() > 0) + { + db.Training_PlanItem.DeleteAllOnSubmit(planItem); + db.SubmitChanges(); + } ////删除培训任务 var tasks = from x in db.Training_Task where x.PlanId == trainingPlan.PlanId select x; if (tasks.Count() > 0) @@ -313,42 +328,11 @@ namespace FineUIPro.Web.HSSE.EduTrain db.Training_Task.DeleteAllOnSubmit(tasks); db.SubmitChanges(); } - - ////删除培训教材类型 - var planItem = (from x in db.Training_PlanItem where x.PlanId == trainingPlan.PlanId select x).ToList(); - if (planItem.Count() > 0) - { - db.Training_PlanItem.DeleteAllOnSubmit(planItem); - db.SubmitChanges(); - } } - if (dpSysUser.SelectedValueArray!=null&&dpSysUser.SelectedValueArray.Count() > 0) + if (dpCompanyTraining.SelectedValueArray != null && dpCompanyTraining.SelectedValueArray.Count() > 0) { - ////新增培训人员明细 - foreach (var PersonId in dpSysUser.SelectedValueArray) - { - if (!string.IsNullOrEmpty(PersonId)) - { - Model.Training_Task newTrainDetail = new Model.Training_Task - { - TaskId = SQLHelper.GetNewID(), - ProjectId = trainingPlan.ProjectId, - PlanId = trainingPlan.PlanId, - UserId = PersonId, - TaskDate = DateTime.Now, - States = Const.State_0, ////未生成培训教材明细 - }; - db.Training_Task.InsertOnSubmit(newTrainDetail); - db.SubmitChanges(); - - - } - } - } - if (dpCompanyTraining.SelectedValueArray!=null) - { - ////新增培训教材类型明细 + ////新增培训计划明细 foreach (var CompanyTrainingItemId in dpCompanyTraining.SelectedValueArray) { if (!string.IsNullOrEmpty(CompanyTrainingItemId)) @@ -357,13 +341,11 @@ namespace FineUIPro.Web.HSSE.EduTrain { PlanItemId = SQLHelper.GetNewID(), PlanId = trainingPlan.PlanId, - }; - + if (!string.IsNullOrEmpty(CompanyTrainingItemId)) { - newPlanItem.CompanyTrainingItemId = CompanyTrainingItemId; - + newPlanItem.CompanyTrainingItemId = CompanyTrainingItemId; var trainingItem = Funs.DB.Training_CompanyTrainingItem.FirstOrDefault(x => x.CompanyTrainingItemId == CompanyTrainingItemId); if (trainingItem != null) { @@ -376,15 +358,64 @@ namespace FineUIPro.Web.HSSE.EduTrain } } + if (dpSysUser.SelectedValueArray != null && dpSysUser.SelectedValueArray.Count() > 0) + { + ////新增培训任务 + foreach (var PersonId in dpSysUser.SelectedValueArray) + { + if (!string.IsNullOrEmpty(PersonId)) + { + string taskId = SQLHelper.GetNewID(); + Model.Training_Task newTrainDetail = new Model.Training_Task + { + TaskId = taskId, + ProjectId = trainingPlan.ProjectId, + PlanId = trainingPlan.PlanId, + UserId = PersonId, + TaskDate = DateTime.Now, + States = Const.State_0, ////未生成培训教材明细 + }; + db.Training_Task.InsertOnSubmit(newTrainDetail); + db.SubmitChanges(); + if (dpCompanyTraining.SelectedValueArray != null && dpCompanyTraining.SelectedValueArray.Count() > 0) + { + foreach (var CompanyTrainingItemId in dpCompanyTraining.SelectedValueArray) + { + var trainingItem = db.Training_CompanyTrainingItem.FirstOrDefault(x => x.CompanyTrainingItemId == CompanyTrainingItemId); + Model.Training_TaskItem newTaskItem = new Model.Training_TaskItem + { + TaskItemId = SQLHelper.GetNewID(), + TaskId = taskId, + PlanId = trainingPlan.PlanId, + PersonId = PersonId, + TrainingItemCode = trainingItem.CompanyTrainingItemCode, + TrainingItemName = trainingItem.CompanyTrainingItemName, + AttachUrl = trainingItem.AttachUrl, + CompanyTrainingItemId = trainingItem.CompanyTrainingItemId, + //LearnTime = trainingItem.LearningTime, + //VideoProgress = 0, + }; + db.Training_TaskItem.InsertOnSubmit(newTaskItem); + db.SubmitChanges(); + } + var taskItem = db.Training_Task.FirstOrDefault(x => x.TaskId == taskId); + ////更新培训任务 + taskItem.States = Const.State_1; + db.SubmitChanges(); + } + + } + } + } PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); } - #endregion + #endregion + + - - /// /// @@ -398,26 +429,26 @@ namespace FineUIPro.Web.HSSE.EduTrain } protected void drpWorkUnit_SelectedIndexChanged(object sender, EventArgs e) { - + string unitName = ((DropDownList)sender).SelectedValue; string id = ""; - if(unitName != BLL.Const._Null) + if (unitName != BLL.Const._Null) { - var unit = Funs.DB.Base_Unit.FirstOrDefault(x=>x.UnitName == unitName); - if(unit != null) + var unit = Funs.DB.Base_Unit.FirstOrDefault(x => x.UnitName == unitName); + if (unit != null) { id = unit.UnitId; } } - + var sysUser = BLL.ProjectUserService.GetProjectUserByUnitidAndProjectId(CurrUser.LoginProjectId, id, Const.HSSEManager); List lists = new List(); - foreach(var item in sysUser) + foreach (var item in sysUser) { lists.Add(new ListItem(item.UserName, item.UserName)); } - - + + } protected void dpUnit_SelectedIndexChanged(object sender, EventArgs e) @@ -428,7 +459,7 @@ namespace FineUIPro.Web.HSSE.EduTrain protected void dpWorkPost_SelectedIndexChanged(object sender, EventArgs e) { initdpSysUser(); - } + } protected void drpTrainType_SelectedIndexChanged(object sender, EventArgs e) { initdpSysUser(); @@ -439,16 +470,16 @@ namespace FineUIPro.Web.HSSE.EduTrain if (dpUnit.SelectedValueArray != null && dpWorkPost.SelectedValueArray != null) { dpSysUser.Items.Clear(); - string unitIds=string.Join(",",dpUnit.SelectedValue); + string unitIds = string.Join(",", dpUnit.SelectedValue); string workPostIds = string.Join(",", dpWorkPost.SelectedValue); - var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, unitIds, workPostIds,"", drpTrainType.SelectedValue,"","").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList(); + var getDataList = APIPersonService.getTrainingPersonListByTrainTypeId(this.CurrUser.LoginProjectId, unitIds, workPostIds, "", drpTrainType.SelectedValue, "", "").OrderBy(x => x.UnitName).ThenBy(x => x.ProjectName).ToList(); dpSysUser.DataTextField = "PersonName"; dpSysUser.DataValueField = "PersonId"; dpSysUser.DataSource = getDataList; dpSysUser.DataBind(); - } + } } - + } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.cs deleted file mode 100644 index 76c54c6a..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.cs +++ /dev/null @@ -1,306 +0,0 @@ -using System; -using System.Data; -using System.Linq; -using System.Text; -using BLL; -using AspNet = System.Web.UI.WebControls; - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class BehavioralSafetyObservation : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) - { - this.ProjectId = Request.Params["projectId"]; - } - - ////权限按钮方法 - this.GetButtonPower(); - this.btnNew.OnClientClick = Window1.GetShowReference("BehavioralSafetyObservationEdit.aspx") + "return false;"; - if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) - { - Grid1.PageSize = this.CurrUser.PageSize.Value; - } - this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); - // 绑定表格 - this.BindGrid(); - } - } - - /// - /// 绑定数据 - /// - private void BindGrid() - { - if (string.IsNullOrEmpty(this.ProjectId)) - { - return; - } - var db = Funs.DB; - var queryData = from x in db.Examine_BehavioralSafetyObservation - join y in db.Sys_User on x.UserId equals y.UserId - join z in db.Sys_User on x.CompileMan equals z.UserId - where x.ProjectId == this.ProjectId - && (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim())) - && (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim())) - && (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim())) - && (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim())) - select new - { - x.Id, - x.Code, - x.Name, - x.Content, - x.Remark, - x.DateTime, - x.CompileDate, - UserName = y.UserName, - CompileManName = z.UserName - }; - Grid1.RecordCount = queryData.Count(); - Grid1.DataSource = queryData; - Grid1.DataBind(); - } - - #region 分页 排序 - /// - /// 改变索引事件 - /// - /// - /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } - - /// - /// 分页下拉选择事件 - /// - /// - /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); - BindGrid(); - } - - /// - /// 排序 - /// - /// - /// - protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) - { - this.BindGrid(); - } - #endregion - #endregion - - #region 查询 - /// - /// 查询 - /// - /// - /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); - } - #endregion - - #region 编辑 - /// - /// 双击事件 - /// - /// - /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - this.EditData(); - } - - /// - /// 右键编辑事件 - /// - /// - /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - this.EditData(); - } - - /// - /// 编辑数据方法 - /// - private void EditData() - { - if (this.btnMenuEdit.Hidden) - { - Alert.ShowInTop("抱歉!您没有编辑权限!", MessageBoxIcon.Warning); - return; - } - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); - return; - } - string id = Grid1.SelectedRowID; - var model = BLL.BehavioralSafetyObservationService.GetBehavioralSafetyObservationById(id); - if (model != null) - { - if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 - { - //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BehavioralSafetyObservationView.aspx?Id={0}", id, "查看 - "))); - } - else - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("BehavioralSafetyObservationEdit.aspx?Id={0}", id, "编辑 - "))); - } - } - } - #endregion - - #region 删除 - - /// - /// 右键删除事件 - /// - /// - /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (Grid1.SelectedRowIndexArray.Length > 0) - { - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - var newModel = BLL.BehavioralSafetyObservationService.GetBehavioralSafetyObservationById(rowID); - if (newModel != null) - { - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BehavioralSafetyObservationMenuId, BLL.Const.BtnDelete); - BLL.BehavioralSafetyObservationService.DeleteBehavioralSafetyObservationById(rowID); - } - } - - this.BindGrid(); - ShowNotify("删除数据成功!", MessageBoxIcon.Success); - } - } - #endregion - - #region 获取按钮权限 - /// - /// 获取按钮权限 - /// - /// - /// - private void GetButtonPower() - { - if (Request.Params["value"] == "0") - { - return; - } - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.BehavioralSafetyObservationMenuId); - 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.btnMenuDelete.Hidden = false; - } - } - } - #endregion - - #region 导出按钮 - /// 导出按钮 - /// - /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("行为安全观察与沟通" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = System.Text.Encoding.UTF8; - this.Grid1.PageSize = 5000; - this.BindGrid(); - Response.Write(GetGridTableHtml(Grid1)); - Response.End(); - } - - /// - /// 导出方法 - /// - /// - /// - private string GetGridTableHtml(Grid grid) - { - StringBuilder sb = new StringBuilder(); - sb.Append(""); - sb.Append(""); - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - sb.AppendFormat("", column.HeaderText); - } - sb.Append(""); - foreach (GridRow row in grid.Rows) - { - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID == "tfNumber") - { - html = (row.FindControl("lblNumber") as AspNet.Label).Text; - } - sb.AppendFormat("", html); - } - - sb.Append(""); - } - - sb.Append("
{0}
{0}
"); - - return sb.ToString(); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.designer.cs deleted file mode 100644 index 5ece7c1b..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx.designer.cs +++ /dev/null @@ -1,197 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HSSE.Examine -{ - - - public partial class BehavioralSafetyObservation - { - - /// - /// 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; - - /// - /// Toolbar2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar2; - - /// - /// txtCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCode; - - /// - /// txtName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtName; - - /// - /// txtUserName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtUserName; - - /// - /// txtContent 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtContent; - - /// - /// ToolbarFill1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarFill ToolbarFill1; - - /// - /// btnNew 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNew; - - /// - /// lblNumber 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label lblNumber; - - /// - /// ToolbarSeparator1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - - /// - /// ToolbarText1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarText ToolbarText1; - - /// - /// ddlPageSize 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlPageSize; - - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; - } -} diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx deleted file mode 100644 index ebe032cc..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx +++ /dev/null @@ -1,73 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BehavioralSafetyObservationEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BehavioralSafetyObservationEdit" ValidateRequest="false" %> - -<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> - - - - - - 编辑行为安全观察与沟通 - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.cs deleted file mode 100644 index e70d5546..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.cs +++ /dev/null @@ -1,165 +0,0 @@ -using BLL; -using System; - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class BehavioralSafetyObservationEdit : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string Id - { - get - { - return (string)ViewState["Id"]; - } - set - { - ViewState["Id"] = value; - } - } - /// - /// 项目主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - this.InitDropDownList(); - - this.Id = Request.Params["Id"]; - if (!string.IsNullOrEmpty(this.Id)) - { - Model.Examine_BehavioralSafetyObservation model = BLL.BehavioralSafetyObservationService.GetBehavioralSafetyObservationById(this.Id); - if (model != null) - { - this.ProjectId = model.ProjectId; - if (this.ProjectId != this.CurrUser.LoginProjectId) - { - this.InitDropDownList(); - } - this.txtCode.Text = model.Code; - this.txtName.Text = model.Name; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime); - if (!string.IsNullOrEmpty(model.UserId)) - { - this.drpUser.SelectedValue = model.UserId; - } - this.txtRemark.Text = model.Remark; - this.txtContent.Text = model.Content; - //this.txtContent.Text = HttpUtility.HtmlDecode(model.Content); - } - } - else - { - ////自动生成编码 - this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_BehavioralSafetyObservation", "Code", CurrUser.LoginProjectId); - //////自动生成编码 - //this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.BehavioralSafetyObservationMenuId, this.ProjectId, this.CurrUser.UnitId); - this.drpUser.SelectedValue = this.CurrUser.UserId; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); - } - } - } - - /// - /// 初始化下拉框 - /// - private void InitDropDownList() - { - BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false); - } - - #endregion - - #region 保存 - /// - /// 保存按钮 - /// - /// - /// - protected void btnSave_Click(object sender, EventArgs e) - { - this.SaveData(BLL.Const.BtnSave); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } - - /// - /// 保存数据 - /// - /// - private void SaveData(string type) - { - Model.Examine_BehavioralSafetyObservation newModel = new Model.Examine_BehavioralSafetyObservation - { - ProjectId = this.ProjectId, - Code = this.txtCode.Text.Trim(), - CompileDate = DateTime.Now, - CompileMan = this.CurrUser.UserId - }; - if (this.drpUser.SelectedValue != BLL.Const._Null) - { - newModel.UserId = this.drpUser.SelectedValue; - } - - newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim()); - newModel.Remark = this.txtRemark.Text.Trim(); - newModel.Name = this.txtName.Text.Trim(); - newModel.Content = this.txtContent.Text.Trim(); - - if (!string.IsNullOrEmpty(this.Id)) - { - newModel.Id = this.Id; - BLL.BehavioralSafetyObservationService.UpdateBehavioralSafetyObservation(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BehavioralSafetyObservationMenuId, BLL.Const.BtnModify); - } - else - { - this.Id = SQLHelper.GetNewID(typeof(Model.Examine_BehavioralSafetyObservation)); - newModel.Id = this.Id; - BLL.BehavioralSafetyObservationService.AddBehavioralSafetyObservation(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.BehavioralSafetyObservationMenuId, BLL.Const.BtnAdd); - } - } - #endregion - - #region 附件上传 - /// - /// 上传附件 - /// - /// - /// - protected void btnAttachUrl_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(this.Id)) - { - SaveData(BLL.Const.BtnSave); - } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/BehavioralSafetyObservation&menuId={1}", Id, BLL.Const.BehavioralSafetyObservationMenuId))); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.designer.cs deleted file mode 100644 index f699cff5..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservationEdit.aspx.designer.cs +++ /dev/null @@ -1,143 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HSSE.Examine -{ - - - public partial class BehavioralSafetyObservationEdit - { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// PageManager1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.PageManager PageManager1; - - /// - /// SimpleForm1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form SimpleForm1; - - /// - /// txtCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCode; - - /// - /// txtName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtName; - - /// - /// drpUser 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUser; - - /// - /// txtDateTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtDateTime; - - /// - /// txtContent 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtContent; - - /// - /// txtRemark 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtRemark; - - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; - - /// - /// btnAttachUrl 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnAttachUrl; - - /// - /// btnSave 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSave; - - /// - /// btnClose 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnClose; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - } -} diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx b/SGGL/FineUIPro.Web/HSSE/Examine/BonusScoreSelfManagement.aspx similarity index 80% rename from SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx rename to SGGL/FineUIPro.Web/HSSE/Examine/BonusScoreSelfManagement.aspx index 8cc6d7ed..3d6c87e8 100644 --- a/SGGL/FineUIPro.Web/HSSE/Examine/BehavioralSafetyObservation.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Examine/BonusScoreSelfManagement.aspx @@ -1,11 +1,11 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BehavioralSafetyObservation.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BehavioralSafetyObservation" %> +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="BonusScoreSelfManagement.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.BonusScoreSelfManagement" %> - 行为安全观察与沟通 + 自主管理加分项 - - -
- - - - - - - - - - - - - - - - - - - <%-- - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/CoConstructionActivitiesEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/CoConstructionActivitiesEdit.aspx.cs deleted file mode 100644 index 6e856999..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/CoConstructionActivitiesEdit.aspx.cs +++ /dev/null @@ -1,165 +0,0 @@ -using BLL; -using System; - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class CoConstructionActivitiesEdit : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string Id - { - get - { - return (string)ViewState["Id"]; - } - set - { - ViewState["Id"] = value; - } - } - /// - /// 项目主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - this.InitDropDownList(); - - this.Id = Request.Params["Id"]; - if (!string.IsNullOrEmpty(this.Id)) - { - Model.Examine_CoConstructionActivities model = BLL.CoConstructionActivitiesService.GetCoConstructionActivitiesById(this.Id); - if (model != null) - { - this.ProjectId = model.ProjectId; - if (this.ProjectId != this.CurrUser.LoginProjectId) - { - this.InitDropDownList(); - } - this.txtCode.Text = model.Code; - this.txtName.Text = model.Name; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime); - if (!string.IsNullOrEmpty(model.UserId)) - { - this.drpUser.SelectedValue = model.UserId; - } - this.txtRemark.Text = model.Remark; - this.txtContent.Text = model.Content; - //this.txtContent.Text = HttpUtility.HtmlDecode(model.Content); - } - } - else - { - ////自动生成编码 - this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_CoConstructionActivities", "Code", CurrUser.LoginProjectId); - //////自动生成编码 - //this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.CoConstructionActivitiesMenuId, this.ProjectId, this.CurrUser.UnitId); - this.drpUser.SelectedValue = this.CurrUser.UserId; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); - } - } - } - - /// - /// 初始化下拉框 - /// - private void InitDropDownList() - { - BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false); - } - - #endregion - - #region 保存 - /// - /// 保存按钮 - /// - /// - /// - protected void btnSave_Click(object sender, EventArgs e) - { - this.SaveData(BLL.Const.BtnSave); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } - - /// - /// 保存数据 - /// - /// - private void SaveData(string type) - { - Model.Examine_CoConstructionActivities newModel = new Model.Examine_CoConstructionActivities - { - ProjectId = this.ProjectId, - Code = this.txtCode.Text.Trim(), - CompileDate = DateTime.Now, - CompileMan = this.CurrUser.UserId - }; - if (this.drpUser.SelectedValue != BLL.Const._Null) - { - newModel.UserId = this.drpUser.SelectedValue; - } - - newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim()); - newModel.Name = this.txtName.Text.Trim(); - newModel.Remark = this.txtRemark.Text.Trim(); - newModel.Content = this.txtContent.Text.Trim(); - - if (!string.IsNullOrEmpty(this.Id)) - { - newModel.Id = this.Id; - BLL.CoConstructionActivitiesService.UpdateCoConstructionActivities(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.CoConstructionActivitiesMenuId, BLL.Const.BtnModify); - } - else - { - this.Id = SQLHelper.GetNewID(typeof(Model.Examine_CoConstructionActivities)); - newModel.Id = this.Id; - BLL.CoConstructionActivitiesService.AddCoConstructionActivities(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.CoConstructionActivitiesMenuId, BLL.Const.BtnAdd); - } - } - #endregion - - #region 附件上传 - /// - /// 上传附件 - /// - /// - /// - protected void btnAttachUrl_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(this.Id)) - { - SaveData(BLL.Const.BtnSave); - } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/CoConstructionActivities&menuId={1}", Id, BLL.Const.CoConstructionActivitiesMenuId))); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx b/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx deleted file mode 100644 index 2f0e08fd..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx +++ /dev/null @@ -1,153 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeadershipJoinHomeworkAnalysisMeeting.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.LeadershipJoinHomeworkAnalysisMeeting" %> - - - - - - - 领导人员参加班组作业分析会 - - - - -
- - - - - - - - - - - - - - - - - - - <%-- - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx.cs deleted file mode 100644 index 01a55340..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeeting.aspx.cs +++ /dev/null @@ -1,306 +0,0 @@ -using System; -using System.Data; -using System.Linq; -using System.Text; -using BLL; -using AspNet = System.Web.UI.WebControls; - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class LeadershipJoinHomeworkAnalysisMeeting : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) - { - this.ProjectId = Request.Params["projectId"]; - } - - ////权限按钮方法 - this.GetButtonPower(); - this.btnNew.OnClientClick = Window1.GetShowReference("LeadershipJoinHomeworkAnalysisMeetingEdit.aspx") + "return false;"; - if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) - { - Grid1.PageSize = this.CurrUser.PageSize.Value; - } - this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); - // 绑定表格 - this.BindGrid(); - } - } - - /// - /// 绑定数据 - /// - private void BindGrid() - { - if (string.IsNullOrEmpty(this.ProjectId)) - { - return; - } - var db = Funs.DB; - var queryData = from x in db.Examine_LeadershipJoinHomeworkAnalysisMeeting - join y in db.Sys_User on x.UserId equals y.UserId - join z in db.Sys_User on x.CompileMan equals z.UserId - where x.ProjectId == this.ProjectId - && (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim())) - && (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim())) - && (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim())) - && (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim())) - select new - { - x.Id, - x.Code, - x.Name, - x.Content, - x.Remark, - x.DateTime, - x.CompileDate, - UserName = y.UserName, - CompileManName = z.UserName - }; - Grid1.RecordCount = queryData.Count(); - Grid1.DataSource = queryData; - Grid1.DataBind(); - } - - #region 分页 排序 - /// - /// 改变索引事件 - /// - /// - /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } - - /// - /// 分页下拉选择事件 - /// - /// - /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); - BindGrid(); - } - - /// - /// 排序 - /// - /// - /// - protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) - { - this.BindGrid(); - } - #endregion - #endregion - - #region 查询 - /// - /// 查询 - /// - /// - /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); - } - #endregion - - #region 编辑 - /// - /// 双击事件 - /// - /// - /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - this.EditData(); - } - - /// - /// 右键编辑事件 - /// - /// - /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - this.EditData(); - } - - /// - /// 编辑数据方法 - /// - private void EditData() - { - if (this.btnMenuEdit.Hidden) - { - Alert.ShowInTop("抱歉!您没有编辑权限!", MessageBoxIcon.Warning); - return; - } - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); - return; - } - string id = Grid1.SelectedRowID; - var model = BLL.LeadershipJoinHomeworkAnalysisMeetingService.GetLeadershipJoinHomeworkAnalysisMeetingById(id); - if (model != null) - { - if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 - { - //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LeadershipJoinHomeworkAnalysisMeetingView.aspx?Id={0}", id, "查看 - "))); - } - else - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("LeadershipJoinHomeworkAnalysisMeetingEdit.aspx?Id={0}", id, "编辑 - "))); - } - } - } - #endregion - - #region 删除 - - /// - /// 右键删除事件 - /// - /// - /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (Grid1.SelectedRowIndexArray.Length > 0) - { - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - var newModel = BLL.LeadershipJoinHomeworkAnalysisMeetingService.GetLeadershipJoinHomeworkAnalysisMeetingById(rowID); - if (newModel != null) - { - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, BLL.Const.BtnDelete); - BLL.LeadershipJoinHomeworkAnalysisMeetingService.DeleteLeadershipJoinHomeworkAnalysisMeetingById(rowID); - } - } - - this.BindGrid(); - ShowNotify("删除数据成功!", MessageBoxIcon.Success); - } - } - #endregion - - #region 获取按钮权限 - /// - /// 获取按钮权限 - /// - /// - /// - private void GetButtonPower() - { - if (Request.Params["value"] == "0") - { - return; - } - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId); - 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.btnMenuDelete.Hidden = false; - } - } - } - #endregion - - #region 导出按钮 - /// 导出按钮 - ///
- /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("领导人员参加班组作业分析会" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = System.Text.Encoding.UTF8; - this.Grid1.PageSize = 5000; - this.BindGrid(); - Response.Write(GetGridTableHtml(Grid1)); - Response.End(); - } - - /// - /// 导出方法 - /// - /// - /// - private string GetGridTableHtml(Grid grid) - { - StringBuilder sb = new StringBuilder(); - sb.Append(""); - sb.Append(""); - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - sb.AppendFormat("", column.HeaderText); - } - sb.Append(""); - foreach (GridRow row in grid.Rows) - { - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID == "tfNumber") - { - html = (row.FindControl("lblNumber") as AspNet.Label).Text; - } - sb.AppendFormat("", html); - } - - sb.Append(""); - } - - sb.Append("
{0}
{0}
"); - - return sb.ToString(); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx deleted file mode 100644 index 1d7e0b51..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx +++ /dev/null @@ -1,73 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.LeadershipJoinHomeworkAnalysisMeetingEdit" ValidateRequest="false" %> - -<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> - - - - - - 编辑领导人员参加班组作业分析会 - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs deleted file mode 100644 index db5ce0f4..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/LeadershipJoinHomeworkAnalysisMeetingEdit.aspx.cs +++ /dev/null @@ -1,165 +0,0 @@ -using BLL; -using System; - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class LeadershipJoinHomeworkAnalysisMeetingEdit : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string Id - { - get - { - return (string)ViewState["Id"]; - } - set - { - ViewState["Id"] = value; - } - } - /// - /// 项目主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - this.InitDropDownList(); - - this.Id = Request.Params["Id"]; - if (!string.IsNullOrEmpty(this.Id)) - { - Model.Examine_LeadershipJoinHomeworkAnalysisMeeting model = BLL.LeadershipJoinHomeworkAnalysisMeetingService.GetLeadershipJoinHomeworkAnalysisMeetingById(this.Id); - if (model != null) - { - this.ProjectId = model.ProjectId; - if (this.ProjectId != this.CurrUser.LoginProjectId) - { - this.InitDropDownList(); - } - this.txtCode.Text = model.Code; - this.txtName.Text = model.Name; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime); - if (!string.IsNullOrEmpty(model.UserId)) - { - this.drpUser.SelectedValue = model.UserId; - } - this.txtRemark.Text = model.Remark; - this.txtContent.Text = model.Content; - //this.txtContent.Text = HttpUtility.HtmlDecode(model.Content); - } - } - else - { - ////自动生成编码 - this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_LeadershipJoinHomeworkAnalysisMeeting", "Code", CurrUser.LoginProjectId); - //////自动生成编码 - //this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, this.ProjectId, this.CurrUser.UnitId); - this.drpUser.SelectedValue = this.CurrUser.UserId; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); - } - } - } - - /// - /// 初始化下拉框 - /// - private void InitDropDownList() - { - BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false); - } - - #endregion - - #region 保存 - /// - /// 保存按钮 - /// - /// - /// - protected void btnSave_Click(object sender, EventArgs e) - { - this.SaveData(BLL.Const.BtnSave); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } - - /// - /// 保存数据 - /// - /// - private void SaveData(string type) - { - Model.Examine_LeadershipJoinHomeworkAnalysisMeeting newModel = new Model.Examine_LeadershipJoinHomeworkAnalysisMeeting - { - ProjectId = this.ProjectId, - Code = this.txtCode.Text.Trim(), - CompileDate = DateTime.Now, - CompileMan = this.CurrUser.UserId - }; - if (this.drpUser.SelectedValue != BLL.Const._Null) - { - newModel.UserId = this.drpUser.SelectedValue; - } - - newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim()); - newModel.Name = this.txtName.Text.Trim(); - newModel.Remark = this.txtRemark.Text.Trim(); - newModel.Content = this.txtContent.Text.Trim(); - - if (!string.IsNullOrEmpty(this.Id)) - { - newModel.Id = this.Id; - BLL.LeadershipJoinHomeworkAnalysisMeetingService.UpdateLeadershipJoinHomeworkAnalysisMeeting(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, BLL.Const.BtnModify); - } - else - { - this.Id = SQLHelper.GetNewID(typeof(Model.Examine_LeadershipJoinHomeworkAnalysisMeeting)); - newModel.Id = this.Id; - BLL.LeadershipJoinHomeworkAnalysisMeetingService.AddLeadershipJoinHomeworkAnalysisMeeting(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId, BLL.Const.BtnAdd); - } - } - #endregion - - #region 附件上传 - /// - /// 上传附件 - /// - /// - /// - protected void btnAttachUrl_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(this.Id)) - { - SaveData(BLL.Const.BtnSave); - } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/LeadershipJoinHomeworkAnalysisMeeting&menuId={1}", Id, BLL.Const.LeadershipJoinHomeworkAnalysisMeetingMenuId))); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/OnePersonPerFile.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/OnePersonPerFile.aspx.cs index 2d3460c4..afd7efa7 100644 --- a/SGGL/FineUIPro.Web/HSSE/Examine/OnePersonPerFile.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Examine/OnePersonPerFile.aspx.cs @@ -109,7 +109,7 @@ namespace FineUIPro.Web.HSSE.Examine ///
private void BindGrid() { - panelCenterRegion.IFrameUrl = $"./StaffHSEInfoArchives.aspx?UserId={this.UserId}&&PersonId={this.PersonId}"; + panelCenterRegion.IFrameUrl = $"./StaffHSEInfoArchivesOld.aspx?UserId={this.UserId}&&PersonId={this.PersonId}"; } #endregion diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx b/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx deleted file mode 100644 index 35339a29..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx +++ /dev/null @@ -1,153 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalSafetyActionPlan.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.PersonalSafetyActionPlan" %> - - - - - - - 个人安全行动计划 - - - - -
- - - - - - - - - - - - - - - - - - - <%-- - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx.designer.cs deleted file mode 100644 index 3d29b055..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlan.aspx.designer.cs +++ /dev/null @@ -1,197 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HSSE.Examine -{ - - - public partial class PersonalSafetyActionPlan - { - - /// - /// 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; - - /// - /// Toolbar2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar2; - - /// - /// txtCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCode; - - /// - /// txtName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtName; - - /// - /// txtUserName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtUserName; - - /// - /// txtContent 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtContent; - - /// - /// ToolbarFill1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarFill ToolbarFill1; - - /// - /// btnNew 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNew; - - /// - /// lblNumber 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label lblNumber; - - /// - /// ToolbarSeparator1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - - /// - /// ToolbarText1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarText ToolbarText1; - - /// - /// ddlPageSize 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlPageSize; - - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; - } -} diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx deleted file mode 100644 index 26c0dc11..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx +++ /dev/null @@ -1,73 +0,0 @@ -<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PersonalSafetyActionPlanEdit.aspx.cs" Inherits="FineUIPro.Web.HSSE.Examine.PersonalSafetyActionPlanEdit" ValidateRequest="false" %> - -<%@ Register Src="~/Controls/FlowOperateControl.ascx" TagName="FlowOperateControl" TagPrefix="uc1" %> - - - - - - 编辑个人安全行动计划 - - - -
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx.designer.cs deleted file mode 100644 index 2759f660..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/PersonalSafetyActionPlanEdit.aspx.designer.cs +++ /dev/null @@ -1,143 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HSSE.Examine -{ - - - public partial class PersonalSafetyActionPlanEdit - { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// PageManager1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.PageManager PageManager1; - - /// - /// SimpleForm1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form SimpleForm1; - - /// - /// txtCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCode; - - /// - /// txtName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtName; - - /// - /// drpUser 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUser; - - /// - /// txtDateTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtDateTime; - - /// - /// txtContent 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtContent; - - /// - /// txtRemark 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtRemark; - - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; - - /// - /// btnAttachUrl 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnAttachUrl; - - /// - /// btnSave 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSave; - - /// - /// btnClose 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnClose; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - } -} diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.cs deleted file mode 100644 index c2c0124b..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.cs +++ /dev/null @@ -1,307 +0,0 @@ -using System; -using System.Data; -using System.Linq; -using System.Text; -using BLL; -using AspNet = System.Web.UI.WebControls; - - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class SharingOfSafetyExperience : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - if (!string.IsNullOrEmpty(Request.Params["projectId"]) && Request.Params["projectId"] != this.CurrUser.LoginProjectId) - { - this.ProjectId = Request.Params["projectId"]; - } - - ////权限按钮方法 - this.GetButtonPower(); - this.btnNew.OnClientClick = Window1.GetShowReference("SharingOfSafetyExperienceEdit.aspx") + "return false;"; - if (this.CurrUser != null && this.CurrUser.PageSize.HasValue) - { - Grid1.PageSize = this.CurrUser.PageSize.Value; - } - this.ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); - // 绑定表格 - this.BindGrid(); - } - } - - /// - /// 绑定数据 - /// - private void BindGrid() - { - if (string.IsNullOrEmpty(this.ProjectId)) - { - return; - } - var db = Funs.DB; - var queryData = from x in db.Examine_SharingOfSafetyExperience - join y in db.Sys_User on x.UserId equals y.UserId - join z in db.Sys_User on x.CompileMan equals z.UserId - where x.ProjectId == this.ProjectId - && (string.IsNullOrEmpty(txtCode.Text.Trim()) || x.Code.Contains(txtCode.Text.Trim())) - && (string.IsNullOrEmpty(txtName.Text.Trim()) || x.Name.Contains(txtName.Text.Trim())) - && (string.IsNullOrEmpty(txtUserName.Text.Trim()) || y.UserName.Contains(txtUserName.Text.Trim())) - && (string.IsNullOrEmpty(txtContent.Text.Trim()) || x.Content.Contains(txtContent.Text.Trim())) - select new - { - x.Id, - x.Code, - x.Name, - x.Content, - x.Remark, - x.DateTime, - x.CompileDate, - UserName = y.UserName, - CompileManName = z.UserName - }; - Grid1.RecordCount = queryData.Count(); - Grid1.DataSource = queryData; - Grid1.DataBind(); - } - - #region 分页 排序 - /// - /// 改变索引事件 - /// - /// - /// - protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) - { - BindGrid(); - } - - /// - /// 分页下拉选择事件 - /// - /// - /// - protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) - { - this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); - BindGrid(); - } - - /// - /// 排序 - /// - /// - /// - protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) - { - this.BindGrid(); - } - #endregion - #endregion - - #region 查询 - /// - /// 查询 - /// - /// - /// - protected void TextBox_TextChanged(object sender, EventArgs e) - { - this.BindGrid(); - } - #endregion - - #region 编辑 - /// - /// 双击事件 - /// - /// - /// - protected void Grid1_RowDoubleClick(object sender, GridRowClickEventArgs e) - { - this.EditData(); - } - - /// - /// 右键编辑事件 - /// - /// - /// - protected void btnMenuEdit_Click(object sender, EventArgs e) - { - this.EditData(); - } - - /// - /// 编辑数据方法 - /// - private void EditData() - { - if (this.btnMenuEdit.Hidden) - { - Alert.ShowInTop("抱歉!您没有编辑权限!", MessageBoxIcon.Warning); - return; - } - if (Grid1.SelectedRowIndexArray.Length == 0) - { - Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); - return; - } - string id = Grid1.SelectedRowID; - var model = BLL.SharingOfSafetyExperienceService.GetSharingOfSafetyExperienceById(id); - if (model != null) - { - if (this.btnMenuEdit.Hidden) ////双击事件 编辑权限有:编辑页面,无:查看页面 或者状态是完成时查看页面 - { - //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SharingOfSafetyExperienceView.aspx?Id={0}", id, "查看 - "))); - } - else - { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("SharingOfSafetyExperienceEdit.aspx?Id={0}", id, "编辑 - "))); - } - } - } - #endregion - - #region 删除 - - /// - /// 右键删除事件 - /// - /// - /// - protected void btnMenuDelete_Click(object sender, EventArgs e) - { - if (Grid1.SelectedRowIndexArray.Length > 0) - { - foreach (int rowIndex in Grid1.SelectedRowIndexArray) - { - string rowID = Grid1.DataKeys[rowIndex][0].ToString(); - var newModel = BLL.SharingOfSafetyExperienceService.GetSharingOfSafetyExperienceById(rowID); - if (newModel != null) - { - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.SharingOfSafetyExperienceMenuId, BLL.Const.BtnDelete); - BLL.SharingOfSafetyExperienceService.DeleteSharingOfSafetyExperienceById(rowID); - } - } - - this.BindGrid(); - ShowNotify("删除数据成功!", MessageBoxIcon.Success); - } - } - #endregion - - #region 获取按钮权限 - /// - /// 获取按钮权限 - /// - /// - /// - private void GetButtonPower() - { - if (Request.Params["value"] == "0") - { - return; - } - var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.SharingOfSafetyExperienceMenuId); - 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.btnMenuDelete.Hidden = false; - } - } - } - #endregion - - #region 导出按钮 - /// 导出按钮 - ///
- /// - /// - protected void btnOut_Click(object sender, EventArgs e) - { - Response.ClearContent(); - string filename = Funs.GetNewFileName(); - Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("安全经验分享" + filename, System.Text.Encoding.UTF8) + ".xls"); - Response.ContentType = "application/excel"; - Response.ContentEncoding = System.Text.Encoding.UTF8; - this.Grid1.PageSize = 5000; - this.BindGrid(); - Response.Write(GetGridTableHtml(Grid1)); - Response.End(); - } - - /// - /// 导出方法 - /// - /// - /// - private string GetGridTableHtml(Grid grid) - { - StringBuilder sb = new StringBuilder(); - sb.Append(""); - sb.Append(""); - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - sb.AppendFormat("", column.HeaderText); - } - sb.Append(""); - foreach (GridRow row in grid.Rows) - { - sb.Append(""); - foreach (GridColumn column in grid.Columns) - { - string html = row.Values[column.ColumnIndex].ToString(); - if (column.ColumnID == "tfNumber") - { - html = (row.FindControl("lblNumber") as AspNet.Label).Text; - } - sb.AppendFormat("", html); - } - - sb.Append(""); - } - - sb.Append("
{0}
{0}
"); - - return sb.ToString(); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.designer.cs deleted file mode 100644 index 8767965e..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperience.aspx.designer.cs +++ /dev/null @@ -1,197 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HSSE.Examine -{ - - - public partial class SharingOfSafetyExperience - { - - /// - /// 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; - - /// - /// Toolbar2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar2; - - /// - /// txtCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCode; - - /// - /// txtName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtName; - - /// - /// txtUserName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtUserName; - - /// - /// txtContent 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtContent; - - /// - /// ToolbarFill1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarFill ToolbarFill1; - - /// - /// btnNew 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnNew; - - /// - /// lblNumber 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.WebControls.Label lblNumber; - - /// - /// ToolbarSeparator1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - - /// - /// ToolbarText1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ToolbarText ToolbarText1; - - /// - /// ddlPageSize 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList ddlPageSize; - - /// - /// Window1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window Window1; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - - /// - /// Menu1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Menu Menu1; - - /// - /// btnMenuEdit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuEdit; - - /// - /// btnMenuDelete 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnMenuDelete; - } -} diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.cs deleted file mode 100644 index 3a74b145..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.cs +++ /dev/null @@ -1,165 +0,0 @@ -using BLL; -using System; - -namespace FineUIPro.Web.HSSE.Examine -{ - public partial class SharingOfSafetyExperienceEdit : PageBase - { - #region 定义项 - /// - /// 主键 - /// - public string Id - { - get - { - return (string)ViewState["Id"]; - } - set - { - ViewState["Id"] = value; - } - } - /// - /// 项目主键 - /// - public string ProjectId - { - get - { - return (string)ViewState["ProjectId"]; - } - set - { - ViewState["ProjectId"] = value; - } - } - #endregion - - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) - { - if (!IsPostBack) - { - this.ProjectId = this.CurrUser.LoginProjectId; - this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - this.InitDropDownList(); - - this.Id = Request.Params["Id"]; - if (!string.IsNullOrEmpty(this.Id)) - { - Model.Examine_SharingOfSafetyExperience model = BLL.SharingOfSafetyExperienceService.GetSharingOfSafetyExperienceById(this.Id); - if (model != null) - { - this.ProjectId = model.ProjectId; - if (this.ProjectId != this.CurrUser.LoginProjectId) - { - this.InitDropDownList(); - } - this.txtCode.Text = model.Code; - this.txtName.Text = model.Name; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", model.DateTime); - if (!string.IsNullOrEmpty(model.UserId)) - { - this.drpUser.SelectedValue = model.UserId; - } - this.txtRemark.Text = model.Remark; - this.txtContent.Text = model.Content; - //this.txtContent.Text = HttpUtility.HtmlDecode(model.Content); - } - } - else - { - ////自动生成编码 - this.txtCode.Text = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_SharingOfSafetyExperience", "Code", CurrUser.LoginProjectId); - //////自动生成编码 - //this.txtCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.SharingOfSafetyExperienceMenuId, this.ProjectId, this.CurrUser.UnitId); - this.drpUser.SelectedValue = this.CurrUser.UserId; - this.txtDateTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); - } - } - } - - /// - /// 初始化下拉框 - /// - private void InitDropDownList() - { - BLL.UserService.InitUserDropDownList(this.drpUser, this.ProjectId, false); - } - - #endregion - - #region 保存 - /// - /// 保存按钮 - /// - /// - /// - protected void btnSave_Click(object sender, EventArgs e) - { - this.SaveData(BLL.Const.BtnSave); - PageContext.RegisterStartupScript(ActiveWindow.GetHideRefreshReference()); - } - - /// - /// 保存数据 - /// - /// - private void SaveData(string type) - { - Model.Examine_SharingOfSafetyExperience newModel = new Model.Examine_SharingOfSafetyExperience - { - ProjectId = this.ProjectId, - Code = this.txtCode.Text.Trim(), - CompileDate = DateTime.Now, - CompileMan = this.CurrUser.UserId - }; - if (this.drpUser.SelectedValue != BLL.Const._Null) - { - newModel.UserId = this.drpUser.SelectedValue; - } - - newModel.DateTime = Funs.GetNewDateTime(this.txtDateTime.Text.Trim()); - newModel.Name = this.txtName.Text.Trim(); - newModel.Remark = this.txtRemark.Text.Trim(); - newModel.Content = this.txtContent.Text.Trim(); - - if (!string.IsNullOrEmpty(this.Id)) - { - newModel.Id = this.Id; - BLL.SharingOfSafetyExperienceService.UpdateSharingOfSafetyExperience(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.SharingOfSafetyExperienceMenuId, BLL.Const.BtnModify); - } - else - { - this.Id = SQLHelper.GetNewID(typeof(Model.Examine_SharingOfSafetyExperience)); - newModel.Id = this.Id; - BLL.SharingOfSafetyExperienceService.AddSharingOfSafetyExperience(newModel); - BLL.LogService.AddSys_Log(this.CurrUser, newModel.Code, newModel.Id, BLL.Const.SharingOfSafetyExperienceMenuId, BLL.Const.BtnAdd); - } - } - #endregion - - #region 附件上传 - /// - /// 上传附件 - /// - /// - /// - protected void btnAttachUrl_Click(object sender, EventArgs e) - { - if (string.IsNullOrEmpty(this.Id)) - { - SaveData(BLL.Const.BtnSave); - } - PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format("../../AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Examine/SharingOfSafetyExperience&menuId={1}", Id, BLL.Const.SharingOfSafetyExperienceMenuId))); - } - #endregion - } -} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.designer.cs deleted file mode 100644 index 399fe2cb..00000000 --- a/SGGL/FineUIPro.Web/HSSE/Examine/SharingOfSafetyExperienceEdit.aspx.designer.cs +++ /dev/null @@ -1,143 +0,0 @@ -//------------------------------------------------------------------------------ -// <自动生成> -// 此代码由工具生成。 -// -// 对此文件的更改可能导致不正确的行为,如果 -// 重新生成代码,则所做更改将丢失。 -// -//------------------------------------------------------------------------------ - -namespace FineUIPro.Web.HSSE.Examine -{ - - - public partial class SharingOfSafetyExperienceEdit - { - - /// - /// form1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::System.Web.UI.HtmlControls.HtmlForm form1; - - /// - /// PageManager1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.PageManager PageManager1; - - /// - /// SimpleForm1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Form SimpleForm1; - - /// - /// txtCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCode; - - /// - /// txtName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtName; - - /// - /// drpUser 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUser; - - /// - /// txtDateTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtDateTime; - - /// - /// txtContent 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtContent; - - /// - /// txtRemark 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtRemark; - - /// - /// Toolbar1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar1; - - /// - /// btnAttachUrl 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnAttachUrl; - - /// - /// btnSave 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnSave; - - /// - /// btnClose 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Button btnClose; - - /// - /// WindowAtt 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Window WindowAtt; - } -} diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx index 9d249dc3..5be13d63 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx @@ -9,100 +9,104 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs index b3c160a5..dc05ff36 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs @@ -1,6 +1,8 @@ using BLL; +using FineUIPro.Web.DataShow; using System; using System.Linq; +using static BLL.TrainingPlanService; namespace FineUIPro.Web.HSSE.HiddenInspection { @@ -78,10 +80,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection if (!IsPostBack) { this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); - - UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); - UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, true); - UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); + this.InitDropDownList(); this.drpRegisterTypes.DataTextField = "RegisterTypesName"; this.drpRegisterTypes.DataValueField = "RegisterTypesId"; @@ -102,11 +101,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection this.drpUnit.SelectedValue = registration.ResponsibleUnit; this.drpWorkArea.DataSource = UnitWorkService.GetUnitWorkList(this.CurrUser.LoginProjectId); this.drpWorkArea.DataBind(); - this.drpResponsibleMan.DataSource = from x in db.Sys_User - join y in db.Project_ProjectUser - on x.UserId equals y.UserId - where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue - select x; + //this.drpResponsibleMan.DataSource = from x in db.Sys_User + // join y in db.Project_ProjectUser + // on x.UserId equals y.UserId + // where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue + // select x; + + PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, registration.ResponsibleUnit, false); this.drpResponsibleMan.DataBind(); this.drpWorkArea.SelectedValue = BLL.Const._Null; this.drpResponsibleMan.SelectedValue = BLL.Const._Null; @@ -126,6 +127,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection if (!string.IsNullOrEmpty(registration.ResponsibleMan)) { this.drpResponsibleMan.SelectedValue = registration.ResponsibleMan; + //根据人员Id获取职务Id + var user = PersonService.GetPersonById(registration.ResponsibleMan); + CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false); + } + if (!string.IsNullOrEmpty(registration.CompanyTrainingItemId)) + { + this.drpTrainingItem.SelectedValue = registration.CompanyTrainingItemId; } if (!string.IsNullOrEmpty(registration.Risk_Level)) { @@ -169,6 +177,39 @@ namespace FineUIPro.Web.HSSE.HiddenInspection } } } + + /// + /// 下拉框加载 + /// + private void InitDropDownList() + { + UnitService.InitUnitByProjectIdUnitTypeDropDownList(this.drpUnit, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); + UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, true); + //UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); + PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, string.Empty, false); + } + + /// + /// 责任人下拉加载 + /// + /// + /// + protected void drpResponsibleMan_SelectedIndexChanged(object sender, EventArgs e) + { + //责任人Id + var responsibleManId = this.drpResponsibleMan.SelectedValue; + if (!string.IsNullOrWhiteSpace(responsibleManId)) + { + //根据人员Id获取职务Id + var user = PersonService.GetPersonById(responsibleManId); + if (user != null && !string.IsNullOrWhiteSpace(user.WorkPostId)) + { + CompanyTrainingItemService.InitCompanyTrainingItemDownList(this.drpTrainingItem, user.WorkPostId, false); + } + } + } + + #endregion /// @@ -186,12 +227,14 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { this.drpWorkArea.DataSource = UnitWorkService.GetUnitWorkList(this.CurrUser.LoginProjectId); this.drpWorkArea.DataBind(); - this.drpResponsibleMan.DataSource = from x in db.Sys_User - join y in db.Project_ProjectUser - on x.UserId equals y.UserId - where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue - select x; - this.drpResponsibleMan.DataBind(); + + PersonService.InitPersonByProjectUnitDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, this.drpUnit.SelectedValue, false); + //this.drpResponsibleMan.DataSource = from x in db.Sys_User + // join y in db.Project_ProjectUser + // on x.UserId equals y.UserId + // where y.ProjectId == this.CurrUser.LoginProjectId && x.UnitId == this.drpUnit.SelectedValue + // select x; + //this.drpResponsibleMan.DataBind(); } Funs.FineUIPleaseSelect(this.drpWorkArea); Funs.FineUIPleaseSelect(this.drpResponsibleMan); @@ -215,16 +258,21 @@ namespace FineUIPro.Web.HSSE.HiddenInspection ShowNotify("请选择责任单位!", MessageBoxIcon.Warning); return; } - if (this.drpWorkArea.SelectedValue == BLL.Const._Null) - { - ShowNotify("请选择单位工程!", MessageBoxIcon.Warning); - return; - } - if (this.drpWorkArea.SelectedValue == BLL.Const._Null) + //if (this.drpWorkArea.SelectedValue == BLL.Const._Null) + //{ + // ShowNotify("请选择单位工程!", MessageBoxIcon.Warning); + // return; + //} + if (this.drpResponsibleMan.SelectedValue == BLL.Const._Null) { ShowNotify("请选择责任人!", MessageBoxIcon.Warning); return; } + if (this.drpTrainingItem.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择重修教材!", MessageBoxIcon.Warning); + return; + } SaveData(true); } else @@ -240,45 +288,67 @@ namespace FineUIPro.Web.HSSE.HiddenInspection /// private void SaveData(bool isClosed) { - Model.HSSE_Hazard_HazardRegister register = new Model.HSSE_Hazard_HazardRegister(); - register.ProjectId = this.CurrUser.LoginProjectId; - register.ProblemTypes = "1"; //安全隐患问题 - register.RegisterTypesId = this.drpRegisterTypes.SelectedValue; - register.CheckCycle = this.ckType.SelectedValue; - register.IsEffective = "1"; - register.Risk_Level = this.dpRiskLevel.SelectedText; + Model.HSSE_Hazard_HazardRegister model = new Model.HSSE_Hazard_HazardRegister(); + model.ProjectId = this.CurrUser.LoginProjectId; + model.ProblemTypes = "1"; //安全隐患问题 + model.RegisterTypesId = this.drpRegisterTypes.SelectedValue; + model.CheckCycle = this.ckType.SelectedValue; + model.IsEffective = "1"; + model.Risk_Level = this.dpRiskLevel.SelectedText; if (this.drpUnit.SelectedValue != BLL.Const._Null) { - register.ResponsibleUnit = this.drpUnit.SelectedValue; + model.ResponsibleUnit = this.drpUnit.SelectedValue; } if (this.drpWorkArea.SelectedValue != BLL.Const._Null) { - register.Place = this.drpWorkArea.SelectedValue; + model.Place = this.drpWorkArea.SelectedValue; } - register.RegisterDef = this.txtRegisterDef.Text.Trim(); + model.RegisterDef = this.txtRegisterDef.Text.Trim(); if (this.drpResponsibleMan.SelectedValue != BLL.Const._Null) { - register.ResponsibleMan = this.drpResponsibleMan.SelectedValue; + model.ResponsibleMan = this.drpResponsibleMan.SelectedValue; } - register.RectificationPeriod = Funs.GetNewDateTime(this.txtRectificationPeriod.Text.Trim() + " 18:00:00"); - register.CheckManId = this.hdCheckManId.Text; - register.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim()); - register.States = "1"; //待整改 + model.RectificationPeriod = Funs.GetNewDateTime(this.txtRectificationPeriod.Text.Trim() + " 18:00:00"); + model.CheckManId = this.hdCheckManId.Text; + model.CutPayment = Funs.GetNewIntOrZero(this.txtCutPayment.Text.Trim()); + model.States = "1";//待整改 + model.CompanyTrainingItemId = drpTrainingItem.SelectedValue; if (!string.IsNullOrEmpty(HazardRegisterId)) { - register.HazardRegisterId = HazardRegisterId; - BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(register); - BLL.LogService.AddSys_Log(this.CurrUser, register.HazardCode, register.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnModify); + model.HazardRegisterId = HazardRegisterId; + BLL.HSSE_Hazard_HazardRegisterService.UpdateHazardRegister(model); + BLL.LogService.AddSys_Log(this.CurrUser, model.HazardCode, model.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnModify); } else { - register.HazardRegisterId = SQLHelper.GetNewID(typeof(Model.HSSE_Hazard_HazardRegister)); - HazardRegisterId = register.HazardRegisterId; - register.CheckTime = DateTime.Now; - register.ControlId = Request.Params["ControlId"]; - BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(register); - BLL.LogService.AddSys_Log(this.CurrUser, register.HazardCode, register.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnAdd); + model.HazardRegisterId = SQLHelper.GetNewID(typeof(Model.HSSE_Hazard_HazardRegister)); + HazardRegisterId = model.HazardRegisterId; + model.CheckTime = DateTime.Now; + model.ControlId = Request.Params["ControlId"]; + BLL.HSSE_Hazard_HazardRegisterService.AddHazardRegister(model); + BLL.LogService.AddSys_Log(this.CurrUser, model.HazardCode, model.HazardRegisterId, BLL.Const.HiddenRectificationMenuId, BLL.Const.BtnAdd); } + + #region 责任人和重修教材非空,生成培训计划 + + if (!string.IsNullOrWhiteSpace(model.ResponsibleMan) && !string.IsNullOrWhiteSpace(model.CompanyTrainingItemId)) + {//责任人和重修教材非空,生成培训计划 + Model.RetakeCourseProducePlanInfo info = new Model.RetakeCourseProducePlanInfo + { + CurrProjectId = this.CurrUser.LoginProjectId, + CurrUserId = this.CurrUser.UserId, + CheckId = model.HazardRegisterId, + CheckType = (int)Enums.RetakeCourseType.日常巡检, + CheckTypeName = "日常巡检重修", + PersonId = model.ResponsibleMan, + CompanyTrainingItemId = model.CompanyTrainingItemId, + TrainEndDate = model.RectificationPeriod + }; + TrainingPlanService.RetakeCourseProducePlan(info); + } + + #endregion + if (isClosed) { PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); @@ -302,8 +372,8 @@ namespace FineUIPro.Web.HSSE.HiddenInspection if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd)) { edit = "1"; - Model.HSSE_Hazard_HazardRegister register = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(this.HazardRegisterId); - DateTime date = Convert.ToDateTime(register.CheckTime); + Model.HSSE_Hazard_HazardRegister model = BLL.HSSE_Hazard_HazardRegisterService.GetHazardRegisterByHazardRegisterId(this.HazardRegisterId); + DateTime date = Convert.ToDateTime(model.CheckTime); string dateStr = date.Year.ToString() + date.Month.ToString(); PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("~/AttachFile/webuploader.aspx?toKeyId={0}&path=FileUpload/Registration/" + dateStr + "&menuId={1}&edit={2}", this.HazardRegisterId, Const.HSSE_HiddenRectificationListMenuId, edit))); } diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs index 37b8cbd9..f1de6ca4 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs @@ -132,13 +132,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection protected global::FineUIPro.DatePicker txtRectificationPeriod; /// - /// txtCheckManName 控件。 + /// drpTrainingItem 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtCheckManName; + protected global::FineUIPro.DropDownList drpTrainingItem; /// /// txtCheckTime 控件。 @@ -150,13 +150,13 @@ namespace FineUIPro.Web.HSSE.HiddenInspection protected global::FineUIPro.TextBox txtCheckTime; /// - /// UploadAttach 控件。 + /// txtCheckManName 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.LinkButton UploadAttach; + protected global::FineUIPro.TextBox txtCheckManName; /// /// txtCutPayment 控件。 @@ -167,6 +167,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection /// protected global::FineUIPro.NumberBox txtCutPayment; + /// + /// UploadAttach 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.LinkButton UploadAttach; + /// /// Toolbar1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx b/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx index 72652a38..0332165a 100644 --- a/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx @@ -4,7 +4,7 @@ - 查看管理月报TCC + 查看管理月报XJYJ
diff --git a/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx.cs index a125dfc9..d82b3541 100644 --- a/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Manager/MonthReportBView.aspx.cs @@ -644,7 +644,7 @@ namespace FineUIPro.Web.HSSE.Manager Response.ContentEncoding = System.Text.Encoding.UTF8; Response.Write(""); - Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("管理月报TCC" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.AppendHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode("管理月报XJYJ" + filename, System.Text.Encoding.UTF8) + ".xls"); Response.ContentType = "application/ms-excel"; this.EnableViewState = false; System.IO.StringWriter oStringWriter = new System.IO.StringWriter(); diff --git a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx index 3b74fa90..da222e54 100644 --- a/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/UnitWork.aspx @@ -42,7 +42,7 @@ - @@ -52,7 +52,7 @@ SortField="UnitWorkCode" FieldType="String" HeaderText="单位工程编号" TextAlign="center" HeaderTextAlign="Center"> - diff --git a/SGGL/Model/APIItem/HSSE/BonusScoreSelfManagementItem.cs b/SGGL/Model/APIItem/HSSE/BonusScoreSelfManagementItem.cs new file mode 100644 index 00000000..7d5b4902 --- /dev/null +++ b/SGGL/Model/APIItem/HSSE/BonusScoreSelfManagementItem.cs @@ -0,0 +1,105 @@ +using System; + +namespace Model +{ + public class BonusScoreSelfManagementItem + { + /// + /// Id + /// + public string Id + { + get; + set; + } + /// + /// 项目ID + /// + public string ProjectId + { + get; + set; + } + /// + /// 人员Id + /// + public string PersonId + { + get; + set; + } + ///// + ///// 编号 + ///// + //public string Code + //{ + // get; + // set; + //} + /// + /// 名称 + /// + public string Name + { + get; + set; + } + /// + /// 加分项Id + /// + public string BonusScoreTypeId + { + get; + set; + } + ///// + ///// 加分项名称 + ///// + //public string BonusScoreTypeName + //{ + // get; + // set; + //} + ///// + ///// 分值 + ///// + //public int Score + //{ + // get; + // set; + //} + /// + /// 内容 + /// + public string Content + { + get; + set; + } + /// + /// 备注 + /// + public string Remark + { + get; + set; + } + /// + /// 附件 + /// + public string AttachFile + { + get; + set; + } + + /// + /// 附件地址 + /// + public string AttachUrl + { + get; + set; + } + } +} diff --git a/SGGL/Model/HSSE/EduTrain/RetakeCourseProducePlanInfo.cs b/SGGL/Model/HSSE/EduTrain/RetakeCourseProducePlanInfo.cs new file mode 100644 index 00000000..b66cf3df --- /dev/null +++ b/SGGL/Model/HSSE/EduTrain/RetakeCourseProducePlanInfo.cs @@ -0,0 +1,38 @@ +using System; + +namespace Model +{ + public class RetakeCourseProducePlanInfo + { + /// + /// 项目Id + /// + public string CurrProjectId { get; set; } + /// + /// 当前人员 + /// + public string CurrUserId { get; set; } + /// + /// 检查Id + /// + public string CheckId { get; set; } + /// + /// 检查类别 + /// + public int CheckType { get; set; } + public string CheckTypeName { get; set; } + /// + /// 责任人Id + /// + public string PersonId { get; set; } + /// + /// 重修教材Id + /// + public string CompanyTrainingItemId { get; set; } + + /// + /// 培训结束时间 + /// + public DateTime? TrainEndDate { get; set; } + } +} \ No newline at end of file diff --git a/SGGL/Model/HSSE/PostTraining/PostTrainingStandardInfo.cs b/SGGL/Model/HSSE/PostTraining/PostTrainingStandardInfo.cs index d38b4444..af8e5dfd 100644 --- a/SGGL/Model/HSSE/PostTraining/PostTrainingStandardInfo.cs +++ b/SGGL/Model/HSSE/PostTraining/PostTrainingStandardInfo.cs @@ -1,5 +1,4 @@ -using MiniExcelLibs.Attributes; - + namespace Model { public class PostTrainingStandardInfo diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index 5f41a259..2f708c6d 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -1007,9 +1007,15 @@ namespace Model partial void InsertExamine_BehavioralSafetyObservation(Examine_BehavioralSafetyObservation instance); partial void UpdateExamine_BehavioralSafetyObservation(Examine_BehavioralSafetyObservation instance); partial void DeleteExamine_BehavioralSafetyObservation(Examine_BehavioralSafetyObservation instance); + partial void InsertExamine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement instance); + partial void UpdateExamine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement instance); + partial void DeleteExamine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement instance); partial void InsertExamine_BonusScoreSituation(Examine_BonusScoreSituation instance); partial void UpdateExamine_BonusScoreSituation(Examine_BonusScoreSituation instance); partial void DeleteExamine_BonusScoreSituation(Examine_BonusScoreSituation instance); + partial void InsertExamine_BonusScoreType(Examine_BonusScoreType instance); + partial void UpdateExamine_BonusScoreType(Examine_BonusScoreType instance); + partial void DeleteExamine_BonusScoreType(Examine_BonusScoreType instance); partial void InsertExamine_CoConstructionActivities(Examine_CoConstructionActivities instance); partial void UpdateExamine_CoConstructionActivities(Examine_CoConstructionActivities instance); partial void DeleteExamine_CoConstructionActivities(Examine_CoConstructionActivities instance); @@ -5348,6 +5354,14 @@ namespace Model } } + public System.Data.Linq.Table Examine_BonusScoreSelfManagement + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Examine_BonusScoreSituation { get @@ -5356,6 +5370,14 @@ namespace Model } } + public System.Data.Linq.Table Examine_BonusScoreType + { + get + { + return this.GetTable(); + } + } + public System.Data.Linq.Table Examine_CoConstructionActivities { get @@ -28330,6 +28352,8 @@ namespace Model private EntitySet _Examine_BehavioralSafetyObservation; + private EntitySet _Examine_BonusScoreSelfManagement; + private EntitySet _Examine_BonusScoreSituation; private EntitySet _Examine_CoConstructionActivities; @@ -28895,6 +28919,7 @@ namespace Model this._Environmental_ProjectChemicalReport = new EntitySet(new Action(this.attach_Environmental_ProjectChemicalReport), new Action(this.detach_Environmental_ProjectChemicalReport)); this._Environmental_ProjectOperationReport = new EntitySet(new Action(this.attach_Environmental_ProjectOperationReport), new Action(this.detach_Environmental_ProjectOperationReport)); this._Examine_BehavioralSafetyObservation = new EntitySet(new Action(this.attach_Examine_BehavioralSafetyObservation), new Action(this.detach_Examine_BehavioralSafetyObservation)); + this._Examine_BonusScoreSelfManagement = new EntitySet(new Action(this.attach_Examine_BonusScoreSelfManagement), new Action(this.detach_Examine_BonusScoreSelfManagement)); this._Examine_BonusScoreSituation = new EntitySet(new Action(this.attach_Examine_BonusScoreSituation), new Action(this.detach_Examine_BonusScoreSituation)); this._Examine_CoConstructionActivities = new EntitySet(new Action(this.attach_Examine_CoConstructionActivities), new Action(this.detach_Examine_CoConstructionActivities)); this._Examine_LeadershipJoinHomeworkAnalysisMeeting = new EntitySet(new Action(this.attach_Examine_LeadershipJoinHomeworkAnalysisMeeting), new Action(this.detach_Examine_LeadershipJoinHomeworkAnalysisMeeting)); @@ -31423,6 +31448,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreSelfManagement_Base_Project", Storage="_Examine_BonusScoreSelfManagement", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] + public EntitySet Examine_BonusScoreSelfManagement + { + get + { + return this._Examine_BonusScoreSelfManagement; + } + set + { + this._Examine_BonusScoreSelfManagement.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreSituation_Base_Project", Storage="_Examine_BonusScoreSituation", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Examine_BonusScoreSituation { @@ -35237,6 +35275,18 @@ namespace Model entity.Base_Project = null; } + private void attach_Examine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement entity) + { + this.SendPropertyChanging(); + entity.Base_Project = this; + } + + private void detach_Examine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement entity) + { + this.SendPropertyChanging(); + entity.Base_Project = null; + } + private void attach_Examine_BonusScoreSituation(Examine_BonusScoreSituation entity) { this.SendPropertyChanging(); @@ -76864,6 +76914,10 @@ namespace Model private System.Nullable _CompileDate; + private string _ResponsibleMan; + + private string _CompanyTrainingItemId; + private EntityRef _Base_Project; #region 可扩展性方法定义 @@ -76894,6 +76948,10 @@ namespace Model partial void OnCompileManChanged(); partial void OnCompileDateChanging(System.Nullable value); partial void OnCompileDateChanged(); + partial void OnResponsibleManChanging(string value); + partial void OnResponsibleManChanged(); + partial void OnCompanyTrainingItemIdChanging(string value); + partial void OnCompanyTrainingItemIdChanged(); #endregion public Check_ProjectLeaderCheck() @@ -77146,6 +77204,46 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ResponsibleMan", DbType="NVarChar(50)")] + public string ResponsibleMan + { + get + { + return this._ResponsibleMan; + } + set + { + if ((this._ResponsibleMan != value)) + { + this.OnResponsibleManChanging(value); + this.SendPropertyChanging(); + this._ResponsibleMan = value; + this.SendPropertyChanged("ResponsibleMan"); + this.OnResponsibleManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyTrainingItemId", DbType="NVarChar(50)")] + public string CompanyTrainingItemId + { + get + { + return this._CompanyTrainingItemId; + } + set + { + if ((this._CompanyTrainingItemId != value)) + { + this.OnCompanyTrainingItemIdChanging(value); + this.SendPropertyChanging(); + this._CompanyTrainingItemId = value; + this.SendPropertyChanged("CompanyTrainingItemId"); + this.OnCompanyTrainingItemIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Check_ProjectLeaderCheck_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] public Base_Project Base_Project { @@ -159460,6 +159558,414 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Examine_BonusScoreSelfManagement")] + public partial class Examine_BonusScoreSelfManagement : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _ProjectId; + + private string _Code; + + private string _Name; + + private string _BonusScoreTypeId; + + private string _BonusScoreTypeName; + + private int _Score; + + private string _PersonId; + + private string _Content; + + private string _Remark; + + private System.Nullable _CompileDate; + + private string _CompileMan; + + private EntityRef _Base_Project; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnProjectIdChanging(string value); + partial void OnProjectIdChanged(); + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnBonusScoreTypeIdChanging(string value); + partial void OnBonusScoreTypeIdChanged(); + partial void OnBonusScoreTypeNameChanging(string value); + partial void OnBonusScoreTypeNameChanged(); + partial void OnScoreChanging(int value); + partial void OnScoreChanged(); + partial void OnPersonIdChanging(string value); + partial void OnPersonIdChanged(); + partial void OnContentChanging(string value); + partial void OnContentChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + #endregion + + public Examine_BonusScoreSelfManagement() + { + this._Base_Project = default(EntityRef); + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectId", DbType="NVarChar(50)")] + public string ProjectId + { + get + { + return this._ProjectId; + } + set + { + if ((this._ProjectId != value)) + { + if (this._Base_Project.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnProjectIdChanging(value); + this.SendPropertyChanging(); + this._ProjectId = value; + this.SendPropertyChanged("ProjectId"); + this.OnProjectIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(50)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BonusScoreTypeId", DbType="NVarChar(50)")] + public string BonusScoreTypeId + { + get + { + return this._BonusScoreTypeId; + } + set + { + if ((this._BonusScoreTypeId != value)) + { + this.OnBonusScoreTypeIdChanging(value); + this.SendPropertyChanging(); + this._BonusScoreTypeId = value; + this.SendPropertyChanged("BonusScoreTypeId"); + this.OnBonusScoreTypeIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_BonusScoreTypeName", DbType="NVarChar(100) NOT NULL", CanBeNull=false)] + public string BonusScoreTypeName + { + get + { + return this._BonusScoreTypeName; + } + set + { + if ((this._BonusScoreTypeName != value)) + { + this.OnBonusScoreTypeNameChanging(value); + this.SendPropertyChanging(); + this._BonusScoreTypeName = value; + this.SendPropertyChanged("BonusScoreTypeName"); + this.OnBonusScoreTypeNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int NOT NULL")] + public int Score + { + get + { + return this._Score; + } + set + { + if ((this._Score != value)) + { + this.OnScoreChanging(value); + this.SendPropertyChanging(); + this._Score = value; + this.SendPropertyChanged("Score"); + this.OnScoreChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PersonId", DbType="NVarChar(50)")] + public string PersonId + { + get + { + return this._PersonId; + } + set + { + if ((this._PersonId != value)) + { + this.OnPersonIdChanging(value); + this.SendPropertyChanging(); + this._PersonId = value; + this.SendPropertyChanged("PersonId"); + this.OnPersonIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Content", DbType="NVarChar(1000)")] + public string Content + { + get + { + return this._Content; + } + set + { + if ((this._Content != value)) + { + this.OnContentChanging(value); + this.SendPropertyChanging(); + this._Content = value; + this.SendPropertyChanged("Content"); + this.OnContentChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(1000)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreSelfManagement_Base_Project", Storage="_Base_Project", ThisKey="ProjectId", OtherKey="ProjectId", IsForeignKey=true)] + public Base_Project Base_Project + { + get + { + return this._Base_Project.Entity; + } + set + { + Base_Project previousValue = this._Base_Project.Entity; + if (((previousValue != value) + || (this._Base_Project.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Base_Project.Entity = null; + previousValue.Examine_BonusScoreSelfManagement.Remove(this); + } + this._Base_Project.Entity = value; + if ((value != null)) + { + value.Examine_BonusScoreSelfManagement.Add(this); + this._ProjectId = value.ProjectId; + } + else + { + this._ProjectId = default(string); + } + this.SendPropertyChanged("Base_Project"); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreSelfManagement_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Examine_BonusScoreSelfManagement.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Examine_BonusScoreSelfManagement.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Examine_BonusScoreSituation")] public partial class Examine_BonusScoreSituation : INotifyPropertyChanging, INotifyPropertyChanged { @@ -159933,6 +160439,253 @@ namespace Model } } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Examine_BonusScoreType")] + public partial class Examine_BonusScoreType : INotifyPropertyChanging, INotifyPropertyChanged + { + + private static PropertyChangingEventArgs emptyChangingEventArgs = new PropertyChangingEventArgs(String.Empty); + + private string _Id; + + private string _Code; + + private string _Name; + + private int _Score; + + private string _Remark; + + private System.Nullable _CompileDate; + + private string _CompileMan; + + private EntityRef _Sys_User; + + #region 可扩展性方法定义 + partial void OnLoaded(); + partial void OnValidate(System.Data.Linq.ChangeAction action); + partial void OnCreated(); + partial void OnIdChanging(string value); + partial void OnIdChanged(); + partial void OnCodeChanging(string value); + partial void OnCodeChanged(); + partial void OnNameChanging(string value); + partial void OnNameChanged(); + partial void OnScoreChanging(int value); + partial void OnScoreChanged(); + partial void OnRemarkChanging(string value); + partial void OnRemarkChanged(); + partial void OnCompileDateChanging(System.Nullable value); + partial void OnCompileDateChanged(); + partial void OnCompileManChanging(string value); + partial void OnCompileManChanged(); + #endregion + + public Examine_BonusScoreType() + { + this._Sys_User = default(EntityRef); + OnCreated(); + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Id", DbType="NVarChar(50) NOT NULL", CanBeNull=false, IsPrimaryKey=true)] + public string Id + { + get + { + return this._Id; + } + set + { + if ((this._Id != value)) + { + this.OnIdChanging(value); + this.SendPropertyChanging(); + this._Id = value; + this.SendPropertyChanged("Id"); + this.OnIdChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Code", DbType="NVarChar(50)")] + public string Code + { + get + { + return this._Code; + } + set + { + if ((this._Code != value)) + { + this.OnCodeChanging(value); + this.SendPropertyChanging(); + this._Code = value; + this.SendPropertyChanged("Code"); + this.OnCodeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(200)")] + public string Name + { + get + { + return this._Name; + } + set + { + if ((this._Name != value)) + { + this.OnNameChanging(value); + this.SendPropertyChanging(); + this._Name = value; + this.SendPropertyChanged("Name"); + this.OnNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Score", DbType="Int NOT NULL")] + public int Score + { + get + { + return this._Score; + } + set + { + if ((this._Score != value)) + { + this.OnScoreChanging(value); + this.SendPropertyChanging(); + this._Score = value; + this.SendPropertyChanged("Score"); + this.OnScoreChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Remark", DbType="NVarChar(1000)")] + public string Remark + { + get + { + return this._Remark; + } + set + { + if ((this._Remark != value)) + { + this.OnRemarkChanging(value); + this.SendPropertyChanging(); + this._Remark = value; + this.SendPropertyChanged("Remark"); + this.OnRemarkChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileDate", DbType="DateTime")] + public System.Nullable CompileDate + { + get + { + return this._CompileDate; + } + set + { + if ((this._CompileDate != value)) + { + this.OnCompileDateChanging(value); + this.SendPropertyChanging(); + this._CompileDate = value; + this.SendPropertyChanged("CompileDate"); + this.OnCompileDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompileMan", DbType="NVarChar(50)")] + public string CompileMan + { + get + { + return this._CompileMan; + } + set + { + if ((this._CompileMan != value)) + { + if (this._Sys_User.HasLoadedOrAssignedValue) + { + throw new System.Data.Linq.ForeignKeyReferenceAlreadyHasValueException(); + } + this.OnCompileManChanging(value); + this.SendPropertyChanging(); + this._CompileMan = value; + this.SendPropertyChanged("CompileMan"); + this.OnCompileManChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreType_Sys_User", Storage="_Sys_User", ThisKey="CompileMan", OtherKey="UserId", IsForeignKey=true)] + public Sys_User Sys_User + { + get + { + return this._Sys_User.Entity; + } + set + { + Sys_User previousValue = this._Sys_User.Entity; + if (((previousValue != value) + || (this._Sys_User.HasLoadedOrAssignedValue == false))) + { + this.SendPropertyChanging(); + if ((previousValue != null)) + { + this._Sys_User.Entity = null; + previousValue.Examine_BonusScoreType.Remove(this); + } + this._Sys_User.Entity = value; + if ((value != null)) + { + value.Examine_BonusScoreType.Add(this); + this._CompileMan = value.UserId; + } + else + { + this._CompileMan = default(string); + } + this.SendPropertyChanged("Sys_User"); + } + } + } + + public event PropertyChangingEventHandler PropertyChanging; + + public event PropertyChangedEventHandler PropertyChanged; + + protected virtual void SendPropertyChanging() + { + if ((this.PropertyChanging != null)) + { + this.PropertyChanging(this, emptyChangingEventArgs); + } + } + + protected virtual void SendPropertyChanged(String propertyName) + { + if ((this.PropertyChanged != null)) + { + this.PropertyChanged(this, new PropertyChangedEventArgs(propertyName)); + } + } + } + [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.Examine_CoConstructionActivities")] public partial class Examine_CoConstructionActivities : INotifyPropertyChanging, INotifyPropertyChanged { @@ -193137,6 +193890,8 @@ namespace Model private string _ControlId; + private string _CompanyTrainingItemId; + private EntityRef _Base_Unit; private EntityRef _HSSE_Hazard_HazardRegisterTypes; @@ -193233,6 +193988,8 @@ namespace Model partial void OnRisk_LevelChanged(); partial void OnControlIdChanging(string value); partial void OnControlIdChanged(); + partial void OnCompanyTrainingItemIdChanging(string value); + partial void OnCompanyTrainingItemIdChanged(); #endregion public HSSE_Hazard_HazardRegister() @@ -194130,6 +194887,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyTrainingItemId", DbType="NVarChar(50)")] + public string CompanyTrainingItemId + { + get + { + return this._CompanyTrainingItemId; + } + set + { + if ((this._CompanyTrainingItemId != value)) + { + this.OnCompanyTrainingItemIdChanging(value); + this.SendPropertyChanging(); + this._CompanyTrainingItemId = value; + this.SendPropertyChanged("CompanyTrainingItemId"); + this.OnCompanyTrainingItemIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_HSSE_Hazard_HazardRegister_Base_Unit", Storage="_Base_Unit", ThisKey="ResponsibleUnit", OtherKey="UnitId", IsForeignKey=true)] public Base_Unit Base_Unit { @@ -374891,10 +375668,14 @@ namespace Model private EntitySet _Examine_BehavioralSafetyObservation_User; + private EntitySet _Examine_BonusScoreSelfManagement; + private EntitySet _Examine_BonusScoreSituation; private EntitySet _Examine_BonusScoreSituation_User; + private EntitySet _Examine_BonusScoreType; + private EntitySet _Examine_CoConstructionActivities; private EntitySet _Examine_CoConstructionActivities_User; @@ -375599,8 +376380,10 @@ namespace Model this._Environmental_UnexpectedEnvironmental = new EntitySet(new Action(this.attach_Environmental_UnexpectedEnvironmental), new Action(this.detach_Environmental_UnexpectedEnvironmental)); this._Examine_BehavioralSafetyObservation = new EntitySet(new Action(this.attach_Examine_BehavioralSafetyObservation), new Action(this.detach_Examine_BehavioralSafetyObservation)); this._Examine_BehavioralSafetyObservation_User = new EntitySet(new Action(this.attach_Examine_BehavioralSafetyObservation_User), new Action(this.detach_Examine_BehavioralSafetyObservation_User)); + this._Examine_BonusScoreSelfManagement = new EntitySet(new Action(this.attach_Examine_BonusScoreSelfManagement), new Action(this.detach_Examine_BonusScoreSelfManagement)); this._Examine_BonusScoreSituation = new EntitySet(new Action(this.attach_Examine_BonusScoreSituation), new Action(this.detach_Examine_BonusScoreSituation)); this._Examine_BonusScoreSituation_User = new EntitySet(new Action(this.attach_Examine_BonusScoreSituation_User), new Action(this.detach_Examine_BonusScoreSituation_User)); + this._Examine_BonusScoreType = new EntitySet(new Action(this.attach_Examine_BonusScoreType), new Action(this.detach_Examine_BonusScoreType)); this._Examine_CoConstructionActivities = new EntitySet(new Action(this.attach_Examine_CoConstructionActivities), new Action(this.detach_Examine_CoConstructionActivities)); this._Examine_CoConstructionActivities_User = new EntitySet(new Action(this.attach_Examine_CoConstructionActivities_User), new Action(this.detach_Examine_CoConstructionActivities_User)); this._Examine_LeadershipJoinHomeworkAnalysisMeeting = new EntitySet(new Action(this.attach_Examine_LeadershipJoinHomeworkAnalysisMeeting), new Action(this.detach_Examine_LeadershipJoinHomeworkAnalysisMeeting)); @@ -378476,6 +379259,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreSelfManagement_Sys_User", Storage="_Examine_BonusScoreSelfManagement", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Examine_BonusScoreSelfManagement + { + get + { + return this._Examine_BonusScoreSelfManagement; + } + set + { + this._Examine_BonusScoreSelfManagement.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreSituation_Sys_User", Storage="_Examine_BonusScoreSituation", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Examine_BonusScoreSituation { @@ -378502,6 +379298,19 @@ namespace Model } } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_BonusScoreType_Sys_User", Storage="_Examine_BonusScoreType", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] + public EntitySet Examine_BonusScoreType + { + get + { + return this._Examine_BonusScoreType; + } + set + { + this._Examine_BonusScoreType.Assign(value); + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Examine_CoConstructionActivities_Sys_User", Storage="_Examine_CoConstructionActivities", ThisKey="UserId", OtherKey="CompileMan", DeleteRule="NO ACTION")] public EntitySet Examine_CoConstructionActivities { @@ -383016,6 +383825,18 @@ namespace Model entity.User = null; } + private void attach_Examine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Examine_BonusScoreSelfManagement(Examine_BonusScoreSelfManagement entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Examine_BonusScoreSituation(Examine_BonusScoreSituation entity) { this.SendPropertyChanging(); @@ -383040,6 +383861,18 @@ namespace Model entity.User = null; } + private void attach_Examine_BonusScoreType(Examine_BonusScoreType entity) + { + this.SendPropertyChanging(); + entity.Sys_User = this; + } + + private void detach_Examine_BonusScoreType(Examine_BonusScoreType entity) + { + this.SendPropertyChanging(); + entity.Sys_User = null; + } + private void attach_Examine_CoConstructionActivities(Examine_CoConstructionActivities entity) { this.SendPropertyChanging(); @@ -401074,6 +401907,8 @@ namespace Model private string _WorkPostNames; + private System.Nullable _Outcome; + private EntitySet _Person_TrainingTask; private EntityRef _Training_CompanyTraining; @@ -401106,6 +401941,8 @@ namespace Model partial void OnDurationsChanged(); partial void OnWorkPostNamesChanging(string value); partial void OnWorkPostNamesChanged(); + partial void OnOutcomeChanging(System.Nullable value); + partial void OnOutcomeChanged(); #endregion public Training_CompanyTrainingItem() @@ -401359,6 +402196,26 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Outcome", DbType="Int")] + public System.Nullable Outcome + { + get + { + return this._Outcome; + } + set + { + if ((this._Outcome != value)) + { + this.OnOutcomeChanging(value); + this.SendPropertyChanging(); + this._Outcome = value; + this.SendPropertyChanged("Outcome"); + this.OnOutcomeChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Person_TrainingTask_Training_CompanyTrainingItem", Storage="_Person_TrainingTask", ThisKey="CompanyTrainingItemId", OtherKey="CompanyTrainingItemId", DeleteRule="NO ACTION")] public EntitySet Person_TrainingTask { @@ -402131,6 +402988,12 @@ namespace Model private string _DepartNames; + private System.Nullable _IsRetakeCourse; + + private string _CheckType; + + private string _CheckId; + private EntitySet _EduTrain_TrainRecord; private EntityRef _Base_TrainLevel; @@ -402195,6 +403058,12 @@ namespace Model partial void OnDepartIdsChanged(); partial void OnDepartNamesChanging(string value); partial void OnDepartNamesChanged(); + partial void OnIsRetakeCourseChanging(System.Nullable value); + partial void OnIsRetakeCourseChanged(); + partial void OnCheckTypeChanging(string value); + partial void OnCheckTypeChanged(); + partial void OnCheckIdChanging(string value); + partial void OnCheckIdChanged(); #endregion public Training_Plan() @@ -402662,6 +403531,66 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_IsRetakeCourse", DbType="Int")] + public System.Nullable IsRetakeCourse + { + get + { + return this._IsRetakeCourse; + } + set + { + if ((this._IsRetakeCourse != value)) + { + this.OnIsRetakeCourseChanging(value); + this.SendPropertyChanging(); + this._IsRetakeCourse = value; + this.SendPropertyChanged("IsRetakeCourse"); + this.OnIsRetakeCourseChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckType", DbType="NVarChar(50)")] + public string CheckType + { + get + { + return this._CheckType; + } + set + { + if ((this._CheckType != value)) + { + this.OnCheckTypeChanging(value); + this.SendPropertyChanging(); + this._CheckType = value; + this.SendPropertyChanged("CheckType"); + this.OnCheckTypeChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CheckId", DbType="NVarChar(50)")] + public string CheckId + { + get + { + return this._CheckId; + } + set + { + if ((this._CheckId != value)) + { + this.OnCheckIdChanging(value); + this.SendPropertyChanging(); + this._CheckId = value; + this.SendPropertyChanged("CheckId"); + this.OnCheckIdChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_EduTrain_TrainRecord_Training_Plan", Storage="_EduTrain_TrainRecord", ThisKey="PlanId", OtherKey="PlanId", DeleteRule="NO ACTION")] public EntitySet EduTrain_TrainRecord { @@ -427022,6 +427951,8 @@ namespace Model private string _Requirements; + private string _CompanyTrainingItemId; + public View_Hazard_HazardRegister() { } @@ -427889,6 +428820,22 @@ namespace Model } } } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_CompanyTrainingItemId", DbType="NVarChar(50)")] + public string CompanyTrainingItemId + { + get + { + return this._CompanyTrainingItemId; + } + set + { + if ((this._CompanyTrainingItemId != value)) + { + this._CompanyTrainingItemId = value; + } + } + } } [global::System.Data.Linq.Mapping.TableAttribute(Name="dbo.View_HJGL_Batch_PointBatch")] diff --git a/SGGL/Model/Model.csproj b/SGGL/Model/Model.csproj index 447d151b..c99cbaf5 100644 --- a/SGGL/Model/Model.csproj +++ b/SGGL/Model/Model.csproj @@ -131,6 +131,7 @@ + @@ -229,6 +230,7 @@ + diff --git a/SGGL/WebAPI/Controllers/CQMS/CheckListController.cs b/SGGL/WebAPI/Controllers/CQMS/CheckListController.cs index f07d3e29..d7f380f6 100644 --- a/SGGL/WebAPI/Controllers/CQMS/CheckListController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/CheckListController.cs @@ -92,7 +92,7 @@ namespace Mvc.Controllers { if (string.IsNullOrEmpty(CheckControl.DocCode)) { - string prefix = BLL.ProjectService.GetProjectByProjectId(CheckControl.ProjectId).ProjectCode + "-QC-TCC-XJ-"; + string prefix = BLL.ProjectService.GetProjectByProjectId(CheckControl.ProjectId).ProjectCode + "-QC-XJYJ-XJ-"; CheckControl.DocCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode",CheckControl.ProjectId, prefix); } CheckControl.CheckControlCode = Guid.NewGuid().ToString(); diff --git a/SGGL/WebAPI/Controllers/CQMS/CommenInfoController.cs b/SGGL/WebAPI/Controllers/CQMS/CommenInfoController.cs index 5d08b8b1..7db45f41 100644 --- a/SGGL/WebAPI/Controllers/CQMS/CommenInfoController.cs +++ b/SGGL/WebAPI/Controllers/CQMS/CommenInfoController.cs @@ -426,7 +426,7 @@ namespace Mvc.Controllers { case "checkList": { - string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-TCC-XJ-"; + string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-XJYJ-XJ-"; //res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_CheckControl", "DocCode", prefix); res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", projectId, prefix); @@ -434,7 +434,7 @@ namespace Mvc.Controllers break; case "jointCheck": { - string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-TCC-XJ-"; + string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-XJYJ-XJ-"; res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode3", "dbo.Check_JointCheck", "JointCheckCode", prefix); } break; @@ -455,7 +455,7 @@ namespace Mvc.Controllers break; case "spotCheck": { - string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-TCC-XJ-"; + string prefix = BLL.ProjectService.GetProjectByProjectId(projectId).ProjectCode + "-QC-XJYJ-XJ-"; //res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5", "dbo.Check_SpotCheck", "DocCode", prefix); res.resultValue = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.Check_CheckControl", "DocCode", projectId, prefix); diff --git a/SGGL/WebAPI/Controllers/HJGL/ElectrodeRecoveryController.cs b/SGGL/WebAPI/Controllers/HJGL/ElectrodeRecoveryController.cs index 6e2182aa..d791b51c 100644 --- a/SGGL/WebAPI/Controllers/HJGL/ElectrodeRecoveryController.cs +++ b/SGGL/WebAPI/Controllers/HJGL/ElectrodeRecoveryController.cs @@ -44,7 +44,7 @@ namespace WebAPI.Controllers.HJGL { if (string.IsNullOrEmpty(ElectrodeRecovery.RecoveryCode)) { - string prefix = BLL.ProjectService.GetProjectByProjectId(ElectrodeRecovery.ProjectId).ProjectCode + "-HJ-TCC-LL-"; + string prefix = BLL.ProjectService.GetProjectByProjectId(ElectrodeRecovery.ProjectId).ProjectCode + "-HJ-XJYJ-LL-"; ElectrodeRecovery.RecoveryCode = BLL.SQLHelper.RunProcNewId("SpGetNewCode5ByProjectId", "dbo.HJGL_ElectrodeRecovery", "RecoveryCode", ElectrodeRecovery.ProjectId, prefix); } ElectrodeRecovery.RecoveryId = Guid.NewGuid().ToString(); diff --git a/SGGL/WebAPI/Controllers/HSSE/BonusScoreSelfManagementController.cs b/SGGL/WebAPI/Controllers/HSSE/BonusScoreSelfManagementController.cs new file mode 100644 index 00000000..9e0603a6 --- /dev/null +++ b/SGGL/WebAPI/Controllers/HSSE/BonusScoreSelfManagementController.cs @@ -0,0 +1,212 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Aspose.Words; +using BLL; +using Model; + +namespace WebAPI.Controllers +{ + /// + /// 自主管理加分项 + /// + public class BonusScoreSelfManagementController : ApiController + { + #region 获取自主管理加分项类型 + + /// + /// 获取自主管理加分项类型 + /// + /// + public Model.ResponeData getBonusScoreTypeList() + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = BonusScoreTypeService.GetBonusScoreTypeList(); + responeData.data = getDataList.Select(x => new { TypeId = x.Id, TypeName = x.Name }); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + #endregion + + #region 获取自主管理加分项列表 + + /// + /// 获取自主管理加分项列表、明细 + /// + /// + public Model.ResponeData getBonusScoreSelfManagementList(string projectId, string personId, string typeId, int pageIndex) + { + var responeData = new Model.ResponeData(); + try + { + var getDataList = BonusScoreSelfManagementService.GetBonusScoreSelfManagementList(projectId, personId, typeId); + int pageCount = getDataList.Count; + if (pageCount > 0 && pageIndex > 0) + { + var getdata = from x in getDataList.Skip(BLL.Funs.PageSize * (pageIndex - 1)).Take(BLL.Funs.PageSize) + select new + { + x.Id, + x.Code, + x.Name, + x.BonusScoreTypeName, + x.Score, + x.CompileDate, + }; + responeData.data = new { pageCount, getdata }; + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + + /// + /// 根据ID获取自主管理加分项详细 + /// + /// 自主管理加分项ID + /// + public Model.ResponeData getBonusScoreSelfManagementById(string Id) + { + var responeData = new Model.ResponeData(); + try + { + var model = BonusScoreSelfManagementService.GetBonusScoreSelfManagementById(Id); + if (model != null) + { + var file = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == Id); + responeData.data = new + { + model.Id, + model.Code, + model.Name, + model.BonusScoreTypeId, + model.BonusScoreTypeName, + model.Content, + model.Remark, + model.CompileDate, + AttachUrl = file != null ? file.AttachUrl : string.Empty + }; + } + else + { + responeData.code = 0; + responeData.message = "自主管理加分项不存在"; + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + + #endregion + + #region 新增、编辑、删除自主管理加分项 + + /// + /// 新增、编辑自主管理加分项 + /// + /// 自主管理加分项 + [HttpPost] + public Model.ResponeData saveBonusScoreSelfManagement([FromBody] Model.BonusScoreSelfManagementItem item) + { + var responeData = new Model.ResponeData(); + try + { + Model.Examine_BonusScoreSelfManagement newModel = new Model.Examine_BonusScoreSelfManagement(); + newModel.Name = item.Name; + newModel.PersonId = item.PersonId; + newModel.BonusScoreTypeId = item.BonusScoreTypeId; + newModel.Remark = item.Remark; + newModel.Content = item.Content; + + var bonusScoreType = BLL.BonusScoreTypeService.GetBonusScoreTypeById(item.BonusScoreTypeId); + if (bonusScoreType != null) + { + newModel.BonusScoreTypeName = bonusScoreType.Name; + newModel.Score = bonusScoreType.Score; + if (!string.IsNullOrWhiteSpace(item.Id)) + { + newModel.Id = item.Id; + BLL.BonusScoreSelfManagementService.UpdateBonusScoreSelfManagement(newModel); + } + else + { + newModel.Id = SQLHelper.GetNewID(typeof(Model.Examine_BonusScoreSelfManagement)); + newModel.Code = SQLHelper.RunProcNewId2("SpGetNewCode3ByProjectId", "dbo.Examine_BonusScoreSelfManagement", "Code", item.ProjectId); + newModel.CompileDate = DateTime.Now; + //newModel.CompileMan = item.PersonId; + //newModel.CompileMan = Const.hfnbdId; + newModel.ProjectId = item.ProjectId; + BLL.BonusScoreSelfManagementService.AddBonusScoreSelfManagement(newModel); + } + //保存附件 + if (!string.IsNullOrEmpty(item.AttachUrl)) + { + UploadFileService.SaveAttachUrl(UploadFileService.GetSourceByAttachUrl(item.AttachUrl, 1024, null), item.AttachUrl, Const.BonusScoreSelfManagementMenuId, newModel.Id); + } + else if (!string.IsNullOrWhiteSpace(item.Id)) + {//编辑时,附件地址传空时,删除附件信息 + CommonService.DeleteAttachFileById(Const.BonusScoreSelfManagementMenuId, newModel.Id); + } + responeData.message = "操作成功"; + } + else + { + responeData.code = 0; + responeData.message = "自主管理加分项类型不存在"; + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + + /// + /// 删除自主管理加分项 + /// + /// + /// + [HttpPost] + public Model.ResponeData deleteBonusScoreSelfManagementById(string Id) + { + var responeData = new Model.ResponeData(); + try + { + BLL.BonusScoreSelfManagementService.DeleteBonusScoreSelfManagementById(Id); + responeData.message = "操作成功"; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + + #endregion + } +} diff --git a/SGGL/WebAPI/Controllers/UserController.cs b/SGGL/WebAPI/Controllers/UserController.cs index cffa3c8c..08238f92 100644 --- a/SGGL/WebAPI/Controllers/UserController.cs +++ b/SGGL/WebAPI/Controllers/UserController.cs @@ -13,7 +13,7 @@ namespace WebAPI.Controllers ///
public class UserController : ApiController { - #region 根据账号或手机号码登录方法 + #region 根据账号或手机号码、身份证号登录方法 /// /// 登录方法 /// @@ -21,6 +21,50 @@ namespace WebAPI.Controllers /// [HttpPost] public Model.ResponeData postLoginOn([FromBody] Model.UserItem userInfo) + { + //登录方法 Model.UserItem + var responeData = new Model.ResponeData + { + message = "账号密码不匹配!" + }; + try + { + var user = APIUserService.UserLogOn(userInfo); + if (user != null) + { + + responeData.message = "登录成功!"; + responeData.data = user; + } + else + { + var user1 = APIPersonService.PersonLogOn(userInfo); + if (user1 != null) + { + responeData.message = "登录成功!"; + responeData.code = 2; + responeData.data = user1; + } + } + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + + return responeData; + } + #endregion + + #region 根据账号或手机号码登录方法 + /// + /// 登录方法 + /// + /// + /// + [HttpPost] + public Model.ResponeData postLoginOn2([FromBody] Model.UserItem userInfo) { //登录方法 Model.UserItem var responeData = new Model.ResponeData diff --git a/SGGL/WebAPI/Filter/TestPermissionAttribute.cs b/SGGL/WebAPI/Filter/TestPermissionAttribute.cs index f7d9cfe4..d93d03b4 100644 --- a/SGGL/WebAPI/Filter/TestPermissionAttribute.cs +++ b/SGGL/WebAPI/Filter/TestPermissionAttribute.cs @@ -30,10 +30,10 @@ namespace WebAPI.Filter if (lists.FirstOrDefault(x => x == strValues) != null) { isOk = true; - isWithOut=true; + isWithOut = true; } - + if (!isOk && token != null) { var getUser = BLL.UserService.GetUserByUserId(token.FirstOrDefault()); @@ -50,6 +50,10 @@ namespace WebAPI.Filter } } } + else if (token == null) + { + isOk = false; + } //FormsAuthenticationTicket authTicket = null; //if (lists.FirstOrDefault(x => x == strValues) == null && auth!=null&&auth.Count()>0 && !string.IsNullOrEmpty(auth.FirstOrDefault())) //{ @@ -69,7 +73,9 @@ namespace WebAPI.Filter //{ // isOk = false; //} - if (lists.FirstOrDefault(x => x == strValues) == null && actionContext.ActionDescriptor.ControllerDescriptor.ControllerName != "FileUpload" && !System.Web.HttpContext.Current.User.Identity.IsAuthenticated) + + //&& !System.Web.HttpContext.Current.User.Identity.IsAuthenticated + if (isOk && lists.FirstOrDefault(x => x == strValues) == null && actionContext.ActionDescriptor.ControllerDescriptor.ControllerName != "FileUpload") { isOk = false; actionContext.Response = actionContext.Request.CreateResponse(System.Net.HttpStatusCode.OK, @@ -86,7 +92,7 @@ namespace WebAPI.Filter IDictionary arguments = actionContext.ActionArguments; // 获取参数 foreach (KeyValuePair item in arguments) { - if (item.Key == "projectid" || item.Key == "ProjectId" || item.Key == "projectId" || item.Key == "Projectid") + if (item.Key.ToLower() == "projectid") { var ProjectItems = APIProjectService.geProjectsByUserId(token.FirstOrDefault()); List projects = new List(); @@ -116,27 +122,27 @@ namespace WebAPI.Filter /// /// /// - public static List lists = new List - { + public static List lists = new List + { "SY*SaveRisk", - "SY*SaveEnvironmentProtection", + "SY*SaveEnvironmentProtection", "SY*SaveLicence", "SY*SavePromise", - "SY*SaveDataBase", - "SY*SaveMajorHazard", + "SY*SaveDataBase", + "SY*SaveMajorHazard", "SY*SaveHiddenDangers", - "HazardRealTime*SaveHazardRealTime", - "upload*attendance", - "upload*person", - "User*postLoginOn", + "HazardRealTime*SaveHazardRealTime", + "upload*attendance", + "upload*person", + "User*postLoginOn", "Person*getPersonInOut", "Person*getUpdatePersonExchangeTime", "Person*getPersonDataExchange", "Person*getPersonByProjectIdIdentityCard", "Person*getAllPersonDataExchange", "Person*SaveSitePerson", - "DoorService*getAttendance", - "CommenInfo*FileUpload" , + "DoorService*getAttendance", + "CommenInfo*FileUpload" , "CNCECServer*PostGetCQMSData", "CNCECServer*PostGetCQMSData_CallBalk", "CNCECServer*PostGetHJGLData", @@ -145,23 +151,28 @@ namespace WebAPI.Filter "CNCECServer*PostGetHSSEData_CallBalk", "CNCECServer*PostGetSYHSEData", "CNCECServer*PostGetSYHSEData_CallBalk", - "BaseInfo*getProjectPersonAndSafeHour", + "BaseInfo*getProjectPersonAndSafeHour", "BaseInfo*getSafeHourFromLastAccident", "Unit*AddUnit", - "BaseInfo*getSafeHourFromLastAccident", + "BaseInfo*getSafeHourFromLastAccident", "HazardRegister*getHazardRegisterTotalCount", "Person*SaveAndUpdateSitePerson", - "Person*addToBlack", + "Person*addToBlack", "Person*getPersonData", "Person*getPersonInOutList", "Person*getPersonAllData", "HazardRegister*getHazardRegisterByProjectIdStates", "Person*getPersonPresenceData", "Vehicle*getVehicleDataExchange", "Vehicle*getUpdateVehicleExchangeTime", - "Vehicle*getVehicleInOut", + "Vehicle*getVehicleInOut", "Person*getPersonPresenceData", "User*getUserByProjectIdUnitIdQuery", - "Environmental*AddMonitoring" + "Environmental*AddMonitoring", + "BonusScoreSelfManagement*getBonusScoreTypeList", + "BonusScoreSelfManagement*getBonusScoreSelfManagementList", + "BonusScoreSelfManagement*getBonusScoreSelfManagementById", + "BonusScoreSelfManagement*saveBonusScoreSelfManagement", + "BonusScoreSelfManagement*deleteBonusScoreSelfManagementById" }; @@ -178,9 +189,9 @@ namespace WebAPI.Filter isOk = true; } - - + + if (!isOk) { if (BLL.Funs.DBList.ContainsKey(System.Threading.Thread.CurrentThread.ManagedThreadId)) diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index 362e85c1..67f1dc73 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -175,6 +175,7 @@ +