diff --git a/.gitignore b/.gitignore index d7b77dd1..8ae1b9a0 100644 --- a/.gitignore +++ b/.gitignore @@ -55,3 +55,4 @@ /SGGL/FineUIPro.Web/FileUpload/Gjsx/2025-03 /SGGLPackFile2 /SGGL/FineUIPro.Web/upload +/SGGL/FineUIPro.Web/FileUpload/PersonBaseInfo/2025-4 diff --git a/DataBase/版本日志/SGGLDB_WH_2025-04-01-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2025-04-01-bwj.sql new file mode 100644 index 00000000..0f8600b9 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2025-04-01-bwj.sql @@ -0,0 +1,370 @@ + +--ȡǰ˹̨Ԥ +ALTER PROCEDURE [dbo].[Sp_WorkBench_GetToDoItems] + @userId NVARCHAR(200)=NULL, + @sType char(10)=null +AS +/*ȡǰ˴*/ +BEGIN +SELECT HazardRegisterId AS DataId + ,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId + ,'ȫѲ' AS MenuName + ,project.ProjectCode + ,register.RegisterDef AS Content + ,users.UserId + ,users.UserName + ,register.RegisterDate AS DataTime + ,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr + ,'HSSE/HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl +FROM HSSE_Hazard_HazardRegister AS register +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +WHERE (@sType='1' or @sType='2') and register.ProjectId = projectUser.ProjectId and +((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') )) +) +UNION ALL + +SELECT HazardRegisterId AS DataId + ,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId + ,'ȫѲȷ' AS MenuName + ,project.ProjectCode + ,register.RegisterDef AS Content + ,users.UserId + ,users.UserName + ,register.RegisterDate AS DataTime + ,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr + ,'HSSE/HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl +FROM HSSE_Hazard_HazardRegister AS register +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +WHERE (@sType='1' or @sType='2') and register.ProjectId = projectUser.ProjectId and +register.states = '2' AND register.CheckManId =@userId + +UNION ALL +SELECT CheckControlCode AS DataId + ,'B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306' AS MenuId + ,'Ѳ' AS MenuName + ,project.ProjectCode + ,checkControl.QuestionDef AS Content + ,users.UserId + ,users.UserName + ,checkControl.CheckDate AS DataTime + ,CONVERT(varchar(100),checkControl.CheckDate, 23) AS DataTimeStr + ,'CQMS/Check/ChecklistEdit.aspx?CheckControlCode='+checkControl.CheckControlCode AS PCUrl +FROM Check_CheckControl AS checkControl +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +WHERE (@sType='1' or @sType='2') and checkControl.ProjectId = projectUser.ProjectId and +checkControl.State != '7' AND checkControl.CheckControlCode in (select CheckControlCode from Check_CheckControlApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null ) + +UNION ALL +SELECT GJSXID AS DataId + ,'0BEA2126-7A48-40EB-8E21-99148E91A22B' AS MenuId + ,'ؼ' AS MenuName + ,project.ProjectCode + ,GJSX.Detail AS Content + ,users.UserId + ,users.UserName + ,GJSX.CreateDate AS DataTime + ,CONVERT(varchar(100),GJSX.CreateDate, 23) AS DataTimeStr + ,'PZHGL/GJSX/GJSXListEdit.aspx?ToDo=ToDo&EditType=Edit&ID='+GJSXID AS PCUrl +FROM GJSX +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +WHERE (@sType='1' or @sType='2') and GJSX.ProjectId = projectUser.ProjectId and +GJSX.State != 0 AND (((select count(*) from GJSX_detail detail where detail.Progress_user=@userId and detail.GJSXID=GJSX.GJSXID)=0 +and (select count(*) from GJSX_Process process where process.UserId=@userId and process.GJSXID=GJSX.GJSXID)>0) +or (GJSX.User_Acceptance like '%'+@userId+'%' and (select count(*) from GJSX_detail detail where detail.GJSXID=GJSX.GJSXID)=(select count(*) from GJSX_Process process where process.GJSXID=GJSX.GJSXID)) +) +UNION ALL +SELECT ConstructSolutionId AS DataId + ,'91C4BFDB-0A51-4992-99CC-EB4EC185593D' AS MenuId + ,'ʩ' AS MenuName + ,project.ProjectCode + ,Solution.SolutionName AS Content + ,users.UserId + ,users.UserName + ,Solution.CompileDate AS DataTime + ,CONVERT(varchar(100),Solution.CompileDate, 23) AS DataTimeStr + ,'CQMS/Solution/EditConstructSolution.aspx?ConstructSolutionId='+Solution.ConstructSolutionId AS PCUrl +FROM Solution_CQMSConstructSolution AS Solution +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +WHERE (@sType='1' or @sType='2') and Solution.ProjectId = projectUser.ProjectId and +Solution.State!='3' +AND Solution.ConstructSolutionId in +(select top 1 ConstructSolutionId from ( +SELECT Solution_CQMSConstructSolutionApprove.* +FROM Solution_CQMSConstructSolutionApprove, +(SELECT MIN([order]) AS [order],ConstructSolutionId FROM Solution_CQMSConstructSolutionApprove where ApproveType!='S' and ApproveDate is null GROUP BY ConstructSolutionId )b +WHERE Solution_CQMSConstructSolutionApprove.[order] = b.[order] and Solution_CQMSConstructSolutionApprove.ConstructSolutionId = b.ConstructSolutionId + ) approve +where approve.ApproveMan=@userId ) + +UNION ALL +SELECT InspectionId AS DataId + ,'4781f467-35bf-4cf2-aaa4-7960a175eb61' AS MenuId + ,'֪ͨ' AS MenuName + ,project.ProjectCode + ,InspectionManagement.AcceptanceSite AS Content + ,users.UserId + ,users.UserName + ,InspectionManagement.CompileDate AS DataTime + ,CONVERT(varchar(100),InspectionManagement.CompileDate, 23) AS DataTimeStr + ,'CQMS/ProcessControl/InspectionNoticeEdit.aspx?View=View&InspectionId='+InspectionManagement.InspectionId AS PCUrl +FROM ProcessControl_InspectionManagement AS InspectionManagement +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +WHERE (@sType='1' or @sType='2') and InspectionManagement.ProjectId=projectUser.ProjectId and +dateadd(day,3,InspectionManagement.CompileDate)>getdate() and InspectionManagement.AcceptanceCheckMan like '%'+@userId+'%' +UNION ALL +SELECT CheckSpecialId AS DataId + ,'1B08048F-93ED-4E84-AE65-DB7917EA2DFB' AS MenuId + ,'ר' AS MenuName + ,project.ProjectCode + ,CheckItemSet.CheckItemName AS Content + ,users.UserId + ,users.UserName + ,CheckSpecial.CheckTime AS DataTime + ,CONVERT(varchar(100),CheckSpecial.CheckTime, 23) AS DataTimeStr + ,'HSSE/Check/CheckSpecialView.aspx?CheckSpecialId='+CheckSpecial.CheckSpecialId AS PCUrl +FROM Check_CheckSpecial AS CheckSpecial +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId =CheckSpecial.CheckItemSetId +WHERE (@sType='1' or @sType='2') and +dateadd(day,3,CheckSpecial.CheckTime)>getdate() and CheckSpecial.PartInPersonIds like '%'+@userId+'%' +and CheckSpecial.ProjectId = projectUser.ProjectId +UNION ALL +SELECT CheckColligationId AS DataId + ,'C198EBA8-9E23-4654-92E1-09C61105C522' AS MenuId + ,'ۺϼ' AS MenuName + ,project.ProjectCode + ,case CheckType when '0' then 'ܼ' when '1' then '¼' else '' end AS Content + ,users.UserId + ,users.UserName + ,CheckColligation.CheckTime AS DataTime + ,CONVERT(varchar(100),CheckColligation.CheckTime, 23) AS DataTimeStr + ,'HSSE/Check/CheckColligationEdit.aspx?CheckColligationId='+CheckColligation.CheckColligationId AS PCUrl +FROM Check_CheckColligation AS CheckColligation +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +LEFT JOIN Sys_FlowOperate AS FlowOperate ON CheckColligation.CheckColligationId=FlowOperate.DataId +LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId +WHERE (@sType='1' or @sType='2') and +FlowOperate.IsClosed <> 1 and FlowOperate.OperaterId=@userId +and CheckColligation.ProjectId = projectUser.ProjectId +UNION ALL +SELECT PatrolPlanId AS DataId + ,'D256E5C8-DC76-4F4D-BABE-A253418823F4' AS MenuId + ,'Ѳ' AS MenuName + ,project.ProjectCode + ,HazardListItem.HazardItems AS Content + ,users.UserId + ,users.UserName + ,PatrolPlan.LimitCheckDate AS DataTime + ,CONVERT(varchar(100),PatrolPlan.LimitCheckDate, 23) AS DataTimeStr + ,'HSSE/Hazard/RoutingInspectionEdit.aspx?PatrolPlanId='+PatrolPlan.PatrolPlanId AS PCUrl +FROM Hazard_PatrolPlan AS PatrolPlan +left join Project_ProjectUser as projectUser on projectUser.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId = projectUser.UserId +left join Base_Project as project on project.ProjectId =projectUser.ProjectId +LEFT JOIN Hazard_HazardSelectedItem AS HazardListItem on HazardListItem.HazardSelectedItemId=PatrolPlan.HazardSelectedItemId +WHERE (@sType='1' or @sType='2') and +dateadd(day,-3,PatrolPlan.LimitCheckDate)=22 and (select COUNT(*) from JDGL_QuantityCompletion WHERE DATENAME(year,GETDATE())=DATENAME(year,EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,EndDate))=0) +and (@sType='1' or @sType='2') and Project.ProjectId = pu.ProjectId --or (DATEADD(day,60,(select top 1 EndDate from JDGL_QuantityCompletion WHERE ProjectId=@projectId order by EndDate desc))=22 and +DATENAME(year,GETDATE())=DATENAME(year,MonthPlan.PlanDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,MonthPlan.PlanDate) +and (@sType='1' or @sType='2') +UNION ALL +SELECT DISTINCT --WeekPlan.WeekPlanId AS DataId + '' AS DataId + ,'56A54B4B-BBA3-4249-9FFC-3A60DAC79059' AS MenuId + ,'ȹܽȼƻδ' AS MenuName + ,project.ProjectCode + ,'' AS Content + ,users.UserId + ,users.UserName + ,GETDATE() AS DataTime + ,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr + ,'JDGL/Check/WeekPlanEdit.aspx?WeekNo='+WeekPlan.WeekNo AS PCUrl +FROM JDGL_WeekPlan AS WeekPlan +LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId +LEFT JOIN Sys_User AS users ON users.UserId =pu.UserId +LEFT JOIN Base_Project as project on project.ProjectId =pu.ProjectId +WHERE WeekPlan.ProjectId = pu.ProjectId +and WeekPlan.DutyPerson like '%'+@userId+'%' and WeekPlan.IsOK =0 and DATENAME(DAY,GETDATE())<=DATENAME(DAY,WeekPlan.EndDate) +and DATENAME(year,GETDATE())=DATENAME(year,WeekPlan.EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,WeekPlan.EndDate) +and (@sType='1' or @sType='2') + +ORDER BY DataTime DESC +END + + + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_WH_2025-04-07-xiaj.sql b/DataBase/版本日志/SGGLDB_WH_2025-04-07-xiaj.sql new file mode 100644 index 00000000..b0c12d90 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2025-04-07-xiaj.sql @@ -0,0 +1,82 @@ + + +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, + 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, + (CASE WHEN Registration.states='3' THEN '' ELSE 'δ' END ) AS ConfirmStr, + 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.Type, + Registration.HiddenType +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/DataBase/版本日志/SGGLDB_WH_2025-04-xiaj(角色授权菜单模块名称调整).sql b/DataBase/版本日志/SGGLDB_WH_2025-04-xiaj(角色授权菜单模块名称调整).sql new file mode 100644 index 00000000..6a8b0ee9 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2025-04-xiaj(角色授权菜单模块名称调整).sql @@ -0,0 +1,15 @@ +update Sys_Const +set ConstText='ؼЭͨ' +where GroupId='MenuType_P' and ConstText='ؼ' +go +update Sys_Const +set ConstText='Գƽ' +where GroupId='MenuType_P' and ConstText='Գ' +go +update Sys_Const +set ConstText='ʩ' +where GroupId='MenuType_P' and ConstText='ȹ' +go +delete Sys_Const +where GroupId='MenuType_P' and ConstText in('ƽ','Ϲ','Э빵ͨ') +go diff --git a/DataBase/版本日志/SGGLDB_WH_V2025-03-31(项目主数据对接)-xiaj.sql b/DataBase/版本日志/SGGLDB_WH_V2025-03-31(项目主数据对接)-xiaj.sql new file mode 100644 index 00000000..0d543391 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2025-03-31(项目主数据对接)-xiaj.sql @@ -0,0 +1,39 @@ + + +--ĿPMPϵͳĿϢ +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'Base_Project' AND COLUMN_NAME = 'PlanStartDate') +BEGIN + ALTER TABLE Base_Project ADD ProjectNameEn nvarchar(500); + ALTER TABLE Base_Project ADD StClientName nvarchar(200); + ALTER TABLE Base_Project ADD ClientContactor nvarchar(200); + ALTER TABLE Base_Project ADD MobileTel nvarchar(200); + ALTER TABLE Base_Project ADD PlanStartDate datetime; + ALTER TABLE Base_Project ADD PlanEndDate datetime; + + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'StClientName' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵϵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'ClientContactor' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵϵ˵绰' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'MobileTel' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀƻʼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'PlanStartDate' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'PlanEndDate' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿӢ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Project', @level2type=N'COLUMN',@level2name=N'ProjectNameEn' +END +GO + + +IF NOT EXISTS (SELECT 1 FROM INFORMATION_SCHEMA.COLUMNS WHERE TABLE_NAME = 'PMP_Project' AND COLUMN_NAME = 'stClientName') +BEGIN + ALTER TABLE PMP_Project ADD stClientName nvarchar(200); + ALTER TABLE PMP_Project ADD clientContactor nvarchar(200); + ALTER TABLE PMP_Project ADD mobileTel nvarchar(200); + ALTER TABLE PMP_Project ADD planStartDate datetime; + ALTER TABLE PMP_Project ADD planEndDate datetime; + ALTER TABLE PMP_Project ADD stLocationName nvarchar(20); + + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PMP_Project', @level2type=N'COLUMN',@level2name=N'stClientName' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵϵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PMP_Project', @level2type=N'COLUMN',@level2name=N'clientContactor' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ҵϵ˵绰' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PMP_Project', @level2type=N'COLUMN',@level2name=N'mobileTel' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀƻʼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PMP_Project', @level2type=N'COLUMN',@level2name=N'planStartDate' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Ŀƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PMP_Project', @level2type=N'COLUMN',@level2name=N'planEndDate' + EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'صƣڡ⣩' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'PMP_Project', @level2type=N'COLUMN',@level2name=N'stLocationName' +END +GO diff --git a/DataBase/版本日志/SGGLDB_WH_V2025-04-03(新增隐患类型)-xiaj.sql b/DataBase/版本日志/SGGLDB_WH_V2025-04-03(新增隐患类型)-xiaj.sql new file mode 100644 index 00000000..d12ac528 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_V2025-04-03(新增隐患类型)-xiaj.sql @@ -0,0 +1,55 @@ + + +-- + + + +update HSSE_Hazard_HazardRegister set Risk_Level='һ¹' where Risk_Level='һ'; +go + +update HSSE_Hazard_HazardRegister set Risk_Level='ش¹' where Risk_Level='ش'; +go + +update HSSE_Hazard_HazardRegister set Risk_Level='ϴ¹' where Risk_Level='ϴ'; +go + + + + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '15B87AA0-556E-49A0-9293-0EA4EACF8D04', '˺', '˺',14,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '15B87AA0-556E-49A0-9293-0EA4EACF8D04' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT 'D40FB4D8-E062-472F-A207-579A8693C2FD', 'ը', 'ը',15,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = 'D40FB4D8-E062-472F-A207-579A8693C2FD' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '229655EC-D220-483A-85A3-632FD092A158', '͸ˮ', '͸ˮ',16,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '229655EC-D220-483A-85A3-632FD092A158' AND GroupId='Hiddendangertype'); + + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '6D51F2BB-0BE1-4B7A-896F-32AFE26FD1C6', 'ðƬ', 'ðƬ',17,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '6D51F2BB-0BE1-4B7A-896F-32AFE26FD1C6' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '75E13D80-CD89-4D38-85F2-AF71C6CA94B3', '', '',18,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '75E13D80-CD89-4D38-85F2-AF71C6CA94B3' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '106FAA43-22B6-43A8-BBFA-E7E4129416CF', '˹ը', '˹ը',19,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '106FAA43-22B6-43A8-BBFA-E7E4129416CF' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '7CAC43A0-CC3F-4AD0-9FFD-BC4FA9B6169D', 'ҩը', 'ҩը',20,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '7CAC43A0-CC3F-4AD0-9FFD-BC4FA9B6169D' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '18B44A92-D602-44AC-BCEF-913873A94757', '¯ը', '¯ը',21,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '18B44A92-D602-44AC-BCEF-913873A94757' AND GroupId='Hiddendangertype'); + +INSERT INTO Sys_Const(ID,ConstValue,ConstText,SortIndex,GroupId) +SELECT '59A2D1CB-311F-4015-9F55-88707101284B', 'ը', 'ը',22,'Hiddendangertype' +WHERE NOT EXISTS (SELECT 1 FROM Sys_Const WHERE ID = '59A2D1CB-311F-4015-9F55-88707101284B' AND GroupId='Hiddendangertype'); +go diff --git a/DataBase/版本日志/SUBQHSE_V2025-04-01-bwj.sql b/DataBase/版本日志/SUBQHSE_V2025-04-01-bwj.sql new file mode 100644 index 00000000..1a4fd807 --- /dev/null +++ b/DataBase/版本日志/SUBQHSE_V2025-04-01-bwj.sql @@ -0,0 +1,347 @@ + + +--ȡǰ˴ +ALTER PROCEDURE [dbo].[Sp_Project_GetToDoItems] + @projectId NVARCHAR(50)=NULL, + @userId NVARCHAR(200)=NULL +AS +/*ȡǰ˴*/ +BEGIN +SELECT HazardRegisterId AS DataId + ,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId + ,'ȫѲ' AS MenuName + ,(case when len(register.RegisterDef)>15 then left(register.RegisterDef,15)+'...' else register.RegisterDef end)AS Content + ,UserId + ,users.UserName + ,register.RegisterDate AS DataTime + ,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr + ,'../HSSE/HiddenInspection/HiddenRectificationRectify.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl +FROM HSSE_Hazard_HazardRegister AS register +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE register.ProjectId=@projectId AND +((register.states = '1' AND (register.ResponsibleMan =@userId OR register.CCManIds LIKE ('%'+@userId+'%') )) +) +UNION ALL + +SELECT HazardRegisterId AS DataId + ,'B6BE5FE0-CB84-47FF-A6C3-5AD9E1CCE079' AS MenuId + ,'ȫѲȷ' AS MenuName + ,(case when len(register.RegisterDef)>15 then left(register.RegisterDef,15)+'...' else register.RegisterDef end) AS Content + ,UserId + ,users.UserName + ,register.RegisterDate AS DataTime + ,CONVERT(varchar(100),register.RegisterDate, 23) AS DataTimeStr + ,'../HSSE/HiddenInspection/HiddenRectificationConfirm.aspx?HazardRegisterId='+register.HazardRegisterId AS PCUrl +FROM HSSE_Hazard_HazardRegister AS register +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE register.ProjectId=@projectId AND +register.states = '2' AND register.CheckManId =@userId + +UNION ALL +SELECT CheckControlCode AS DataId + ,'B3E99BD9-FDC7-4F15-8C3C-A7821AC9E306' AS MenuId + ,'Ѳ' AS MenuName + ,checkControl.QuestionDef AS Content + ,UserId + ,users.UserName + ,checkControl.CheckDate AS DataTime + ,CONVERT(varchar(100),checkControl.CheckDate, 23) AS DataTimeStr + ,'../CQMS/Check/ChecklistEdit.aspx?ToDo=ToDo&CheckControlCode='+checkControl.CheckControlCode AS PCUrl +FROM Check_CheckControl AS checkControl +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE checkControl.ProjectId=@projectId AND +checkControl.State != '7' AND checkControl.CheckControlCode in (select CheckControlCode from Check_CheckControlApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null ) + +UNION ALL +SELECT GJSXID AS DataId + ,'0BEA2126-7A48-40EB-8E21-99148E91A22B' AS MenuId + ,'ؼ' AS MenuName + ,GJSX.Detail AS Content + ,users.UserId + ,users.UserName + ,GJSX.CreateDate AS DataTime + ,CONVERT(varchar(100),GJSX.CreateDate, 23) AS DataTimeStr + ,'../PZHGL/GJSX/GJSXListEdit.aspx?ToDo=ToDo&EditType=Edit&ID='+GJSXID AS PCUrl +FROM GJSX +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE GJSX.ProjectId=@projectId AND +GJSX.State != 0 AND (((select count(*) from GJSX_detail detail where detail.Progress_user=@userId and detail.GJSXID=GJSX.GJSXID)=0 +and (select count(*) from GJSX_Process process where process.UserId=@userId and process.GJSXID=GJSX.GJSXID)>0) +or (GJSX.User_Acceptance like '%'+@userId+'%' and (select count(*) from GJSX_detail detail where detail.GJSXID=GJSX.GJSXID)=(select count(*) from GJSX_Process process where process.GJSXID=GJSX.GJSXID)) +) + +--UNION ALL +--SELECT InspectionEquipmentId AS DataId +-- ,'6c2c1e5e-1812-4e1c-a683-7125518e28c7' AS MenuId +-- ,'豸ϱȷ' AS MenuName +-- ,Equipment.InspectionName AS Content +-- ,UserId +-- ,users.UserName +-- ,Equipment.InspectionDate AS DataTime +-- ,CONVERT(varchar(100),Equipment.InspectionDate, 23) AS DataTimeStr +-- ,'../CQMS/Comprehensive/InspectionEquipmentEdit.aspx?ToDo=ToDo&InspectionEquipmentId='+Equipment.InspectionEquipmentId AS PCUrl +--FROM Comprehensive_InspectionEquipment AS Equipment +--LEFT JOIN Sys_User AS users ON users.UserId =@userId +--WHERE Equipment.ProjectId=@projectId and +--Equipment.Status!='3' AND Equipment.InspectionEquipmentId in (select InspectionEquipmentId from Comprehensive_InspectionEquipmentApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null ) +--UNION ALL +--SELECT InspectionPersonId AS DataId +-- ,'8ed133de-5899-4687-878a-20b1f5280f18' AS MenuId +-- ,'Աȷ' AS MenuName +-- ,Person.PersonName AS Content +-- ,UserId +-- ,users.UserName +-- ,Person.CompileDate AS DataTime +-- ,CONVERT(varchar(100),Person.CompileDate, 23) AS DataTimeStr +-- ,'../CQMS/Comprehensive/InspectionPersonEdit.aspx?ToDo=ToDo&InspectionPersonId='+Person.InspectionPersonId AS PCUrl +--FROM Comprehensive_InspectionPerson AS Person +--LEFT JOIN Sys_User AS users ON users.UserId =@userId +--WHERE Person.ProjectId=@projectId and +--Person.Status!='3' AND Person.InspectionPersonId in (select InspectionPersonId from Comprehensive_InspectionPersonApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null ) +--UNION ALL +--SELECT InspectionMachineId AS DataId +-- ,'aa55fad1-6c51-43f5-8c99-3c6aaae79118' AS MenuId +-- ,'߱ȷ' AS MenuName +-- ,Machine.InspectionMachineName AS Content +-- ,UserId +-- ,users.UserName +-- ,Machine.CompileDate AS DataTime +-- ,CONVERT(varchar(100),Machine.CompileDate, 23) AS DataTimeStr +-- ,'../CQMS/Comprehensive/InspectionMachineEdit.aspx?ToDo=ToDo&InspectionMachineId='+Machine.InspectionMachineId AS PCUrl +--FROM Comprehensive_InspectionMachine AS Machine +--LEFT JOIN Sys_User AS users ON users.UserId =@userId +--WHERE Machine.ProjectId=@projectId and +--Machine.Status!='3' AND Machine.InspectionMachineId in (select InspectionMachineId from Comprehensive_InspectionMachineApprove approve where approve.ApproveType!='S' and approve.ApproveMan=@userId and approve.ApproveDate is null ) +UNION ALL +SELECT ConstructSolutionId AS DataId + ,'91C4BFDB-0A51-4992-99CC-EB4EC185593D' AS MenuId + ,'ʩ' AS MenuName + ,Solution.SolutionName AS Content + ,UserId + ,users.UserName + ,Solution.CompileDate AS DataTime + ,CONVERT(varchar(100),Solution.CompileDate, 23) AS DataTimeStr + ,'../CQMS/Solution/EditConstructSolution.aspx?ToDo=ToDo&ConstructSolutionId='+Solution.ConstructSolutionId AS PCUrl +FROM Solution_CQMSConstructSolution AS Solution +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE Solution.ProjectId=@projectId and +Solution.State!='3' +AND Solution.ConstructSolutionId in +(select top 1 ConstructSolutionId from ( +SELECT Solution_CQMSConstructSolutionApprove.* +FROM Solution_CQMSConstructSolutionApprove, +(SELECT MIN([order]) AS [order],ConstructSolutionId FROM Solution_CQMSConstructSolutionApprove where ApproveType!='S' and ApproveDate is null GROUP BY ConstructSolutionId )b +WHERE Solution_CQMSConstructSolutionApprove.[order] = b.[order] and Solution_CQMSConstructSolutionApprove.ConstructSolutionId = b.ConstructSolutionId + ) approve +where approve.ApproveMan=@userId ) + +UNION ALL +SELECT InspectionId AS DataId + ,'4781f467-35bf-4cf2-aaa4-7960a175eb61' AS MenuId + ,'֪ͨ' AS MenuName + ,InspectionManagement.AcceptanceSite AS Content + ,UserId + ,users.UserName + ,InspectionManagement.CompileDate AS DataTime + ,CONVERT(varchar(100),InspectionManagement.CompileDate, 23) AS DataTimeStr + ,'../CQMS/ProcessControl/InspectionNoticeEdit.aspx?View=View&InspectionId='+InspectionManagement.InspectionId AS PCUrl +FROM ProcessControl_InspectionManagement AS InspectionManagement +LEFT JOIN Sys_User AS users ON users.UserId =@userId +WHERE InspectionManagement.ProjectId=@projectId and +dateadd(day,3,InspectionManagement.CompileDate)>getdate() and InspectionManagement.AcceptanceCheckMan like '%'+@userId+'%' +UNION ALL +SELECT CheckSpecialId AS DataId + ,'1B08048F-93ED-4E84-AE65-DB7917EA2DFB' AS MenuId + ,'ר' AS MenuName + ,CheckItemSet.CheckItemName AS Content + ,UserId + ,users.UserName + ,CheckSpecial.CheckTime AS DataTime + ,CONVERT(varchar(100),CheckSpecial.CheckTime, 23) AS DataTimeStr + ,'../HSSE/Check/CheckSpecialView.aspx?CheckSpecialId='+CheckSpecial.CheckSpecialId AS PCUrl +FROM Check_CheckSpecial AS CheckSpecial +LEFT JOIN Sys_User AS users ON users.UserId =@userId +LEFT JOIN Technique_CheckItemSet AS CheckItemSet ON CheckItemSet.CheckItemSetId =CheckSpecial.CheckItemSetId +WHERE CheckSpecial.ProjectId=@projectId and +dateadd(day,3,CheckSpecial.CheckTime)>getdate() and CheckSpecial.PartInPersonIds like '%'+@userId+'%' +UNION ALL +SELECT CheckColligationId AS DataId + ,'C198EBA8-9E23-4654-92E1-09C61105C522' AS MenuId + ,'ۺϼ' AS MenuName + ,case CheckType when '0' then 'ܼ' when '1' then '¼' else '' end AS Content + ,users.UserId + ,users.UserName + ,CheckColligation.CheckTime AS DataTime + ,CONVERT(varchar(100),CheckColligation.CheckTime, 23) AS DataTimeStr + ,'../HSSE/Check/CheckColligationEdit.aspx?CheckColligationId='+CheckColligation.CheckColligationId AS PCUrl +FROM Check_CheckColligation AS CheckColligation +LEFT JOIN Sys_User AS users ON users.UserId =@userId +LEFT JOIN Sys_FlowOperate AS FlowOperate ON CheckColligation.CheckColligationId=FlowOperate.DataId +LEFT JOIN Sys_User AS OperateUser ON FlowOperate.OperaterId=OperateUser.UserId +WHERE CheckColligation.ProjectId=@projectId and FlowOperate.IsClosed <> 1 and FlowOperate.OperaterId=@userId +UNION ALL +SELECT PatrolPlanId AS DataId + ,'D256E5C8-DC76-4F4D-BABE-A253418823F4' AS MenuId + ,'Ѳ' AS MenuName + ,HazardListItem.HazardItems AS Content + ,UserId + ,users.UserName + ,PatrolPlan.LimitCheckDate AS DataTime + ,CONVERT(varchar(100),PatrolPlan.LimitCheckDate, 23) AS DataTimeStr + ,'../HSSE/Hazard/RoutingInspectionEdit.aspx?PatrolPlanId='+PatrolPlan.PatrolPlanId AS PCUrl +FROM Hazard_PatrolPlan AS PatrolPlan +LEFT JOIN Sys_User AS users ON users.UserId =@userId +LEFT JOIN Hazard_HazardSelectedItem AS HazardListItem on HazardListItem.HazardSelectedItemId=PatrolPlan.HazardSelectedItemId +WHERE HazardListItem.ProjectId=@projectId and +dateadd(day,-3,PatrolPlan.LimitCheckDate)=22 and (select COUNT(*) from JDGL_QuantityCompletion WHERE ProjectId=@projectId and DATENAME(year,GETDATE())=DATENAME(year,EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,EndDate))=0) +--or (DATEADD(day,60,(select top 1 EndDate from JDGL_QuantityCompletion WHERE ProjectId=@projectId order by EndDate desc))=22 and +DATENAME(year,GETDATE())=DATENAME(year,MonthPlan.PlanDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,MonthPlan.PlanDate) + +UNION ALL +SELECT DISTINCT --WeekPlan.WeekPlanId AS DataId + '' AS DataId + ,'56A54B4B-BBA3-4249-9FFC-3A60DAC79059' AS MenuId + ,'ȹܽȼƻδ' AS MenuName + ,'' AS Content + ,users.UserId + ,users.UserName + ,GETDATE() AS DataTime + ,CONVERT(varchar(100),GETDATE(), 23) AS DataTimeStr + ,'../JDGL/Check/WeekPlanEdit.aspx?ToDo=ToDo&WeekNo='+WeekPlan.WeekNo AS PCUrl +FROM JDGL_WeekPlan AS WeekPlan +LEFT JOIN Sys_User AS users ON users.UserId =@userId +LEFT JOIN Project_ProjectUser as pu on pu.UserId=@userId +WHERE WeekPlan.ProjectId=@projectId +and WeekPlan.DutyPerson like '%'+@userId+'%' and WeekPlan.IsOK =0 and DATENAME(DAY,GETDATE())<=DATENAME(DAY,WeekPlan.EndDate) +and DATENAME(year,GETDATE())=DATENAME(year,WeekPlan.EndDate) and DATENAME(MONTH,GETDATE())=DATENAME(MONTH,WeekPlan.EndDate) + + +ORDER BY DataTime DESC +END + + + + + +GO + + diff --git a/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs b/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs index c9bd25ed..565c5768 100644 --- a/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs +++ b/SGGL/BLL/API/HSSE/APIHazardRegisterService.cs @@ -74,7 +74,7 @@ namespace BLL HandleIdea = hazardRegister.HandleIdea, CutPayment = hazardRegister.CutPayment, ProblemTypes = hazardRegister.ProblemTypes, - RegisterTypesId = hazardRegister.RegisterTypesId, + //RegisterTypesId = hazardRegister.RegisterTypesId, CheckCycle = hazardRegister.CheckCycle, SafeSupervisionIsOK = hazardRegister.SafeSupervisionIsOK, IsWx = "Y", diff --git a/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs b/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs index a89b7565..11ff07a6 100644 --- a/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs +++ b/SGGL/BLL/CQMS/Check/CheckControlApproveService.cs @@ -101,7 +101,7 @@ namespace BLL /// 一个质量巡检审批实体 public static Model.Check_CheckControlApprove GetCheckControlApproveByCheckControlId(string CheckControlCode) { - return db.Check_CheckControlApprove.OrderByDescending(x=>x.ApproveDate).FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate != null); + return db.Check_CheckControlApprove.FirstOrDefault(x => x.CheckControlCode == CheckControlCode && x.ApproveType != "S" && x.ApproveDate == null); } /// /// 修改质量巡检审批信息 diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 5bbd5c0a..ef2e5a0a 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -18,10 +18,25 @@ namespace BLL public const string sysglyId = "AF17168B-87BD-4GLY-1111-F0A0A1158F9B"; /// - /// 系统管理员ID + /// 系统管理员ID——JT /// public const string hfnbdId = "C4A62EC0-E5D3-4EBF-A5FA-E56AA89633C0"; + /// + /// 施工部——付伟 + /// + public const string fuweiId = "dd72a950-8a8e-4958-ba8c-954c58a9beea"; + + /// + /// 施工部——申银行 + /// + public const string shenyinhangId = "fb3b3171-f2f3-40b1-b40b-9424cc14ecfe"; + + /// + /// 施工部——张慧娟 + /// + public const string zhanghuijuanId = "8cd25563-429e-4ac7-a13f-610e35eea62d"; + /// /// 公共临时账户ID /// @@ -282,136 +297,6 @@ namespace BLL public const string PostType_5 = "5"; #endregion - #region 内置岗位 - /// - /// HSE工程师岗位Id - /// - public static string WorkPost_HSSEEngineer = "D1115B78-C9E1-43A4-8AB1-FF099CAF7BA4"; - /// - /// 项目安全总监岗位Id - /// - public static string WorkPost_ProjectHSSEDirector = "5e6e259e-ea0a-4a63-8f52-df4a19a6c9fa"; - /// - /// HSE经理岗位Id - /// - public static string WorkPost_SafetyManager = "eac153fd-4cf3-4f5f-984d-022a636d47aa"; - - /// - /// HSE副经理岗位Id - /// - public static string WorkPost_SafetyManagerFu = "46AA7960-1D35-4D5B-8C8F-AA4C874D63C8"; - - /// - /// 无损检测工岗位Id - /// - public static string WorkPost_Checker = "595999E9-75A8-4064-9BD1-9EE02F236297"; - - /// - /// 木工岗位Id - /// - public static string WorkPost_Carpentry = "4ACC633F-BD81-4CBB-9058-A4E4DFFE7881"; - - /// - /// 钢筋工岗位Id - /// - public static string WorkPost_SteelWorker = "E735CF61-096B-4134-B6D4-766B4B8EF790"; - - /// - /// 瓦工岗位Id - /// - public static string WorkPost_Bricklayer = "5E07B570-2E2C-470E-8379-7FEAECF8F62A"; - - /// - /// 混凝土工岗位Id - /// - public static string WorkPost_ConcreteWorker = "14f1fa16-965e-427d-a342-edbb3230ae3c"; - - /// - /// 钳工岗位Id - /// - public static string WorkPost_Fitter1 = "c7431c69-fb64-4960-a9da-2c7b8d380097"; - - /// - /// 钳工岗位Id - /// - public static string WorkPost_Fitter2 = "F49B8430-AC71-40B2-86A3-6825C73F59E5"; - - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder = "97afac2d-7ffb-49de-bf15-4b49ef24df63"; - - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder1 = "16c736b6-7ee1-4069-8b57-1a658e6a615f"; - - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder2 = "36644e8c-0593-4ca7-880f-6a55510c51a1"; - - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder3 = "5383f797-da4a-4547-b2aa-905a99c1bcfa"; - - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder4 = "97afac2d-7ffb-49de-bf15-4b49ef24df63"; - - /// - /// 焊工岗位Id - /// - public static string WorkPost_Welder5 = "F8CD2EB0-1D46-422B-A21C-331669B2CF6C"; - - /// - /// 铆工岗位Id - /// - public static string WorkPost_Riveter = "338A8CB9-FB41-4E09-A2BD-ADD27BDBE9DE"; - - /// - /// 管工岗位Id - /// - public static string WorkPost_Foreman = "edc167d9-e2ed-4ed9-8c4d-9c179ff0286f"; - - /// - /// 电工岗位Id - /// - public static string WorkPost_Electrician1 = "29999836-fcdd-43f5-ab6c-77c5e0d6ce0d"; - - /// - /// 电工岗位Id - /// - public static string WorkPost_Electrician2 = "5CBA1BD0-B66B-4362-8CF3-CEA9D3F425DB"; - - /// - /// 电工岗位Id - /// - public static string WorkPost_Electrician3 = "bb71b5f6-d6c6-49d8-83aa-577c6f0808a0"; - - /// - /// 仪表工岗位Id - /// - public static string WorkPost_Instrumentalist = "EFBA9A9A-FF98-47B4-949E-951A8F4E42E5"; - - /// - /// 防腐保温工岗位Id - /// - public static string WorkPost_AnticorrosionWorker = "010CBFD3-51B9-4C48-A6F8-15326D810AA5"; - - /// - /// 普工岗位Id - /// - public static string WorkPost_PGWorker = "D30865B9-A966-441D-84AC-289BCC5A9E4D"; - - /// - /// 其他岗位Id - /// - public static string WorkPost_Other = "71D6437A-6EE4-434A-A68C-BBB2B00FB6C6"; - #endregion - #region 系统环境设置常量 /// /// 月报上报时间 @@ -634,6 +519,136 @@ namespace BLL public const string CarEngineer = "89F8AA0B-77ED-4B17-B697-EFF7259C790B"; #endregion + #region 内置岗位 + /// + /// HSE工程师岗位Id + /// + public static string WorkPost_HSSEEngineer = "D1115B78-C9E1-43A4-8AB1-FF099CAF7BA4"; + /// + /// 项目安全总监岗位Id + /// + public static string WorkPost_ProjectHSSEDirector = "5e6e259e-ea0a-4a63-8f52-df4a19a6c9fa"; + /// + /// HSE经理岗位Id + /// + public static string WorkPost_SafetyManager = "eac153fd-4cf3-4f5f-984d-022a636d47aa"; + + /// + /// HSE副经理岗位Id + /// + public static string WorkPost_SafetyManagerFu = "46AA7960-1D35-4D5B-8C8F-AA4C874D63C8"; + + /// + /// 无损检测工岗位Id + /// + public static string WorkPost_Checker = "595999E9-75A8-4064-9BD1-9EE02F236297"; + + /// + /// 木工岗位Id + /// + public static string WorkPost_Carpentry = "4ACC633F-BD81-4CBB-9058-A4E4DFFE7881"; + + /// + /// 钢筋工岗位Id + /// + public static string WorkPost_SteelWorker = "E735CF61-096B-4134-B6D4-766B4B8EF790"; + + /// + /// 瓦工岗位Id + /// + public static string WorkPost_Bricklayer = "5E07B570-2E2C-470E-8379-7FEAECF8F62A"; + + /// + /// 混凝土工岗位Id + /// + public static string WorkPost_ConcreteWorker = "14f1fa16-965e-427d-a342-edbb3230ae3c"; + + /// + /// 钳工岗位Id + /// + public static string WorkPost_Fitter1 = "c7431c69-fb64-4960-a9da-2c7b8d380097"; + + /// + /// 钳工岗位Id + /// + public static string WorkPost_Fitter2 = "F49B8430-AC71-40B2-86A3-6825C73F59E5"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder = "97afac2d-7ffb-49de-bf15-4b49ef24df63"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder1 = "16c736b6-7ee1-4069-8b57-1a658e6a615f"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder2 = "36644e8c-0593-4ca7-880f-6a55510c51a1"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder3 = "5383f797-da4a-4547-b2aa-905a99c1bcfa"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder4 = "97afac2d-7ffb-49de-bf15-4b49ef24df63"; + + /// + /// 焊工岗位Id + /// + public static string WorkPost_Welder5 = "F8CD2EB0-1D46-422B-A21C-331669B2CF6C"; + + /// + /// 铆工岗位Id + /// + public static string WorkPost_Riveter = "338A8CB9-FB41-4E09-A2BD-ADD27BDBE9DE"; + + /// + /// 管工岗位Id + /// + public static string WorkPost_Foreman = "edc167d9-e2ed-4ed9-8c4d-9c179ff0286f"; + + /// + /// 电工岗位Id + /// + public static string WorkPost_Electrician1 = "29999836-fcdd-43f5-ab6c-77c5e0d6ce0d"; + + /// + /// 电工岗位Id + /// + public static string WorkPost_Electrician2 = "5CBA1BD0-B66B-4362-8CF3-CEA9D3F425DB"; + + /// + /// 电工岗位Id + /// + public static string WorkPost_Electrician3 = "bb71b5f6-d6c6-49d8-83aa-577c6f0808a0"; + + /// + /// 仪表工岗位Id + /// + public static string WorkPost_Instrumentalist = "EFBA9A9A-FF98-47B4-949E-951A8F4E42E5"; + + /// + /// 防腐保温工岗位Id + /// + public static string WorkPost_AnticorrosionWorker = "010CBFD3-51B9-4C48-A6F8-15326D810AA5"; + + /// + /// 普工岗位Id + /// + public static string WorkPost_PGWorker = "D30865B9-A966-441D-84AC-289BCC5A9E4D"; + + /// + /// 其他岗位Id + /// + public static string WorkPost_Other = "71D6437A-6EE4-434A-A68C-BBB2B00FB6C6"; + #endregion + #region 报表流程定义 /// /// 编制中 diff --git a/SGGL/BLL/PMP/PMPDataService.cs b/SGGL/BLL/PMP/PMPDataService.cs index 8e435d17..c092d745 100644 --- a/SGGL/BLL/PMP/PMPDataService.cs +++ b/SGGL/BLL/PMP/PMPDataService.cs @@ -128,8 +128,11 @@ namespace BLL newItem.Code = item.code; newItem.StNum = item.stNum; newItem.Name = item.name; + newItem.ProjectNameEn = item.projectNameEn; newItem.RealStartDate = item.realStartDate; newItem.RealEndDate = item.realEndDate; + newItem.PlanStartDate = item.planStartDate; + newItem.PlanEndDate = item.planEndDate; newItem.DisType = item.disType; newItem.ProjShortName = item.projShortName; newItem.ProjStepZxnoCode = item.projStepZxnoCode; @@ -141,6 +144,7 @@ namespace BLL newItem.RemarkA = item.remarkA; newItem.RemarkB = item.remarkB; newItem.RemarkC = item.remarkC; + newItem.StLocationName = item.stLocationName; newItem.Address = item.address; newItem.CityCode = item.cityCode; newItem.CityName = item.cityName; @@ -148,9 +152,11 @@ namespace BLL newItem.CountryName = item.countryName; newItem.CountyCode = item.countyCode; newItem.CountyName = item.countyName; - newItem.ProjectNameEn = item.projectNameEn; newItem.ProvinceCode = item.provinceCode; newItem.ProvinceName = item.provinceName; + newItem.StClientName = item.stClientName; + newItem.ClientContactor = item.clientContactor; + newItem.MobileTel = item.mobileTel; newItem.CreateTime = DateTime.Now; list.Add(newItem); } @@ -183,7 +189,7 @@ namespace BLL /// 项目OBS查询接口 /// /// 项目Id - public static List GetPMPProjectOBSMasterData(string proId) + public static List GetPMPProjectOBSMasterData(string proId) { string url = $"{PmpApiUrl}/api/standard/dis/query_all"; var token = GetToken(); @@ -196,11 +202,12 @@ namespace BLL string data = string.Empty; string rows = string.Empty; + List outlist = new List(); List list = new List(); int pageSize = 1000;//一次性最多返回1000条数据 List searchCond = new List(); - searchCond.Add(new PMPSearchCondData { name = "id", value = proId, fieldType = "SelectList" }); + searchCond.Add(new PMPSearchCondData { name = "projectId", value = proId, fieldType = "SelectList" }); for (int pageNum = 1; pageNum < 10; pageNum++) { var tempData = new @@ -219,7 +226,7 @@ namespace BLL string pushContent = JsonConvert.SerializeObject(tempData); //var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", null, newToken, pushContent); - var returndata = "{\"msg\":\"操作成功\",\"total\":63,\"code\":1,\"data\":{\"userColumnPermissions\":\"\"},\"rows\":[{\"disType\":\"\",\"obsId\":\"1874004938250653696\",\"code\":\"1874004938250653696\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":2,\"staffName\":\"\",\"name\":\"化工工艺专业负责人\",\"id\":944618,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004948325371904\",\"code\":\"1874004948325371904\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目技术主管\",\"id\":944616,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004944894431232\"},{\"disType\":\"\",\"obsId\":\"1874004946647650304\",\"code\":\"1874004946647650304\",\"staffCode\":\"890\",\"proCode\":\"\",\"level\":3,\"staffName\":\"金吉\",\"name\":\"1717470730419048448\",\"id\":944614,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004946622484480\"},{\"disType\":\"\",\"obsId\":\"1874004935037816832\",\"code\":\"1874004935037816832\",\"staffCode\":\"\",\"proCode\":\"IN\",\"level\":2,\"staffName\":\"\",\"name\":\"仪表专业负责人\",\"id\":944612,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004944919597056\",\"code\":\"1874004944919597056\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目主管\",\"id\":944610,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004944894431232\"},{\"disType\":\"\",\"obsId\":\"1726143893013139456\",\"code\":\"1726143893013139456\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目经理\",\"id\":924461,\"projectId\":\"1725799419921571842\",\"obsPid\":\"1726139280880963584\"},{\"disType\":\"\",\"obsId\":\"1790293713575088128\",\"code\":\"1790293713575088128\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":2,\"staffName\":\"\",\"name\":\"化工工艺专业负责人\",\"id\":914461,\"projectId\":\"1764929892790579202\",\"obsPid\":\"1790293698567868416\"},{\"disType\":\"\",\"obsId\":\"1726152536429301760\",\"code\":\"1726152536429301760\",\"staffCode\":\"786\",\"proCode\":\"HV\",\"level\":3,\"staffName\":\"罗晓波\",\"name\":\"1717470703806189568\",\"id\":904461,\"projectId\":\"1725804867986931714\",\"obsPid\":\"1726152536387358720\"},{\"disType\":\"\",\"obsId\":\"1726158429212512256\",\"code\":\"1726158429212512256\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目技术主管\",\"id\":894461,\"projectId\":\"1725799683017678849\",\"obsPid\":\"1726154187265413120\"},{\"disType\":\"\",\"obsId\":\"1726145953582419968\",\"code\":\"1726145953582419968\",\"staffCode\":\"\",\"proCode\":\"TC\",\"level\":2,\"staffName\":\"\",\"name\":\"电信专业负责人\",\"id\":884461,\"projectId\":\"1725799443120267266\",\"obsPid\":\"1726142507911352320\"},{\"disType\":\"\",\"obsId\":\"1807817821707702272\",\"code\":\"1807817821707702272\",\"staffCode\":\"1548\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"罗骏\",\"name\":\"1717470895821426688\",\"id\":874461,\"projectId\":\"1764864241774374914\",\"obsPid\":\"1807817374255157248\"},{\"disType\":\"\",\"obsId\":\"1726132867945336832\",\"code\":\"1726132867945336832\",\"staffCode\":\"175\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"章安杰\",\"name\":\"1717470554467995648\",\"id\":864461,\"projectId\":\"1725799080250056706\",\"obsPid\":\"1726132867723038720\"},{\"disType\":\"\",\"obsId\":\"1726128845142233088\",\"code\":\"1726128845142233088\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":1,\"staffName\":\"\",\"name\":\"设计岗位\",\"id\":854461,\"projectId\":\"1725799069407780865\",\"obsPid\":\"0\"},{\"disType\":\"\",\"obsId\":\"1809004454788337664\",\"code\":\"1809004454788337664\",\"staffCode\":\"2126\",\"proCode\":\"EQ\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844619,\"projectId\":\"1764929736976379906\",\"obsPid\":\"1809004377281794048\"},{\"disType\":\"\",\"obsId\":\"1808814135417376768\",\"code\":\"1808814135417376768\",\"staffCode\":\"2126\",\"proCode\":\"MA\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844618,\"projectId\":\"1725799377735262209\",\"obsPid\":\"1808814135350267904\"},{\"disType\":\"\",\"obsId\":\"1810889570779271168\",\"code\":\"1810889570779271168\",\"staffCode\":\"2126\",\"proCode\":\"EQ\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844617,\"projectId\":\"1767762648939679746\",\"obsPid\":\"1810889570716356608\"},{\"disType\":\"\",\"obsId\":\"1726146119777521664\",\"code\":\"1726146119777521664\",\"staffCode\":\"2126\",\"proCode\":\"EQ\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844616,\"projectId\":\"1725799414410256386\",\"obsPid\":\"1726146115658715136\"},{\"disType\":\"\",\"obsId\":\"1726145572903194624\",\"code\":\"1726145572903194624\",\"staffCode\":\"2126\",\"proCode\":\"MA\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844615,\"projectId\":\"1725804757517352961\",\"obsPid\":\"1726145572857057280\"},{\"disType\":\"\",\"obsId\":\"1726144782193004544\",\"code\":\"1726144782193004544\",\"staffCode\":\"2126\",\"proCode\":\"EQ\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844614,\"projectId\":\"1725799392608264194\",\"obsPid\":\"1726144782134284288\"},{\"disType\":\"\",\"obsId\":\"1726152137353859072\",\"code\":\"1726152137353859072\",\"staffCode\":\"2126\",\"proCode\":\"MA\",\"level\":3,\"staffName\":\"向派\",\"name\":\"1717471125925138432\",\"id\":844612,\"projectId\":\"1725799615191588866\",\"obsPid\":\"1726152137269972992\"},{\"disType\":\"\",\"obsId\":\"1726153045173211136\",\"code\":\"1726153045173211136\",\"staffCode\":\"30129\",\"proCode\":\"CP\",\"level\":3,\"staffName\":\"廖超奇\",\"name\":\"1717471125082083328\",\"id\":844611,\"projectId\":\"1725799665967833090\",\"obsPid\":\"1726153044460179456\"},{\"disType\":\"\",\"obsId\":\"1726151906969128960\",\"code\":\"1726151906969128960\",\"staffCode\":\"30129\",\"proCode\":\"CP\",\"level\":3,\"staffName\":\"廖超奇\",\"name\":\"1717471125082083328\",\"id\":844610,\"projectId\":\"1725799637161353218\",\"obsPid\":\"1726151906071547904\"},{\"disType\":\"\",\"obsId\":\"1726150009159815168\",\"code\":\"1726150009159815168\",\"staffCode\":\"2103\",\"proCode\":\"ES\",\"level\":3,\"staffName\":\"韦科旭\",\"name\":\"1717471113103151104\",\"id\":844461,\"projectId\":\"1725799582257913858\",\"obsPid\":\"1726150007641477120\"},{\"disType\":\"\",\"obsId\":\"1726151001037213696\",\"code\":\"1726151001037213696\",\"staffCode\":\"415\",\"proCode\":\"IN\",\"level\":3,\"staffName\":\"罗晓珂\",\"name\":\"1717470620075298816\",\"id\":834461,\"projectId\":\"1725799603615309825\",\"obsPid\":\"1726150999971860480\"},{\"disType\":\"\",\"obsId\":\"1804003904929796096\",\"code\":\"1804003904929796096\",\"staffCode\":\"\",\"proCode\":\"WS\",\"level\":2,\"staffName\":\"\",\"name\":\"给排水专业负责人\",\"id\":824461,\"projectId\":\"1802552209230016513\",\"obsPid\":\"1804003851456614400\"},{\"disType\":\"\",\"obsId\":\"1808274512249229312\",\"code\":\"1808274512249229312\",\"staffCode\":\"\",\"proCode\":\"PL\",\"level\":2,\"staffName\":\"\",\"name\":\"总图运输专业负责人\",\"id\":814461,\"projectId\":\"1764864026589802497\",\"obsPid\":\"1808274237060943872\"},{\"disType\":\"\",\"obsId\":\"1726132878502400000\",\"code\":\"1726132878502400000\",\"staffCode\":\"1046\",\"proCode\":\"IN\",\"level\":3,\"staffName\":\"黄志清\",\"name\":\"1717470745505959936\",\"id\":804461,\"projectId\":\"1725799072750641154\",\"obsPid\":\"1726132878452068352\"},{\"disType\":\"\",\"obsId\":\"1726137657777590272\",\"code\":\"1726137657777590272\",\"staffCode\":\"1267\",\"proCode\":\"\",\"level\":3,\"staffName\":\"杨小菁\",\"name\":\"1717470533823631360\",\"id\":794461,\"projectId\":\"1725799239822352385\",\"obsPid\":\"1726137657714675712\"},{\"disType\":\"\",\"obsId\":\"1726157288894500864\",\"code\":\"1726157288894500864\",\"staffCode\":\"\",\"proCode\":\"OP\",\"level\":2,\"staffName\":\"\",\"name\":\"界外管道设计人员\",\"id\":784461,\"projectId\":\"1725799240183062530\",\"obsPid\":\"1726133411036401664\"},{\"disType\":\"\",\"obsId\":\"1726132507709149184\",\"code\":\"1726132507709149184\",\"staffCode\":\"\",\"proCode\":\"MM\",\"level\":2,\"staffName\":\"\",\"name\":\"机泵机修专业负责人\",\"id\":774461,\"projectId\":\"1725799071211331585\",\"obsPid\":\"1726129428284706816\"},{\"disType\":\"\",\"obsId\":\"1811164041230553088\",\"code\":\"1811164041230553088\",\"staffCode\":\"\",\"proCode\":\"CA\",\"level\":2,\"staffName\":\"\",\"name\":\"分析化验专业负责人\",\"id\":764461,\"projectId\":\"1764864367871930369\",\"obsPid\":\"1807815887470858240\"},{\"disType\":\"\",\"obsId\":\"1726155600942993408\",\"code\":\"1726155600942993408\",\"staffCode\":\"389\",\"proCode\":\"EL\",\"level\":3,\"staffName\":\"晏国强\",\"name\":\"1717471101140996096\",\"id\":754461,\"projectId\":\"1725803434193469441\",\"obsPid\":\"1726155600481619968\"},{\"disType\":\"\",\"obsId\":\"1726135145758593024\",\"code\":\"1726135145758593024\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744619,\"projectId\":\"1725799271686479873\",\"obsPid\":\"1726135145712455680\"},{\"disType\":\"\",\"obsId\":\"1726133483706912768\",\"code\":\"1726133483706912768\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744618,\"projectId\":\"1725799173220999170\",\"obsPid\":\"1726133483383951360\"},{\"disType\":\"\",\"obsId\":\"1726133130533933056\",\"code\":\"1726133130533933056\",\"staffCode\":\"1772\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744617,\"projectId\":\"1725799077746057217\",\"obsPid\":\"1726132883451678720\"},{\"disType\":\"\",\"obsId\":\"1726145857809682432\",\"code\":\"1726145857809682432\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744616,\"projectId\":\"1725799409708441602\",\"obsPid\":\"1726145857763545088\"},{\"disType\":\"\",\"obsId\":\"1726148955298992128\",\"code\":\"1726148955298992128\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744615,\"projectId\":\"1725799425017651202\",\"obsPid\":\"1726148951897411584\"},{\"disType\":\"\",\"obsId\":\"1726157384600129536\",\"code\":\"1726157384600129536\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744614,\"projectId\":\"1725799281572454402\",\"obsPid\":\"1726157384549797888\"},{\"disType\":\"\",\"obsId\":\"1726135852599480320\",\"code\":\"1726135852599480320\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744613,\"projectId\":\"1725799263302066177\",\"obsPid\":\"1726135851144056832\"},{\"disType\":\"\",\"obsId\":\"1726138089275002880\",\"code\":\"1726138089275002880\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744612,\"projectId\":\"1725799250043871233\",\"obsPid\":\"1726138086376738816\"},{\"disType\":\"\",\"obsId\":\"1726138683238780928\",\"code\":\"1726138683238780928\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744611,\"projectId\":\"1725799311301681153\",\"obsPid\":\"1726138683184254976\"},{\"disType\":\"\",\"obsId\":\"1726141568810881024\",\"code\":\"1726141568810881024\",\"staffCode\":\"1772\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"余亮平\",\"name\":\"1717470963383275520\",\"id\":744610,\"projectId\":\"1725799395095486466\",\"obsPid\":\"1726141566743089152\"},{\"disType\":\"\",\"obsId\":\"1726149044658638848\",\"code\":\"1726149044658638848\",\"staffCode\":\"1728\",\"proCode\":\"\",\"level\":3,\"staffName\":\"罗运涛\",\"name\":\"1717470960854110208\",\"id\":744461,\"projectId\":\"1725804693705211905\",\"obsPid\":\"1726149044616695808\"},{\"disType\":\"\",\"obsId\":\"1726153527283290112\",\"code\":\"1726153527283290112\",\"staffCode\":\"1056\",\"proCode\":\"WT\",\"level\":3,\"staffName\":\"王健\",\"name\":\"1717470770139107328\",\"id\":734461,\"projectId\":\"1725799663623217154\",\"obsPid\":\"1726153527241347072\"},{\"disType\":\"\",\"obsId\":\"1726157217700384768\",\"code\":\"1726157217700384768\",\"staffCode\":\"769\",\"proCode\":\"\",\"level\":3,\"staffName\":\"黄斌\",\"name\":\"1717470700014538752\",\"id\":724461,\"projectId\":\"1725799204829274113\",\"obsPid\":\"1726157217662636032\"},{\"disType\":\"\",\"obsId\":\"1764904789835124736\",\"code\":\"1764904789835124736\",\"staffCode\":\"420\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"高伟\",\"name\":\"1717470621077737472\",\"id\":714461,\"projectId\":\"1764863509365010433\",\"obsPid\":\"1764904789776404480\"},{\"disType\":\"\",\"obsId\":\"1726145000506527744\",\"code\":\"1726145000506527744\",\"staffCode\":\"278\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"向国军\",\"name\":\"1717470582938931200\",\"id\":704461,\"projectId\":\"1725799494219472898\",\"obsPid\":\"1726145000447807488\"},{\"disType\":\"\",\"obsId\":\"1808376237744328704\",\"code\":\"1808376237744328704\",\"staffCode\":\"132\",\"proCode\":\"WT\",\"level\":3,\"staffName\":\"向陆伟\",\"name\":\"1717470544162590720\",\"id\":694461,\"projectId\":\"1764863896155336706\",\"obsPid\":\"1808376237660442624\"},{\"disType\":\"\",\"obsId\":\"1726156889512873984\",\"code\":\"1726156889512873984\",\"staffCode\":\"130\",\"proCode\":\"CP\",\"level\":3,\"staffName\":\"赵军\",\"name\":\"1717470543642497024\",\"id\":684461,\"projectId\":\"1725799047966498818\",\"obsPid\":\"1726156889470930944\"},{\"disType\":\"\",\"obsId\":\"1726127989193838592\",\"code\":\"1726127989193838592\",\"staffCode\":\"1632\",\"proCode\":\"\",\"level\":3,\"staffName\":\"徐岩\",\"name\":\"1717470918953013248\",\"id\":674461,\"projectId\":\"1725799019185184770\",\"obsPid\":\"1726127832435920896\"},{\"disType\":\"\",\"obsId\":\"1726126696895221760\",\"code\":\"1726126696895221760\",\"staffCode\":\"\",\"proCode\":\"EQ\",\"level\":2,\"staffName\":\"\",\"name\":\"设备设计人员\",\"id\":664461,\"projectId\":\"1725798995277651969\",\"obsPid\":\"1726125667168423936\"},{\"disType\":\"\",\"obsId\":\"1726124657519759360\",\"code\":\"1726124657519759360\",\"staffCode\":\"1545\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"张帆顺\",\"name\":\"1717470895326498816\",\"id\":654461,\"projectId\":\"1725798972104122370\",\"obsPid\":\"1726124653040242688\"},{\"disType\":\"\",\"obsId\":\"1726124330045280256\",\"code\":\"1726124330045280256\",\"staffCode\":\"\",\"proCode\":\"PL\",\"level\":2,\"staffName\":\"\",\"name\":\"总图运输专业负责人\",\"id\":644619,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726125111280537600\",\"code\":\"1726125111280537600\",\"staffCode\":\"\",\"proCode\":\"HV\",\"level\":2,\"staffName\":\"\",\"name\":\"暖通空调专业负责人\",\"id\":644618,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726123136807735296\",\"code\":\"1726123136807735296\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":2,\"staffName\":\"\",\"name\":\"化工工艺专业负责人\",\"id\":644617,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726123685099737088\",\"code\":\"1726123685099737088\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":2,\"staffName\":\"\",\"name\":\"化工工艺设计人员\",\"id\":644616,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726123869846245376\",\"code\":\"1726123869846245376\",\"staffCode\":\"\",\"proCode\":\"HA\",\"level\":2,\"staffName\":\"\",\"name\":\"换热器分析专业负责人\",\"id\":644615,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726124929658785792\",\"code\":\"1726124929658785792\",\"staffCode\":\"\",\"proCode\":\"AR\",\"level\":2,\"staffName\":\"\",\"name\":\"建筑专业负责人\",\"id\":644614,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726124285094924288\",\"code\":\"1726124285094924288\",\"staffCode\":\"\",\"proCode\":\"PL\",\"level\":2,\"staffName\":\"\",\"name\":\"总图运输设计人员\",\"id\":644613,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123136757403648\"},{\"disType\":\"\",\"obsId\":\"1726123870135652352\",\"code\":\"1726123870135652352\",\"staffCode\":\"369\",\"proCode\":\"IN\",\"level\":3,\"staffName\":\"张皓\",\"name\":\"1717470608947810304\",\"id\":644612,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726123870089515008\"},{\"disType\":\"\",\"obsId\":\"1726125411286519808\",\"code\":\"1726125411286519808\",\"staffCode\":\"290\",\"proCode\":\"MH\",\"level\":3,\"staffName\":\"杨建国\",\"name\":\"1717470585799446528\",\"id\":644611,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726125411106164736\"},{\"disType\":\"\",\"obsId\":\"1726156522741960704\",\"code\":\"1726156522741960704\",\"staffCode\":\"325\",\"proCode\":\"MH\",\"level\":3,\"staffName\":\"袁铁群\",\"name\":\"1717470597417668608\",\"id\":644610,\"projectId\":\"1725798951640113153\",\"obsPid\":\"1726156522700017664\"},{\"disType\":\"\",\"obsId\":\"1726123531131031552\",\"code\":\"1726123531131031552\",\"staffCode\":\"278\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"向国军\",\"name\":\"1717470582938931200\",\"id\":644461,\"projectId\":\"1725798951220682754\",\"obsPid\":\"1726123531097477120\"}]}"; + var returndata = "{\"msg\":\"操作成功\",\"total\":25,\"code\":1,\"data\":{\"userColumnPermissions\":\"\"},\"rows\":[{\"disType\":\"\",\"obsId\":\"1874790096868347904\",\"code\":\"1874790096868347904\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":2,\"staffName\":\"\",\"name\":\"化工工艺设计人员\",\"id\":944768,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874790096893513728\",\"code\":\"1874790096893513728\",\"staffCode\":\"722\",\"proCode\":\"CP\",\"level\":3,\"staffName\":\"赵保林\",\"name\":\"1717470687628759040\",\"id\":944766,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874790096868347904\"},{\"disType\":\"\",\"obsId\":\"1874790098684481536\",\"code\":\"1874790098684481536\",\"staffCode\":\"30453\",\"proCode\":\"CP\",\"level\":3,\"staffName\":\"李平\",\"name\":\"1717471296016748544\",\"id\":944764,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874790096868347904\"},{\"disType\":\"\",\"obsId\":\"1874004933423009792\",\"code\":\"1874004933423009792\",\"staffCode\":\"\",\"proCode\":\"MC\",\"level\":1,\"staffName\":\"\",\"name\":\"设计岗位\",\"id\":944642,\"projectId\":\"1857091204378914817\",\"obsPid\":\"0\"},{\"disType\":\"\",\"obsId\":\"1874004946622484480\",\"code\":\"1874004946622484480\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目经理\",\"id\":944640,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004944894431232\"},{\"disType\":\"\",\"obsId\":\"1874004933448175616\",\"code\":\"1874004933448175616\",\"staffCode\":\"\",\"proCode\":\"PL\",\"level\":2,\"staffName\":\"\",\"name\":\"总图运输专业负责人\",\"id\":944638,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004936635846656\",\"code\":\"1874004936635846656\",\"staffCode\":\"\",\"proCode\":\"ST\",\"level\":2,\"staffName\":\"\",\"name\":\"结构专业负责人\",\"id\":944636,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004941513822208\",\"code\":\"1874004941513822208\",\"staffCode\":\"\",\"proCode\":\"EL\",\"level\":2,\"staffName\":\"\",\"name\":\"电气专业负责人\",\"id\":944634,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004933469147136\",\"code\":\"1874004933469147136\",\"staffCode\":\"2239\",\"proCode\":\"PL\",\"level\":3,\"staffName\":\"夏玉霞\",\"name\":\"1717471200965431296\",\"id\":944632,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933448175616\"},{\"disType\":\"\",\"obsId\":\"1874004935062982656\",\"code\":\"1874004935062982656\",\"staffCode\":\"1610\",\"proCode\":\"IN\",\"level\":3,\"staffName\":\"李伟家\",\"name\":\"1717470915924725760\",\"id\":944630,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004935037816832\"},{\"disType\":\"\",\"obsId\":\"1874004944894431232\",\"code\":\"1874004944894431232\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":1,\"staffName\":\"\",\"name\":\"管理岗位\",\"id\":944628,\"projectId\":\"1857091204378914817\",\"obsPid\":\"0\"},{\"disType\":\"\",\"obsId\":\"1874004948350537728\",\"code\":\"1874004948350537728\",\"staffCode\":\"591\",\"proCode\":\"\",\"level\":3,\"staffName\":\"刘翔\",\"name\":\"1717470662420992000\",\"id\":944626,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004948325371904\"},{\"disType\":\"\",\"obsId\":\"1874004941538988032\",\"code\":\"1874004941538988032\",\"staffCode\":\"387\",\"proCode\":\"EL\",\"level\":3,\"staffName\":\"李婉\",\"name\":\"1717470613658013696\",\"id\":944624,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004941513822208\"},{\"disType\":\"\",\"obsId\":\"1874004943308984320\",\"code\":\"1874004943308984320\",\"staffCode\":\"235\",\"proCode\":\"MC\",\"level\":3,\"staffName\":\"吴菁\",\"name\":\"1717470571836608512\",\"id\":944622,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004943288012800\"},{\"disType\":\"\",\"obsId\":\"1874004944940568576\",\"code\":\"1874004944940568576\",\"staffCode\":\"4\",\"proCode\":\"\",\"level\":3,\"staffName\":\"张锦跃\",\"name\":\"1717470496427216896\",\"id\":944620,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004944919597056\"},{\"disType\":\"\",\"obsId\":\"1874004938250653696\",\"code\":\"1874004938250653696\",\"staffCode\":\"\",\"proCode\":\"CP\",\"level\":2,\"staffName\":\"\",\"name\":\"化工工艺专业负责人\",\"id\":944618,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004948325371904\",\"code\":\"1874004948325371904\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目技术主管\",\"id\":944616,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004944894431232\"},{\"disType\":\"\",\"obsId\":\"1874004946647650304\",\"code\":\"1874004946647650304\",\"staffCode\":\"890\",\"proCode\":\"\",\"level\":3,\"staffName\":\"金吉\",\"name\":\"1717470730419048448\",\"id\":944614,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004946622484480\"},{\"disType\":\"\",\"obsId\":\"1874004935037816832\",\"code\":\"1874004935037816832\",\"staffCode\":\"\",\"proCode\":\"IN\",\"level\":2,\"staffName\":\"\",\"name\":\"仪表专业负责人\",\"id\":944612,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004944919597056\",\"code\":\"1874004944919597056\",\"staffCode\":\"\",\"proCode\":\"\",\"level\":2,\"staffName\":\"\",\"name\":\"项目主管\",\"id\":944610,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004944894431232\"},{\"disType\":\"\",\"obsId\":\"1874004939882237952\",\"code\":\"1874004939882237952\",\"staffCode\":\"957\",\"proCode\":\"PP\",\"level\":3,\"staffName\":\"黄晓娟\",\"name\":\"1717470773876232192\",\"id\":944608,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004939861266432\"},{\"disType\":\"\",\"obsId\":\"1874004943288012800\",\"code\":\"1874004943288012800\",\"staffCode\":\"\",\"proCode\":\"MC\",\"level\":2,\"staffName\":\"\",\"name\":\"材控应力专业负责人\",\"id\":944606,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"},{\"disType\":\"\",\"obsId\":\"1874004938271625216\",\"code\":\"1874004938271625216\",\"staffCode\":\"1008\",\"proCode\":\"CP\",\"level\":3,\"staffName\":\"王海\",\"name\":\"1717470759519129600\",\"id\":944604,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004938250653696\"},{\"disType\":\"\",\"obsId\":\"1874004936669401088\",\"code\":\"1874004936669401088\",\"staffCode\":\"468\",\"proCode\":\"ST\",\"level\":3,\"staffName\":\"陈宇\",\"name\":\"1717470632112951296\",\"id\":944602,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004936635846656\"},{\"disType\":\"\",\"obsId\":\"1874004939861266432\",\"code\":\"1874004939861266432\",\"staffCode\":\"\",\"proCode\":\"PP\",\"level\":2,\"staffName\":\"\",\"name\":\"管道布置专业负责人\",\"id\":944600,\"projectId\":\"1857091204378914817\",\"obsPid\":\"1874004933423009792\"}]}"; if (!string.IsNullOrEmpty(returndata)) { //JObject obj = JObject.Parse(returndata); @@ -234,9 +241,6 @@ namespace BLL { list.AddRange(pmpOBSResponseData.rows); - //获取岗位专业人员 - var sss = list.Where(x => x.level == 3 && !string.IsNullOrWhiteSpace(x.staffName)); - if (pmpOBSResponseData.rows.Count < 1000) {//当本次请求数据小于1000时,说明后续已经没有数据了,不用再请求接口;跳出循环 break; @@ -252,7 +256,22 @@ namespace BLL break; } } - return list; + + if (list.Any()) + { + //获取岗位专业人员 + var userlist = list.Where(x => x.level == 3 && !string.IsNullOrWhiteSpace(x.staffName)); + foreach (var user in userlist) + { + //根据obsPid获取对应任职岗位 + var work = list.Where(x => x.obsId == user.obsPid).FirstOrDefault(); + if (work != null) + { + outlist.Add(new PMPOBSOutInput { workName = work.name, userName = user.staffName }); + } + } + } + return outlist; } diff --git a/SGGL/BLL/PZHGL/GJSX/GJSXMonitorService.cs b/SGGL/BLL/PZHGL/GJSX/GJSXMonitorService.cs index 7722f561..ce133599 100644 --- a/SGGL/BLL/PZHGL/GJSX/GJSXMonitorService.cs +++ b/SGGL/BLL/PZHGL/GJSX/GJSXMonitorService.cs @@ -10,6 +10,10 @@ using System.Data; using NPOI.SS.Formula.Functions; using System.Reflection; using System.Text; +using System.Net.Security; +using System.Security.Cryptography.X509Certificates; +using System.Threading.Tasks; +using System.Threading; namespace BLL @@ -90,19 +94,23 @@ namespace BLL var userIds = BLL.UserService.GetUserHaveEmailList(); if (userIds.Any() && lstOverdue.Any()) { + //int allnum = 0; var lstProject = lstOverdue.Select(x => new { x.ProjectId, x.ProjectName }).Distinct().ToList(); foreach (var pro in lstProject) { + //if (allnum > 50) { break; } var lstProjectOverdue = lstOverdue.Where(x => x.ProjectId == pro.ProjectId).ToList(); if (lstProjectOverdue.Any()) { string projectName = pro.ProjectName; foreach (var user in userIds) { + //if (allnum > 100) { break; } MailMessage mail = new MailMessage(); //邮件主题 mail.Subject = $"关键事项超期预警提醒——{projectName}"; mail.To.Add(user.Email); + //mail.To.Add("test@test.com"); mail.IsBodyHtml = true;//确保邮件正文被当作HTML解析 StringBuilder tbodyStr = new StringBuilder(); @@ -113,7 +121,7 @@ namespace BLL { foreach (var item in acceptanceItems) { - tbodyStr.Append($"{index}本人负责{item.UnitName}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); + tbodyStr.Append($"{index}本人负责{item.UnitName}{item.GJSXID}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); index++; } } @@ -123,7 +131,7 @@ namespace BLL { foreach (var item in userItems) { - tbodyStr.Append($"{index}本人发起{item.UnitName}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); + tbodyStr.Append($"{index}本人发起{item.UnitName}{item.GJSXID}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); index++; } } @@ -133,7 +141,7 @@ namespace BLL { foreach (var item in receiveItems) { - tbodyStr.Append($"{index}本人跟踪{item.UnitName}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); + tbodyStr.Append($"{index}本人跟踪{item.UnitName}{item.GJSXID}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); index++; } } @@ -143,7 +151,7 @@ namespace BLL { foreach (var item in csUserItems) { - tbodyStr.Append($"{index}抄送本人{item.UnitName}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); + tbodyStr.Append($"{index}抄送本人{item.UnitName}{item.GJSXID}{item.Detail}{item.GJSXTypeName}{item.UserName}{item.User_AcceptanceUserName}{item.CompleteDate.ToShortDateString()}{(item.DateDiffDays > 0 ? item.DateDiffDays.ToString() : "半")}"); index++; } } @@ -171,6 +179,7 @@ namespace BLL 序号 类型 责任单位 + 事项ID 事项描述 事项类别 发起人 @@ -182,12 +191,15 @@ namespace BLL " + tbodyStr.ToString() + ""; mail.Body = bodyStr; - - PushEmail(mail); + if (index > 1) + { + //allnum++; + bool send = PushEmail(mail); + //Thread.Sleep(1000); //暂停1秒 + } } } } - } #endregion @@ -195,6 +207,7 @@ namespace BLL } catch (Exception ex) { + ErrLogInfo.WriteLog("关键事项邮件预警", ex); } } @@ -202,29 +215,42 @@ namespace BLL /// 发送邮件 /// /// - private static void PushEmail(MailMessage mail) + private static bool PushEmail(MailMessage mail) { + //await Task.Delay(1000); //等待1000毫秒 + // 忽略SSL证书验证 + ServicePointManager.ServerCertificateValidationCallback = + delegate (object sender, X509Certificate certificate, X509Chain chain, SslPolicyErrors sslPolicyErrors) + { + return true; + }; //获取发送邮箱配置 Email_Pop pops = BLL.Email_PopService.GetEmail_Pop("7EC5E991-B7A0-495A-90ED-2BE15370C959"); if (pops != null) { + mail.From = new MailAddress(pops.EmailYx);//发件人邮箱地址 SmtpClient client = new SmtpClient(pops.EmailFwq);//替换为你的SMTP服务器地址 client.Port = int.Parse(pops.EmailDk);//587或465如果使用SSL client.EnableSsl = true;//如果服务器支持SSL,设置为true client.DeliveryMethod = SmtpDeliveryMethod.Network; client.UseDefaultCredentials = false; client.Credentials = new NetworkCredential(pops.EmailYx, pops.EmailPass);//替换为你的邮箱和服务授权码 - mail.From = new MailAddress(pops.EmailYx);//发件人邮箱地址 + client.Timeout = 6000;//6秒超时 try { client.Send(mail); + client.Dispose();//释放资源 + return true; //Console.WriteLine("Email sent successfully."); } catch (Exception ex) { + ErrLogInfo.WriteLog("关键事项发送邮件预警", ex); + return false; //Console.WriteLine("Email sending failed: " + ex.Message); } } + return false; } } diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index a44ad576..b6114021 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -111,8 +111,11 @@ ProjectCode = project.ProjectCode, JTProjectCode = project.JTProjectCode, ProjectName = project.ProjectName, + ProjectNameEn = project.ProjectNameEn, StartDate = project.StartDate, EndDate = project.EndDate, + PlanStartDate = project.PlanStartDate, + PlanEndDate = project.PlanEndDate, ProjectAddress = project.ProjectAddress, ContractNo = project.ContractNo, WorkRange = project.WorkRange, @@ -133,6 +136,9 @@ ProjectMoney = project.ProjectMoney, ConstructionMoney = project.ConstructionMoney, Telephone = project.Telephone, + StClientName = project.StClientName, + ClientContactor = project.ClientContactor, + MobileTel = project.MobileTel, Country = project.Country, Province = project.Province, City = project.City, @@ -162,8 +168,11 @@ newProject.ProjectCode = project.ProjectCode; newProject.JTProjectCode = project.JTProjectCode; newProject.ProjectName = project.ProjectName; + newProject.ProjectNameEn = project.ProjectNameEn; newProject.StartDate = project.StartDate; newProject.EndDate = project.EndDate; + newProject.PlanStartDate = project.PlanStartDate; + newProject.PlanEndDate = project.PlanEndDate; newProject.ProjectAddress = project.ProjectAddress; newProject.ShortName = project.ShortName; newProject.ContractNo = project.ContractNo; @@ -184,6 +193,9 @@ newProject.ProjectMoney = project.ProjectMoney; newProject.ConstructionMoney = project.ConstructionMoney; newProject.Telephone = project.Telephone; + newProject.StClientName = project.StClientName; + newProject.ClientContactor = project.ClientContactor; + newProject.MobileTel = project.MobileTel; newProject.Country = project.Country; newProject.Province = project.Province; newProject.City = project.City; diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index f17852f2..51c64369 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -3532,7 +3532,7 @@ { //查询所有在建项目 var upReport = (from x in db.Base_Project - where (x.ProjectState == "1" || x.ProjectState == null) + where (x.ProjectState == "1" || x.ProjectState == null) && (x.IsDelete == null || x.IsDelete == false) select new Model.BaseProjectItem { ProjectId = x.ProjectId, diff --git a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs index 4cfaefae..389dd09f 100644 --- a/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs +++ b/SGGL/BLL/ZHGL/DataSync/ProjectDataSync/Project_HSSEData_HSSEService.cs @@ -1385,7 +1385,7 @@ namespace BLL { var result = (from x in Funs.DB.Solution_LargerHazard where x.ProjectId == projectid && x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime - select x.TrainPersonNum).ToList().Sum(x => x.Value); + select x).ToList().Sum(x => x.TrainPersonNum ?? 0); return result; } diff --git a/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs b/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs index 85217206..e0ab03e7 100644 --- a/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs +++ b/SGGL/BLL/ZHGL/RealName/RealNameMonitorService.cs @@ -18,7 +18,7 @@ namespace BLL /// public static void StartMonitor() { - int adTimeJ = Funs.GetNewInt(ConfigurationManager.AppSettings["Intervaltime"]) ?? 30; + int adTimeJ = Funs.GetNewInt(ConfigurationManager.AppSettings["Intervaltime"]) ?? 60; //var getSynchroSet = Funs.DB.RealName_SynchroSet.FirstOrDefault(); //if (getSynchroSet != null && getSynchroSet.Intervaltime.HasValue) //{ @@ -60,7 +60,7 @@ namespace BLL AutoReset = true }; messageTimer.Elapsed += new ElapsedEventHandler(UpdateSitePerson); - messageTimer.Interval = 1000 * 60 * 60 * 24;// 60分钟 60000 * adTimeJ; + messageTimer.Interval = 1000 * 60 * 30;// 60分钟 60000 * adTimeJ; messageTimer.Start(); } @@ -86,7 +86,9 @@ namespace BLL SynchroSetService.InsertRealNamePushLog(null, item.ProCode, "实名制定时器", "sucess", "200", item.ProName, "成功", null); SynchroSetService.PushProCollCompany(item.ProCode); SynchroSetService.PushAttendance(item.ProCode); - SynchroSetService.updatePersonsExitTime(item.ProCode); + + UpdateSitePerson(null, null); + //SynchroSetService.updatePersonsExitTime(item.ProCode); } } } diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index 4a0bc23c..6b75c0a4 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -878,8 +878,9 @@ namespace BLL foreach (var item in getUnit) { item.RealNamePushTime = DateTime.Now; - db.SubmitChanges(); - } + + } + db.SubmitChanges(); } } InsertRealNamePushLog(null, null, "推送参建企业数据", sucess, code, mess, data, pushContent); @@ -1532,9 +1533,9 @@ namespace BLL { getPerson.RealNameUpdateTime = DateTime.Now; } - db.SubmitChanges(); + db.SubmitChanges(); } - } + } } } else @@ -1564,7 +1565,7 @@ namespace BLL db.SubmitChanges(); } } - } + } } } } @@ -1759,18 +1760,18 @@ namespace BLL { { "token", getaccess_token(proCode) } }; - if (count == 200) - { - addTeam(getData.Select(x => x.TeamGroupId).Distinct().ToList(), newToken); - getTeam(proCode, newToken); + //if (count == 200) + //{ + // addTeam(getData.Select(x => x.TeamGroupId).Distinct().ToList(), newToken); + // getTeam(proCode, newToken); - var getPersonS = getData.Select(x => x.idcardNumber).Distinct().ToList(); - foreach (var pitem in getPersonS) - { - PushPersonsByIdentityCard(Const.BtnAdd, proCode, pitem, false); - PushPersonsByIdentityCard(Const.BtnModify, proCode, pitem, false); - } - } + // var getPersonS = getData.Select(x => x.idcardNumber).Distinct().ToList(); + // foreach (var pitem in getPersonS) + // { + // PushPersonsByIdentityCard(Const.BtnAdd, proCode, pitem, false); + // PushPersonsByIdentityCard(Const.BtnModify, proCode, pitem, false); + // } + //} pushContent = JsonConvert.SerializeObject(listObject); var returndata = BLL.APIGetHttpService.OutsideHttp(url, "POST", null, newToken, pushContent); @@ -1794,6 +1795,13 @@ namespace BLL } } } + else + { + if (mess.Contains("token无效")) + { + getaccess_token_New(proCode); + } + } } InsertRealNamePushLog(null, proCode, "推送考勤数据", sucess, code, mess, data, pushContent); if (data.Contains("无法入场") || mess.Contains("班组")) diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx index 39ab7c05..6a2e6cac 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.en-US.resx @@ -1356,4 +1356,8 @@ Completion status of engineering quantity 工程量完成情况 + + OnDuty + 在岗人数 + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx index 09791248..8236a725 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.resx @@ -1200,4 +1200,7 @@ 工程量完成情况 + + 在岗人数 + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx index 173770bd..be94a888 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan.zh-CN.resx @@ -1197,4 +1197,7 @@ 工程量完成情况 + + 在岗人数 + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs b/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs index 42142ae3..f1782eff 100644 --- a/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs +++ b/SGGL/FineUIPro.Web/App_GlobalResources/Lan1.designer.cs @@ -1689,6 +1689,15 @@ namespace Resources { } } + /// + /// 查找类似 在岗人数 的本地化字符串。 + /// + internal static string main_new0_ProjectNum_OnDuty { + get { + return ResourceManager.GetString("main_new0_ProjectNum_OnDuty", resourceCulture); + } + } + /// /// 查找类似 参建人数 的本地化字符串。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs index 1f70069a..e598a0c0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs @@ -377,7 +377,7 @@ namespace FineUIPro.Web.CQMS.Check } } - else if (isAuthenticated) + else if (isAuthenticated || CurrUser.UserId == Const.hfnbdId) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("CheckListEdit.aspx?CheckControlCode={0}", codes, "编辑 - "))); return; diff --git a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx index fb436b9d..066b2dbe 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx @@ -186,10 +186,10 @@ - + - + diff --git a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs index 4fa1cb3b..ec759a1d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/ChecklistEdit.aspx.cs @@ -197,20 +197,17 @@ namespace FineUIPro.Web.CQMS.Check } if (State != BLL.Const.CheckControl_Complete) { - //Funs.Bind(drpHandleType, CheckControlService.GetDHandleTypeByState(State)); CheckControlService.Init(drpHandleType, State, false); } if (State == BLL.Const.CheckControl_Compile) { this.rblIsAgree.Visible = false; - //Funs.Bind(drpHandleMan, UserService.GetMainUserList(this.CurrUser.LoginProjectId)) UserService.Init(drpHandleMan, CurrUser.LoginProjectId, false); this.drpHandleMan.SelectedIndex = 1; } else { UserService.Init(drpHandleMan, CurrUser.LoginProjectId, false); - //Funs.Bind(drpHandleMan, UserService.GetMainUserList(this.CurrUser.LoginProjectId)); this.rblIsAgree.Visible = true; } @@ -371,7 +368,15 @@ namespace FineUIPro.Web.CQMS.Check } } } - if (drpHandleType.SelectedValue != BLL.Const.CheckControl_Complete && (this.drpHandleMan.SelectedValue == "0" || this.drpHandleMan.SelectedValue == null)) + + if (string.IsNullOrEmpty(drpHandleType.SelectedValue)) + { + Alert.ShowInTop("请先选择下一步流程!", MessageBoxIcon.Warning); + return; + } + + if (drpHandleType.SelectedValue != BLL.Const.CheckControl_Complete && + string.IsNullOrEmpty(drpHandleMan.SelectedValue)) { Alert.ShowInTop("请先选择办理人员!", MessageBoxIcon.Warning); return; @@ -425,7 +430,14 @@ namespace FineUIPro.Web.CQMS.Check } } } - if (drpHandleType.SelectedValue != BLL.Const.CheckControl_Complete && (this.drpHandleMan.SelectedValue == "0" || this.drpHandleMan.SelectedValue == null)) + if (string.IsNullOrEmpty(drpHandleType.SelectedValue)) + { + Alert.ShowInTop("请先选择下一步流程!", MessageBoxIcon.Warning); + return; + } + + if (drpHandleType.SelectedValue != BLL.Const.CheckControl_Complete && + string.IsNullOrEmpty(drpHandleMan.SelectedValue)) { Alert.ShowInTop("请先选择办理人员!", MessageBoxIcon.Warning); return; @@ -640,10 +652,10 @@ namespace FineUIPro.Web.CQMS.Check { UserService.InitUserDropDownList(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty); } - if (drpHandleMan.Items.Count > 0) - { - drpHandleMan.SelectedIndex = 0; - } + // if (drpHandleMan.Items.Count > 0) + // { + // drpHandleMan.SelectedIndex = 0; + // } if (drpHandleType.SelectedText.Contains("重新编制")) { UserService.InitUserDropDownList(drpHandleMan, CurrUser.LoginProjectId, false, string.Empty); @@ -672,16 +684,6 @@ namespace FineUIPro.Web.CQMS.Check protected void drpHandleType_SelectedIndexChanged(object sender, EventArgs e) { HandleMan(); - //if (drpHandleType.SelectedValue == BLL.Const.CheckControl_Audit2 || drpHandleType.SelectedValue == BLL.Const.CheckControl_ReCompile2) - //{ - // drpHandleMan.Items.Clear(); - //Funs.Bind(drpHandleMan, UserService.GetUserByUnitId(this.CurrUser.LoginProjectId, drpUnit.SelectedValue)); - //} - //else - //{ - // drpHandleMan.Items.Clear(); - // Funs.Bind(drpHandleMan, UserService.GetMainUserList(this.CurrUser.LoginProjectId)); - //} } protected void rblIsAgree_SelectedIndexChanged(object sender, EventArgs e) @@ -693,49 +695,6 @@ namespace FineUIPro.Web.CQMS.Check { } - //if (state == Const.CheckControl_Compile || state == Const.CheckControl_ReCompile) //无是否同意 - //{ - // ListItem[] lis = new ListItem[2]; - // lis[0] = new ListItem("总包负责人审核", Const.CheckControl_Audit1); - // lis[1] = new ListItem("分包专业工程师回复", Const.CheckControl_Audit2); - // return lis; - //} - //else if (state == Const.CheckControl_Audit1)//有是否同意 - //{ - // ListItem[] lis = new ListItem[2]; - // lis[0] = new ListItem("分包专业工程师回复", Const.CheckControl_Audit2);//是 加载 - // lis[1] = new ListItem("重新整理", Const.CheckControl_ReCompile);//否加载 - // return lis; - //} - //else if (state == Const.CheckControl_Audit2 || state == Const.CheckControl_ReCompile2)//无是否同意 - //{ - // ListItem[] lis = new ListItem[2]; - // lis[0] = new ListItem("分包负责人审批", Const.CheckControl_Audit3); - // lis[1] = new ListItem("总包专业工程师确认", Const.CheckControl_Audit4); - // return lis; - //} - //else if (state == Const.CheckControl_Audit3)//有是否同意 - //{ - // ListItem[] lis = new ListItem[2]; - // lis[0] = new ListItem("总包专业工程师确认", Const.CheckControl_Audit4);//是 加载 - // lis[1] = new ListItem("分包专业工程师重新回复", Const.CheckControl_ReCompile2);//否加载 - // return lis; - //} - //else if (state == Const.CheckControl_Audit4)//有是否同意 - //{ - // ListItem[] lis = new ListItem[3]; - // lis[0] = new ListItem("总包负责人确认", Const.CheckControl_Audit5);//是 加载 - // lis[1] = new ListItem("审批完成", Const.CheckControl_Complete);//是 加载 - // lis[2] = new ListItem("分包专业工程师重新回复", Const.CheckControl_ReCompile2);//否加载 - // return lis; - //} - //else if (state == Const.CheckControl_Audit5)//有是否同意 - //{ - // ListItem[] lis = new ListItem[2]; - // lis[0] = new ListItem("审批完成", Const.CheckControl_Complete);//是 加载 - // lis[1] = new ListItem("分包专业工程师重新回复", Const.CheckControl_ReCompile2);//否加载 - // return lis; - //} /// /// 待办事项的下拉框的处理 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs index eb6b11b9..4a3ac4df 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs @@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew * @param doc Document对象 * @return */ - public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "",string CenterPage="",string cellUnitLeft="") + public static Cell CreateCell(String value, Document doc, double cellWidth, string cellMerge = "", string CenterPage = "", string cellUnitLeft = "") { Cell cell = new Cell(doc); Paragraph p = new Paragraph(doc); @@ -185,7 +185,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { p.ParagraphFormat.Alignment = ParagraphAlignment.Center;//表格中字体居中 } - + p.AppendChild(new Run(doc, value)); @@ -194,7 +194,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew cell.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center; cell.CellFormat.Borders.LineWidth = 1.5; - + cell.AppendChild(p); return cell; } @@ -227,10 +227,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew var endDate = Convert.ToDateTime(weekModel.EndDate); //获取project var pModel = db.Base_Project.FirstOrDefault(x => x.ProjectId == weekModel.ProjectId); - var urlHz = startDate.ToString("yyyyMMdd")+"-" + var urlHz = startDate.ToString("yyyyMMdd") + "-" + endDate.ToString("yyyyMMdd"); - newUrl = uploadfilepath.Replace("项目质量月报", pModel.ShortName + "项目质量月报(第"+ weekModel.SortId + "期)"+ urlHz); + newUrl = uploadfilepath.Replace("项目质量月报", pModel.ShortName + "项目质量月报(第" + weekModel.SortId + "期)" + urlHz); if (File.Exists(newUrl)) { @@ -250,9 +250,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew orderby x.UnitName select x).FirstOrDefault(); - Bookmark bkmark = doc.Range.Bookmarks["username"]; - if (bkmark != null) { - + Bookmark bkmark = doc.Range.Bookmarks["username"]; + if (bkmark != null) + { + if (unitsYz != null) { bkmark.Text = unitsYz.UnitName; @@ -264,14 +265,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //} } - bkmark= doc.Range.Bookmarks["projectNo"]; - if (bkmark!=null) + bkmark = doc.Range.Bookmarks["projectNo"]; + if (bkmark != null) { bkmark.Text = pModel.ProjectCode; } bkmark = doc.Range.Bookmarks["createdate"]; - if (bkmark!=null) + if (bkmark != null) { bkmark.Text = weekModel.CreateDate.ToString().Split(' ')[0].Replace('/', '.'); } @@ -283,7 +284,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew } bkmark = doc.Range.Bookmarks["quamanagername"]; - if (bkmark != null) { + if (bkmark != null) + { //var zlName = ""; ////根据项目获取质量经理 //var puserList = db.Project_ProjectUser.Where(x => x.ProjectId == weekModel.ProjectId && x.RoleId.Contains(BLL.Const.QAManager)).ToList(); @@ -307,19 +309,19 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { var sdate = Convert.ToDateTime(weekModel.StartDate); var edate = Convert.ToDateTime(weekModel.EndDate); - bkmark.Text = sdate.Year+"年"+ sdate.Month +"月"+ sdate.Day+"日至"+ + bkmark.Text = sdate.Year + "年" + sdate.Month + "月" + sdate.Day + "日至" + edate.Year + "年" + edate.Month + "月" + edate.Day + "日"; } bkmark = doc.Range.Bookmarks["reportindex"]; - if (bkmark!=null) + if (bkmark != null) { bkmark.Text = weekModel.SortId; } bkmark = doc.Range.Bookmarks["fromcode"]; //fromcode,项目号-RM-PQM-顺序号 - if (bkmark!=null) + if (bkmark != null) { bkmark.Text = pModel.ProjectCode + "-RM-PQM-" + weekModel.SortId; } @@ -333,12 +335,13 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //跳过页眉的表头 while (isYm) { - if (table.Range.Text.Substring(0, 2)!="序号") + if (table.Range.Text.Substring(0, 2) != "序号") { whileIndex += 1; table = (Aspose.Words.Tables.Table)doc.GetChild(NodeType.Table, whileIndex, true); } - else{ + else + { isYm = false; } } @@ -348,14 +351,14 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { //创建行 Row row = new Row(doc); - row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width,"","1")); - row.Cells.Add(CreateCell(item.ProStage, doc, table.FirstRow.Cells[1].CellFormat.Width,"","", "unit")); + row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1")); + row.Cells.Add(CreateCell(item.ProStage, doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit")); row.Cells.Add(CreateCell(item.ProDescribe, doc, table.FirstRow.Cells[2].CellFormat.Width, "", "", "unit")); row.Cells.Add(CreateCell(item.TargetValue, doc, table.FirstRow.Cells[3].CellFormat.Width)); row.Cells.Add(CreateCell(item.MonthPer, doc, table.FirstRow.Cells[4].CellFormat.Width)); row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[5].CellFormat.Width, "", "", "unit")); - - table.Rows.Insert(numberIndex, row); + + table.Rows.Insert(numberIndex, row); numberIndex += 1; } //自动设置表格样式 @@ -368,7 +371,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew bkmark = doc.Range.Bookmarks["Content1"]; if (bkmark != null) { - bkmark.Text= txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText; + bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "0").ContentText; } bkmark = doc.Range.Bookmarks["Content2"]; @@ -388,10 +391,10 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "8").ContentText; } - + #endregion - var ContuructionAllList = db.Report_Construction_Plan.Where(x => x.ReportId == Id).OrderBy(x=>x.UnitOrMajor).ToList(); + var ContuructionAllList = db.Report_Construction_Plan.Where(x => x.ReportId == Id).OrderBy(x => x.UnitOrMajor).ToList(); #region 3.施工方案及检验试验计划审批情况 @@ -422,7 +425,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //创建行 Row row = new Row(doc); row.Cells.Add(CreateCell(numberIndex.ToString(), doc, table.FirstRow.Cells[0].CellFormat.Width, "", "1")); - row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width,"","","unit")); + row.Cells.Add(CreateCell(item.UnitOrMajor, doc, table.FirstRow.Cells[1].CellFormat.Width, "", "", "unit")); row.Cells.Add(CreateCell(item.Quantity1.ToString(), doc, table.FirstRow.Cells[2].CellFormat.Width)); row.Cells.Add(CreateCell(item.Quantity2.ToString(), doc, table.FirstRow.Cells[3].CellFormat.Width)); row.Cells.Add(CreateCell(item.Remarks, doc, table.FirstRow.Cells[4].CellFormat.Width, "", "", "unit")); @@ -468,7 +471,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew } } numberIndex = 1; - int? num1 = 0, num2 = 0, num3=0; + int? num1 = 0, num2 = 0, num3 = 0; foreach (var item in wdsgfaList) { //创建行 @@ -482,7 +485,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew table.Rows.Insert(numberIndex, row); num1 += item.Quantity1; num2 += item.Quantity2; - num3+= item.Quantity3; + num3 += item.Quantity3; numberIndex += 1; } //自动设置表格样式 @@ -677,9 +680,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew } } int i = 1; - var cNProfessionals = from x in Funs.DB.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId + var cNProfessionals = from x in Funs.DB.Base_CNProfessional + where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId && x.CNProfessionalId != BLL.Const.ComprehensiveId - orderby x.SortIndex select x; + orderby x.SortIndex + select x; foreach (var item in cNProfessionals) { //专业下所有集合 @@ -704,7 +709,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Quantity5Sum += Convert.ToInt32(checkStatisc.OneOKRate); Quantity6Sum += Convert.ToInt32(checkStatisc.TotalOneOKRate); } - if (StatisticsList.Count>0) + if (StatisticsList.Count > 0) { isYm = true; whileIndex += 1; @@ -728,7 +733,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { //创建行 Row row = new Row(doc); - row.Cells.Add(CreateCell((numberIndex-1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1")); + row.Cells.Add(CreateCell((numberIndex - 1).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "", "1")); row.Cells.Add(CreateCell(item.WorkName, doc, table.Rows[0].Cells[1].CellFormat.Width)); row.Cells.Add(CreateCell(item.CheckNum.ToString(), doc, table.Rows[1].Cells[2].CellFormat.Width)); row.Cells.Add(CreateCell(item.TotalCheckNum.ToString(), doc, table.Rows[1].Cells[3].CellFormat.Width)); @@ -768,11 +773,11 @@ namespace FineUIPro.Web.CQMS.ManageReportNew #region 7.1合格焊工管理情况 - Quantity1Sum = 0; Quantity2Sum = 0; Quantity3Sum = 0; Quantity4Sum = 0; Quantity5Sum = 0; Quantity6Sum = 0; + Quantity1Sum = 0; Quantity2Sum = 0; Quantity3Sum = 0; Quantity4Sum = 0; Quantity5Sum = 0; Quantity6Sum = 0; int Quantity7Sum = 0, Quantity8Sum = 0; - + List PassWelderList = new List(); - + if (project != null) { if (project.StartDate != null) @@ -786,7 +791,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2 orderby y.UnitCode select new { x.UnitId, y.UnitName }; - + foreach (var item in units) { @@ -844,7 +849,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Quantity7Sum += passWelderStatisc.OtherMountGuard; Quantity8Sum += passWelderStatisc.OtherTotal; } - if (PassWelderList.Count>0) + if (PassWelderList.Count > 0) { isYm = true; whileIndex += 1; @@ -958,7 +963,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //自动设置表格样式 table.AutoFit(AutoFitBehavior.FixedColumnWidths); } - else { + else + { isYm = true; numberIndex = 1; whileIndex += 1; @@ -1003,24 +1009,16 @@ namespace FineUIPro.Web.CQMS.ManageReportNew int? totalNum0 = 0, totalNum1 = 0;//拍片数量合计 - + endDate = endDate.AddDays(1); foreach (var item in units) { int? num0 = 0, num1 = 0;//拍片数量小计 - var query = from c in db.ProcessControl_NondestructiveTest_New - join u in db.Base_Unit on c.UnitId equals u.UnitId - - - where c.ProjectId == this.CurrUser.LoginProjectId && c.UnitId == item.UnitId - && c.CreateDate >= Convert.ToDateTime(startDate) && c.CreateDate <= Convert.ToDateTime(endDate) - + && c.CreateDate >= Convert.ToDateTime(startDate) && c.CreateDate < Convert.ToDateTime(endDate) orderby c.CreateDate descending - select new - { c.CreateDate, c.ProjectId, @@ -1040,7 +1038,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew model.Id = Guid.NewGuid().ToString(); model.CreateMan = item.UnitName;//用作存储施工单位名称 model.ProfessionalName = "工艺管道"; - if (gygdModel != null) { model.MonthQuantity = gygdModel.MonthQuantity; @@ -1068,9 +1065,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew NondestructiveTestlist.Add(model); } - - - //地管 gygdModel = query.FirstOrDefault(x => x.ProfessionalName == "地管"); model = new Model.ProcessControl_NondestructiveTest_New(); @@ -1175,11 +1169,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew int pageCount = 1; foreach (var item in NondestructiveTestlist) { - //创建行 Row row = new Row(doc); - - //如果是第一列,或者 if (numberIndex == 1 || Unitname != item.CreateMan) { @@ -1189,7 +1180,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew } row.Cells.Add(CreateCell((pageCount).ToString(), doc, table.Rows[0].Cells[0].CellFormat.Width, "0", "1")); row.Cells.Add(CreateCell(item.CreateMan, doc, table.Rows[0].Cells[1].CellFormat.Width, "0", "", "unit")); - + Unitname = item.CreateMan; } else @@ -1199,8 +1190,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Unitname = item.CreateMan; } - - row.Cells.Add(CreateCell(item.ProfessionalName.ToString(), doc, table.Rows[0].Cells[2].CellFormat.Width)); row.Cells.Add(CreateCell(item.MonthQuantity.ToString(), doc, table.Rows[0].Cells[3].CellFormat.Width)); row.Cells.Add(CreateCell(item.TotalQuantity.ToString(), doc, table.Rows[0].Cells[4].CellFormat.Width)); @@ -1213,7 +1202,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { pageCount += 1; } - + } //自动设置表格样式 table.AutoFit(AutoFitBehavior.FixedColumnWidths); @@ -1233,7 +1222,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //自动设置表格样式 table.AutoFit(AutoFitBehavior.FixedColumnWidths); } - else { + else + { isYm = true; numberIndex = 1; whileIndex += 1; @@ -1324,7 +1314,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //自动设置表格样式 table.AutoFit(AutoFitBehavior.FixedColumnWidths); } - else { + else + { isYm = true; numberIndex = 1; whileIndex += 1; @@ -3130,7 +3121,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew { bkmark.Text = txtReportList.FirstOrDefault(x => x.ContentType == "23-1").ContentText; } - } + } bkmark = doc.Range.Bookmarks["ImageContent2"]; if (bkmark != null) diff --git a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs index a87bda58..b3eb6c1e 100644 --- a/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ConstructionEquipment.aspx.cs @@ -40,14 +40,14 @@ namespace FineUIPro.Web.DataShow strSql = @"SELECT ID,ProjectId,ProjectCode,ProjectName,UnitId,UnitName,SpecialEquipmentId,SpecialEquipmentName,SizeModel,OwnerCheck,CertificateNum,IsUsed,CompileDate,EQType FROM (SELECT Item.EquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId - ,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'特种设备' AS EQType + ,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'特种设备' AS EQType,P.ProjectState FROM InApproveManager_EquipmentInItem AS Item LEFT JOIN InApproveManager_EquipmentIn AS EQ ON EQ.EquipmentInId = Item.EquipmentInId LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId LEFT JOIN Base_Project AS P ON EQ.ProjectId = P.ProjectId LEFT JOIN Base_Unit AS Unit ON Unit.UnitId = EQ.UnitId UNION ALL SELECT Item.GeneralEquipmentInItemId AS ID,EQ.ProjectId,P.ProjectCode,P.ProjectName,EQ.UnitId,Unit.UnitName,Item.SpecialEquipmentId - ,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'一般设备' AS EQType + ,SPE.SpecialEquipmentName,Item.SizeModel,Item.OwnerCheck,Item.CertificateNum,Item.IsUsed,EQ.CompileDate,'一般设备' AS EQType,P.ProjectState FROM InApproveManager_GeneralEquipmentInItem AS Item LEFT JOIN InApproveManager_GeneralEquipmentIn AS EQ ON EQ.GeneralEquipmentInId = Item.GeneralEquipmentInId LEFT JOIN Base_SpecialEquipment AS SPE ON Item.SpecialEquipmentId = SPE.SpecialEquipmentId @@ -56,6 +56,8 @@ namespace FineUIPro.Web.DataShow WHERE 1=1 "; strSql += " AND V.IsUsed = @IsUsed"; + //在建项目数据 + strSql += " AND (V.ProjectState = '1' OR V.ProjectState IS NULL)"; listStr.Add(new SqlParameter("@IsUsed", "1")); if (this.rbType.SelectedValue == "2") { diff --git a/SGGL/FineUIPro.Web/DataShow/JD.aspx b/SGGL/FineUIPro.Web/DataShow/JD.aspx index 5c6718d2..caa8d497 100644 --- a/SGGL/FineUIPro.Web/DataShow/JD.aspx +++ b/SGGL/FineUIPro.Web/DataShow/JD.aspx @@ -53,10 +53,10 @@ - - + + + + @@ -157,7 +163,7 @@ @@ -165,6 +171,9 @@ + + @@ -231,6 +240,10 @@ + + + diff --git a/SGGL/FineUIPro.Web/DataShow/JDMonthDetail.aspx.cs b/SGGL/FineUIPro.Web/DataShow/JDMonthDetail.aspx.cs new file mode 100644 index 00000000..15f12db6 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/JDMonthDetail.aspx.cs @@ -0,0 +1,148 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class JDMonthDetail : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + public string Month + { + get + { + return (string)ViewState["Month"]; + } + set + { + ViewState["Month"] = value; + } + } + #endregion + 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"]; + } + if (!string.IsNullOrEmpty(Request.Params["month"])) + { + this.Month = Request.Params["month"]; + } + else + { + //统计月份信息 + DateTime months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01"); + if (DateTime.Now.Day < 26) + { + months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.AddMonths(-1).Month.ToString() + "-01"); + } + this.Month = months.ToString("yyyy-MM-dd"); + } + this.txtMonths.Text = this.Month.Replace("-01", ""); + BindGrid(); + } + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + this.Month = string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtMonths.Text.Trim() + "-01")); + BindGrid(); + } + #endregion + + /// + /// 加载Grid + /// + private void BindGrid() + { + DataTable tb = BindData(); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 加载数据 + /// + /// + private DataTable BindData() + { + string strSql = @"select mp.*,u.UnitName +,DutyPersonName = STUFF((SELECT ',' + p.UserName FROM dbo.Sys_User as p where PATINDEX('%,' + RTRIM(p.UserId) + ',%', ',' + mp.DutyPerson + ',') > 0 FOR XML PATH('')), 1, 1,'') +from [dbo].[JDGL_MonthPlan] mp +left join Base_Unit u on u.UnitId=mp.UnitId +where mp.ProjectId=@ProjectId and mp.Months=@month order by mp.SortIndex"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + listStr.Add(new SqlParameter("@month", this.Month)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox2_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + #endregion + + + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/JDMonthDetail.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/JDMonthDetail.aspx.designer.cs new file mode 100644 index 00000000..5faa1ad4 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/JDMonthDetail.aspx.designer.cs @@ -0,0 +1,80 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class JDMonthDetail + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtMonths 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtMonths; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx b/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx new file mode 100644 index 00000000..4565bad1 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx @@ -0,0 +1,101 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JDWeekDetail.aspx.cs" Inherits="FineUIPro.Web.DataShow.JDWeekDetail" %> + + + + + + 进度情况 + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx.cs b/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx.cs new file mode 100644 index 00000000..7bd81005 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx.cs @@ -0,0 +1,186 @@ +using BLL; +using NPOI.SS.Formula.Functions; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.SqlClient; +using System.Linq; + +namespace FineUIPro.Web.DataShow +{ + public partial class JDWeekDetail : PageBase + { + #region 项目主键 + /// + /// 项目主键 + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + public string WeekNo + { + get + { + return (string)ViewState["WeekNo"]; + } + set + { + ViewState["WeekNo"] = value; + } + } + #endregion + 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"]; + } + Model.SGGLDB db = Funs.DB; + var lastWeek = (from x in db.JDGL_WeekPlan where x.ProjectId == this.ProjectId && DateTime.Now > ((DateTime)x.EndDate).AddDays(1) orderby x.EndDate descending select x).FirstOrDefault(); + + this.WeekNo = lastWeek != null ? lastWeek.WeekNo : string.Empty; + this.InitDropDownList(); + BindGrid(); + } + } + + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + WeekItemService.InitWeekItemDropDownList(this.drpWeekNo, this.ProjectId, false); + if (!string.IsNullOrWhiteSpace(this.WeekNo)) + { + var item = WeekItemService.GetWeekItemByProjectIdAndWeekNo(this.ProjectId, int.Parse(this.WeekNo)); + if (item != null) + { + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + } + else + { + //获取当前时间所在周号,存在默认选中当前时间点所在周,否则选择最后一个周 + var item = WeekItemService.GetWeekItemByDateNow(this.ProjectId); + if (item != null) + {//存在默认选中当前时间点所在周 + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + else + { + var items = WeekItemService.GetWeekItemList(this.ProjectId); + if (items.Any()) + {//否则选择最后一个周 + item = items.First(); + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + } + } + } + /// + /// 周号选择触发事件 + /// + /// + /// + protected void drpWeekNo_SelectedIndexChanged(object sender, EventArgs e) + { + string weekNo = this.drpWeekNo.SelectedValue; + this.WeekNo = weekNo; + var item = BLL.WeekItemService.GetWeekItemByProjectIdAndWeekNo(this.ProjectId, int.Parse(weekNo)); + if (item != null) + { + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + BindGrid(); + } + + /// + /// 加载Grid + /// + private void BindGrid() + { + DataTable tb = BindData(); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + /// + /// 加载数据 + /// + /// + private DataTable BindData() + { + string strSql = @"select mp.*,u.UnitName,uw.UnitWorkName,cn.ProfessionalName,case mp.IsOK when 1 then '已完成' when 0 then '未完成' else '' end as IsOKStr +,DutyPersonName = STUFF((SELECT ',' + p.UserName FROM dbo.Sys_User as p where PATINDEX('%,' + RTRIM(p.UserId) + ',%', ',' + mp.DutyPerson + ',') > 0 FOR XML PATH('')), 1, 1,'') +from [dbo].[JDGL_WeekPlan] mp +left join Base_Unit u on u.UnitId=mp.UnitId +left join WBS_UnitWork uw on uw.UnitWorkId=mp.UnitWork +left join Base_CNProfessional cn on cn.CNProfessionalId=mp.Major +where mp.ProjectId=@ProjectId and mp.WeekNo=@WeekNo order by mp.SortIndex"; + List listStr = new List(); + listStr.Add(new SqlParameter("@ProjectId", this.ProjectId)); + listStr.Add(new SqlParameter("@WeekNo", this.WeekNo)); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + return tb; + } + + /// + /// 查询 + /// + /// + /// + protected void TextBox2_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 表排序、分页、关闭窗口 + /// + /// 分页 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, GridSortEventArgs e) + { + BindGrid(); + } + + #endregion + + + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx.designer.cs new file mode 100644 index 00000000..c9d1d3d8 --- /dev/null +++ b/SGGL/FineUIPro.Web/DataShow/JDWeekDetail.aspx.designer.cs @@ -0,0 +1,98 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DataShow +{ + + + public partial class JDWeekDetail + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel2; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpWeekNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpWeekNo; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + } +} diff --git a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs index 1ddd7b60..61a1c334 100644 --- a/SGGL/FineUIPro.Web/DataShow/License.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/License.aspx.cs @@ -40,8 +40,11 @@ namespace FineUIPro.Web.DataShow strSql = @"SELECT V.LicenseManagerId,V.ProjectId,V.ProjectCode,V.ProjectName,V.LicenseTypeName,V.UnitName,V.UnitTypeName,V.IsHighRisk ,V.WorkAreaName,V.CompileDate,V.StartDate,V.EndDate,V.WorkStatesStr,V.LicenseTypeId,V.UnitId,V.LicenseManageContents ,V.CompileMan,V.CompileDate,V.States,V.UserName - FROM View_License_LicenseManager AS V + FROM View_License_LicenseManager AS V + LEFT JOIN Base_Project AS Project ON V.ProjectId =Project.ProjectId WHERE 1=1"; + //在建项目数据 + strSql += " AND (Project.ProjectState = '1' OR Project.ProjectState IS NULL)"; if (this.rbType.SelectedValue=="2") { strSql += " AND V.WorkStates = @WorkStates"; diff --git a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs index 9c07b6b2..571ee42e 100644 --- a/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/ProjectPerson.aspx.cs @@ -41,6 +41,8 @@ namespace FineUIPro.Web.DataShow LEFT JOIN Base_Unit AS Unit ON Person.UnitId =Unit.UnitId LEFT JOIN Base_WorkPost AS WorkPost ON Person.WorkPostId =WorkPost.WorkPostId WHERE IsUsed=1 AND InTime <=GETDATE() AND (OutTime IS NULL OR OutTime > GETDATE()) "; + //在建项目数据 + strSql += " AND (Project.ProjectState = '1' OR Project.ProjectState IS NULL)"; List listStr = new List(); if (this.drpProject.SelectedValue !=Const._Null) { diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index f898226a..6ac1f9ec 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -706,6 +706,8 @@ + + @@ -9352,6 +9354,20 @@ InspectionManagementItem.aspx + + JDWeekDetail.aspx + ASPXCodeBehind + + + JDWeekDetail.aspx + + + JDMonthDetail.aspx + ASPXCodeBehind + + + JDMonthDetail.aspx + JD.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/Global.asax.cs b/SGGL/FineUIPro.Web/Global.asax.cs index 830bd89b..2e55c63b 100644 --- a/SGGL/FineUIPro.Web/Global.asax.cs +++ b/SGGL/FineUIPro.Web/Global.asax.cs @@ -69,17 +69,17 @@ { ErrLogInfo.WriteLog("实名制同步定时器启动失败!", ex); } - ////根据考勤记录修改人员状态定时器 - try - { - BLL.RealNameMonitorService.StartUpdateSitePerson(); - // BLL.RealNameMonitorService.StartMonitorProject(); - SynchroSetService.InsertRealNamePushLog(null, null, "根据考勤记录修改人员状态定时器开始启动", "sucess", "200", null, "成功", null); - } - catch (Exception ex) - { - ErrLogInfo.WriteLog("根据考勤记录修改人员状态定时器启动失败!", ex); - } + //////根据考勤记录修改人员状态定时器 此任务放入推送实名制定时任务中,同时操作人员表,导致死锁 + //try + //{ + // //BLL.RealNameMonitorService.StartUpdateSitePerson(); + // // BLL.RealNameMonitorService.StartMonitorProject(); + // //SynchroSetService.InsertRealNamePushLog(null, null, "根据考勤记录修改人员状态定时器开始启动", "sucess", "200", null, "成功", null); + //} + //catch (Exception ex) + //{ + // ErrLogInfo.WriteLog("根据考勤记录修改人员状态定时器启动失败!", ex); + //} ///实名制出入记录去重 try { diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx index f510cb67..4955beeb 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx @@ -9,106 +9,112 @@
- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - + + + + <%-- + + + + + + + + + + --%> + + + + + + + + - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + - - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs index fad4fc70..5250d7fe 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.cs @@ -90,19 +90,19 @@ namespace FineUIPro.Web.HSSE.HiddenInspection UnitWorkService.InitUnitWorkDownList(this.drpWorkArea, this.CurrUser.LoginProjectId, true); UserService.InitUserProjectIdUnitTypeDropDownList(this.drpResponsibleMan, this.CurrUser.LoginProjectId, Const.ProjectUnitType_2, true); - this.drpRegisterTypes.DataTextField = "RegisterTypesName"; - this.drpRegisterTypes.DataValueField = "RegisterTypesId"; - if (Type=="1") - { - this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("4"); //安全巡检类型 + //this.drpRegisterTypes.DataTextField = "RegisterTypesName"; + //this.drpRegisterTypes.DataValueField = "RegisterTypesId"; + //if (Type=="1") + //{ + // this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("4"); //安全巡检类型 - } - else - { - this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型 + //} + //else + //{ + // this.drpRegisterTypes.DataSource = BLL.HSSE_Hazard_HazardRegisterTypesService.GetHazardRegisterTypesList("1"); //安全巡检类型 - } - this.drpRegisterTypes.DataBind(); + //} + //this.drpRegisterTypes.DataBind(); this.HazardRegisterId = Request.Params["HazardRegisterId"]; //新增初始化 this.txtCheckManName.Text = this.CurrUser.UserName; @@ -132,10 +132,10 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { this.drpWorkArea.SelectedValue = registration.Place; } - if (!string.IsNullOrEmpty(registration.RegisterTypesId)) - { - this.drpRegisterTypes.SelectedValue = registration.RegisterTypesId; - } + //if (!string.IsNullOrEmpty(registration.RegisterTypesId)) + //{ + // this.drpRegisterTypes.SelectedValue = registration.RegisterTypesId; + //} if (!string.IsNullOrEmpty(registration.CheckCycle)) { this.ckType.SelectedValue = registration.CheckCycle; @@ -245,7 +245,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection Model.HSSE_Hazard_HazardRegister register = new Model.HSSE_Hazard_HazardRegister(); register.ProjectId = this.CurrUser.LoginProjectId; register.ProblemTypes = "1"; //安全隐患问题 - register.RegisterTypesId = this.drpRegisterTypes.SelectedValue; + //register.RegisterTypesId = this.drpRegisterTypes.SelectedValue; register.CheckCycle = this.ckType.SelectedValue; register.Risk_Level = this.dpRiskLevel.SelectedText; register.IsEffective = "1"; diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs index 2fac2582..0f77b625 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationAdd.aspx.designer.cs @@ -41,24 +41,6 @@ namespace FineUIPro.Web.HSSE.HiddenInspection /// protected global::FineUIPro.Form SimpleForm1; - /// - /// drpRegisterTypes 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpRegisterTypes; - - /// - /// dpRiskLevel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList dpRiskLevel; - /// /// drpUnit 控件。 /// @@ -167,6 +149,15 @@ namespace FineUIPro.Web.HSSE.HiddenInspection /// protected global::FineUIPro.DropDownList drpHiddenType; + /// + /// dpRiskLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList dpRiskLevel; + /// /// Toolbar1 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx index 17ad7de4..51d5da58 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx @@ -25,9 +25,9 @@ - - + --%> @@ -35,6 +35,15 @@ AutoPostBack="true" OnTextChanged="TextBox_TextChanged" LabelAlign="right" Width="250px" LabelWidth="80px"> + + + + + + + +
@@ -57,14 +66,6 @@ - - - - - - - @@ -86,16 +87,63 @@ - + - + + + + + + + + + + + + + + + + + + + + + + + + + + + + + @@ -108,36 +156,6 @@ - - - - - - - - - - - - - - - - - - <%-- diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs index 2a914fa9..8a1d11ce 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.cs @@ -29,17 +29,17 @@ namespace FineUIPro.Web.HSSE.HiddenInspection /// /// 巡检类型 0 日常 1 常规 /// - public string Type - { + public string Type + { get { - return (string )ViewState["Type"]; + return (string)ViewState["Type"]; } - set + set { ViewState["Type"] = value; - - } + + } } #endregion @@ -90,11 +90,11 @@ namespace FineUIPro.Web.HSSE.HiddenInspection strSql += " AND CheckManName LIKE @CheckMan"; listStr.Add(new SqlParameter("@CheckMan", "%" + this.txtCheckMan.Text.Trim() + "%")); } - if (!string.IsNullOrEmpty(this.txtType.Text.Trim())) - { - strSql += " AND RegisterTypesName LIKE @Type"; - listStr.Add(new SqlParameter("@Type", "%" + this.txtType.Text.Trim() + "%")); - } + //if (!string.IsNullOrEmpty(this.txtType.Text.Trim())) + //{ + // strSql += " AND RegisterTypesName LIKE @Type"; + // listStr.Add(new SqlParameter("@Type", "%" + this.txtType.Text.Trim() + "%")); + //} if (!string.IsNullOrEmpty(this.txtWorkAreaName.Text.Trim())) { strSql += " AND WorkAreaName LIKE @WorkAreaName"; @@ -149,7 +149,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); - Grid1.RecordCount = tb.Rows.Count; + Grid1.RecordCount = tb.Rows.Count; var table = this.GetPagedDataTable(Grid1, tb); Grid1.DataSource = table; @@ -175,7 +175,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection /// /// protected void Grid1_Sort(object sender, GridSortEventArgs e) - { + { BindGrid(); } @@ -256,7 +256,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { if (registration.CheckManId == this.CurrUser.UserId) //当前人是检查人,可以在整改前继续编辑 { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?HazardRegisterId={0}&&Type={1}", RegistrationId,Type, "编辑 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?HazardRegisterId={0}&&Type={1}", RegistrationId, Type, "编辑 - "))); } else { @@ -371,7 +371,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnAdd)) { - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?Type={0}",Type, "登记 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("HiddenRectificationAdd.aspx?Type={0}", Type, "登记 - "))); } else { @@ -418,7 +418,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection if (getD != null) { BLL.LogService.AddSys_Log(this.CurrUser, getD.HazardCode, getD.HazardRegisterId, BLL.Const.HSSE_HiddenRectificationListMenuId, BLL.Const.BtnDelete); - BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(RegistrationId); + BLL.HSSE_Hazard_HazardRegisterService.DeleteHazardRegisterByHazardRegisterId(RegistrationId); BindGrid(); ShowNotify("删除成功!", MessageBoxIcon.Success); } @@ -470,6 +470,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection #endregion #region 格式化字符串 + /// /// 获取整改前图片 /// @@ -640,7 +641,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection this.BindGrid(); } #endregion - + /// /// /// @@ -659,7 +660,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { hazardRegisterIds = hazardRegisterIds.Substring(0, hazardRegisterIds.LastIndexOf(",")); } - // PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("HiddenRectificationPrint.aspx?HazardRegisterIds={0}&CheckType={1}", hazardRegisterIds,"0", "查看 - "))); + // PageContext.RegisterStartupScript(Window4.GetShowReference(String.Format("HiddenRectificationPrint.aspx?HazardRegisterIds={0}&CheckType={1}", hazardRegisterIds,"0", "查看 - "))); this.hdRemark.Text = string.Empty; //} } diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.designer.cs index 99b04d08..74db3225 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/HiddenRectificationList.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.HSSE.HiddenInspection { - - - public partial class HiddenRectificationList { - +namespace FineUIPro.Web.HSSE.HiddenInspection +{ + + + public partial class HiddenRectificationList + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar1 控件。 /// @@ -56,7 +58,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// txtCheckMan 控件。 /// @@ -65,16 +67,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCheckMan; - - /// - /// txtType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtType; - + /// /// txtWorkAreaName 控件。 /// @@ -83,7 +76,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtWorkAreaName; - + /// /// txtResponsibilityUnitName 控件。 /// @@ -92,70 +85,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtResponsibilityUnitName; - - /// - /// Toolbar2 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Toolbar Toolbar2; - - /// - /// txtStartTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtStartTime; - - /// - /// Label3 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label3; - - /// - /// txtEndTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtEndTime; - - /// - /// txtStartRectificationTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtStartRectificationTime; - - /// - /// Label1 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label Label1; - - /// - /// txtEndRectificationTime 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtEndRectificationTime; - + /// /// drpStates 控件。 /// @@ -164,7 +94,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpStates; - + /// /// dpRiskLevel 控件。 /// @@ -173,7 +103,70 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList dpRiskLevel; - + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label3; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// txtStartRectificationTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartRectificationTime; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// txtEndRectificationTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndRectificationTime; + /// /// ToolbarFill1 控件。 /// @@ -182,7 +175,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// hdRemark 控件。 /// @@ -191,7 +184,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdRemark; - + /// /// btnNew 控件。 /// @@ -200,7 +193,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -209,7 +202,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -218,7 +211,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// /// lbImageUrl 控件。 /// @@ -227,7 +220,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lbImageUrl; - + /// /// Label2 控件。 /// @@ -236,7 +229,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label2; - + /// /// ToolbarSeparator1 控件。 /// @@ -245,7 +238,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -254,7 +247,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -263,7 +256,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -272,7 +265,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Window2 控件。 /// @@ -281,7 +274,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window2; - + /// /// Window3 控件。 /// @@ -290,7 +283,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window3; - + /// /// Menu1 控件。 /// @@ -299,7 +292,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnModify 控件。 /// @@ -308,7 +301,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnModify; - + /// /// btnRectify 控件。 /// @@ -317,7 +310,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnRectify; - + /// /// btnConfirm 控件。 /// @@ -326,7 +319,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnConfirm; - + /// /// btnMenuSee 控件。 /// @@ -335,7 +328,7 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuSee; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx index e2ef78ae..da2febc1 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx @@ -49,7 +49,8 @@ - + + <%----%> @@ -62,11 +63,11 @@ - - +
diff --git a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx.cs b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx.cs index a05af7f7..17aa59fc 100644 --- a/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/HiddenInspection/RiskAnalysisChart.aspx.cs @@ -98,23 +98,24 @@ namespace FineUIPro.Web.HSSE.HiddenInspection } else { - #region 按检查项 + #region 按隐患类型 + + var types = from x in Funs.DB.Sys_Const where x.GroupId == "Hiddendangertype" orderby x.SortIndex select x; if (this.drpChartType.SelectedValue != "Pie") //非饼形图 { - ///按检查项 + ///按隐患类型 DataTable dtTime = new DataTable(); - dtTime.Columns.Add("检查项", typeof(string)); + dtTime.Columns.Add("隐患类型", typeof(string)); dtTime.Columns.Add("总数量", typeof(string)); dtTime.Columns.Add("待整改", typeof(string)); dtTime.Columns.Add("已整改", typeof(string)); - var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x; foreach (var item in types) { DataRow rowTime = dtTime.NewRow(); Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem(); - rowTime["检查项"] = item.RegisterTypesName; - var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId); + rowTime["隐患类型"] = item.ConstValue; + var typeHazad = hazardRegisters.Where(x => x.HiddenType == item.ConstValue); rowTime["总数量"] = typeHazad.Count(); rowTime["待整改"] = typeHazad.Where(x => x.States == "1" || x.States == null).Count(); rowTime["已整改"] = typeHazad.Where(x => x.States == "3" || x.States == "2").Count(); @@ -127,22 +128,70 @@ namespace FineUIPro.Web.HSSE.HiddenInspection { ///按问题类型 DataTable dtTime = new DataTable(); - dtTime.Columns.Add("检查项", typeof(string)); + dtTime.Columns.Add("隐患类型", typeof(string)); dtTime.Columns.Add("总数量", typeof(string)); - var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x; foreach (var item in types) { DataRow rowTime = dtTime.NewRow(); Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem(); - rowTime["检查项"] = item.RegisterTypesName; - var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId); + rowTime["隐患类型"] = item.ConstValue; + var typeHazad = hazardRegisters.Where(x => x.HiddenType == item.ConstValue); rowTime["总数量"] = typeHazad.Count(); dtTime.Rows.Add(rowTime); } this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked)); } + + #endregion + + + #region 按检查项 + //if (this.drpChartType.SelectedValue != "Pie") //非饼形图 + //{ + // ///按检查项 + // DataTable dtTime = new DataTable(); + // dtTime.Columns.Add("检查项", typeof(string)); + // dtTime.Columns.Add("总数量", typeof(string)); + // dtTime.Columns.Add("待整改", typeof(string)); + // dtTime.Columns.Add("已整改", typeof(string)); + + // var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x; + // foreach (var item in types) + // { + // DataRow rowTime = dtTime.NewRow(); + // Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem(); + // rowTime["检查项"] = item.RegisterTypesName; + // var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId); + // rowTime["总数量"] = typeHazad.Count(); + // rowTime["待整改"] = typeHazad.Where(x => x.States == "1" || x.States == null).Count(); + // rowTime["已整改"] = typeHazad.Where(x => x.States == "3" || x.States == "2").Count(); + // dtTime.Rows.Add(rowTime); + // } + + // this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked)); + //} + //else //饼形图 + //{ + // ///按问题类型 + // DataTable dtTime = new DataTable(); + // dtTime.Columns.Add("检查项", typeof(string)); + // dtTime.Columns.Add("总数量", typeof(string)); + + // var types = from x in Funs.DB.HSSE_Hazard_HazardRegisterTypes where x.HazardRegisterType == "1" orderby x.TypeCode select x; + // foreach (var item in types) + // { + // DataRow rowTime = dtTime.NewRow(); + // Model.SpTDesktopItem newspItem = new Model.SpTDesktopItem(); + // rowTime["检查项"] = item.RegisterTypesName; + // var typeHazad = hazardRegisters.Where(x => x.RegisterTypesId == item.RegisterTypesId); + // rowTime["总数量"] = typeHazad.Count(); + // dtTime.Rows.Add(rowTime); + // } + + // this.ChartAccidentTime.CreateChart(BLL.ChartControlService.GetDataSourceChart(dtTime, "巡检问题分析", this.drpChartType.SelectedValue, 1100, 330, this.ckbShow.Checked)); + //} #endregion } } diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx index 4b245f26..f5422a15 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx @@ -64,7 +64,7 @@ - diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs index 8f63b3f9..3187f469 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardEdit.aspx.cs @@ -111,7 +111,7 @@ namespace FineUIPro.Web.HSSE.Solution // this.txtLargerHazardCode.Text = BLL.CodeRecordsService.ReturnCodeByMenuIdProjectId(BLL.Const.ProjectLargerHazardListMenuId, this.ProjectId, this.CurrUser.UnitId); this.txtExpectedTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); this.txtRemark.Text = HttpUtility.HtmlDecode("描述"); - this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}",DateTime.Now); + this.txtRecordTime.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); } } } @@ -135,26 +135,29 @@ namespace FineUIPro.Web.HSSE.Solution //判断附件是否必传 if (!returnFj(this.HazardId + "_1")) { - Alert.ShowInTop("请上传附件1-论证后的方案", MessageBoxIcon.Warning); + Alert.ShowInTop("请上传附件1-专项方案", MessageBoxIcon.Warning); return; } - if (!returnFj(this.HazardId + "_2")) + if (Convert.ToBoolean(this.rblIsArgument.SelectedValue) && Convert.ToBoolean(this.rblIsSuperLargerHazard.SelectedValue)) { - Alert.ShowInTop("请上传附件2-专家论证报告", MessageBoxIcon.Warning); - return; - } + if (!returnFj(this.HazardId + "_2")) + { + Alert.ShowInTop("请上传附件2-专家论证报告", MessageBoxIcon.Warning); + return; + } - if (!returnFj(this.HazardId + "_3")) - { - Alert.ShowInTop("请上传附件3-论证会签到表", MessageBoxIcon.Warning); - return; - } + if (!returnFj(this.HazardId + "_3")) + { + Alert.ShowInTop("请上传附件3-论证会签到表", MessageBoxIcon.Warning); + return; + } - if (!returnFj(this.HazardId + "_4")) - { - Alert.ShowInTop("请上传附件4-论证会会议照片", MessageBoxIcon.Warning); - return; + if (!returnFj(this.HazardId + "_4")) + { + Alert.ShowInTop("请上传附件4-论证会会议照片", MessageBoxIcon.Warning); + return; + } } if (!returnFj(this.HazardId + "_5")) @@ -189,7 +192,7 @@ namespace FineUIPro.Web.HSSE.Solution ExpectedTime = Funs.GetNewDateTime(this.txtExpectedTime.Text.Trim()), IsArgument = Convert.ToBoolean(this.rblIsArgument.SelectedValue), IsSuperLargerHazard = Convert.ToBoolean(this.rblIsSuperLargerHazard.SelectedValue), - TrainPersonNum=Funs.GetNewIntOrZero(this.txtTrainPersonNum.Text.Trim()), + TrainPersonNum = Funs.GetNewIntOrZero(this.txtTrainPersonNum.Text.Trim()), Remark = HttpUtility.HtmlEncode(this.txtRemark.Text.Trim()), Descriptions = this.txtDescriptions.Text.Trim(), RecordTime = Funs.GetNewDateTime(this.txtRecordTime.Text.Trim()), @@ -200,7 +203,7 @@ namespace FineUIPro.Web.HSSE.Solution { largerHazard.HazardId = this.HazardId; BLL.LargerHazardService.UpdateLargerHazard(largerHazard); - BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId,BLL.Const.ProjectLargerHazardListMenuId,BLL.Const.BtnModify); + BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnModify); } else { @@ -208,7 +211,7 @@ namespace FineUIPro.Web.HSSE.Solution largerHazard.RecardMan = this.CurrUser.UserId; this.HazardId = largerHazard.HazardId; BLL.LargerHazardService.AddLargerHazard(largerHazard); - BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnAdd); + BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnAdd); } Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.ProjectInformation); Project_HSSEData_HSSEService.StatisticalData(this.CurrUser.LoginProjectId, Project_HSSEData_HSSEService.HSSEDateType.DangerousProject); @@ -230,9 +233,9 @@ namespace FineUIPro.Web.HSSE.Solution //菜单id和质量危大保持一致 PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format( "../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", - this.HazardId+"_1", BLL.Const.MajorPlanApprovalMenuId))); + this.HazardId + "_1", BLL.Const.MajorPlanApprovalMenuId))); } - + protected void btnAttach_Click2(object sender, EventArgs e) { if (string.IsNullOrEmpty(this.HazardId)) @@ -242,7 +245,7 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format( "../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", - this.HazardId+"_2", BLL.Const.MajorPlanApprovalMenuId))); + this.HazardId + "_2", BLL.Const.MajorPlanApprovalMenuId))); } protected void btnAttach_Click3(object sender, EventArgs e) @@ -254,7 +257,7 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format( "../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", - this.HazardId+"_3", BLL.Const.MajorPlanApprovalMenuId))); + this.HazardId + "_3", BLL.Const.MajorPlanApprovalMenuId))); } protected void btnAttach_Click4(object sender, EventArgs e) @@ -266,7 +269,7 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format( "../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", - this.HazardId+"_4", BLL.Const.MajorPlanApprovalMenuId))); + this.HazardId + "_4", BLL.Const.MajorPlanApprovalMenuId))); } protected void btnAttach_Click5(object sender, EventArgs e) @@ -278,7 +281,7 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format( "../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", - this.HazardId+"_5", BLL.Const.MajorPlanApprovalMenuId))); + this.HazardId + "_5", BLL.Const.MajorPlanApprovalMenuId))); } protected void btnAttach_Click6(object sender, EventArgs e) @@ -290,13 +293,14 @@ namespace FineUIPro.Web.HSSE.Solution PageContext.RegisterStartupScript(WindowAtt.GetShowReference(String.Format( "../../AttachFile/webuploader.aspx?type=0&toKeyId={0}&path=FileUpload/CQMS/MajorPlanApproval&menuId={1}", - this.HazardId+"_6", BLL.Const.MajorPlanApprovalMenuId))); + this.HazardId + "_6", BLL.Const.MajorPlanApprovalMenuId))); } - - private bool returnFj(string id) { + + private bool returnFj(string id) + { bool isT = true; var model = Funs.DB.AttachFile.FirstOrDefault(x => x.ToKeyId == id); - if (model==null) + if (model == null) { return false; } @@ -323,7 +327,7 @@ namespace FineUIPro.Web.HSSE.Solution }; this.HazardId = largerHazard.HazardId; BLL.LargerHazardService.AddLargerHazard(largerHazard); - BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId,BLL.Const.ProjectLargerHazardListMenuId,BLL.Const.BtnAdd); + BLL.LogService.AddSys_Log(this.CurrUser, largerHazard.HazardCode, largerHazard.HazardId, BLL.Const.ProjectLargerHazardListMenuId, BLL.Const.BtnAdd); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx index ceaff8cd..6bd9d33f 100644 --- a/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx +++ b/SGGL/FineUIPro.Web/HSSE/Solution/LargerHazardList.aspx @@ -125,7 +125,7 @@ diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs index 3526f3d7..ac98488a 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs @@ -233,10 +233,14 @@ namespace FineUIPro.Web.JDGL.Check } else { - var user = projectUsers.FirstOrDefault(e => e.UserName == col3); - if (user == null) + var lstUser = col3.Split(','); + foreach (var obj in lstUser) { - result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col3 + "]不在项目用户信息中!" + "|"; + var user = projectUsers.FirstOrDefault(x => x.UserName == obj); + if (user == null) + { + result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + obj + "]不在项目用户信息中!" + "|"; + } } } @@ -410,13 +414,19 @@ namespace FineUIPro.Web.JDGL.Check MonthPlan.PlanDate = Funs.GetNewDateTime(col2); } - if (!string.IsNullOrEmpty(col3))//计划完成 + if (!string.IsNullOrEmpty(col3))//五环责任人 { - var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col3); - if (projectUser != null) + var lstUser = col3.Split(','); + var lstUserIds = string.Empty; + foreach (var obj in lstUser) { - MonthPlan.DutyPerson = projectUser.UserId; + var projectUser = projectUsers.FirstOrDefault(x => x.UserName == obj); + if (projectUser != null) + { + lstUserIds = !string.IsNullOrWhiteSpace(lstUserIds) ? $"{lstUserIds},{projectUser.UserId}" : projectUser.UserId; + } } + MonthPlan.DutyPerson = lstUserIds; } if (!string.IsNullOrEmpty(col4))//实际完成时间 { @@ -608,7 +618,16 @@ namespace FineUIPro.Web.JDGL.Check string name = string.Empty; if (DutyPerson != null) { - name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString()); + var lstUser = DutyPerson.ToString().Split(','); + var lstUserIds = string.Empty; + foreach (var obj in lstUser) + { + var username = BLL.UserService.GetUserNameByUserId(obj); + if (username != null) + { + name = !string.IsNullOrWhiteSpace(name) ? $"{name},{username}" : username; + } + } } return name; } diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx index c31fd95e..75d32cc5 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx @@ -15,11 +15,12 @@ - - --%> + + - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs index 75f1f6ad..63a3198e 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs @@ -1,4 +1,5 @@ using BLL; +using FineUIPro.Web.ProjectData; using System; using System.Collections.Generic; using System.Data; @@ -55,6 +56,7 @@ namespace FineUIPro.Web.JDGL.Check { this.hdFileName.Text = string.Empty; this.hdCheckResult.Text = string.Empty; + this.InitDropDownList(); if (WeekPlans != null) { WeekPlans.Clear(); @@ -63,8 +65,52 @@ namespace FineUIPro.Web.JDGL.Check this.ProjectId = Request.Params["ProjectId"]; } } + /// + /// 初始化下拉框 + /// + private void InitDropDownList() + { + WeekItemService.InitWeekItemDropDownList(this.drpWeekNo, this.CurrUser.LoginProjectId, false); + + //获取当前时间所在周号,存在默认选中当前时间点所在周,否则选择最后一个周 + var item = WeekItemService.GetWeekItemByDateNow(this.CurrUser.LoginProjectId); + if (item != null) + {//存在默认选中当前时间点所在周 + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + else + { + var items = WeekItemService.GetWeekItemList(this.CurrUser.LoginProjectId); + if (items.Any()) + {//否则选择最后一个周 + item = items.First(); + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + } + } #endregion + /// + /// 周号选择触发事件 + /// + /// + /// + protected void drpWeekNo_SelectedIndexChanged(object sender, EventArgs e) + { + var weekNo = this.drpWeekNo.SelectedValue; + var item = BLL.WeekItemService.GetWeekItemByProjectIdAndWeekNo(this.CurrUser.LoginProjectId, int.Parse(weekNo)); + if (item != null) + { + this.drpWeekNo.SelectedValue = item.WeekNo.ToString(); + this.txtStartDate.Text = string.Format("{0:yyyy-MM-dd}", item.StartDate); + this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", item.EndDate); + } + } + #region 审核 /// /// 审核 @@ -246,10 +292,14 @@ namespace FineUIPro.Web.JDGL.Check } else { - var user = projectUsers.FirstOrDefault(e => e.UserName == col4); - if (user == null) + var lstUser = col4.Split(','); + foreach (var obj in lstUser) { - result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col4 + "]不在项目用户信息中!" + "|"; + var user = projectUsers.FirstOrDefault(x => x.UserName == obj); + if (user == null) + { + result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + obj + "]不在项目用户信息中!" + "|"; + } } } @@ -408,7 +458,7 @@ namespace FineUIPro.Web.JDGL.Check select new { x.UserId, y.UserName }; var cns = from x in db.Base_CNProfessional select x; var unitWorks = from x in db.WBS_UnitWork where x.ProjectId == this.CurrUser.LoginProjectId select x; - string weekNo = this.txtWeekNo.Text.Trim(); + string weekNo = this.drpWeekNo.SelectedValue.Trim(); DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); if (pds != null && ir > 0) @@ -457,11 +507,17 @@ namespace FineUIPro.Web.JDGL.Check } if (!string.IsNullOrEmpty(col4))//五环责任人 { - var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col4); - if (projectUser != null) + var lstUser = col4.Split(','); + var lstUserIds = string.Empty; + foreach (var obj in lstUser) { - WeekPlan.DutyPerson = projectUser.UserId; + var projectUser = projectUsers.FirstOrDefault(x => x.UserName == obj); + if (projectUser != null) + { + lstUserIds = !string.IsNullOrWhiteSpace(lstUserIds) ? $"{lstUserIds},{projectUser.UserId}" : projectUser.UserId; + } } + WeekPlan.DutyPerson = lstUserIds; } if (!string.IsNullOrEmpty(col5))//计划完成时间 { @@ -504,7 +560,7 @@ namespace FineUIPro.Web.JDGL.Check /// protected void btnSave_Click(object sender, EventArgs e) { - if (string.IsNullOrEmpty(this.txtWeekNo.Text.Trim())) + if (string.IsNullOrEmpty(this.drpWeekNo.SelectedValue.Trim())) { ShowNotify("请选择周号!", MessageBoxIcon.Warning); return; @@ -514,7 +570,7 @@ namespace FineUIPro.Web.JDGL.Check var WeekPlanLists = from x in Funs.DB.JDGL_WeekPlan where x.ProjectId == this.ProjectId select x; string quantityListId = string.Empty; int a = WeekPlans.Count(); - string weekNo = this.txtWeekNo.Text.Trim(); + string weekNo = this.drpWeekNo.SelectedValue.Trim(); for (int i = 0; i < a; i++) { @@ -525,7 +581,7 @@ namespace FineUIPro.Web.JDGL.Check newWeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan)); newWeekPlan.ProjectId = this.ProjectId; newWeekPlan.WeekNo = weekNo; - newWeekPlan.StartDate= WeekPlans[i].StartDate; + newWeekPlan.StartDate = WeekPlans[i].StartDate; newWeekPlan.EndDate = WeekPlans[i].EndDate; newWeekPlan.UnitWork = WeekPlans[i].UnitWork; newWeekPlan.Major = WeekPlans[i].Major; @@ -666,7 +722,16 @@ namespace FineUIPro.Web.JDGL.Check string name = string.Empty; if (DutyPerson != null) { - name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString()); + var lstUser = DutyPerson.ToString().Split(','); + var lstUserIds = string.Empty; + foreach (var obj in lstUser) + { + var username = BLL.UserService.GetUserNameByUserId(obj); + if (username != null) + { + name = !string.IsNullOrWhiteSpace(name) ? $"{name},{username}" : username; + } + } } return name; } diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs index f23fddd1..fe777ed6 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.JDGL.Check { - - - public partial class WeekPlanIn { - +namespace FineUIPro.Web.JDGL.Check +{ + + + public partial class WeekPlanIn + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// SimpleForm1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Form SimpleForm1; - + /// /// Toolbar2 控件。 /// @@ -47,16 +49,16 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// - /// txtWeekNo 控件。 + /// drpWeekNo 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.TextBox txtWeekNo; - + protected global::FineUIPro.DropDownList drpWeekNo; + /// /// txtStartDate 控件。 /// @@ -65,7 +67,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStartDate; - + /// /// txtEndDate 控件。 /// @@ -74,7 +76,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndDate; - + /// /// btnAudit 控件。 /// @@ -83,7 +85,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnAudit; - + /// /// btnImport 控件。 /// @@ -92,7 +94,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnImport; - + /// /// btnSave 控件。 /// @@ -101,7 +103,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// btnDownLoad 控件。 /// @@ -110,7 +112,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDownLoad; - + /// /// fuAttachUrl 控件。 /// @@ -119,7 +121,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.FileUpload fuAttachUrl; - + /// /// Grid1 控件。 /// @@ -128,7 +130,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Label2 控件。 /// @@ -137,7 +139,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label2; - + /// /// Label3 控件。 /// @@ -146,7 +148,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label3; - + /// /// Label4 控件。 /// @@ -155,7 +157,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label4; - + /// /// lbImageUrl 控件。 /// @@ -164,7 +166,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lbImageUrl; - + /// /// Label1 控件。 /// @@ -173,7 +175,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label1; - + /// /// Label5 控件。 /// @@ -182,7 +184,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label5; - + /// /// hdFileName 控件。 /// @@ -191,7 +193,7 @@ namespace FineUIPro.Web.JDGL.Check { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.HiddenField hdFileName; - + /// /// hdCheckResult 控件。 /// diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx.cs index 89b1dc1a..23f3273c 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSet.aspx.cs @@ -11,26 +11,26 @@ using AspNet = System.Web.UI.WebControls; namespace FineUIPro.Web.ProjectData { public partial class ProjectSet : PageBase - { - public string URLToken - { - get - { - return (string)ViewState["URLToken"]; - } - set - { - ViewState["URLToken"] = value; - } - } + { + public string URLToken + { + get + { + return (string)ViewState["URLToken"]; + } + set + { + ViewState["URLToken"] = value; + } + } - #region 加载 - /// - /// 加载页面 - /// - /// - /// - protected void Page_Load(object sender, EventArgs e) + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { @@ -229,68 +229,68 @@ namespace FineUIPro.Web.ProjectData } } } - /// - /// 关联摄像头 - /// - /// - /// - protected void btnMonitor_Click(object sender, EventArgs e) - { - var sysSet16 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控地址" select x).ToList().FirstOrDefault(); - var sysSet17 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控密码" select x).ToList().FirstOrDefault(); - if (sysSet16 == null) - { - ShowNotify("视频监控地址未设置!", MessageBoxIcon.Warning); - return; - } - if (sysSet17 == null) - { - ShowNotify("视频监控密码未设置!", MessageBoxIcon.Warning); - return; - } - if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) - { - string url = sysSet16.SetValue; - string username = "admin"; - string password = sysSet17.SetValue; + /// + /// 关联摄像头 + /// + /// + /// + protected void btnMonitor_Click(object sender, EventArgs e) + { + var sysSet16 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控地址" select x).ToList().FirstOrDefault(); + var sysSet17 = (from x in Funs.DB.Sys_Set where x.SetName == "视频监控密码" select x).ToList().FirstOrDefault(); + if (sysSet16 == null) + { + ShowNotify("视频监控地址未设置!", MessageBoxIcon.Warning); + return; + } + if (sysSet17 == null) + { + ShowNotify("视频监控密码未设置!", MessageBoxIcon.Warning); + return; + } + if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) + { + string url = sysSet16.SetValue; + string username = "admin"; + string password = sysSet17.SetValue; - if (string.IsNullOrEmpty(URLToken)) - { - String res = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/login?username=" + username + "&password=" + Funs.EncryptionPassword(password)); - Dictionary dicres = JsonConvert.DeserializeObject>(res); - URLToken = dicres["URLToken"]; - } - var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == Grid1.SelectedRowID); + if (string.IsNullOrEmpty(URLToken)) + { + String res = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/login?username=" + username + "&password=" + Funs.EncryptionPassword(password)); + Dictionary dicres = JsonConvert.DeserializeObject>(res); + URLToken = dicres["URLToken"]; + } + var project = Funs.DB.Base_Project.FirstOrDefault(x => x.ProjectId == Grid1.SelectedRowID); - string resUserInfor = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/user/info?token=" + URLToken + "&username=" + project.ProjectCode); - if ("user not found".Equals(resUserInfor) || "远程服务器返回错误: (400) 错误的请求。".Equals(resUserInfor)) - { - string resUserSave = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/user/save?token=" + URLToken + "&ID=0&Username=" + project.ProjectCode + "&Role=操作员,观众&Enable=true"); - Dictionary dicUserSave = JsonConvert.DeserializeObject>(resUserSave); - project.MonitorId = dicUserSave["ID"]; - string newPassWord = Funs.EncryptionPassword(DateTime.Now.Ticks.ToString()); - newPassWord = newPassWord.Substring(newPassWord.Length - 9, 8); - string resResPS = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/user/resetpassword?token=" + URLToken + "&id=" + dicUserSave["ID"] + "&password=" + newPassWord); - project.MonitorPW = newPassWord; + string resUserInfor = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/user/info?token=" + URLToken + "&username=" + project.ProjectCode); + if ("user not found".Equals(resUserInfor) || "远程服务器返回错误: (400) 错误的请求。".Equals(resUserInfor)) + { + string resUserSave = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/user/save?token=" + URLToken + "&ID=0&Username=" + project.ProjectCode + "&Role=操作员,观众&Enable=true"); + Dictionary dicUserSave = JsonConvert.DeserializeObject>(resUserSave); + project.MonitorId = dicUserSave["ID"]; + string newPassWord = Funs.EncryptionPassword(DateTime.Now.Ticks.ToString()); + newPassWord = newPassWord.Substring(newPassWord.Length - 9, 8); + string resResPS = BLL.CommonService.CreateGetHttpResponse(url + "api/v1/user/resetpassword?token=" + URLToken + "&id=" + dicUserSave["ID"] + "&password=" + newPassWord); + project.MonitorPW = newPassWord; - Funs.DB.SubmitChanges(); - } + Funs.DB.SubmitChanges(); + } - PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectMonitorList.aspx?ProjectCode={0}&Id={1}&URLToken={2}", project.ProjectCode, project.MonitorId, URLToken, "查看 - "))); + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectMonitorList.aspx?ProjectCode={0}&Id={1}&URLToken={2}", project.ProjectCode, project.MonitorId, URLToken, "查看 - "))); - } - else - { - ShowNotify("请选择项目进入!", MessageBoxIcon.Warning); - } - } + } + else + { + ShowNotify("请选择项目进入!", MessageBoxIcon.Warning); + } + } - /// - /// 查看 - /// - /// - /// - protected void btnView_Click(object sender, EventArgs e) + /// + /// 查看 + /// + /// + /// + protected void btnView_Click(object sender, EventArgs e) { if (!string.IsNullOrEmpty(Grid1.SelectedRowID)) { PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("ProjectSetMap.aspx?projectId={0}&value=0", Grid1.SelectedRowID, "查看 - "))); } @@ -316,11 +316,11 @@ namespace FineUIPro.Web.ProjectData var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, menuId); if (buttonList.Count() > 0) { - if (buttonList.Contains(BLL.Const.BtnAdd)) - { - btnUpdata.Hidden = false; - this.btnNew.Hidden = false; - } + //if (buttonList.Contains(BLL.Const.BtnAdd)) + //{ + // btnUpdata.Hidden = false; + // this.btnNew.Hidden = false; + //} if (buttonList.Contains(BLL.Const.BtnModify) || buttonList.Contains(BLL.Const.BtnSave)) { this.btnMenuEdit.Hidden = false; @@ -330,6 +330,13 @@ namespace FineUIPro.Web.ProjectData this.btnMenuDelete.Hidden = false; } } + + string curruserId = this.CurrUser.UserId; + if (curruserId == Const.sysglyId || curruserId == Const.hfnbdId || curruserId == Const.fuweiId || curruserId == Const.shenyinhangId || curruserId == Const.zhanghuijuanId) + {//只有管理员、JT、付伟、申银行、张慧敏的账号可以新增和维护项目数据 + btnUpdata.Hidden = false; + this.btnNew.Hidden = false; + } } #endregion diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx index 472c2736..7341da11 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx @@ -14,237 +14,272 @@ - <%-- --%> - <%-- - --%> - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - 拾取坐标 + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + 拾取坐标 + + + + + + + + + + + + + + + + + + - + + - - - - - - - - - - - - - - - - + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs index d4c0d537..c8c47a83 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.cs @@ -35,6 +35,16 @@ namespace FineUIPro.Web.ProjectData { if (!IsPostBack) { + string curruserId = this.CurrUser.UserId; + if (curruserId == Const.sysglyId || curruserId == Const.hfnbdId || curruserId == Const.fuweiId || curruserId == Const.shenyinhangId || curruserId == Const.zhanghuijuanId) + {//只有管理员、JT、付伟、申银行、张慧娟的账号可以新增和维护项目数据 + this.btnSave.Hidden = false; + } + else + { + this.btnSave.Hidden = true; + } + BindGrid(); BindGrid2(); this.btnClose.OnClientClick = ActiveWindow.GetHideReference(); @@ -76,6 +86,7 @@ namespace FineUIPro.Web.ProjectData this.drpProjectBox.Value = project.ProjectName; } //this.txtProjectName.Text = project.ProjectName; + this.txtProjectNameEn.Text = project.ProjectNameEn; this.txtProjectCode.Text = project.ProjectCode; this.txtJTProjectCode.Text = project.JTProjectCode; this.txtProjectAddress.Text = project.ProjectAddress; @@ -94,6 +105,14 @@ namespace FineUIPro.Web.ProjectData { this.txtEndDate.Text = string.Format("{0:yyyy-MM-dd}", project.EndDate); } + if (project.PlanStartDate.HasValue) + { + this.txtPlanStartDate.Text = string.Format("{0:yyyy-MM-dd}", project.PlanStartDate); + } + if (project.PlanEndDate.HasValue) + { + this.txtPlanEndDate.Text = string.Format("{0:yyyy-MM-dd}", project.PlanEndDate); + } this.txtShortName.Text = project.ShortName; if (!string.IsNullOrEmpty(project.ProjectType)) @@ -166,6 +185,9 @@ namespace FineUIPro.Web.ProjectData this.txtProjectMoney.Text = project.ProjectMoney.ToString(); this.txtConstructionMoney.Text = project.ConstructionMoney.ToString(); this.txtTelephone.Text = project.Telephone; + this.txtStClientName.Text = project.StClientName; + this.txtClientContactor.Text = project.ClientContactor; + this.txtMobileTel.Text = project.MobileTel; if (!string.IsNullOrEmpty(project.Country)) { this.drpCountry.SelectedValue = project.Country; @@ -208,6 +230,7 @@ namespace FineUIPro.Web.ProjectData { ProjectCode = this.txtProjectCode.Text.Trim(), JTProjectCode = this.txtJTProjectCode.Text.Trim(), + ProjectNameEn = this.txtProjectNameEn.Text.Trim(), //ProjectName = Regex.Replace(this.txtProjectName.Text, @"\s", ""), ProjectAddress = this.txtProjectAddress.Text.Trim(), WorkRange = this.txtWorkRange.Text.Trim(), @@ -219,6 +242,9 @@ namespace FineUIPro.Web.ProjectData ConstructionMoney = Funs.GetNewDecimal(this.txtConstructionMoney.Text), Remark = this.txtRemark.Text.Trim(), Telephone = this.txtTelephone.Text.Trim(), + StClientName = this.txtStClientName.Text.Trim(), + ClientContactor = this.txtClientContactor.Text.Trim(), + MobileTel = this.txtMobileTel.Text.Trim(), HJProjectCode = this.txtHJProjectCode.Text.Trim(), KZProjectCode = this.txtKZProjectCode.Text.Trim(), City = this.txtCity.Text.Trim(), @@ -262,6 +288,16 @@ namespace FineUIPro.Web.ProjectData project.EndDate = Funs.GetNewDateTime(this.txtEndDate.Text.Trim()); } + if (!string.IsNullOrEmpty(txtPlanStartDate.Text.Trim())) + { + project.PlanStartDate = Funs.GetNewDateTime(this.txtPlanStartDate.Text.Trim()); + } + + if (!string.IsNullOrEmpty(txtPlanEndDate.Text.Trim())) + { + project.PlanEndDate = Funs.GetNewDateTime(this.txtPlanEndDate.Text.Trim()); + } + project.ShortName = this.txtShortName.Text.Trim(); if (this.drpProjectType.SelectedValue != BLL.Const._Null) { @@ -429,16 +465,26 @@ namespace FineUIPro.Web.ProjectData this.txtShortName.Text = pmpProject.ProjShortName; this.txtProjectAddress.Text = pmpProject.Address; this.txtCity.Text = pmpProject.CityName; - this.txtStartDate.Text = pmpProject.RealStartDate != null ? ((DateTime)pmpProject.RealStartDate).ToString("yyyy-MM-dd") : ""; - this.txtEndDate.Text = pmpProject.RealEndDate != null ? ((DateTime)pmpProject.RealEndDate).ToString("yyyy-MM-dd") : ""; - //this.txtEnglishRemark.Text = pmpProject.ProjectNameEn; + this.txtStartDate.Text = pmpProject.RealStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pmpProject.RealStartDate) : ""; + this.txtEndDate.Text = pmpProject.RealEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pmpProject.RealEndDate) : ""; + this.txtPlanStartDate.Text = pmpProject.PlanStartDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pmpProject.PlanStartDate) : ""; + this.txtPlanEndDate.Text = pmpProject.PlanEndDate.HasValue ? string.Format("{0:yyyy-MM-dd}", pmpProject.PlanEndDate) : ""; + this.txtProjectNameEn.Text = pmpProject.ProjectNameEn; + this.txtStClientName.Text = pmpProject.StClientName; + this.txtClientContactor.Text = pmpProject.ClientContactor; + this.txtMobileTel.Text = pmpProject.MobileTel; + if (pmpProject.StLocationName == "境外") + { + this.ckbIsForeign.Checked = true; + } } } #endregion - #region 设置项目、施工、安全经理 + #region 设置项目OBS + /// /// 设置项目、施工、安全经理 /// @@ -453,6 +499,8 @@ namespace FineUIPro.Web.ProjectData var project = BLL.ProjectService.GetProjectByProjectId(projectId); if (project != null) { + #region 项目经理 + string OldProjectManager = string.Empty; ////项目经理 var m = Funs.DB.Project_ProjectUser.FirstOrDefault(x => x.ProjectId == projectId && x.RoleId.Contains(BLL.Const.ProjectManager)); if (m != null) @@ -490,7 +538,11 @@ namespace FineUIPro.Web.ProjectData BLL.ProjectUserService.AddProjectUser(newProjectUser); } } - ////施工经理 + + #endregion + + #region 施工经理 + string OldConstructionManager = string.Empty; var c = Funs.DB.Project_ProjectUser.FirstOrDefault(x => x.ProjectId == projectId && x.RoleId.Contains(BLL.Const.ConstructionManager)); if (c != null) @@ -528,7 +580,11 @@ namespace FineUIPro.Web.ProjectData BLL.ProjectUserService.AddProjectUser(newProjectUser); } } - ///安全经理 + + #endregion + + #region 安全经理 + string OldHSSEManager = string.Empty; var h = Funs.DB.Project_ProjectUser.FirstOrDefault(x => x.ProjectId == projectId && x.RoleId.Contains(BLL.Const.HSSEManager)); if (h != null) @@ -567,7 +623,10 @@ namespace FineUIPro.Web.ProjectData } } - ///质量经理 + #endregion + + #region 质量经理 + string OldQAManager = string.Empty; var qa = Funs.DB.Project_ProjectUser.FirstOrDefault(x => x.ProjectId == projectId && x.RoleId.Contains(BLL.Const.QAManager)); if (qa != null) @@ -606,7 +665,10 @@ namespace FineUIPro.Web.ProjectData } } - ///开车经理 + #endregion + + #region 开车经理 + string OldDriveManager = string.Empty; var Drive = Funs.DB.Project_ProjectUser.FirstOrDefault(x => x.ProjectId == projectId && x.RoleId.Contains(BLL.Const.DriveManager)); if (Drive != null) @@ -644,6 +706,9 @@ namespace FineUIPro.Web.ProjectData BLL.ProjectUserService.AddProjectUser(newProjectUser); } } + + #endregion + } } #endregion @@ -1780,11 +1845,11 @@ namespace FineUIPro.Web.ProjectData private void BindGrid2() { - var lastPmpProject = (from x in Funs.DB.PMP_Project orderby x.CreateTime descending select x).FirstOrDefault(); - if (lastPmpProject == null || DateTime.Now > lastPmpProject.CreateTime.AddHours(30)) - { - PMPDataService.GetPMPProjectMasterData(); - } + //var lastPmpProject = (from x in Funs.DB.PMP_Project orderby x.CreateTime descending select x).FirstOrDefault(); + //if (lastPmpProject == null || DateTime.Now > lastPmpProject.CreateTime.AddHours(30)) + //{ + // PMPDataService.GetPMPProjectMasterData(); + //} //var pmptoken = PMPDataService.GetToken(); var list = (from x in Funs.DB.PMP_Project orderby x.StNum descending select x).ToList(); string codeName = ttbPmpProCodeSearch.Text.Trim(); diff --git a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs index f2c1df6d..d05a7512 100644 --- a/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/ProjectData/ProjectSetSave.aspx.designer.cs @@ -41,6 +41,24 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.Form SimpleForm1; + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// Form_edit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form_edit; + /// /// drpProjectBox 控件。 /// @@ -104,15 +122,6 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.TextBox txtProjectCode; - /// - /// txtShortName 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtShortName; - /// /// drpMasterBox1 控件。 /// @@ -167,6 +176,42 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.Grid Grid1; + /// + /// txtJTProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtJTProjectCode; + + /// + /// txtShortName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtShortName; + + /// + /// txtProjectNameEn 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectNameEn; + + /// + /// txtEnglishRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtEnglishRemark; + /// /// drpProjectType 控件。 /// @@ -203,6 +248,15 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.DatePicker txtStartDate; + /// + /// txtPlanStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanStartDate; + /// /// txtEndDate 控件。 /// @@ -212,6 +266,15 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.DatePicker txtEndDate; + /// + /// txtPlanEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanEndDate; + /// /// txtContractNo 控件。 /// @@ -230,6 +293,213 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.NumberBox txtDuration; + /// + /// txtStClientName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtStClientName; + + /// + /// txtClientContactor 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtClientContactor; + + /// + /// txtTelephone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtTelephone; + + /// + /// txtMobileTel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMobileTel; + + /// + /// txtWorkRange 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtWorkRange; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextArea txtRemark; + + /// + /// txtProjectMoney 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProjectMoney; + + /// + /// txtConstructionMoney 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtConstructionMoney; + + /// + /// txtProjectAddress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjectAddress; + + /// + /// drpUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnit; + + /// + /// drpCountry 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCountry; + + /// + /// ckbIsForeign 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBox ckbIsForeign; + + /// + /// drpProvince 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProvince; + + /// + /// txtCity 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtCity; + + /// + /// txtMapCoordinates 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtMapCoordinates; + + /// + /// bottomPanel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel bottomPanel; + + /// + /// txtProgress 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox txtProgress; + + /// + /// txtHJProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtHJProjectCode; + + /// + /// txtKZProjectCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtKZProjectCode; + + /// + /// txtProjType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjType; + + /// + /// txtProjPhase 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtProjPhase; + + /// + /// ContentPanel2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel2; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + /// /// drpProjectManager 控件。 /// @@ -275,186 +545,6 @@ namespace FineUIPro.Web.ProjectData /// protected global::FineUIPro.DropDownList drpDriveManager; - /// - /// drpUnit 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpUnit; - - /// - /// txtProjectAddress 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtProjectAddress; - - /// - /// txtJTProjectCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtJTProjectCode; - - /// - /// ckbIsForeign 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.CheckBox ckbIsForeign; - - /// - /// txtWorkRange 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtWorkRange; - - /// - /// txtRemark 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextArea txtRemark; - - /// - /// txtProjectMoney 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox txtProjectMoney; - - /// - /// txtConstructionMoney 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox txtConstructionMoney; - - /// - /// txtTelephone 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtTelephone; - - /// - /// drpCountry 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpCountry; - - /// - /// drpProvince 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DropDownList drpProvince; - - /// - /// txtCity 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtCity; - - /// - /// txtMapCoordinates 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtMapCoordinates; - - /// - /// bottomPanel 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.ContentPanel bottomPanel; - - /// - /// txtEnglishRemark 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtEnglishRemark; - - /// - /// txtHJProjectCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtHJProjectCode; - - /// - /// txtKZProjectCode 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtKZProjectCode; - - /// - /// txtProjType 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtProjType; - - /// - /// txtProjPhase 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.TextBox txtProjPhase; - - /// - /// txtProgress 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.NumberBox txtProgress; - /// /// Toolbar1 控件。 /// diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx index d98c2928..392699e2 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx @@ -21,6 +21,7 @@ + <%----%> @@ -76,6 +77,12 @@ <%----%> + + + + @@ -100,9 +107,6 @@ <%-- --%> <%-- --%> - - <%-- diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs index c48a28c2..38f1e81b 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.cs @@ -46,11 +46,9 @@ namespace FineUIPro.Web.Transfer public DataTable DataSql() { - string strSql = @"select * - ,(CASE isnull(IsEng,0) WHEN 1 THEN 'Y' ELSE 'N' END) IsEngStr - ,IsMatI IsMatIStr - from Transfer_PunchlistFrom - where ProjectId = @ProjectId"; + string strSql = @"select * ,(CASE isnull(IsEng,0) WHEN 1 THEN 'Y' ELSE 'N' END) IsEngStr ,IsMatI IsMatIStr + from Transfer_PunchlistFrom + where ProjectId = @ProjectId"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); @@ -59,6 +57,11 @@ namespace FineUIPro.Web.Transfer strSql += " AND Raised_By = @Raised_By"; listStr.Add(new SqlParameter("@Raised_By", this.txtRaised_By.Text.Trim())); } + if (!string.IsNullOrEmpty(this.txtNo.Text.Trim())) + { + strSql += " AND Num_NO = @No"; + listStr.Add(new SqlParameter("@No", this.txtNo.Text.Trim())); + } if (!string.IsNullOrEmpty(this.txtSystem_No.Text.Trim())) { strSql += " AND System_No like @System_No"; @@ -84,6 +87,11 @@ namespace FineUIPro.Web.Transfer } strSql += ")"; } + if (!string.IsNullOrEmpty(txtStartDate_Raised.Text.Trim())) + { + strSql += " AND Date_Raised = @StartDate_Raised"; + listStr.Add(new SqlParameter("@StartDate_Raised", Funs.GetNewDateTime(txtStartDate_Raised.Text.Trim()))); + } //if (!string.IsNullOrEmpty(txtStartDate_Raised.Text.Trim())) //{ // strSql += " AND Date_Raised >= @StartDate_Raised"; @@ -534,7 +542,7 @@ namespace FineUIPro.Web.Transfer } try { - newUrl = uploadfilepath.Replace("导出模板", "导出数据").Replace(".xlsx", DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx"); + newUrl = uploadfilepath.Replace("DataOut", "PunchlistFrom").Replace("导出模板", "导出数据").Replace(".xlsx", DateTime.Now.ToString("yyyyMMddHHmmss") + ".xlsx"); File.Copy(uploadfilepath, newUrl); NPOI.SS.UserModel.IWorkbook workbook; using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) diff --git a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs index c20c7832..623630f0 100644 --- a/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/Transfer/PunchlistFrom.aspx.designer.cs @@ -59,6 +59,15 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.Toolbar ToolSearch; + /// + /// txtNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtNo; + /// /// txtSystem_No 控件。 /// @@ -176,6 +185,24 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.DropDownList ddlPunchType; + /// + /// txtStartDate_Raised 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate_Raised; + + /// + /// txtEndRequired_Date 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndRequired_Date; + /// /// rbOutType 控件。 /// @@ -239,15 +266,6 @@ namespace FineUIPro.Web.Transfer /// protected global::FineUIPro.DropDownList ddlPIC_WUH; - /// - /// txtEndRequired_Date 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.DatePicker txtEndRequired_Date; - /// /// lbPhotoesImageUrl 控件。 /// diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx b/SGGL/FineUIPro.Web/common/mainProject2.aspx index ddbc04e2..45a746ac 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx @@ -682,11 +682,11 @@
- - @@ -787,7 +787,7 @@ function reloadGrid(param) { __doPostBack(null, 'ReloadGrid$' + param); } - //弹框代办 + //弹框待办 function returnWindows(objUrl) { document.getElementById("hiddenUrl").value = objUrl; $('#btnShowWindows').click(); diff --git a/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs b/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs index 21ad07fd..5d1ce19a 100644 --- a/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs +++ b/SGGL/FineUIPro.Web/common/mainProject2.aspx.cs @@ -1705,8 +1705,8 @@ where qc.QuantityCompletionId=(select top 1 QuantityCompletionId from[JDGL_Quant div_grlc.InnerHtml = getDataList.Count().ToString(); foreach (var item in getDataList) { - returnDbHtml += "
" + item.MenuName + "" + item.Content + "
  • " + - item.DataTime.ToString().Replace('/', '-').Split(' ')[0] + "
  • "; + returnDbHtml += "
    " + item.MenuName + "" + item.Content + "" + + item.DataTime.ToString().Replace('/', '-').Split(' ')[0] + "
    "; } } else diff --git a/SGGL/FineUIPro.Web/common/main_new0.aspx b/SGGL/FineUIPro.Web/common/main_new0.aspx index 71f2c7cc..363b46e6 100644 --- a/SGGL/FineUIPro.Web/common/main_new0.aspx +++ b/SGGL/FineUIPro.Web/common/main_new0.aspx @@ -90,7 +90,7 @@
    0
    -
    +
    diff --git a/SGGL/FineUIPro.Web/common/main_new0.aspx.cs b/SGGL/FineUIPro.Web/common/main_new0.aspx.cs index cf0636c2..d4699e99 100644 --- a/SGGL/FineUIPro.Web/common/main_new0.aspx.cs +++ b/SGGL/FineUIPro.Web/common/main_new0.aspx.cs @@ -48,13 +48,13 @@ namespace FineUIPro.Web.common div_qyzbzjrs.InnerHtml = (from x in db.Person_CompanyBranchPerson where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId == unitId select x).Count().ToString(); - + //企业总部专职人数 div_qyzbzzrs.InnerHtml = (from x in db.Person_CompanyBranchPerson join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId where x.IsOnJob == true && y.IsHsse == true && x.UnitId == unitId select x).Count().ToString(); - + //分支机构总监人数 div_fzjgzjrs.InnerHtml = (from x in db.Person_CompanyBranchPerson where x.IsOnJob == true && x.WorkPostId == Const.WorkPost_HSSEDirector && x.UnitId != unitId @@ -64,7 +64,7 @@ namespace FineUIPro.Web.common join y in db.Base_WorkPost on x.WorkPostId equals y.WorkPostId where x.IsOnJob == true && y.IsHsse == true && x.UnitId != unitId select x).Count().ToString(); - + if (pids == null) { //项目总监 @@ -78,13 +78,15 @@ namespace FineUIPro.Web.common where y.IsHsse == true && x.IsUsed == true select x).Count().ToString(); div_qyzbzzrs1.InnerHtml = div_xmzzrs.InnerHtml; - //项目参建 + //企业总部参建人数 + div_qyzbcjrs.InnerHtml = (from x in db.SitePerson_Person + where x.IsUsed == true + select x).Count().ToString(); + //项目在岗人数 div_xmcjrs.InnerHtml = (from x in db.SitePerson_Person - where x.IsUsed == true + where x.IsUsed == true && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime.Value > DateTime.Now) select x).Count().ToString(); - //企业总部参建人数 - div_qyzbcjrs.InnerHtml = div_xmcjrs.InnerHtml; //注安师 var ZasSql = @"SELECT Person.ProjectId,Project.ProjectCode,Project.ProjectName,Unit.UnitId,Unit.UnitId,Unit.UnitName, Person.PersonName,Person.PersonId,Person.IdentityCard,Person.Sex,Person.WorkPostId,WorkPost.WorkPostName,Person.Telephone @@ -102,7 +104,8 @@ namespace FineUIPro.Web.common div_zasrs.InnerHtml = tb.Rows.Count.ToString(); } - else { + else + { //项目总监 div_xmrs.InnerHtml = (from x in db.SitePerson_Person where x.WorkPostId == Const.WorkPost_HSSEDirector && x.IsUsed == true @@ -114,10 +117,15 @@ namespace FineUIPro.Web.common where y.IsHsse == true && x.IsUsed == true && pids.Contains(x.ProjectId) select x).Count().ToString(); - //项目参建 + //项目参建人数 + div_qyzbcjrs.InnerHtml = (from x in db.SitePerson_Person + where x.IsUsed == true + && pids.Contains(x.ProjectId) + select x).Count().ToString(); + + //项目在岗人数 div_xmcjrs.InnerHtml = (from x in db.SitePerson_Person - where x.IsUsed == true - && pids.Contains(x.ProjectId) + where x.IsUsed == true && pids.Contains(x.ProjectId) && x.InTime <= DateTime.Now && (!x.OutTime.HasValue || x.OutTime.Value > DateTime.Now) select x).Count().ToString(); string s1 = string.Format("'{0}'", String.Join(",", pids).Replace(",", "','")); @@ -141,11 +149,10 @@ namespace FineUIPro.Web.common div_qyzbrs1.InnerHtml = div_xmrs.InnerHtml; div_qyzbzzrs1.InnerHtml = div_xmzzrs.InnerHtml; - div_qyzbcjrs.InnerHtml = div_xmcjrs.InnerHtml; } - - + + //项目信息 getProjectInfo(); @@ -184,8 +191,9 @@ namespace FineUIPro.Web.common //int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0; this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0]; } - else { - var list = db.Base_Project.Where(x=>pids.Contains(x.ProjectId)); + else + { + var list = db.Base_Project.Where(x => pids.Contains(x.ProjectId)); //在建项目 div_zjxm.InnerHtml = list.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).Count().ToString(); //停工项目 @@ -196,7 +204,7 @@ namespace FineUIPro.Web.common //int wHours = Funs.DB.SitePerson_PersonInOutNumber.Max(x => x.WorkHours) ?? 0; this.div_safeworktime.InnerHtml = Count3().ToString().Split('.')[0]; } - + } #endregion #region 安全人工时穿透数据 @@ -242,7 +250,8 @@ namespace FineUIPro.Web.common cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0); } } - else { + else + { var getAllPersonInOutList = from x in db.SitePerson_PersonInOutNumber where pids.Contains(x.ProjectId) select x; @@ -256,7 +265,7 @@ namespace FineUIPro.Web.common var getD1 = from x in db.Accident_AccidentHandle join y in db.Base_Project on x.ProjectId equals y.ProjectId - where pids.Contains(x.ProjectId) + where pids.Contains(x.ProjectId) select x; var getD2 = from x in db.Accident_AccidentReport join y in db.Base_Project on x.ProjectId equals y.ProjectId @@ -275,7 +284,7 @@ namespace FineUIPro.Web.common cout1 = cout1 - getD2.Sum(x => x.WorkingHoursLoss ?? 0); } } - + return cout1; } @@ -300,7 +309,8 @@ namespace FineUIPro.Web.common { list = db.Base_Project.Where(x => pids.Contains(x.ProjectId)).ToList(); } - else { + else + { list = db.Base_Project.Where(x => (x.ProjectState == Const.ProjectState_1 || x.ProjectState == null)).ToList(); } var hazardRegisters = from x in db.HSSE_Hazard_HazardRegister select x; @@ -366,17 +376,20 @@ namespace FineUIPro.Web.common div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day select x).Count() + (from x in Funs.DB.Meeting_MonthMeeting where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day select x).Count()).ToString(); } - else { - + else + { + //项目安全领导小组 div_xmaqldxz.InnerHtml = Funs.DB.Meeting_SafetyLeaderGroupMeeting.Where(x => x.CompileDate > Const.DtmarkTime - && pids.Contains(x.ProjectId) ).Count().ToString(); + && pids.Contains(x.ProjectId)).Count().ToString(); //项目安全例会 DateTime date = DateTime.Now; - div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day + div_xmalh.InnerHtml = ((from x in Funs.DB.Meeting_WeekMeeting + where x.WeekMeetingDate.Value.Year == date.Year && x.WeekMeetingDate.Value.Month == date.Month && x.WeekMeetingDate.Value.Day == date.Day && pids.Contains(x.ProjectId) select x).Count() - + (from x in Funs.DB.Meeting_MonthMeeting where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day + + (from x in Funs.DB.Meeting_MonthMeeting + where x.MonthMeetingDate.Value.Year == date.Year && x.MonthMeetingDate.Value.Month == date.Month && x.MonthMeetingDate.Value.Day == date.Day && pids.Contains(x.ProjectId) select x).Count()).ToString(); @@ -389,9 +402,9 @@ namespace FineUIPro.Web.common /// 获取费用使用(万元) ///
    /// - public int GetCostUse() + public int GetCostUse() { - if (pids==null) + if (pids == null) { var result = 0; var costs = (from x in Funs.DB.CostGoods_CostSmallDetailItem @@ -419,7 +432,7 @@ namespace FineUIPro.Web.common /// 获取施工机具在用数 /// /// - public int GetUseEquipmentNum() + public int GetUseEquipmentNum() { if (pids == null) { @@ -453,7 +466,7 @@ namespace FineUIPro.Web.common /// 获取施工机具特种设备数 /// /// - public int GetSpecialEquipmentNum() + public int GetSpecialEquipmentNum() { if (pids == null) { @@ -477,7 +490,7 @@ namespace FineUIPro.Web.common /// 获取作业许可项数 /// /// - public int GetLicensesNum() + public int GetLicensesNum() { if (pids == null) { @@ -500,7 +513,7 @@ namespace FineUIPro.Web.common /// 获取作业许可关闭项数 /// /// - public int GetLicensesCloseNum() + public int GetLicensesCloseNum() { if (pids == null) { @@ -525,9 +538,9 @@ namespace FineUIPro.Web.common /// 获取一般隐患整改闭环项 /// /// - public int GetGeneralClosedNum() + public int GetGeneralClosedNum() { - if (pids==null) + if (pids == null) { var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister where x.Risk_Level == "一般" && x.States == "3" && @@ -538,19 +551,19 @@ namespace FineUIPro.Web.common else { var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister - where x.Risk_Level == "一般" && x.States == "3" && + where x.Risk_Level == "一般" && x.States == "3" && x.CheckTime > Const.DtmarkTime && pids.Contains(x.ProjectId) select x).Count(); return result; } - + } /// /// 获取一般隐患未整改完成项 /// /// - public int GetGeneralNotClosedNum() + public int GetGeneralNotClosedNum() { if (pids == null) { @@ -574,7 +587,7 @@ namespace FineUIPro.Web.common /// 一般整改率 /// /// - public string GetGeneralZgl() + public string GetGeneralZgl() { var num1 = Math.Round(100.0 * GetGeneralClosedNum() / (GetGeneralClosedNum() + GetGeneralNotClosedNum()), 0).ToString(); return num1; @@ -584,7 +597,7 @@ namespace FineUIPro.Web.common /// 获取重大隐患整改闭环项 /// /// - public int GetMajorClosedNum() + public int GetMajorClosedNum() { if (pids == null) { @@ -608,7 +621,7 @@ namespace FineUIPro.Web.common /// 获取重大隐患未整改完成项 /// /// - public int GetMajorNotClosedNum() + public int GetMajorNotClosedNum() { if (pids == null) { @@ -632,7 +645,7 @@ namespace FineUIPro.Web.common /// 重大整改率 /// /// - public string GetMajorZgl() + public string GetMajorZgl() { var num1 = Math.Round(100.0 * GetMajorClosedNum() / (GetMajorClosedNum() + GetMajorNotClosedNum()), 0).ToString(); if (num1 == "NaN") num1 = "0"; @@ -646,16 +659,17 @@ namespace FineUIPro.Web.common /// 获取企业负责人带班检查次数 /// /// - public int GetCompanyLeadShiftCheckNum() + public int GetCompanyLeadShiftCheckNum() { if (pids == null) { return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum(); } - else { + else + { return HSSEData_HSSEService.GetCompanyLeadShiftCheckNum(pids); } - + } @@ -664,7 +678,7 @@ namespace FineUIPro.Web.common /// 获取企业综合检查次数 /// /// - public int GetCompanyComprehensiveCheckNum() + public int GetCompanyComprehensiveCheckNum() { if (pids == null) return HSSEData_HSSEService.GetCompanyComprehensiveCheckNum(); @@ -676,7 +690,7 @@ namespace FineUIPro.Web.common /// 获取企业专项检查次数 /// /// - public int GetCompanySpecialCheckNum() + public int GetCompanySpecialCheckNum() { if (pids == null) return HSSEData_HSSEService.GetCompanySpecialCheckNum(); @@ -688,7 +702,7 @@ namespace FineUIPro.Web.common /// 获取项目负责人带班检查次数 /// /// - public int GetProjectLeadShiftCheckNum() + public int GetProjectLeadShiftCheckNum() { if (pids == null) { @@ -697,21 +711,22 @@ namespace FineUIPro.Web.common select x).Count(); return result; } - else { + else + { var result = (from x in Funs.DB.Check_ProjectLeaderCheck where x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId) select x).Count(); return result; } - + } /// /// 获取项目专项检查次数 /// /// - public int GetProjectSpecialCheckNum() + public int GetProjectSpecialCheckNum() { if (pids == null) { @@ -720,21 +735,22 @@ namespace FineUIPro.Web.common select x).Count(); return result; } - else { + else + { var result = (from x in Funs.DB.Check_CheckSpecial where x.CheckTime > Const.DtmarkTime && pids.Contains(x.ProjectId) select x).Count(); return result; } - + } /// /// 获取项目专业检查次数 /// /// - public int GetProjectMajorCheckNum() + public int GetProjectMajorCheckNum() { if (pids == null) { @@ -743,7 +759,8 @@ namespace FineUIPro.Web.common select x).Count(); return result; } - else { + else + { var result = (from x in Funs.DB.HSSE_Hazard_HazardRegister where x.CheckTime > Const.DtmarkTime && pids.Contains(x.ProjectId) @@ -758,7 +775,7 @@ namespace FineUIPro.Web.common /// 获取未遂事件数 /// /// - public int GetNearMissNum() + public int GetNearMissNum() { if (pids == null) { @@ -768,21 +785,22 @@ namespace FineUIPro.Web.common select x).Count(); return result; } - else { + else + { var result = (from x in Funs.DB.Accident_AccidentPersonRecord join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId where x.IsAttempt == "1" && x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId) select x).Count(); return result; } - + } /// /// 获取可记录事件数 /// /// - public int GetRecordableEventNum() + public int GetRecordableEventNum() { if (pids == null) { @@ -792,21 +810,22 @@ namespace FineUIPro.Web.common select x).Count(); return result; } - else { + else + { var result = (from x in Funs.DB.Accident_AccidentPersonRecord join y in Funs.DB.Base_AccidentType on x.AccidentTypeId equals y.AccidentTypeId where x.CompileDate > Const.DtmarkTime && pids.Contains(x.ProjectId) select x).Count(); return result; } - + } /// /// 获取一般事故数 /// /// - public int GetGeneralAccidentNum() + public int GetGeneralAccidentNum() { if (pids == null) { @@ -828,7 +847,7 @@ namespace FineUIPro.Web.common /// 获取较大事故数 /// /// - public int GetMajorAccidentNum() + public int GetMajorAccidentNum() { if (pids == null) { @@ -850,7 +869,7 @@ namespace FineUIPro.Web.common /// 获取重大事故数 /// /// - public int GetSeriousAccidentNum() + public int GetSeriousAccidentNum() { if (pids == null) { @@ -872,13 +891,14 @@ namespace FineUIPro.Web.common /// 获取特别重大事故数 /// /// - public int GetSpecialSeriousAccidentNum() + public int GetSpecialSeriousAccidentNum() { - if (pids == null) { + if (pids == null) + { var result = (from x in Funs.DB.Accident_AccidentReport - where x.AccidentDegree == "4" - select x).Count(); - return result; + where x.AccidentDegree == "4" + select x).Count(); + return result; } else { @@ -895,7 +915,7 @@ namespace FineUIPro.Web.common /// 获取企业级综合预案数 /// /// - public int GetCompanyComprehensivePlanNum() + public int GetCompanyComprehensivePlanNum() { if (pids == null) { @@ -928,7 +948,7 @@ namespace FineUIPro.Web.common /// 获取企业级专项预案数 /// /// - public int GetCompanySpecialPlanNum() + public int GetCompanySpecialPlanNum() { if (pids == null) { @@ -960,7 +980,7 @@ namespace FineUIPro.Web.common /// 获取企业级现场处置预案 /// /// - public int GetCompanyOnSiteDisposalPlan() + public int GetCompanyOnSiteDisposalPlan() { if (pids == null) { @@ -992,7 +1012,7 @@ namespace FineUIPro.Web.common /// 获取企业级演练次数 /// /// - public int GetCompanyDrillNum() + public int GetCompanyDrillNum() { if (pids == null) { @@ -1022,7 +1042,7 @@ namespace FineUIPro.Web.common /// 获取三级安全教育培训数 /// /// - public int GetSafeTrainNum() + public int GetSafeTrainNum() { if (pids == null) { @@ -1049,7 +1069,7 @@ namespace FineUIPro.Web.common /// 获取专项培训数 /// /// - public int GetSpecialTrainNum() + public int GetSpecialTrainNum() { if (pids == null) { @@ -1075,7 +1095,7 @@ namespace FineUIPro.Web.common /// 获取特种作业培训数 /// /// - public int GetSpecialOperationTrainNum() + public int GetSpecialOperationTrainNum() { if (pids == null) { @@ -1103,7 +1123,7 @@ namespace FineUIPro.Web.common /// 获取一般风险数 /// /// - public int GetGeneralRiskNum() + public int GetGeneralRiskNum() { if (pids == null) { @@ -1128,7 +1148,7 @@ namespace FineUIPro.Web.common /// 获取低风险数 /// /// - public int GetLowRiskNum() + public int GetLowRiskNum() { if (pids == null) { @@ -1153,7 +1173,7 @@ namespace FineUIPro.Web.common /// 获取中风险数 /// /// - public int GetMediumRiskNum() + public int GetMediumRiskNum() { if (pids == null) { @@ -1178,7 +1198,7 @@ namespace FineUIPro.Web.common /// 获取高风险数 /// /// - public int GetHighRiskNum() + public int GetHighRiskNum() { if (pids == null) { @@ -1188,7 +1208,8 @@ namespace FineUIPro.Web.common select x).Count(); return result; } - else { + else + { var result = (from x in Funs.DB.Hazard_HazardSelectedItem join y in Funs.DB.Base_RiskLevel on x.HazardLevel equals y.RiskLevelId where y.RiskLevel == 4 && (x.IsStart == true || x.State == "1") @@ -1204,7 +1225,7 @@ namespace FineUIPro.Web.common /// 获取危大工程审批完成数 /// /// - public int GetCompletedNum() + public int GetCompletedNum() { if (pids == null) { @@ -1228,19 +1249,19 @@ namespace FineUIPro.Web.common /// 获取危大工程培训人次数 /// /// - public int GetTrainPersonNum() + public int GetTrainPersonNum() { if (pids == null) { var result = (from x in Funs.DB.Solution_LargerHazard - where x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime + where x.IsSuperLargerHazard == false && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime select x.TrainPersonNum).ToList().Sum(x => x.Value); return result; } else { var result = (from x in Funs.DB.Solution_LargerHazard - where x.IsSuperLargerHazard == false && x.RecordTime > Const.DtmarkTime && pids.Contains(x.ProjectId) + where x.IsSuperLargerHazard == false && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime && pids.Contains(x.ProjectId) select x.TrainPersonNum).ToList().Sum(x => x.Value); return result; } @@ -1250,7 +1271,7 @@ namespace FineUIPro.Web.common /// 获取危大工程施工个数 /// /// - public int GetConstructionNum() + public int GetConstructionNum() { if (pids == null) { @@ -1274,7 +1295,7 @@ namespace FineUIPro.Web.common /// 获取危大工程完工个数 /// /// - public int GetFinishedNum() + public int GetFinishedNum() { if (pids == null) { @@ -1298,7 +1319,7 @@ namespace FineUIPro.Web.common /// 获取超危大工程审批完成数 /// /// - public int GetSuperCompletedNum() + public int GetSuperCompletedNum() { if (pids == null) { @@ -1322,13 +1343,13 @@ namespace FineUIPro.Web.common /// 获取超危大工程培训人次数 /// /// - public int GetSuperTrainPersonNum() + public int GetSuperTrainPersonNum() { if (pids == null) { var result = (from x in Funs.DB.Solution_LargerHazard - where x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime + where x.IsSuperLargerHazard == true && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime select x.TrainPersonNum).ToList().Sum(x => x.Value); return result; } @@ -1336,7 +1357,7 @@ namespace FineUIPro.Web.common { var result = (from x in Funs.DB.Solution_LargerHazard - where x.IsSuperLargerHazard == true && x.RecordTime > Const.DtmarkTime && pids.Contains(x.ProjectId) + where x.IsSuperLargerHazard == true && x.TrainPersonNum != null && x.RecordTime > Const.DtmarkTime && pids.Contains(x.ProjectId) select x.TrainPersonNum).ToList().Sum(x => x.Value); return result; } @@ -1346,7 +1367,7 @@ namespace FineUIPro.Web.common /// 获取超危大工程施工个数 /// /// - public int GetSuperConstructionNum() + public int GetSuperConstructionNum() { if (pids == null) { @@ -1370,7 +1391,7 @@ namespace FineUIPro.Web.common /// 获取超危大工程完工个数 /// /// - public int GetSuperFinishedNum() + public int GetSuperFinishedNum() { if (pids == null) { diff --git a/SGGL/FineUIPro.Web/index.aspx.cs b/SGGL/FineUIPro.Web/index.aspx.cs index 73b3755e..8a00e723 100644 --- a/SGGL/FineUIPro.Web/index.aspx.cs +++ b/SGGL/FineUIPro.Web/index.aspx.cs @@ -327,7 +327,8 @@ namespace FineUIPro.Web this.hdHomePage.Text = "1"; if (this.CurrUser.HomePageType == "2") { - this.Tab1.IFrameUrl = "~/common/main2.aspx"; + //this.Tab1.IFrameUrl = "~/common/main2.aspx"; + this.Tab1.IFrameUrl = "~/common/main_new.aspx"; this.hdHomePage.Text = "2"; } if (Request.Cookies["SelectLan"] != null) @@ -545,7 +546,8 @@ namespace FineUIPro.Web if (this.hdHomePage.Text == "1") { this.hdHomePage.Text = "2"; - this.Tab1.IFrameUrl = "~/common/main2.aspx"; + //this.Tab1.IFrameUrl = "~/common/main2.aspx"; + this.Tab1.IFrameUrl = "~/common/main_new.aspx"; } else { diff --git a/SGGL/Model/Model.cs b/SGGL/Model/Model.cs index a9463acb..e0efe2e3 100644 --- a/SGGL/Model/Model.cs +++ b/SGGL/Model/Model.cs @@ -26719,6 +26719,18 @@ namespace Model private System.Nullable _IsDelete; + private string _ProjectNameEn; + + private string _StClientName; + + private string _ClientContactor; + + private string _MobileTel; + + private System.Nullable _PlanStartDate; + + private System.Nullable _PlanEndDate; + private EntitySet _Accident_AccidentHandle; private EntitySet _Accident_AccidentPersonRecord; @@ -27425,6 +27437,18 @@ namespace Model partial void OnMasterSysIdChanged(); partial void OnIsDeleteChanging(System.Nullable value); partial void OnIsDeleteChanged(); + partial void OnProjectNameEnChanging(string value); + partial void OnProjectNameEnChanged(); + partial void OnStClientNameChanging(string value); + partial void OnStClientNameChanged(); + partial void OnClientContactorChanging(string value); + partial void OnClientContactorChanged(); + partial void OnMobileTelChanging(string value); + partial void OnMobileTelChanged(); + partial void OnPlanStartDateChanging(System.Nullable value); + partial void OnPlanStartDateChanged(); + partial void OnPlanEndDateChanging(System.Nullable value); + partial void OnPlanEndDateChanged(); #endregion public Base_Project() @@ -28589,6 +28613,126 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ProjectNameEn", DbType="NVarChar(500)")] + public string ProjectNameEn + { + get + { + return this._ProjectNameEn; + } + set + { + if ((this._ProjectNameEn != value)) + { + this.OnProjectNameEnChanging(value); + this.SendPropertyChanging(); + this._ProjectNameEn = value; + this.SendPropertyChanged("ProjectNameEn"); + this.OnProjectNameEnChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_StClientName", DbType="NVarChar(200)")] + public string StClientName + { + get + { + return this._StClientName; + } + set + { + if ((this._StClientName != value)) + { + this.OnStClientNameChanging(value); + this.SendPropertyChanging(); + this._StClientName = value; + this.SendPropertyChanged("StClientName"); + this.OnStClientNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ClientContactor", DbType="NVarChar(200)")] + public string ClientContactor + { + get + { + return this._ClientContactor; + } + set + { + if ((this._ClientContactor != value)) + { + this.OnClientContactorChanging(value); + this.SendPropertyChanging(); + this._ClientContactor = value; + this.SendPropertyChanged("ClientContactor"); + this.OnClientContactorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_MobileTel", DbType="NVarChar(200)")] + public string MobileTel + { + get + { + return this._MobileTel; + } + set + { + if ((this._MobileTel != value)) + { + this.OnMobileTelChanging(value); + this.SendPropertyChanging(); + this._MobileTel = value; + this.SendPropertyChanged("MobileTel"); + this.OnMobileTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanStartDate", DbType="DateTime")] + public System.Nullable PlanStartDate + { + get + { + return this._PlanStartDate; + } + set + { + if ((this._PlanStartDate != value)) + { + this.OnPlanStartDateChanging(value); + this.SendPropertyChanging(); + this._PlanStartDate = value; + this.SendPropertyChanged("PlanStartDate"); + this.OnPlanStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanEndDate", DbType="DateTime")] + public System.Nullable PlanEndDate + { + get + { + return this._PlanEndDate; + } + set + { + if ((this._PlanEndDate != value)) + { + this.OnPlanEndDateChanging(value); + this.SendPropertyChanging(); + this._PlanEndDate = value; + this.SendPropertyChanged("PlanEndDate"); + this.OnPlanEndDateChanged(); + } + } + } + [global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentHandle_Base_Project", Storage="_Accident_AccidentHandle", ThisKey="ProjectId", OtherKey="ProjectId", DeleteRule="NO ACTION")] public EntitySet Accident_AccidentHandle { @@ -284393,6 +284537,18 @@ namespace Model private System.DateTime _CreateTime; + private string _StClientName; + + private string _ClientContactor; + + private string _MobileTel; + + private System.Nullable _PlanStartDate; + + private System.Nullable _PlanEndDate; + + private string _StLocationName; + #region 可扩展性方法定义 partial void OnLoaded(); partial void OnValidate(System.Data.Linq.ChangeAction action); @@ -284453,6 +284609,18 @@ namespace Model partial void OnRealEndDateChanged(); partial void OnCreateTimeChanging(System.DateTime value); partial void OnCreateTimeChanged(); + partial void OnStClientNameChanging(string value); + partial void OnStClientNameChanged(); + partial void OnClientContactorChanging(string value); + partial void OnClientContactorChanged(); + partial void OnMobileTelChanging(string value); + partial void OnMobileTelChanged(); + partial void OnPlanStartDateChanging(System.Nullable value); + partial void OnPlanStartDateChanged(); + partial void OnPlanEndDateChanging(System.Nullable value); + partial void OnPlanEndDateChanged(); + partial void OnStLocationNameChanging(string value); + partial void OnStLocationNameChanged(); #endregion public PMP_Project() @@ -285020,6 +285188,126 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="stClientName", Storage="_StClientName", DbType="NVarChar(200)")] + public string StClientName + { + get + { + return this._StClientName; + } + set + { + if ((this._StClientName != value)) + { + this.OnStClientNameChanging(value); + this.SendPropertyChanging(); + this._StClientName = value; + this.SendPropertyChanged("StClientName"); + this.OnStClientNameChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="clientContactor", Storage="_ClientContactor", DbType="NVarChar(200)")] + public string ClientContactor + { + get + { + return this._ClientContactor; + } + set + { + if ((this._ClientContactor != value)) + { + this.OnClientContactorChanging(value); + this.SendPropertyChanging(); + this._ClientContactor = value; + this.SendPropertyChanged("ClientContactor"); + this.OnClientContactorChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="mobileTel", Storage="_MobileTel", DbType="NVarChar(200)")] + public string MobileTel + { + get + { + return this._MobileTel; + } + set + { + if ((this._MobileTel != value)) + { + this.OnMobileTelChanging(value); + this.SendPropertyChanging(); + this._MobileTel = value; + this.SendPropertyChanged("MobileTel"); + this.OnMobileTelChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="planStartDate", Storage="_PlanStartDate", DbType="DateTime")] + public System.Nullable PlanStartDate + { + get + { + return this._PlanStartDate; + } + set + { + if ((this._PlanStartDate != value)) + { + this.OnPlanStartDateChanging(value); + this.SendPropertyChanging(); + this._PlanStartDate = value; + this.SendPropertyChanged("PlanStartDate"); + this.OnPlanStartDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="planEndDate", Storage="_PlanEndDate", DbType="DateTime")] + public System.Nullable PlanEndDate + { + get + { + return this._PlanEndDate; + } + set + { + if ((this._PlanEndDate != value)) + { + this.OnPlanEndDateChanging(value); + this.SendPropertyChanging(); + this._PlanEndDate = value; + this.SendPropertyChanged("PlanEndDate"); + this.OnPlanEndDateChanged(); + } + } + } + + [global::System.Data.Linq.Mapping.ColumnAttribute(Name="stLocationName", Storage="_StLocationName", DbType="NVarChar(20)")] + public string StLocationName + { + get + { + return this._StLocationName; + } + set + { + if ((this._StLocationName != value)) + { + this.OnStLocationNameChanging(value); + this.SendPropertyChanging(); + this._StLocationName = value; + this.SendPropertyChanged("StLocationName"); + this.OnStLocationNameChanged(); + } + } + } + public event PropertyChangingEventHandler PropertyChanging; public event PropertyChangedEventHandler PropertyChanged; @@ -424135,6 +424423,8 @@ namespace Model private string _StatesStr; + private string _ConfirmStr; + private string _RegisterTypesId; private string _RegisterTypesName; @@ -424907,6 +425197,22 @@ namespace Model } } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_ConfirmStr", DbType="VarChar(6) NOT NULL", CanBeNull=false)] + public string ConfirmStr + { + get + { + return this._ConfirmStr; + } + set + { + if ((this._ConfirmStr != value)) + { + this._ConfirmStr = value; + } + } + } + [global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RegisterTypesId", DbType="NVarChar(50)")] public string RegisterTypesId { diff --git a/SGGL/Model/NPOIImg.cs b/SGGL/Model/NPOIImg.cs new file mode 100644 index 00000000..d4cbe673 --- /dev/null +++ b/SGGL/Model/NPOIImg.cs @@ -0,0 +1,12 @@ + +namespace Model +{ + public class NPOIImg + { + public string SavePath { get; set; } + + public int Row { get; set; } + + public int Col { get; set; } + } +} diff --git a/SGGL/Model/PMP/PMPOBS.cs b/SGGL/Model/PMP/PMPOBS.cs index 868bb06f..68714805 100644 --- a/SGGL/Model/PMP/PMPOBS.cs +++ b/SGGL/Model/PMP/PMPOBS.cs @@ -115,6 +115,21 @@ namespace Model } + /// + /// 项目OBS输出信息 + /// + public partial class PMPOBSOutInput + { + /// + /// 岗位专业名称 + /// + public string workName { get; set; } + /// + /// 对应岗位专业任职人员名称 + /// + public string userName { get; set; } + } + public partial class PMPOBSResponseData { diff --git a/SGGL/Model/PMP/PMPProject.cs b/SGGL/Model/PMP/PMPProject.cs index 461d8272..fb8e64d6 100644 --- a/SGGL/Model/PMP/PMPProject.cs +++ b/SGGL/Model/PMP/PMPProject.cs @@ -103,11 +103,16 @@ namespace Model [JsonProperty("stNum")] public string stNum { get; set; } /// - /// 名称 + /// 项目名称 /// [JsonProperty("name")] public string name { get; set; } /// + /// 项目英文名称 + /// + [JsonProperty("projectNameEn")] + public string projectNameEn { get; set; } + /// /// 项目简称 /// [JsonProperty("projShortName")] @@ -123,22 +128,47 @@ namespace Model [JsonProperty("realEndDate")] public DateTime? realEndDate { get; set; } /// + /// 计划开始日期 + /// + [JsonProperty("planStartDate")] + public DateTime? planStartDate { get; set; } + /// + /// 计划结束日期 + /// + [JsonProperty("planEndDate")] + public DateTime? planEndDate { get; set; } + /// + /// 业主名称 + /// + [JsonProperty("stClientName")] + public string stClientName { get; set; } + /// + /// 业主联系人 + /// + [JsonProperty("clientContactor")] + public string clientContactor { get; set; } + /// + /// 业主联系人电话 + /// + [JsonProperty("mobileTel")] + public string mobileTel { get; set; } + /// /// 操作类型 /// [JsonProperty("disType")] public string disType { get; set; } + ///// + ///// 项目类型名称(一级)【控制软件项目类型】 + ///// + //[JsonProperty("projName")] + //public string projName { get; set; } + ///// + ///// 项目类型名称(二级) + ///// + //[JsonProperty("projTypeName")] + //public string projTypeName { get; set; } /// - /// 项目阶段编码 - /// - [JsonProperty("projStepZxnoCode")] - public string projStepZxnoCode { get; set; } - /// - /// 项目阶段名称 - /// - [JsonProperty("projStepZxnoName")] - public string projStepZxnoName { get; set; } - /// - /// 项目类型一级 + /// 项目类型一级【控制软件项目类型】 /// [JsonProperty("stProjectTypeVals")] public string stProjectTypeVals { get; set; } @@ -147,11 +177,31 @@ namespace Model /// [JsonProperty("stProjectStepVals")] public string stProjectStepVals { get; set; } + ///// + ///// 项目阶段名称【控制软件项目阶段】 + ///// + //[JsonProperty("projStepName")] + //public string projStepName { get; set; } + /// + /// 项目阶段编码 + /// + [JsonProperty("projStepZxnoCode")] + public string projStepZxnoCode { get; set; } + /// + /// 项目阶段名称【控制软件项目阶段】 + /// + [JsonProperty("projStepZxnoName")] + public string projStepZxnoName { get; set; } /// /// 项目阶段 /// [JsonProperty("projStepZxnoVals")] public string projStepZxnoVals { get; set; } + ///// + ///// 项目性质名称 + ///// + //[JsonProperty("projPropName")] + //public string projPropName { get; set; } /// /// 项目性质 /// @@ -163,20 +213,10 @@ namespace Model [JsonProperty("remarkC")] public string remarkC { get; set; } /// - /// 详细地址 + /// 建设地点名称(境内、境外) /// - [JsonProperty("address")] - public string address { get; set; } - /// - /// 市编码 - /// - [JsonProperty("cityCode")] - public string cityCode { get; set; } - /// - /// 市名称 - /// - [JsonProperty("cityName")] - public string cityName { get; set; } + [JsonProperty("stLocationName")] + public string stLocationName { get; set; } /// /// 国家编码 /// @@ -188,6 +228,26 @@ namespace Model [JsonProperty("countryName")] public string countryName { get; set; } /// + /// 省编码 + /// + [JsonProperty("provinceCode")] + public string provinceCode { get; set; } + /// + /// 省名称 + /// + [JsonProperty("provinceName")] + public string provinceName { get; set; } + /// + /// 市编码 + /// + [JsonProperty("cityCode")] + public string cityCode { get; set; } + /// + /// 市名称 + /// + [JsonProperty("cityName")] + public string cityName { get; set; } + /// /// 区县编码 /// [JsonProperty("countyCode")] @@ -198,20 +258,10 @@ namespace Model [JsonProperty("countyName")] public string countyName { get; set; } /// - /// 项目英文名称 + /// 详细地址 /// - [JsonProperty("projectNameEn")] - public string projectNameEn { get; set; } - /// - /// 省编码 - /// - [JsonProperty("provinceCode")] - public string provinceCode { get; set; } - /// - /// 省名称 - /// - [JsonProperty("provinceName")] - public string provinceName { get; set; } + [JsonProperty("address")] + public string address { get; set; } /// /// 经度 /// diff --git a/SGGL/WebAPI/Controllers/JGZL/JGZLController.cs b/SGGL/WebAPI/Controllers/JGZL/JGZLController.cs new file mode 100644 index 00000000..dbbaac30 --- /dev/null +++ b/SGGL/WebAPI/Controllers/JGZL/JGZLController.cs @@ -0,0 +1,282 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Net; +using System.Net.Http; +using System.Web.Http; +using Model; +using BLL; + + +namespace WebAPI.Controllers.JGZL +{ + public class JGZLController : ApiController + { + #region 用户基本数据,单位,项目,单位工程,签审岗位(无),机构(无) + + /// + /// 用户基本数据,单位,项目,单位工程,签审岗位(无),机构(无) + /// + /// + public Model.ResponeData getUserList(string UserName,int? PageIndex,int? PageSize) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var responeData = new Model.ResponeData(); + try + { + var getUserListQuery = from x in db.Sys_User + join u in db.Base_Unit on x.UnitId equals u.UnitId into uGrouped + from ug in uGrouped.DefaultIfEmpty() + select new + { + x.UserId, + x.Account, + x.UserName, + x.Telephone, + x.IdentityCard, + x.BirthDay, + x.Email, + x.IsPost, + x.Sex, + ug.UnitId, + ug.UnitName, + ProjectItems = from proj in db.Base_Project + join pu in db.Project_ProjectUser on proj.ProjectId equals pu.ProjectId + where pu.UserId == x.UserId + select new + { + proj.ProjectId, + proj.ProjectName, + pu.WorkAreaId // 假设 WorkAreaId 是 UnitWorkIds 的来源 + } + }; + + var getList = getUserListQuery.AsEnumerable() + .Select(user => new UserItem + { + UserId = user.UserId, + Account = user.Account, + UserName = user.UserName, + Telephone = user.Telephone, + IdentityCard = user.IdentityCard, + BirthDay = user.BirthDay, + Email = user.Email, + IsPost = user.IsPost, + Sex = user.Sex, + UnitId = user.UnitId, + UnitName = user.UnitName, + ProjectItemList = user.ProjectItems.Select(projectItem => new ProjectItem + { + ProjectId = projectItem.ProjectId, + ProjectName = projectItem.ProjectName, + UnitWorkItemList = string.IsNullOrEmpty(projectItem.WorkAreaId) + ? new List() + : db.WBS_UnitWork + .Where(uw => projectItem.WorkAreaId.Split(',') + .Contains(uw.UnitWorkId)) + .Select(uw => new UnitWorkItem + { + UnitWorkId = uw.UnitWorkId, + UnitWorkName = uw.UnitWorkName + }) + .ToList() + }).ToList() + }).ToList(); + + if (!string.IsNullOrEmpty(UserName)) + { + getList = getList.Where(x => x.UserName.Contains(UserName)).ToList(); + } + + if (PageIndex > 0 && PageSize > 0) + { + getList = getList.Skip(((int)PageIndex - 1) * (int)PageSize).Take((int)PageSize).ToList(); + } + + responeData.data = new { getList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + } + + #endregion + + #region 项目数据 + + /// + /// 项目数据 + /// + /// + public Model.ResponeData getProjedtList() + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var responeData = new Model.ResponeData(); + try + { + var getList = (from x in db.Base_Project + select new + { + x.ProjectId, + x.ProjectCode, + x.ProjectName, + x.StartDate, + }).ToList(); + + responeData.data = new { getList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + } + + #endregion + + + #region 根据项目获取单位工程数据 + + /// + /// 根据项目获取单位工程数据 + /// + /// + public Model.ResponeData getUnitWorkListByProjectId(string ProjectId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var responeData = new Model.ResponeData(); + try + { + var getList = (from x in db.WBS_UnitWork + where x.ProjectId==ProjectId + select new + { + x.UnitWorkId, + x.UnitWorkName, + x.UnitWorkCode, + }).ToList(); + + responeData.data = new { getList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + } + + #endregion + + + #region 根据项目获取装置数据 + + /// + /// 根据项目获取装置数据 + /// + /// + public Model.ResponeData getInstallationListByProjectId(string ProjectId) + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var responeData = new Model.ResponeData(); + try + { + var getList = (from x in db.Project_Installation + where x.ProjectId==ProjectId + select new + { + x.InstallationId, + x.InstallationName, + x.InstallationCode, + }).ToList(); + + responeData.data = new { getList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + } + + #endregion + + + #region 单位数据 + + /// + /// 单位数据 + /// + /// + public Model.ResponeData getUnitList() + { + using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) + { + var responeData = new Model.ResponeData(); + try + { + var getList = (from x in db.Base_Unit + select new + { + x.UnitId, + x.UnitCode, + x.UnitName, + }).ToList(); + + responeData.data = new { getList }; + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.Message; + } + return responeData; + } + } + + #endregion + + public class UserItem + { + public string UserId { get; set; } + public string Account { get; set; } + public string UserName { get; set; } + public string Telephone { get; set; } + public string IdentityCard { get; set; } + public DateTime? BirthDay { get; set; } + public string Email { get; set; } + public System.Nullable IsPost { get; set; } + public string Sex { get; set; } + public string UnitId { get; set; } + public string UnitName { get; set; } + public List ProjectItemList { get; set; } + + } + + public class ProjectItem + { + public string ProjectId { get; set; } + public string ProjectName { get; set; } + public List UnitWorkItemList { get; set; } + } + + public class UnitWorkItem + { + public string UnitWorkId { get; set; } + public string UnitWorkName { get; set; } + } + } +} \ No newline at end of file diff --git a/SGGL/WebAPI/Controllers/PMP/PMPController.cs b/SGGL/WebAPI/Controllers/PMP/PMPController.cs new file mode 100644 index 00000000..9d842992 --- /dev/null +++ b/SGGL/WebAPI/Controllers/PMP/PMPController.cs @@ -0,0 +1,33 @@ +using BLL; +using System; +using System.Web.Http; + +namespace WebAPI.Controllers +{ + /// + /// 五环PMP系统 + /// + public class PMPController : ApiController + { + /// + /// 每天夜间同步获取PMP系统项目数据 + /// + /// + [HttpPost] + public Model.ResponeData SynPMPProjectData() + { + var responeData = new Model.ResponeData(); + try + { + PMPDataService.GetPMPProjectMasterData(); + } + catch (Exception ex) + { + responeData.code = 0; + responeData.message = ex.ToString(); + } + return responeData; + } + + } +} \ No newline at end of file diff --git a/SGGL/WebAPI/Filter/TestPermissionAttribute.cs b/SGGL/WebAPI/Filter/TestPermissionAttribute.cs index 3cee737f..1bac0193 100644 --- a/SGGL/WebAPI/Filter/TestPermissionAttribute.cs +++ b/SGGL/WebAPI/Filter/TestPermissionAttribute.cs @@ -86,7 +86,14 @@ namespace WebAPI.Filter /// /// /// - public static List lists = new List { "GJSX*OverdueWarningSendEmail", "User*postLoginOn", "get*token", "HazardRegister*getHazardRegisterTotalCount", "HazardRegister*getHazardRegisterByProjectIdStates", "upload*attendance" }; + public static List lists = new List { "PMP*SynPMPProjectData", "GJSX*OverdueWarningSendEmail", "User*postLoginOn", "get*token", "HazardRegister*getHazardRegisterTotalCount", + "HazardRegister*getHazardRegisterByProjectIdStates", + "JGZL*getUserList", + "JGZL*getProjedtList", + "JGZL*getUnitWorkListByProjectId", + "JGZL*getInstallationListByProjectId", + "JGZL*getUnitList", + "upload*attendance" }; /// /// diff --git a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user index 57be39e8..f2a7b18e 100644 --- a/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user +++ b/SGGL/WebAPI/Properties/PublishProfiles/FolderProfile.pubxml.user @@ -6,7 +6,7 @@ <_PublishTargetUrl>E:\诺必达合肥\发布\五环WebApi - True|2025-03-13T08:44:25.3220313Z||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||; + True|2025-04-07T08:11:44.5172315Z||;True|2025-04-02T18:10:22.8695984+08:00||;True|2025-04-02T17:59:51.2978116+08:00||;True|2025-04-02T17:50:55.8630437+08:00||;True|2025-04-02T17:49:22.5114405+08:00||;True|2025-04-02T17:47:11.0650205+08:00||;True|2025-04-02T17:39:09.8576853+08:00||;True|2025-04-02T17:38:15.3079030+08:00||;True|2025-04-02T17:22:03.6735964+08:00||;True|2025-04-02T17:19:04.4220913+08:00||;True|2025-04-02T17:17:14.0244636+08:00||;True|2025-04-02T17:11:09.6583011+08:00||;True|2025-04-02T17:07:23.6330597+08:00||;True|2025-04-02T16:58:45.4070649+08:00||;True|2025-04-02T16:50:20.5907511+08:00||;True|2025-04-02T16:44:18.5351224+08:00||;True|2025-04-02T16:31:11.1297141+08:00||;True|2025-04-02T16:18:43.1126995+08:00||;True|2025-04-02T14:50:42.5384021+08:00||;True|2025-04-01T10:53:08.9403414+08:00||;True|2025-04-01T10:52:08.7646389+08:00||;True|2025-04-01T09:52:56.3095742+08:00||;True|2025-03-13T16:44:25.3220313+08:00||;True|2025-03-13T15:31:10.3223071+08:00||;True|2025-03-13T10:58:17.1401575+08:00||;True|2025-01-23T23:10:37.9664637+08:00||;True|2024-09-24T09:51:10.8028974+08:00||;True|2024-09-20T17:30:59.6144803+08:00||;True|2024-09-20T15:28:40.2547949+08:00||;True|2024-09-19T16:30:51.3047517+08:00||;True|2024-09-19T15:53:23.2431713+08:00||;True|2024-09-19T15:48:55.0571748+08:00||;True|2024-09-19T15:06:29.5748482+08:00||;True|2024-09-19T14:55:42.1477578+08:00||;True|2024-09-19T10:07:53.8666329+08:00||;True|2024-09-03T16:26:17.4985546+08:00||;True|2024-07-17T10:29:15.9472548+08:00||; @@ -86,22 +86,22 @@ 10/28/2024 14:02:50 - 03/13/2025 16:44:23 + 04/07/2025 16:11:41 - 03/13/2025 16:44:23 + 04/07/2025 16:11:41 12/06/2024 20:13:58 - 03/13/2025 16:44:14 + 04/07/2025 16:11:19 12/26/2024 09:46:52 - 03/13/2025 16:44:14 + 04/07/2025 16:11:19 12/18/2020 05:32:28 @@ -128,10 +128,10 @@ 07/25/2012 19:48:56 - 03/13/2025 10:57:48 + 04/07/2025 16:11:13 - 03/13/2025 10:57:48 + 04/07/2025 16:11:13 07/04/2024 14:13:01 @@ -389,13 +389,13 @@ 02/09/2013 00:42:28 - 03/13/2025 16:44:14 + 04/07/2025 16:11:22 - 03/13/2025 16:44:14 + 04/07/2025 16:11:22 - 03/13/2025 16:44:14 + 04/07/2025 16:11:22 01/23/2014 21:57:34 @@ -479,7 +479,7 @@ 10/28/2024 14:02:50 - 03/13/2025 16:44:15 + 04/07/2025 16:11:23 10/28/2024 14:02:50 diff --git a/SGGL/WebAPI/WebAPI.csproj b/SGGL/WebAPI/WebAPI.csproj index fa3d6503..7b3fb804 100644 --- a/SGGL/WebAPI/WebAPI.csproj +++ b/SGGL/WebAPI/WebAPI.csproj @@ -165,6 +165,7 @@ + @@ -217,6 +218,7 @@ +