diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-08-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-08-bwj.sql new file mode 100644 index 00000000..49a3b09c --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-08-bwj.sql @@ -0,0 +1,4 @@ + +insert into Base_CNProfessional(CNProfessionalId,CNProfessionalCode,ProfessionalName,SortIndex) +values('BD344C54-66CC-4547-89AF-04C297D60CD7','HSE','ȫ',111) +go diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-09-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-09-gaofei.sql new file mode 100644 index 00000000..99a52678 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-09-gaofei.sql @@ -0,0 +1,338 @@ +alter table [dbo].[JDGL_MonthPlan] add SortIndex int null +GO + + +--ȡǰ˴ +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 + ,register.RegisterDef 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 + ,register.RegisterDef 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) + + +ORDER BY DataTime DESC +END + + + + + + + + + + + + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql new file mode 100644 index 00000000..c12f4b7d --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-11-gaofei.sql @@ -0,0 +1,112 @@ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','ܽȼƻ','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','޸',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','ɾ',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','',4) + GO + + +CREATE TABLE [dbo].[JDGL_WeekPlan]( + [WeekPlanId] [nvarchar](50) NOT NULL, + [ProjectId] [nvarchar](50) NULL, + [WeekNo] [nvarchar](50) NULL, + [StartDate] [datetime] NULL, + [EndDate] [datetime] NULL, + [UnitWork] [nvarchar](50) NULL, + [Major] [nvarchar](50) NULL, + [WorkContent] [nvarchar](500) NULL, + [UnitId] [nvarchar](50) NULL, + [DutyPerson] [nvarchar](50) NULL, + [PlanDate] [datetime] NULL, + [IsOK] [bit] NULL, + [Remark] [nvarchar](200) NULL, + [CompileMan] [nvarchar](50) NULL, + [CompileDate] [datetime] NULL, + [SortIndex] [int] NULL, + CONSTRAINT [PK_JDGL_WeekPlan] PRIMARY KEY CLUSTERED +( + [WeekPlanId] ASC +)WITH (PAD_INDEX = OFF, STATISTICS_NORECOMPUTE = OFF, IGNORE_DUP_KEY = OFF, ALLOW_ROW_LOCKS = ON, ALLOW_PAGE_LOCKS = ON) ON [PRIMARY] +) ON [PRIMARY] + +GO + +ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Project] FOREIGN KEY([ProjectId]) +REFERENCES [dbo].[Base_Project] ([ProjectId]) +GO + +ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Project] +GO + +ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit] FOREIGN KEY([UnitId]) +REFERENCES [dbo].[Base_Unit] ([UnitId]) +GO + +ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Base_Unit] +GO + +ALTER TABLE [dbo].[JDGL_WeekPlan] WITH CHECK ADD CONSTRAINT [FK_JDGL_WeekPlan_Sys_User] FOREIGN KEY([DutyPerson]) +REFERENCES [dbo].[Sys_User] ([UserId]) +GO + +ALTER TABLE [dbo].[JDGL_WeekPlan] CHECK CONSTRAINT [FK_JDGL_WeekPlan_Sys_User] +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekPlanId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ĿId' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'ProjectId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܺ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WeekNo' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ʼ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'StartDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'EndDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'/λ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitWork' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'רҵ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Major' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'WorkContent' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ελ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'UnitId' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'廷' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'DutyPerson' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ƻʱ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'PlanDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'״̬' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'IsOK' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ע' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'Remark' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileMan' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'CompileDate' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan', @level2type=N'COLUMN',@level2name=N'SortIndex' +GO + +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ܽȼƻ' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'JDGL_WeekPlan' +GO + + diff --git a/DataBase/版本日志/SGGLDB_WH_2024-05-13-bwj.sql b/DataBase/版本日志/SGGLDB_WH_2024-05-13-bwj.sql new file mode 100644 index 00000000..429e321b --- /dev/null +++ b/DataBase/版本日志/SGGLDB_WH_2024-05-13-bwj.sql @@ -0,0 +1,3 @@ + +update ProcessControl_InspectionManagement set IsOnceQualified=1 +go \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql index 5cacfbb3..b592cf6f 100644 --- a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql +++ b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql @@ -104,6 +104,19 @@ go VALUES('F136D1B4-A988-42E7-AD7C-4A246B440D03','94287B92-7E96-4B90-BC6F-DAF30AE3B314','保存',4) GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('56A54B4B-BBA3-4249-9FFC-3A60DAC79059','周进度计划','JDGL/Check/WeekPlan.aspx',52,'0','Menu_JDGL',0,1,1) + GO + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('9371CFCF-E162-49FD-BC48-CE178E153F51','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','增加',1) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('DC978D83-FC78-4A7E-888A-581082F0F70D','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','修改',2) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('BE4B07C7-EFE7-47F1-BBF9-A60930F70BDD','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','删除',3) + INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) + VALUES('A8102F40-6E06-49EB-9471-3FF4DC745226','56A54B4B-BBA3-4249-9FFC-3A60DAC79059','保存',4) + GO + --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('27C1D718-2DC0-42A5-96C0-F7A2D0DBC5F6','进度测量标志(权重)设置','',20,'0','Menu_JDGL',0,0,1) --GO diff --git a/SGGL/FineUIPro.Web/BaseInfo/CNProfessional.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/CNProfessional.aspx.cs index 05168107..521c3dcc 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/CNProfessional.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/CNProfessional.aspx.cs @@ -42,7 +42,7 @@ namespace FineUIPro.Web.BaseInfo protected DataTable BindData() { - string strSql = @"select CNProfessionalId,CNProfessionalCode,ProfessionalName,SortIndex from [dbo].[Base_CNProfessional] where CNProfessionalId !='"+Const.CNProfessionalConstructId+"' "; + string strSql = @"select CNProfessionalId,CNProfessionalCode,ProfessionalName,SortIndex from [dbo].[Base_CNProfessional] where CNProfessionalId !='" + Const.CNProfessionalConstructId + "' and CNProfessionalId !='" + Const.CNProfessionalHSEId + "' "; List listStr = new List(); if (!string.IsNullOrEmpty(this.txtCNProfessionalCode.Text.Trim())) diff --git a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs index 0d123acd..f2584260 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/CheckList.aspx.cs @@ -654,20 +654,10 @@ namespace FineUIPro.Web.CQMS.Check cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Check/JointCheck.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/JointCheck.aspx.cs index d99bd26a..5a129aea 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/JointCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/JointCheck.aspx.cs @@ -456,20 +456,10 @@ namespace FineUIPro.Web.CQMS.Check cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Check/JointCheckStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/JointCheckStatistics.aspx.cs index 3ec4559a..9725f413 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/JointCheckStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/JointCheckStatistics.aspx.cs @@ -350,20 +350,10 @@ namespace FineUIPro.Web.CQMS.Check cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs index b1957133..cc2861fb 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosure.aspx.cs @@ -280,20 +280,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs index de6eb01f..30e346f3 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ConTechnologyDisclosureEdit.aspx.cs @@ -93,7 +93,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } - var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null))); + var q = Funs.DB.Comprehensive_ConTechnologyDisclosure.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.ConTechnologyDisclosureId != this.ConTechnologyDisclosureId || (this.ConTechnologyDisclosureId == null && x.ConTechnologyDisclosureId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx index 1a926684..51eb19ad 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx @@ -85,7 +85,7 @@ - + diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs index 528aca21..fb537b1c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDoc.aspx.cs @@ -368,20 +368,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs index ebe28ca5..d7159bba 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DataReceivingDocEdit.aspx.cs @@ -92,7 +92,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive BLL.UnitService.GetUnit(this.drpSendUnitId, this.CurrUser.LoginProjectId, false);//发件单位 BLL.UnitService.GetUnit(this.drpReceiveUnit, this.CurrUser.LoginProjectId, false);//接收单位 BLL.UnitService.GetUnit(this.drpIssueToUnit, this.CurrUser.LoginProjectId, false);//下发至单位 - BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业 + BLL.CNProfessionalService.InitCNProfessionalDocDownList(this.drpCNProfessionalId, true);//专业 //LoadAuditSelect(); //this.agree.Hidden = true; //this.options.Hidden = true; @@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null))); + var q = Funs.DB.Comprehensive_DataReceivingDoc.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DataReceivingDocId != this.DataReceivingDocId || (this.DataReceivingDocId == null && x.DataReceivingDocId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs index 474ecd6f..877a7142 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrder.aspx.cs @@ -333,20 +333,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs index 8782ad1e..971fdfe0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignChangeOrderEdit.aspx.cs @@ -181,7 +181,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); + var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -269,7 +269,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); + var q = Funs.DB.Comprehensive_DesignChangeOrder.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignChangeOrderId != this.DesignChangeOrderId || (this.DesignChangeOrderId == null && x.DesignChangeOrderId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs index 3ce2d892..29da87aa 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetails.aspx.cs @@ -355,20 +355,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs index 32679055..b508159b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDetailsEdit.aspx.cs @@ -176,7 +176,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); + var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -263,7 +263,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); + var q = Funs.DB.Comprehensive_DesignDetails.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDetailsId != this.DesignDetailsId || (this.DesignDetailsId == null && x.DesignDetailsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs index 7f8dc3d6..a49dfe19 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawings.aspx.cs @@ -394,20 +394,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs index 5d203926..7167b13b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/DesignDrawingsEdit.aspx.cs @@ -171,7 +171,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); + var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -257,7 +257,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); + var q = Funs.DB.Comprehensive_DesignDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.DesignDrawingsId != this.DesignDrawingsId || (this.DesignDrawingsId == null && x.DesignDrawingsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs index 946783be..95f3d39b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApproval.aspx.cs @@ -322,20 +322,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs index b39dbdef..12819210 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/GeneralPlanApprovalEdit.aspx.cs @@ -91,7 +91,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null))); + var q = Funs.DB.Comprehensive_GeneralPlanApproval.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.GeneralPlanApprovalId != this.GeneralPlanApprovalId || (this.GeneralPlanApprovalId == null && x.GeneralPlanApprovalId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs index a7627848..afaedd1b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipment.aspx.cs @@ -327,20 +327,23 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); + NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Right; cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; + font0.FontHeightInPoints = 11; + //font0.IsBold = true; cellStyle0.SetFont(font0); + // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); @@ -388,7 +391,7 @@ namespace FineUIPro.Web.Comprehensive cell.SetCellValue(item.Supplier);//供货厂商 cell = row.CreateCell(7); - cell.CellStyle = cellStyle; + cell.CellStyle = cellStyle0; cell.SetCellValue(item.Counts);//本次数量 cell = row.CreateCell(8); @@ -396,7 +399,7 @@ namespace FineUIPro.Web.Comprehensive cell.SetCellValue(item.Unit);//单位 cell = row.CreateCell(9); - cell.CellStyle = cellStyle; + cell.CellStyle = cellStyle0; cell.SetCellValue(item.SamplingCount);//本次抽检数量 cell = row.CreateCell(10); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs index 4da28c17..0ab3bba4 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionEquipmentEdit.aspx.cs @@ -243,7 +243,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); + var q = Funs.DB.Comprehensive_InspectionEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionEquipmentId != this.InspectionEquipmentId || (this.InspectionEquipmentId == null && x.InspectionEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs index b788b077..41427d4a 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachine.aspx.cs @@ -346,19 +346,20 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); + NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Right; cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; + font0.FontHeightInPoints = 11; cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); @@ -445,7 +446,7 @@ namespace FineUIPro.Web.Comprehensive cell.SetCellValue(isO);//是否在校验期内 cell = row.CreateCell(11); - cell.CellStyle = cellStyle; + cell.CellStyle = cellStyle0; cell.SetCellValue(item.UnitsCount.HasValue ? item.UnitsCount.ToString() : "");//台数 cell = row.CreateCell(12); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs index b747c313..775f42c2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionMachineEdit.aspx.cs @@ -193,7 +193,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); + var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -268,7 +268,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择报验单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); + var q = Funs.DB.Comprehensive_InspectionMachine.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionMachineId != this.InspectionMachineId || (this.InspectionMachineId == null && x.InspectionMachineId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs index 570f9cb5..25d54dd2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPerson.aspx.cs @@ -413,20 +413,11 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); + // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs index 68154aa6..45a6ea71 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionPersonEdit.aspx.cs @@ -225,7 +225,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } } - var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); + var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -410,7 +410,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } } - var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); + var q = Funs.DB.Comprehensive_InspectionPerson.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode ==Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.InspectionPersonId != this.InspectionPersonId || (this.InspectionPersonId == null && x.InspectionPersonId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs index 70b59d90..67b39dc2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlan.aspx.cs @@ -288,20 +288,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs index 5acb22a7..19c4dc18 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/InspectionTestPlanEdit.aspx.cs @@ -105,7 +105,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); + var q = Funs.DB.Inspection_Test_Plan.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs index 3e65c307..fa084818 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApproval.aspx.cs @@ -323,20 +323,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs index cd64a4e1..2f927704 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/MajorPlanApprovalEdit.aspx.cs @@ -90,7 +90,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null))); + var q = Funs.DB.Comprehensive_MajorPlanApproval.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.MajorPlanApprovalId != this.MajorPlanApprovalId || (this.MajorPlanApprovalId == null && x.MajorPlanApprovalId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs index e2034bc8..61c7cb53 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagement.aspx.cs @@ -378,20 +378,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs index b6763aba..d17a66e0 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/NCRManagementEdit.aspx.cs @@ -201,7 +201,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive return; } - var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); + var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -327,7 +327,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); + var q = Funs.DB.Comprehensive_NCRManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.NCRManagementId != this.NCRManagementId || (this.NCRManagementId == null && x.NCRManagementId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs index 43613d57..ac9df4fe 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipe.aspx.cs @@ -315,20 +315,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs index 65d06056..6d75c0fe 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/PressurePipeEdit.aspx.cs @@ -164,7 +164,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); + var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -250,7 +250,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); + var q = Funs.DB.Comprehensive_PressurePipe.FirstOrDefault(x => x.Projctid == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.PressurePipeId != this.PressurePipeId || (this.PressurePipeId == null && x.PressurePipeId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs index 6cd67ae8..bd982a97 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccident.aspx.cs @@ -321,20 +321,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs index 7c08b396..350d6554 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/QualityAccidentEdit.aspx.cs @@ -152,7 +152,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { if (drpUnit.SelectedValue != BLL.Const._Null) { - var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); + var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -232,7 +232,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive { if (drpUnit.SelectedValue != BLL.Const._Null) { - var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); + var q = Funs.DB.Comprehensive_QualityAccident.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.QualityAccidentId != this.QualityAccidentId || (this.QualityAccidentId == null && x.QualityAccidentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs index 7ea4448c..890bd48b 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawings.aspx.cs @@ -372,20 +372,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs index f63213ef..78007deb 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/ReviewDrawingsEdit.aspx.cs @@ -212,7 +212,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); + var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -293,7 +293,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); + var q = Funs.DB.Comprehensive_ReviewDrawings.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.Id != this.Id || (this.Id == null && x.Id != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs index ac6399c2..54414dac 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagement.aspx.cs @@ -328,20 +328,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs index 35cdefa5..fe9f9d7c 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SiteVisaManagementEdit.aspx.cs @@ -174,7 +174,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); + var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -247,7 +247,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); + var q = Funs.DB.Comprehensive_SiteVisaManagement.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.VisaId != this.VisaId || (this.VisaId == null && x.VisaId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs index e44a11cf..e4337bb2 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipment.aspx.cs @@ -309,20 +309,10 @@ namespace FineUIPro.Web.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs index 4c14e70a..136ff62f 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/SpecialEquipmentEdit.aspx.cs @@ -169,7 +169,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); + var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); @@ -250,7 +250,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择所属单位!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); + var q = Funs.DB.Comprehensive_SpecialEquipment.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.SpecialEquipmentId != this.SpecialEquipmentId || (this.SpecialEquipmentId == null && x.SpecialEquipmentId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs index 173e9d12..82136871 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecords.aspx.cs @@ -250,20 +250,10 @@ namespace FineUIPro.Web.CQMS.Comprehensive cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs index 39e9e0dc..2d1c9f27 100644 --- a/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Comprehensive/TrainingRecordsEdit.aspx.cs @@ -69,7 +69,7 @@ namespace FineUIPro.Web.CQMS.Comprehensive Alert.ShowInTop("请选择专业!", MessageBoxIcon.Warning); return; } - var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null))); + var q = Funs.DB.Comprehensive_TrainingRecords.FirstOrDefault(x => x.ProjectId == this.CurrUser.LoginProjectId && x.RemarkCode == Funs.GetNewInt(this.txtRemarkCode.Text.Trim()) && (x.TrainingRecordsId != this.TrainingRecordsId || (this.TrainingRecordsId == null && x.TrainingRecordsId != null))); if (q != null) { Alert.ShowInTop("标志编号已存在!", MessageBoxIcon.Warning); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/CheckStatisc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/CheckStatisc.aspx.cs index 89ab0863..7b6003c0 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/CheckStatisc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/CheckStatisc.aspx.cs @@ -429,20 +429,10 @@ namespace FineUIPro.Web.CQMS.ManageReport cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs index 4bc3a73c..491a51d3 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/DesignChangeStatisc.aspx.cs @@ -225,20 +225,10 @@ namespace FineUIPro.Web.CQMS.ManageReport cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/HJGLStatisc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/HJGLStatisc.aspx.cs index a6cd63f5..efcad6d3 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/HJGLStatisc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/HJGLStatisc.aspx.cs @@ -177,20 +177,10 @@ namespace FineUIPro.Web.CQMS.ManageReport cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs index 53c5a5d6..60ca2d1f 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReport/NCRStatisc.aspx.cs @@ -194,20 +194,10 @@ namespace FineUIPro.Web.CQMS.ManageReport cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs index 588b9c69..eec67584 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReport.aspx.cs @@ -177,7 +177,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //序号 value = " " + value; } - + p.ParagraphFormat.Alignment = ParagraphAlignment.Center; p.AppendChild(new Run(doc, value)); @@ -231,8 +231,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew Document doc = new Aspose.Words.Document(newUrl); DocumentBuilder builder = new DocumentBuilder(doc); - - #region 头部静态列 //业主单位 var unitsYz = (from x in db.Base_Unit @@ -344,13 +342,12 @@ namespace FineUIPro.Web.CQMS.ManageReportNew 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)); - table.Rows.Insert(numberIndex, row); + table.Rows.Insert(numberIndex, row); numberIndex += 1; } //自动设置表格样式 table.AutoFit(AutoFitBehavior.FixedColumnWidths); - #endregion #region 本月主要工作内容 diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs index 8459a6b6..67bf69dc 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/MonthReportEdit.aspx.cs @@ -103,8 +103,8 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //加载所有专业 CNProfessionals = (from x in db.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId - //&& x.CNProfessionalId != BLL.Const.ComprehensiveId - orderby x.SortIndex + && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId + orderby x.SortIndex select new ProfessionalsClass { CNProfessionalId=x.CNProfessionalId, diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReport.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReport.aspx.cs index 82c1a59c..5a534372 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReport.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReport.aspx.cs @@ -178,6 +178,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew value = " " + value; } + p.ParagraphFormat.Alignment = ParagraphAlignment.Center; p.AppendChild(new Run(doc, value)); diff --git a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs index 0bbb6454..e9a5d952 100644 --- a/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ManageReportNew/WeekReportEdit.aspx.cs @@ -105,7 +105,7 @@ namespace FineUIPro.Web.CQMS.ManageReportNew //加载所有专业 CNProfessionals = (from x in db.Base_CNProfessional where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId - //&& x.CNProfessionalId != BLL.Const.ComprehensiveId + && x.CNProfessionalId != BLL.Const.CNProfessionalHSEId orderby x.SortIndex select new ProfessionalsClass { @@ -600,17 +600,6 @@ namespace FineUIPro.Web.CQMS.ManageReportNew int Quantity1Sum = 0; int Quantity2Sum = 0; - //加载所有专业 - //var CNProfessionals = from x in db.Base_CNProfessional - // where x.CNProfessionalId != BLL.Const.CNProfessionalConstructId - // && x.CNProfessionalId != BLL.Const.ComprehensiveId - // orderby x.SortIndex - // select new - // { - // x.CNProfessionalId, - // x.ProfessionalName - // }; - foreach (var item in CNProfessionals) { diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs index b11d0dba..20ded6c8 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/CheckManStatistics.aspx.cs @@ -46,7 +46,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// public void BindGvInspectionManagement() { - //List StatisticsList = new List(); + StatisticsList = new List(); Model.Base_Project project = BLL.ProjectService.GetProjectByProjectId(this.CurrUser.LoginProjectId); StartDate = Convert.ToDateTime(project.StartDate); EndDate = DateTime.Now; @@ -60,17 +60,40 @@ namespace FineUIPro.Web.CQMS.ProcessControl } //统计所给时间段的全部数量 List managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, string.Empty, StartDate, DateTime.Now, false); - List compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList(); - foreach (var item in compileMans) + var checkMans = managementListSunNumber.Select(x => x.AcceptanceCheckMan.Split(',').ToList()); + List compileMans = new List(); + foreach (var item in checkMans) { - Model.Sys_User user = BLL.UserService.GetUserByUserId(item); + string id = item.FirstOrDefault().Trim(); + compileMans.Add(id); + } + checkMans= managementListSunNumber.Select(x => x.AcceptanceCheckMan.Split('、').ToList()); + foreach (var item in checkMans) + { + string name = item.FirstOrDefault().Trim(); + compileMans.Add(name); + } + //List compileMans = managementListSunNumber.Select(x => x.CompileMan).Distinct().ToList(); + foreach (var item in compileMans.Distinct()) + { + Model.NCRStatisc Statistics = new Model.NCRStatisc(); + Model.Sys_User user = BLL.UserService.GetUserByUserId(item);//新数据保存的用户Id if (user != null) { - Model.NCRStatisc Statistics = new Model.NCRStatisc(); Statistics.WorkName = user.UserName; - Statistics.CheckNum = managementListSunNumber.Where(x => x.CompileMan == item).Count(); + Statistics.CheckNum = managementListSunNumber.Where(x => x.AcceptanceCheckMan == item).Count(); StatisticsList.Add(Statistics); } + else + { + Model.Sys_User u = BLL.UserService.GetUserByUserName(item);//老数据保存的姓名 + if (u!=null) + { + Statistics.WorkName = u.UserName; + Statistics.CheckNum = managementListSunNumber.Where(x => x.AcceptanceCheckMan == item).Count(); + StatisticsList.Add(Statistics); + } + } } Model.NCRStatisc StatisticsLast = new Model.NCRStatisc(); StatisticsLast.WorkName = "合计"; @@ -114,20 +137,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs index acf0782d..9ba330af 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/HotProessManage.aspx.cs @@ -287,20 +287,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs index a9d4f145..76a8d003 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagement.aspx.cs @@ -288,20 +288,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx index e41e3da7..12620a86 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx @@ -21,7 +21,8 @@ - + + diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs index dd91818a..e290e18e 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionManagementStatistics.aspx.cs @@ -3,10 +3,6 @@ using System; using System.Collections.Generic; using System.IO; using System.Linq; -using System.Text; -using System.Web; -using System.Web.UI; -using System.Web.UI.WebControls; namespace FineUIPro.Web.CQMS.ProcessControl { @@ -29,7 +25,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业 drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null)); } - else + else if(drpZhType.SelectedValue.Equals("2")) { BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商 drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位名称 -", BLL.Const._Null)); @@ -73,14 +69,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl //统计所给时间段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); } - else + else if (ZyType == "2") { //统计所给时间段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); //统计所给时间段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); } - + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); Statistics.SunNumber = managementListSunNumber.Count(); Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); @@ -108,13 +110,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true); } - else + else if (ZyType == "2") { //统计所给事件段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, false); //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NextDate, true); } + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NextDate); Statistics.SunNumber = managementListSunNumber.Count(); Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); @@ -142,7 +151,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); } - else + else if(ZyType=="2") { //统计所给事件段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); @@ -150,6 +159,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); } + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); @@ -178,13 +194,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); } - else + else if (ZyType == "2") { //统计所给事件段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); } + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate); Statistics.SunNumber = managementListSunNumber.Count(); Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); @@ -226,7 +249,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); } - else + else if(ZyType=="2") { //统计所给事件段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, false); @@ -234,6 +257,13 @@ namespace FineUIPro.Web.CQMS.ProcessControl managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, DateTime.Now, true); } + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", DateTime.Now); Statistics.SunNumber = managementListSunNumber.Count(); Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); @@ -260,12 +290,19 @@ namespace FineUIPro.Web.CQMS.ProcessControl //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); } - else + else if(ZyType=="2") { //统计所给事件段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, false); //统计所给事件段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, NewDate, true); } + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate += string.Format("{0:yyyy-MM-dd}", NewDate); Statistics.SunNumber = managementListSunNumber.Count(); Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); @@ -333,13 +370,20 @@ namespace FineUIPro.Web.CQMS.ProcessControl managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByCNProfessionalIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true); } - else + else if(ZyType=="2") { //统计所给时间段的全部数量 managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, false); //统计所给时间段的合格数量 managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByUnitIdAndDate(this.CurrUser.LoginProjectId, cNProfessionalId, StartDate, EndDate, true); } + else + { + //统计所给事件段的全部数量 + managementListSunNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, false); + //统计所给事件段的合格数量 + managementListOneNumber = BLL.InspectionManagementService.getInspectionManagementDetailListByDate(this.CurrUser.LoginProjectId, StartDate, NewDate, true); + } Statistics.CheckDate = string.Format("{0:yyyy-MM-dd}", StartDate) + " 至 " + string.Format("{0:yyyy-MM-dd}", EndDate); Statistics.SunNumber = managementListSunNumber.Count(); Statistics.OneStatisticsSunNumber = managementListOneNumber.Count(); @@ -515,7 +559,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessional, false);//专业 drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择专业 -", BLL.Const._Null)); } - else + else if(drpZhType.SelectedValue.Equals("2")) { BLL.UnitService.InitUnitDownList(this.drpCNProfessional, this.CurrUser.LoginProjectId, false);//施工分包商 drpCNProfessional.Items.Insert(0, new FineUIPro.ListItem("- 请选择单位 -", BLL.Const._Null)); diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx index 14cd79aa..ae285275 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx @@ -105,11 +105,13 @@ + - diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.cs index 421e60bf..a5c44d64 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.cs @@ -8,6 +8,7 @@ using System.Data.SqlClient; using System.IO; using System.Linq; using System.Text; +using System.Text.RegularExpressions; namespace FineUIPro.Web.CQMS.ProcessControl { @@ -185,7 +186,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl } //合格的情况下不允许修改 var model = Funs.DB.ProcessControl_InspectionManagement.FirstOrDefault(x => x.InspectionId == Grid1.SelectedRowID); - if (model.IsOnceQualified==true) + if (model.IsOnceQualified == true) { Alert.ShowInTop("该共检通知单已合格,不允许修改!", MessageBoxIcon.Warning); return; @@ -253,6 +254,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl { this.btnMenuDel.Hidden = false; } + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnMenuCopy.Hidden = false; + } } } #endregion @@ -311,20 +316,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); @@ -435,17 +430,17 @@ namespace FineUIPro.Web.CQMS.ProcessControl var units = (from x in db.Base_Unit join y in db.Project_ProjectUnit on x.UnitId equals y.UnitId - where y.ProjectId==this.CurrUser.LoginProjectId && y.UnitType== BLL.Const.ProjectUnitType_4 + where y.ProjectId == this.CurrUser.LoginProjectId && y.UnitType == BLL.Const.ProjectUnitType_4 orderby x.UnitName select x).FirstOrDefault(); - if (units!=null) + if (units != null) { bookmarkUnitName.Text = units.UnitName; } } var projectModel = db.Base_Project.Where(x => x.ProjectId == this.CurrUser.LoginProjectId).FirstOrDefault(); var inspectionModel = db.ProcessControl_InspectionManagement.Where(x => x.InspectionId == Id).FirstOrDefault(); - + //项目编号 Bookmark bookmarkProjectCode = doc.Range.Bookmarks["projectCode"]; if (bookmarkProjectCode != null) @@ -575,7 +570,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl builder.StartTable(); builder.CellFormat.Borders.LineStyle = Aspose.Words.LineStyle.Single; builder.CellFormat.Borders.Color = System.Drawing.Color.Black; - + builder.Bold = false; builder.RowFormat.Height = 20; builder.Font.Size = 10; @@ -591,7 +586,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl { builder.RowFormat.Height = 200 / ManagementDetaillList.Count; } - else { + else + { builder.RowFormat.Height = 20; } builder.CellFormat.Borders.Left.LineWidth = 1; @@ -602,7 +598,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl builder.CellFormat.Width = 156; builder.Write(ConvertControlPointType(item.ControlPointType)); builder.CellFormat.Borders.Left.LineWidth = 0; - // 控制点等级 + // 控制点等级 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; @@ -612,11 +608,12 @@ namespace FineUIPro.Web.CQMS.ProcessControl var ControlPointType = ConvertClass(item.ControlPointType); #region 控制点等级 - if (ControlPointType.Contains("A") ) + if (ControlPointType.Contains("A")) { builder.Write("■A "); } - else { + else + { builder.Write("□A "); } if (ControlPointType.Contains("B")) @@ -838,8 +835,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl builder.Write("注:如果业主有规定,执行业主的规定。 "); #endregion - - doc.Save(newUrl); + + doc.Save(newUrl); string fileName = Path.GetFileName(newUrl); FileInfo info = new FileInfo(newUrl); long fileSize = info.Length; @@ -860,7 +857,8 @@ namespace FineUIPro.Web.CQMS.ProcessControl } } - public class WorkBranchList { + public class WorkBranchList + { public string UnitWorkId { get; set; } public string Branch { get; set; } } @@ -974,9 +972,84 @@ namespace FineUIPro.Web.CQMS.ProcessControl uname = CarryUnitIds.ToString(); } return uname; - + } #endregion + #endregion + + /// + /// 复制 + /// + /// + /// + protected void btnMenuCopy_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length == 0) + { + Alert.ShowInTop("请至少选择一条记录", MessageBoxIcon.Warning); + return; + } + var inspection = BLL.InspectionManagementService.GetInspectionManagementById(this.Grid1.SelectedRowID); + if (inspection != null) + { + Model.ProcessControl_InspectionManagement newInspection = new Model.ProcessControl_InspectionManagement(); + newInspection.InspectionId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagement)); + newInspection.ProjectId = this.CurrUser.LoginProjectId; + newInspection.UnitId = inspection.UnitId; + newInspection.CNProfessionalId = inspection.CNProfessionalId; + newInspection.InspectionCode = inspection.InspectionCode; + newInspection.UnitWorkId = inspection.UnitWorkId; + newInspection.Branch = inspection.Branch; + newInspection.ControlPointType = inspection.ControlPointType; + newInspection.AcceptanceSite = inspection.AcceptanceSite; + newInspection.IsOnceQualified = inspection.IsOnceQualified; + newInspection.InspectionDate = inspection.InspectionDate; + newInspection.AttachUrl = inspection.AttachUrl; + newInspection.CheckDate = inspection.CheckDate; + newInspection.CheckMan = inspection.CheckMan; + newInspection.UnqualifiedReason = inspection.UnqualifiedReason; + + //通知单编号后有字母递增,无则加“a” + string fisrtE = inspection.NoticeCode.Substring(0,inspection.NoticeCode.Length - 1); + string lastE = inspection.NoticeCode.Substring(inspection.NoticeCode.Length - 1, 1); + bool b = Regex.IsMatch(lastE, "[a-zA-Z]"); + if (b) + { + int x = (int)Convert.ToByte(Convert.ToChar(lastE)); + newInspection.NoticeCode = fisrtE + Convert.ToChar(x + 1); + } + else + { + newInspection.NoticeCode = inspection.NoticeCode + "a"; + } + + newInspection.AcceptanceCheckMan = inspection.AcceptanceCheckMan; + newInspection.ParentDivisionProjectId = inspection.ParentDivisionProjectId; + newInspection.CompileMan = this.CurrUser.UserId; + newInspection.CompileDate = DateTime.Now; + newInspection.FileType = inspection.FileType; + newInspection.AttachUrl2 = inspection.AttachUrl2; + BLL.InspectionManagementService.AddInspectionManagement(newInspection); + + var details = InspectionManagementDetailService.GetInspectionDetails(inspection.InspectionId); + if (details.Count > 0) + { + foreach (var item in details) + { + Model.ProcessControl_InspectionManagementDetail newDetail = new Model.ProcessControl_InspectionManagementDetail(); + newDetail.InspectionDetailId = SQLHelper.GetNewID(typeof(Model.ProcessControl_InspectionManagementDetail)); + newDetail.InspectionId = newInspection.InspectionId; + newDetail.UnitWorkId = item.UnitWorkId; + newDetail.Branch = item.Branch; + newDetail.ControlPointType = item.ControlPointType; + newDetail.CreateDate = DateTime.Now; + BLL.InspectionManagementDetailService.AddInspectionDetail(newDetail); + } + } + ShowNotify("复制成功!"); + BindGrid(); + } + } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs index 9f1a0b58..6aa89952 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNotice.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.CQMS.ProcessControl -{ - - - public partial class InspectionNotice - { - +namespace FineUIPro.Web.CQMS.ProcessControl { + + + public partial class InspectionNotice { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// ToolSearch 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar ToolSearch; - + /// /// drpUnitWork 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpUnitWork; - + /// /// drpCNProfessional 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCNProfessional; - + /// /// txtStarTime 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtStarTime; - + /// /// Label1 控件。 /// @@ -94,7 +92,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Label Label1; - + /// /// txtEndTime 控件。 /// @@ -103,7 +101,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DatePicker txtEndTime; - + /// /// btnSearch 控件。 /// @@ -112,7 +110,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSearch; - + /// /// btnNew 控件。 /// @@ -121,7 +119,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnOut 控件。 /// @@ -130,7 +128,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnOut; - + /// /// lblPageIndex 控件。 /// @@ -139,7 +137,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label lblPageIndex; - + /// /// Label3 控件。 /// @@ -148,7 +146,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label Label3; - + /// /// lbtnFileUrl 控件。 /// @@ -157,7 +155,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.LinkButton lbtnFileUrl; - + /// /// ToolbarText1 控件。 /// @@ -166,7 +164,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -175,7 +173,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// Window1 控件。 /// @@ -184,7 +182,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Window Window1; - + /// /// Menu1 控件。 /// @@ -193,7 +191,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuModify 控件。 /// @@ -202,16 +200,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuModify; - - /// - /// btnPrinter 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.MenuButton btnPrinter; - + /// /// btnMenuDel 控件。 /// @@ -220,5 +209,23 @@ namespace FineUIPro.Web.CQMS.ProcessControl /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuDel; + + /// + /// btnPrinter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnPrinter; + + /// + /// btnMenuCopy 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuCopy; } } diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs index 7f16cf78..dbaec460 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/InspectionNoticeEdit.aspx.cs @@ -22,6 +22,7 @@ namespace FineUIPro.Web.CQMS.ProcessControl BLL.UnitService.InitUnitByProjectIdUnitTypeDropDownList(drpUnit, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, true);//施工分包商 BLL.CNProfessionalService.InitCNProfessionalDownList(this.drpCNProfessionalId, true);//专业 UserService.InitUserProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false); + //UserService.InitUserNameProjectIdUnitTypeDropDownList(this.drpAcceptanceCheckMan, this.CurrUser.LoginProjectId, string.Empty, false); this.hdInspectionNoticeId.Text = Request.Params["inspectionId"]; if (!string.IsNullOrEmpty(Request.Params["View"])) { diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest_New.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest_New.aspx.cs index 15f2fd7a..9bf5f2ac 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest_New.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/NondestructiveTest_New.aspx.cs @@ -272,20 +272,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.cs b/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.cs index ba811d35..08fa8539 100644 --- a/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/ProcessControl/TestPackageManagement.aspx.cs @@ -259,20 +259,10 @@ namespace FineUIPro.Web.CQMS.ProcessControl cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle.WrapText = true;//自动换行 var font = workbook.CreateFont(); font.FontHeightInPoints = 11; cellStyle.SetFont(font); - NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); - cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; - cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; - cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; - var font0 = workbook.CreateFont(); - font0.FontHeightInPoints = 12; - font0.IsBold = true; - cellStyle0.SetFont(font0); // 第二步:创建新数据行 NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); NPOI.SS.UserModel.IRow row = sheet.GetRow(0); diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/NCR统计模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/NCR统计模板.xls index 2b2ee259..ee483fc8 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/NCR统计模板.xls and b/SGGL/FineUIPro.Web/File/Excel/CQMS/NCR统计模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/共检通知单模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/共检通知单模板.xls index 09e863ef..8af57e88 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/共检通知单模板.xls and b/SGGL/FineUIPro.Web/File/Excel/CQMS/共检通知单模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测合格率统计模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测合格率统计模板.xls index 076a94ad..8939a178 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测合格率统计模板.xls and b/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测合格率统计模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测模板.xls index 394f8d82..e49cb770 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测模板.xls and b/SGGL/FineUIPro.Web/File/Excel/CQMS/控制点检查检测模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/现场检查情况模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/现场检查情况模板.xls index d5a7bd28..85906471 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/现场检查情况模板.xls and b/SGGL/FineUIPro.Web/File/Excel/CQMS/现场检查情况模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/CQMS/问题统计模板.xls b/SGGL/FineUIPro.Web/File/Excel/CQMS/问题统计模板.xls index bc520710..7f7d2ca0 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/CQMS/问题统计模板.xls and b/SGGL/FineUIPro.Web/File/Excel/CQMS/问题统计模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls index 0ffdc028..0110c6be 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/NCR管理导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls index ebd30f05..6bea5e18 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/人员报验导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls new file mode 100644 index 00000000..7d83766c Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/周进度计划导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls index ed68a7f4..7bb81f37 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/图纸收发记录导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls index 969e47a4..f861c908 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/培训记录导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/月度计划情况导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/月度计划情况导入模板.xls new file mode 100644 index 00000000..53b08121 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataIn/月度计划情况导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls index 57d5dc56..3ba4c985 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/机具报验导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls index fed59a1f..aeebee8b 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计交底管理导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计变更单导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计变更单导入模板.xls index c80f278d..28d9dc9d 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/设计变更单导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/设计变更单导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls index b8ab3ffe..da32b34d 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/资料收发文登记记录导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls b/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls index 8ca36be6..1731459b 100644 Binary files a/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls and b/SGGL/FineUIPro.Web/File/Excel/DataIn/超过一定规模的危大施工方案导入模板.xls differ diff --git a/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量周报.doc b/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量周报.doc index 97ea9d3e..6cfd48e9 100644 Binary files a/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量周报.doc and b/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量周报.doc differ diff --git a/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc b/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc index 5bb59508..bb2f0765 100644 Binary files a/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc and b/SGGL/FineUIPro.Web/File/Word/CQMS/项目质量月报.doc differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index d9baf44a..2849b8fd 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -1381,6 +1381,9 @@ + + + @@ -1402,6 +1405,8 @@ + + @@ -13767,6 +13772,27 @@ MonthPlan.aspx + + MonthPlanEdit.aspx + ASPXCodeBehind + + + MonthPlanEdit.aspx + + + MonthPlanIn.aspx + ASPXCodeBehind + + + MonthPlanIn.aspx + + + MonthPlanStatisc.aspx + ASPXCodeBehind + + + MonthPlanStatisc.aspx + PipelineCompletion.aspx ASPXCodeBehind @@ -13914,6 +13940,20 @@ UndergroundPipeCompletionIn.aspx + + WeekPlan.aspx + ASPXCodeBehind + + + WeekPlan.aspx + + + WeekPlanIn.aspx + ASPXCodeBehind + + + WeekPlanIn.aspx + EarnedValueCurve.aspx ASPXCodeBehind diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user index e687716b..6b113dbb 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj.user @@ -1,7 +1,7 @@  - Debug|Any CPU + Release|Any CPU true false diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx index 82708f7a..921a15fd 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx @@ -16,7 +16,7 @@ @@ -30,6 +30,8 @@ OnClick="btnSave_Click"> + + @@ -53,7 +55,7 @@ SortField="UnitName" FieldType="String" HeaderText="责任单位" TextAlign="center" HeaderTextAlign="Center"> - @@ -78,7 +80,7 @@ - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs index 86941399..594d2512 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.cs @@ -19,7 +19,7 @@ namespace FineUIPro.Web.JDGL.Check { GetButtonPower(); btnNew.OnClientClick = Window1.GetShowReference("MonthPlanEdit.aspx") + "return false;"; - this.txtMonths.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now); BindGrid(); } } @@ -51,6 +51,7 @@ namespace FineUIPro.Web.JDGL.Check protected void btnModify_Click(object sender, EventArgs e) { + Window1.Title = "录入"; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanEdit.aspx?Months={0}", this.txtMonths.Text, "编辑 - "))); } @@ -59,34 +60,9 @@ namespace FineUIPro.Web.JDGL.Check /// private void BindGrid() { - string strSql = @"select qc.MonthPlanId,(select PlanNum from JDGL_MonthPlan where QuantityListId=ql.QuantityListId and Months=@month) as PlanNum, - (select RealNum from JDGL_MonthPlan where QuantityListId=ql.QuantityListId and Months=@month) as RealNum, - (select NextNum from JDGL_MonthPlan where QuantityListId=ql.QuantityListId and Months=@month) as NextNum,ql.DesignNum,ql.Name,ql.Unit,ql.SortIndex, - CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalPlanNum, - CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) as TotalRealNum, - CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(qc.PlanNum, 0) WHEN 0 THEN 0 - - ELSE 100 * ISNULL(qc.RealNum, 0) / (1.0 * qc.PlanNum) END AS DECIMAL(9, 2))))) + '%' - - AS Rate, - CONVERT(NVARCHAR(10), ((CAST(CASE(select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) WHEN 0 THEN 0 - - ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * (select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month)) END AS DECIMAL(9, 2)))))+'%' - - AS TotalRate, - CONVERT(NVARCHAR(10), ((CAST(CASE ISNULL(ql.DesignNum, 0) WHEN 0 THEN 0 - - ELSE 100 * (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months <= @month) / (1.0 * ql.DesignNum) END AS DECIMAL(9, 2)))))+'%' - - AS SumRate, - CONVERT(FLOAT, (select sum(ISNULL(PlanNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalPlanNum, - CONVERT(FLOAT, (select sum(ISNULL(RealNum, 0)) from JDGL_MonthPlan where ProjectId = ql.ProjectId and QuantityListId = qc.QuantityListId and Months < qc.Months)) as LastTotalRealNum - from[dbo].JDGL_QuantityList ql - left join dbo.[JDGL_MonthPlan] qc on ql.QuantityListId=qc.QuantityListId -where qc.MonthPlanId=(select top 1 MonthPlanId from[JDGL_MonthPlan] q where q.QuantityListId=qc.QuantityListId and q.Months<=@month order by q.Months desc) and qc.ProjectId=@ProjectId order by ql.SortIndex, ql.Name"; - //string strSql = @"select * - // from dbo.View_JDGL_MonthPlan qc - // where qc.ProjectId=@ProjectId order by qc.SortIndex, qc.Name"; + string strSql = @"select mp.*,u.UnitName,us.UserName as DutyPersonName from [dbo].[JDGL_MonthPlan] mp +left join Base_Unit u on u.UnitId=mp.UnitId +left join Sys_User us on us.UserId=mp.DutyPerson where mp.ProjectId=@ProjectId and mp.Months=@month order by mp.SortIndex"; List listStr = new List(); listStr.Add(new SqlParameter("@ProjectId", this.CurrUser.LoginProjectId)); listStr.Add(new SqlParameter("@month", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtMonths.Text.Trim() + "-01")))); @@ -167,6 +143,7 @@ where qc.MonthPlanId=(select top 1 MonthPlanId from[JDGL_MonthPlan] q where q.Qu /// protected void btnImport_Click(object sender, EventArgs e) { + Window1.Title = "导入"; PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); } @@ -180,5 +157,18 @@ where qc.MonthPlanId=(select top 1 MonthPlanId from[JDGL_MonthPlan] q where q.Qu BindGrid(); } #endregion + + #region 统计 + /// + /// 统计分析 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + Window1.Title = "统计"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("MonthPlanStatisc.aspx", "统计 - "))); + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs index 48d93b0d..4f1d79dd 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlan.aspx.designer.cs @@ -75,6 +75,15 @@ namespace FineUIPro.Web.JDGL.Check { /// protected global::FineUIPro.Button btnSave; + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + /// /// btnNew 控件。 /// diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx new file mode 100644 index 00000000..33096eb3 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx @@ -0,0 +1,104 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthPlanEdit.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MonthPlanEdit" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx.cs new file mode 100644 index 00000000..e9d081c9 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx.cs @@ -0,0 +1,188 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class MonthPlanEdit : PageBase + { + /// + /// 项目id + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + DateTime months = Convert.ToDateTime(DateTime.Now.Year.ToString() + "-" + DateTime.Now.Month.ToString() + "-01"); + if (!string.IsNullOrEmpty(Request.Params["Months"])) + { + months = Convert.ToDateTime(Request.Params["Months"] + "-01"); + } + BLL.ProjectUnitService.InitUnitDropDownList2(drpUnitId, this.CurrUser.LoginProjectId, BLL.Const.ProjectUnitType_2, false); + UserService.Init(drpDutyPerson, CurrUser.LoginProjectId, false); + this.txtMonth.Text = string.Format("{0:yyyy-MM}", months); + BindGrid(); + } + } + + /// + /// 加载Grid + /// + private void BindGrid() + { + DateTime months = Convert.ToDateTime(this.txtMonth.Text + "-01"); + Model.SGGLDB db = Funs.DB; + Grid1.DataSource = from x in db.JDGL_MonthPlan + where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months + orderby x.SortIndex + select new + { + x.MonthPlanId, + x.ProjectId, + x.Months, + UnitId = db.Base_Unit.First(y => y.UnitId == x.UnitId).UnitName, + x.NodeContent, + x.PlanDate, + DutyPerson = db.Sys_User.First(y => y.UserId == x.DutyPerson).UserName, + x.RealDate, + x.Remark, + }; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtMonths_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtMonth.Text)) + { + ShowNotify("请选择月份!", MessageBoxIcon.Warning); + } + SaveData(true); + } + + private void SaveData(bool bl) + { + DateTime months = Convert.ToDateTime(this.txtMonth.Text + "-01"); + var list = GetDetails(); + var units = from x in Funs.DB.Base_Unit select x; + var users = from x in Funs.DB.Sys_User select x; + BLL.MonthPlanService.DeleteAllMonthPlan(this.CurrUser.LoginProjectId, months); + Model.SGGLDB db = Funs.DB; + int i = 1; + foreach (var item in list) + { + Model.JDGL_MonthPlan MonthPlan = new Model.JDGL_MonthPlan(); + MonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan)); + MonthPlan.ProjectId = this.CurrUser.LoginProjectId; + MonthPlan.Months = months; + var unit = units.FirstOrDefault(x => x.UnitName == item.UnitId); + if (unit != null) + { + MonthPlan.UnitId = unit.UnitId; + } + MonthPlan.NodeContent = item.NodeContent; + MonthPlan.PlanDate = item.PlanDate; + var user = users.FirstOrDefault(x => x.UserName == item.DutyPerson); + if (user != null) + { + MonthPlan.DutyPerson = user.UserId; + } + MonthPlan.RealDate = item.RealDate; + MonthPlan.Remark = item.Remark; + MonthPlan.CompileMan = this.CurrUser.UserId; + MonthPlan.CompileDate = DateTime.Now; + MonthPlan.SortIndex = i; + BLL.MonthPlanService.AddMonthPlan(MonthPlan); + i++; + } + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + + #region 增加按钮事件 + /// + /// 增加按钮事件 + /// + /// + /// + protected void btnNew_Click(object sender, EventArgs e) + { + var list = GetDetails(); + Model.JDGL_MonthPlan ql = new Model.JDGL_MonthPlan(); + ql.MonthPlanId = SQLHelper.GetNewID(); + list.Add(ql); + Grid1.DataSource = list; + Grid1.DataBind(); + } + private List GetDetails() + { + List list = new List(); + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + Model.JDGL_MonthPlan ql = new Model.JDGL_MonthPlan(); + ql.MonthPlanId = Grid1.Rows[i].RowID; + ql.UnitId = values.Value("UnitId"); + ql.NodeContent = values.Value("NodeContent"); + ql.PlanDate = Funs.GetNewDateTime(values.Value("PlanDate")); + ql.DutyPerson = values.Value("DutyPerson"); + ql.RealDate = Funs.GetNewDateTime(values.Value("RealDate")); + ql.Remark = values.Value("Remark"); + list.Add(ql); + } + return list; + } + #endregion + + #region 行点击事件 + /// + /// Grid行点击事件 + /// + /// + /// + protected void Grid1_RowCommand(object sender, GridCommandEventArgs e) + { + string monthPlanId = Grid1.DataKeys[e.RowIndex][0].ToString(); + var list = GetDetails(); + if (e.CommandName == "del")//删除 + { + var Report = list.FirstOrDefault(x => x.MonthPlanId == monthPlanId); + if (Report != null) + { + list.Remove(Report); + } + this.Grid1.DataSource = list; + this.Grid1.DataBind(); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx.designer.cs new file mode 100644 index 00000000..92339b8d --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanEdit.aspx.designer.cs @@ -0,0 +1,168 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class MonthPlanEdit { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel17 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel17; + + /// + /// Toolbar5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar5; + + /// + /// txtMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtMonth; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// Form15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form15; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar3; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// drpUnitId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpUnitId; + + /// + /// txtNodeContent 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtNodeContent; + + /// + /// txtPlanDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanDate; + + /// + /// drpDutyPerson 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpDutyPerson; + + /// + /// txtRealDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRealDate; + + /// + /// txtRemark 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtRemark; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx new file mode 100644 index 00000000..c0373daa --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx @@ -0,0 +1,105 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthPlanIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MonthPlanIn" %> + + + + + + 导入信息 + + + +
+ + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs new file mode 100644 index 00000000..2b868129 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.cs @@ -0,0 +1,615 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class MonthPlanIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List MonthPlans = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (MonthPlans != null) + { + MonthPlans.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (MonthPlans != null) + { + MonthPlans.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 6); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + Model.SGGLDB db = Funs.DB; + var projectUnits = from x in db.Project_ProjectUnit + join y in db.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.CurrUser.LoginProjectId + select new { x.UnitId, y.UnitName }; + var projectUsers = from x in db.Project_ProjectUser + join y in db.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + select new { x.UserId, y.UserName }; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (string.IsNullOrEmpty(col0)) + { + result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "此项为必填项!" + "|"; + } + else + { + var unit = projectUnits.FirstOrDefault(e => e.UnitName == col0); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "[" + col0 + "]不在项目单位中!" + "|"; + } + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (string.IsNullOrEmpty(col1)) + { + result += "第" + (i + 2).ToString() + "行," + "节点内容" + "," + "此项为必填项!" + "|"; + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (!string.IsNullOrEmpty(col2)) + { + try + { + DateTime dec = Convert.ToDateTime(col2); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "[" + col2 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (string.IsNullOrEmpty(col3)) + { + result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "此项为必填项!" + "|"; + } + else + { + var user = projectUsers.FirstOrDefault(e => e.UserName == col3); + if (user == null) + { + result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col3 + "]不在项目用户信息中!" + "|"; + } + } + + string col4 = pds.Rows[i][4].ToString().Trim(); + if (!string.IsNullOrEmpty(col4)) + { + try + { + DateTime dec = Convert.ToDateTime(col4); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "实际完成时间" + "," + "[" + col4 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 6); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + MonthPlans.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + Model.SGGLDB db = Funs.DB; + var projectUnits = from x in db.Project_ProjectUnit + join y in db.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.CurrUser.LoginProjectId select new { x.UnitId,y.UnitName}; + var projectUsers = from x in db.Project_ProjectUser + join y in db.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId select new { x.UserId,y.UserName}; + DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim()); + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.JDGL_MonthPlan MonthPlan = new Model.JDGL_MonthPlan(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + string col3 = pds.Rows[i][3].ToString().Trim(); + string col4 = pds.Rows[i][4].ToString().Trim(); + string col5 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(col0))//责任单位 + { + var projectUnit = projectUnits.FirstOrDefault(x=>x.UnitName==col0); + if (projectUnit != null) + { + MonthPlan.UnitId = projectUnit.UnitId; + } + } + if (!string.IsNullOrEmpty(col1))//节点内容 + { + MonthPlan.NodeContent = col1; + } + + if (!string.IsNullOrEmpty(col2))//计划完成时间 + { + MonthPlan.PlanDate = Funs.GetNewDateTime(col2); + + } + if (!string.IsNullOrEmpty(col3))//计划完成 + { + var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col3); + if (projectUser != null) + { + MonthPlan.DutyPerson = projectUser.UserId; + } + } + if (!string.IsNullOrEmpty(col4))//实际完成时间 + { + MonthPlan.RealDate = Funs.GetNewDateTime(col4); + } + if (!string.IsNullOrEmpty(col5))//备注 + { + MonthPlan.Remark = col5; + } + int num = (from x in Funs.DB.JDGL_MonthPlan where x.Months == month && x.ProjectId == this.CurrUser.LoginProjectId select x).Count(); + MonthPlan.SortIndex = num + 1; + MonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan)); + MonthPlans.Add(MonthPlan); + } + if (MonthPlans.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = MonthPlans; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtMonth.Text.Trim())) + { + ShowNotify("请选择月份!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + var monthPlanLists = from x in Funs.DB.JDGL_MonthPlan where x.ProjectId == this.ProjectId select x; + string quantityListId = string.Empty; + int a = MonthPlans.Count(); + DateTime month = Convert.ToDateTime(this.txtMonth.Text.Trim()); + for (int i = 0; i < a; i++) + { + var oldMonthPlan = monthPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.Months == month && x.UnitId == MonthPlans[i].UnitId && x.NodeContent== MonthPlans[i].NodeContent); + if (oldMonthPlan == null) + { + Model.JDGL_MonthPlan newMonthPlan = new Model.JDGL_MonthPlan(); + newMonthPlan.MonthPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_MonthPlan)); + newMonthPlan.ProjectId = this.ProjectId; + newMonthPlan.Months = month; + newMonthPlan.UnitId = MonthPlans[i].UnitId; + newMonthPlan.NodeContent = MonthPlans[i].NodeContent; + newMonthPlan.PlanDate = MonthPlans[i].PlanDate; + newMonthPlan.DutyPerson = MonthPlans[i].DutyPerson; + newMonthPlan.RealDate = MonthPlans[i].RealDate; + newMonthPlan.Remark = MonthPlans[i].Remark; + newMonthPlan.SortIndex= MonthPlans[i].SortIndex; + newMonthPlan.CompileMan = this.CurrUser.UserId; + newMonthPlan.CompileDate = DateTime.Now; + BLL.MonthPlanService.AddMonthPlan(newMonthPlan); + } + else + { + oldMonthPlan.NodeContent = MonthPlans[i].NodeContent; + oldMonthPlan.PlanDate = MonthPlans[i].PlanDate; + oldMonthPlan.DutyPerson = MonthPlans[i].DutyPerson; + oldMonthPlan.RealDate = MonthPlans[i].RealDate; + oldMonthPlan.Remark = MonthPlans[i].Remark; + BLL.MonthPlanService.UpdateMonthPlan(oldMonthPlan); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.MonthPlanTemplateUrl; + string filePath = Const.MonthPlanTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + + /// + /// + /// + /// + /// + protected string ConvertUnitName(object UnitId) + { + string name = string.Empty; + if (UnitId != null) + { + name = BLL.UnitService.GetUnitNameByUnitId(UnitId.ToString()); + } + return name; + } + + /// + /// + /// + /// + /// + protected string ConvertDutyPersonName(object DutyPerson) + { + string name = string.Empty; + if (DutyPerson != null) + { + name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString()); + } + return name; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.designer.cs new file mode 100644 index 00000000..5f589525 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanIn.aspx.designer.cs @@ -0,0 +1,159 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class MonthPlanIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtMonth 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtMonth; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx new file mode 100644 index 00000000..e2b41974 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx @@ -0,0 +1,83 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="MonthPlanStatisc.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.MonthPlanStatisc" %> + + + + + + + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs new file mode 100644 index 00000000..faf76327 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.cs @@ -0,0 +1,280 @@ +using System; +using System.Collections.Generic; +using System.IO; +using System.Linq; +using System.Text; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using BLL; +using AspNet = System.Web.UI.WebControls; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class MonthPlanStatisc : PageBase + { + private static List StatisticsList = new List(); + + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now); + BindStatisc(); + } + } + protected void btnSearch_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtMonths.Text.Trim())) + { + Alert.ShowInTop("月份不能为空!", MessageBoxIcon.Warning); + return; + } + BindStatisc(); + } + #region 绑定GridView + /// + /// 绑定 + /// + /// + public void BindStatisc() + { + DateTime months = Convert.ToDateTime(this.txtMonths.Text + "-01"); + StatisticsList = new List(); + int i = 1; + Model.SGGLDB db = Funs.DB; + //所有集合 + var totalList = from x in db.JDGL_MonthPlan where x.ProjectId == this.CurrUser.LoginProjectId && x.Months == months select x; + if (this.ckType.SelectedValue == "1") //按责任单位 + { + var pUnit = from x in db.Project_ProjectUnit + join y in db.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.CurrUser.LoginProjectId && x.UnitType == BLL.Const.ProjectUnitType_2 + orderby y.UnitCode + select y; + foreach (var item in pUnit) + { + //当期集合 + var list = totalList.Where(x => x.UnitId == item.UnitId); + Model.JDGL_MonthPlan JDGL_MonthPlan = new Model.JDGL_MonthPlan(); + JDGL_MonthPlan.NodeContent = item.UnitName; + int a = list.Count(); + int b = list.Count(x => x.RealDate.HasValue); + JDGL_MonthPlan.UnitId = a.ToString(); + JDGL_MonthPlan.DutyPerson = b.ToString(); + if (a != 0)//被除数不能为零 + { + JDGL_MonthPlan.Remark = Math.Round((double)b / (double)a * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + JDGL_MonthPlan.Remark = "0%"; + } + StatisticsList.Add(JDGL_MonthPlan); + i++; + } + } + else //按五环责任人 + { + var user = (from x in db.Sys_User + join y in db.JDGL_MonthPlan on x.UserId equals y.DutyPerson + where y.ProjectId == this.CurrUser.LoginProjectId + orderby x.UserId + select x).Distinct().ToList(); + foreach (var item in user) + { + //所有集合 + var list = totalList.Where(x => x.DutyPerson == item.UserId); + Model.JDGL_MonthPlan JDGL_MonthPlan = new Model.JDGL_MonthPlan(); + JDGL_MonthPlan.NodeContent = item.UserName; + int a = list.Count(); + int b = list.Count(x => x.RealDate.HasValue); + JDGL_MonthPlan.UnitId = a.ToString(); + JDGL_MonthPlan.DutyPerson = b.ToString(); + if (a != 0)//被除数不能为零 + { + JDGL_MonthPlan.Remark = Math.Round((double)b / (double)a * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + JDGL_MonthPlan.Remark = "0%"; + } + StatisticsList.Add(JDGL_MonthPlan); + i++; + } + } + if (StatisticsList.Count() > 0) //增加总计 + { + Model.JDGL_MonthPlan StatisticsLast = new Model.JDGL_MonthPlan(); + StatisticsLast.NodeContent = "合计"; + int a = totalList.Count(); + int b = totalList.Count(x => x.RealDate.HasValue); + StatisticsLast.UnitId = a.ToString(); + StatisticsLast.DutyPerson = b.ToString(); + if (a != 0)//被除数不能为零 + { + StatisticsLast.Remark = Math.Round((double)b / (double)a * 100, 2) + "%";//保留两位小数、后四舍五入 + } + else + { + StatisticsLast.Remark = "0%"; + } + StatisticsList.Add(StatisticsLast); + } + this.Grid1.DataSource = StatisticsList; + this.Grid1.DataBind(); + } + #endregion + protected void ckType_SelectedIndexChanged(object sender, EventArgs e) + { + if (this.ckType.SelectedValue == "1") + { + this.Grid1.Columns[1].HeaderText = "责任单位"; + } + else + { + this.Grid1.Columns[1].HeaderText = "五环责任人"; + } + BindStatisc(); + } + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + BindStatisc(); + } + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string rootPath = Server.MapPath("~/"); + //string initTemplatePath = Const.JDGL_MonthPlanTemlUrl; + //string uploadfilepath = string.Empty; + //string newUrl = string.Empty; + //uploadfilepath = rootPath + initTemplatePath; + + //if (StatisticsList != null) + //{ + // string projectName = BLL.ProjectService.GetShortNameByProjectId(this.CurrUser.LoginProjectId); + // newUrl = uploadfilepath.Replace("NCR统计模板", "NCR统计(" + projectName + DateTime.Now.ToString("yyyyMMdd") + ")"); + // File.Copy(uploadfilepath, newUrl); + // // 第一步:读取文件流 + // NPOI.SS.UserModel.IWorkbook workbook; + // using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + // { + // //workbook = new NPOI.XSSF.UserModel.XSSFWorkbook(stream); + // workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + // } + // // 创建单元格样式 + // NPOI.SS.UserModel.ICellStyle cellStyle = workbook.CreateCellStyle(); + // cellStyle.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + // cellStyle.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + // cellStyle.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + // cellStyle.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + // cellStyle.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + // cellStyle.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + // cellStyle.WrapText = true;//自动换行 + // var font = workbook.CreateFont(); + // font.FontHeightInPoints = 11; + // cellStyle.SetFont(font); + // // 第二步:创建新数据行 + // NPOI.SS.UserModel.ISheet sheet = workbook.GetSheetAt(0); + // NPOI.SS.UserModel.IRow row = sheet.GetRow(0); + // NPOI.SS.UserModel.ICell cell; + // int i = 2; + // foreach (var item in StatisticsList) + // { + // // 第二步:创建新数据行 + // row = sheet.CreateRow(i); + // // 添加数据 + // cell = row.CreateCell(0); + // cell.CellStyle = cellStyle; + // cell.SetCellValue(item.WorkName);//工作名称 + + // cell = row.CreateCell(1); + // cell.CellStyle = cellStyle; + // cell.SetCellValue(item.CheckNum); + + // cell = row.CreateCell(2); + // cell.CellStyle = cellStyle; + // cell.SetCellValue(item.OKNum); + + // cell = row.CreateCell(3); + // cell.CellStyle = cellStyle; + // cell.SetCellValue(item.NotOKNum); + + // cell = row.CreateCell(4); + // cell.CellStyle = cellStyle; + // cell.SetCellValue(item.OKRate); + + // cell = row.CreateCell(5); + // cell.CellStyle = cellStyle; + // cell.SetCellValue(item.Remark); + // i++; + // } + // // 第三步:写入文件流 + // using (FileStream stream = new FileStream(newUrl, FileMode.Create, FileAccess.Write)) + // { + // workbook.Write(stream); + // workbook.Close(); + // } + // string fileName = Path.GetFileName(newUrl); + // FileInfo info = new FileInfo(newUrl); + // long fileSize = info.Length; + // Response.Clear(); + // Response.ContentType = "application/x-zip-compressed"; + // Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + // Response.AddHeader("Content-Length", fileSize.ToString()); + // Response.TransmitFile(newUrl, 0, fileSize); + // Response.Flush(); + // Response.Close(); + // File.Delete(newUrl); + //} + //else + //{ + // Alert.ShowInTop("当前无记录,无法导出!", MessageBoxIcon.Warning); + //} + } + + /// + /// 导出方法 + /// + /// + /// + //private string GetGridTableHtml(Grid grid) + //{ + // StringBuilder sb = new StringBuilder(); + // sb.Append(""); + // sb.Append(""); + // sb.Append(""); + // grid.PageSize = 10000; + // BindStatisc(); + // foreach (GridColumn column in grid.Columns) + // { + // sb.AppendFormat("", column.HeaderText); + // } + // sb.Append(""); + // foreach (GridRow row in grid.Rows) + // { + // sb.Append(""); + // foreach (GridColumn column in grid.Columns) + // { + // string html = row.Values[column.ColumnIndex].ToString(); + // if (column.ColumnID == "tfNumber") + // { + // html = (row.FindControl("labNumber") as AspNet.Label).Text; + // } + // sb.AppendFormat("", html); + // } + + // sb.Append(""); + // } + + // sb.Append("
{0}
{0}
"); + + // return sb.ToString(); + //} + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.designer.cs new file mode 100644 index 00000000..92ad596d --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/MonthPlanStatisc.aspx.designer.cs @@ -0,0 +1,132 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class MonthPlanStatisc { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtMonths 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtMonths; + + /// + /// ckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.RadioButtonList ckType; + + /// + /// btnSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs index 95013fdc..2aed0b93 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletion.aspx.cs @@ -19,7 +19,7 @@ namespace FineUIPro.Web.JDGL.Check { GetButtonPower(); btnNew.OnClientClick = Window1.GetShowReference("QuantityCompletionEdit.aspx") + "return false;"; - this.txtMonths.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.txtMonths.Text = string.Format("{0:yyyy-MM}", DateTime.Now); BindGrid(); } } diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionEdit.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionEdit.aspx index c37ac7fd..dc35fa11 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionEdit.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionEdit.aspx @@ -95,61 +95,6 @@ - <%-- - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - --%> diff --git a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx index 0b91d671..a733a780 100644 --- a/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx +++ b/SGGL/FineUIPro.Web/JDGL/Check/QuantityCompletionIn.aspx @@ -15,7 +15,7 @@ - diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx new file mode 100644 index 00000000..3d59cd90 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx @@ -0,0 +1,114 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlan.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlan" %> + + + + + + 周进度计划 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs new file mode 100644 index 00000000..2484cb80 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.cs @@ -0,0 +1,177 @@ +using System; +using System.Collections.Generic; +using System.Linq; +using System.Web; +using System.Web.UI; +using System.Web.UI.WebControls; +using System.Data; +using System.Data.SqlClient; +using BLL; +using Newtonsoft.Json.Linq; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class WeekPlan : PageBase + { + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + GetButtonPower(); + btnNew.OnClientClick = Window1.GetShowReference("WeekPlanEdit.aspx") + "return false;"; + this.txtWeeks.Text = string.Format("{0:yyyy-MM}", DateTime.Now); + BindGrid(); + } + } + + #region 获取按钮权限 + /// + /// 获取按钮权限 + /// + /// + /// + private void GetButtonPower() + { + if (Request.Params["value"] == BLL.Const._Null) + { + return; + } + var buttonList = BLL.CommonService.GetAllButtonList(this.CurrUser.LoginProjectId, this.CurrUser.UserId, BLL.Const.WeekPlanMenuId); + if (buttonList.Count() > 0) + { + if (buttonList.Contains(BLL.Const.BtnSave)) + { + this.btnNew.Hidden = false; + this.btnModify.Hidden = false; + this.btnMenuDel.Hidden = false; + } + } + } + #endregion + + protected void btnModify_Click(object sender, EventArgs e) + { + Window1.Title = "录入"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanEdit.aspx?Weeks={0}", this.txtWeeks.Text, "编辑 - "))); + } + + /// + /// 加载Grid + /// + private void BindGrid() + { + string strSql = @"select mp.*,u.UnitName,us.UserName as DutyPersonName,uw.UnitWorkName,cn.ProfessionalName,case mp.IsOK when 1 then '已完成' when 0 then '未完成' else '' end as IsOKStr from [dbo].[JDGL_WeekPlan] mp +left join Base_Unit u on u.UnitId=mp.UnitId +left join Sys_User us on us.UserId=mp.DutyPerson +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.CurrUser.LoginProjectId)); + listStr.Add(new SqlParameter("@WeekNo", string.Format("{0:yyyy-MM-dd}", Convert.ToDateTime(this.txtWeeks.Text.Trim() + "-01")))); + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + Grid1.RecordCount = tb.Rows.Count; + //tb = GetFilteredTable(Grid1.FilteredData, tb); + var table = this.GetPagedDataTable(Grid1, tb); + Grid1.DataSource = table; + Grid1.DataBind(); + } + + #region 月份选择事件 + /// + /// 月份选择事件 + /// + /// + /// + protected void txtWeeks_TextChanged(object sender, EventArgs e) + { + BindGrid(); + } + #endregion + + #region 保存按钮 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (this.Grid1.Rows.Count > 0) + { + JArray mergedData = Grid1.GetMergedData(); + foreach (JObject mergedRow in mergedData) + { + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + Model.JDGL_WeekPlan WeekPlan = BLL.WeekPlanService.GetWeekPlanById(this.Grid1.Rows[i].RowID); + if (WeekPlan != null) + { + WeekPlan.CompileMan = this.CurrUser.UserId; + WeekPlan.CompileDate = DateTime.Now; + BLL.WeekPlanService.UpdateWeekPlan(WeekPlan); + } + } + Alert.ShowInTop("保存成功!", MessageBoxIcon.Success); + } + else + { + Alert.ShowInTop("请至少选择一条记录!", MessageBoxIcon.Warning); + return; + } + } + #endregion + + protected void btnMenuDel_Click(object sender, EventArgs e) + { + if (Grid1.SelectedRowIndexArray.Length > 0) + { + foreach (int rowIndex in Grid1.SelectedRowIndexArray) + { + string rowID = Grid1.DataKeys[rowIndex][0].ToString(); + BLL.WeekPlanService.DeleteWeekPlanByWeekPlanId(rowID); + } + + BindGrid(); + ShowNotify("删除数据成功!", MessageBoxIcon.Success); + } + } + + #region 导入 + /// + /// 导入按钮 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + Window1.Title = "导入"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanIn.aspx?ProjectId={0}", this.CurrUser.LoginProjectId, "导入 - "))); + } + + /// + /// 关闭导入弹出窗口 + /// + /// + /// + protected void Window1_Close(object sender, WindowCloseEventArgs e) + { + BindGrid(); + } + #endregion + + #region 统计 + /// + /// 统计分析 + /// + /// + /// + protected void BtnAnalyse_Click(object sender, EventArgs e) + { + Window1.Title = "统计"; + PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("WeekPlanStatisc.aspx", "统计 - "))); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs new file mode 100644 index 00000000..3e7ac331 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlan.aspx.designer.cs @@ -0,0 +1,150 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class WeekPlan { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// txtWeeks 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtWeeks; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// BtnAnalyse 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button BtnAnalyse; + + /// + /// btnNew 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnNew; + + /// + /// btnModify 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnModify; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// lblPageIndex 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lblPageIndex; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + + /// + /// btnMenuDel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.MenuButton btnMenuDel; + } +} diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx new file mode 100644 index 00000000..d13ca509 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx @@ -0,0 +1,125 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WeekPlanIn.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.WeekPlanIn" %> + + + + + + 导入信息 + + + +
+ + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- + + + + + --%> + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs new file mode 100644 index 00000000..fbaf8fb4 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.cs @@ -0,0 +1,735 @@ +using BLL; +using System; +using System.Collections.Generic; +using System.Data; +using System.Data.OleDb; +using System.IO; +using System.Linq; +using System.Web.UI; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class WeekPlanIn : PageBase + { + #region 定义变量 + /// + /// 上传预设的虚拟路径 + /// + private string initPath = Const.ExcelUrl; + + /// + /// 人员集合 + /// + public static List WeekPlans = new List(); + + /// + /// 错误集合 + /// + public static string errorInfos = string.Empty; + + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + #endregion + + #region 加载页面 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.hdFileName.Text = string.Empty; + this.hdCheckResult.Text = string.Empty; + if (WeekPlans != null) + { + WeekPlans.Clear(); + } + errorInfos = string.Empty; + this.ProjectId = Request.Params["ProjectId"]; + } + } + #endregion + + #region 审核 + /// + /// 审核 + /// + /// + /// + protected void btnAudit_Click(object sender, EventArgs e) + { + try + { + if (this.fuAttachUrl.HasFile == false) + { + ShowNotify("请您选择Excel文件!", MessageBoxIcon.Warning); + return; + } + string IsXls = Path.GetExtension(this.fuAttachUrl.FileName).ToString().Trim().ToLower(); + if (IsXls != ".xls") + { + ShowNotify("只可以选择Excel文件!", MessageBoxIcon.Warning); + return; + } + if (WeekPlans != null) + { + WeekPlans.Clear(); + } + if (!string.IsNullOrEmpty(errorInfos)) + { + errorInfos = string.Empty; + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + if (!Directory.Exists(initFullPath)) + { + Directory.CreateDirectory(initFullPath); + } + + this.hdFileName.Text = BLL.Funs.GetNewFileName() + IsXls; + string filePath = initFullPath + this.hdFileName.Text; + this.fuAttachUrl.PostedFile.SaveAs(filePath); + //PageContext.RegisterStartupScript(Window1.GetShowReference(String.Format("PersonDataAudit.aspx?FileName={0}&ProjectId={1}", this.hdFileName.Text, Request.Params["ProjectId"], "审核 - "))); + ImportXlsToData(rootPath + initPath + this.hdFileName.Text); + } + catch (Exception ex) + { + ShowNotify("'" + ex.Message + "'", MessageBoxIcon.Warning); + } + } + + #region 读Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL(ds.Tables[0], 8); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集行数 + /// + private bool AddDatasetToSQL(DataTable pds, int Cols) + { + string result = string.Empty; + int ic, ir; + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "行", MessageBoxIcon.Warning); + } + ir = pds.Rows.Count; + Model.SGGLDB db = Funs.DB; + var projectUnits = from x in db.Project_ProjectUnit + join y in db.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.CurrUser.LoginProjectId + select new { x.UnitId, y.UnitName }; + 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; + var projectUsers = from x in db.Project_ProjectUser + join y in db.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + select new { x.UserId, y.UserName }; + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + string col0 = pds.Rows[i][0].ToString().Trim(); + if (string.IsNullOrEmpty(col0)) + { + result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "此项为必填项!" + "|"; + } + else + { + var unitWork = unitWorks.FirstOrDefault(e => e.UnitWorkName == col0); + if (unitWork == null) + { + result += "第" + (i + 2).ToString() + "行," + "工序/单位工程" + "," + "[" + col0 + "]不在项目单位工程中!" + "|"; + } + } + + string col1 = pds.Rows[i][1].ToString().Trim(); + if (string.IsNullOrEmpty(col1)) + { + result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "此项为必填项!" + "|"; + } + else + { + var cn = cns.FirstOrDefault(e => e.ProfessionalName == col1); + if (cn == null) + { + result += "第" + (i + 2).ToString() + "行," + "专业" + "," + "[" + col1 + "]不在专业信息中!" + "|"; + } + } + + string col2 = pds.Rows[i][2].ToString().Trim(); + if (string.IsNullOrEmpty(col2)) + { + result += "第" + (i + 2).ToString() + "行," + "工作项" + "," + "此项为必填项!" + "|"; + } + + string col3 = pds.Rows[i][3].ToString().Trim(); + if (string.IsNullOrEmpty(col3)) + { + result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "此项为必填项!" + "|"; + } + else + { + var unit = projectUnits.FirstOrDefault(e => e.UnitName == col3); + if (unit == null) + { + result += "第" + (i + 2).ToString() + "行," + "责任单位" + "," + "[" + col3 + "]不在项目单位中!" + "|"; + } + } + + string col4 = pds.Rows[i][4].ToString().Trim(); + if (string.IsNullOrEmpty(col4)) + { + result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "此项为必填项!" + "|"; + } + else + { + var user = projectUsers.FirstOrDefault(e => e.UserName == col4); + if (user == null) + { + result += "第" + (i + 2).ToString() + "行," + "五环责任人" + "," + "[" + col4 + "]不在项目用户信息中!" + "|"; + } + } + + string col5 = pds.Rows[i][5].ToString().Trim(); + if (!string.IsNullOrEmpty(col5)) + { + try + { + DateTime dec = Convert.ToDateTime(col5); + } + catch (Exception) + { + result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "[" + col5 + "]错误!" + "|"; + } + } + else + { + result += "第" + (i + 2).ToString() + "行," + "计划完成时间" + "," + "此项为必填项!" + "|"; + } + + string col6 = pds.Rows[i][6].ToString().Trim(); + if (!string.IsNullOrEmpty(col6)) + { + if (col6 != "已完成" && col6 != "未完成") + { + result += "第" + (i + 2).ToString() + "行," + "完成状态" + "," + "[" + col6 + "]错误!" + "|"; + } + } + } + if (!string.IsNullOrEmpty(result)) + { + result = result.Substring(0, result.LastIndexOf("|")); + errorInfos = result; + Alert alert = new Alert + { + Message = result, + Target = Target.Self + }; + alert.Show(); + + + } + else + { + errorInfos = string.Empty; + ShowNotify("审核完成,请点击导入!", MessageBoxIcon.Success); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 导入 + /// + /// 导入 + /// + /// + /// + protected void btnImport_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(errorInfos)) + { + if (!string.IsNullOrEmpty(this.hdFileName.Text)) + { + string rootPath = Server.MapPath("~/"); + ImportXlsToData2(rootPath + initPath + this.hdFileName.Text); + } + else + { + ShowNotify("请先审核要导入的文件!", MessageBoxIcon.Warning); + } + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + + #region Excel提取数据 + /// + /// 从Excel提取数据--》Dataset + /// + /// Excel文件路径名 + private void ImportXlsToData2(string fileName) + { + try + { + string oleDBConnString = String.Empty; + oleDBConnString = "Provider=Microsoft.Jet.OLEDB.4.0;"; + oleDBConnString += "Data Source="; + oleDBConnString += fileName; + oleDBConnString += ";Extended Properties=Excel 8.0;"; + OleDbConnection oleDBConn = null; + OleDbDataAdapter oleAdMaster = null; + DataTable m_tableName = new DataTable(); + DataSet ds = new DataSet(); + + oleDBConn = new OleDbConnection(oleDBConnString); + oleDBConn.Open(); + m_tableName = oleDBConn.GetOleDbSchemaTable(OleDbSchemaGuid.Tables, null); + + if (m_tableName != null && m_tableName.Rows.Count > 0) + { + + m_tableName.TableName = m_tableName.Rows[0]["TABLE_NAME"].ToString().Trim(); + + } + string sqlMaster; + sqlMaster = " SELECT * FROM [" + m_tableName.TableName + "]"; + oleAdMaster = new OleDbDataAdapter(sqlMaster, oleDBConn); + oleAdMaster.Fill(ds, "m_tableName"); + oleAdMaster.Dispose(); + oleDBConn.Close(); + oleDBConn.Dispose(); + + AddDatasetToSQL2(ds.Tables[0], 8); + } + catch (Exception ex) + { + throw ex; + } + } + #endregion + + #region 将Dataset的数据导入数据库 + /// + /// 将Dataset的数据导入数据库 + /// + /// 数据集 + /// 数据集列数 + /// + private bool AddDatasetToSQL2(DataTable pds, int Cols) + { + int ic, ir; + WeekPlans.Clear(); + ic = pds.Columns.Count; + if (ic < Cols) + { + Alert.ShowInTop("导入Excel格式错误!Excel只有" + ic.ToString().Trim() + "列", MessageBoxIcon.Warning); + } + + ir = pds.Rows.Count; + Model.SGGLDB db = Funs.DB; + var projectUnits = from x in db.Project_ProjectUnit + join y in db.Base_Unit on x.UnitId equals y.UnitId + where x.ProjectId == this.CurrUser.LoginProjectId + select new { x.UnitId, y.UnitName }; + var projectUsers = from x in db.Project_ProjectUser + join y in db.Sys_User on x.UserId equals y.UserId + where x.ProjectId == this.CurrUser.LoginProjectId + 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(); + DateTime startDate = Convert.ToDateTime(this.txtStartDate.Text.Trim()); + DateTime endDate = Convert.ToDateTime(this.txtEndDate.Text.Trim()); + if (pds != null && ir > 0) + { + for (int i = 0; i < ir; i++) + { + Model.JDGL_WeekPlan WeekPlan = new Model.JDGL_WeekPlan(); + string col0 = pds.Rows[i][0].ToString().Trim(); + string col1 = pds.Rows[i][1].ToString().Trim(); + string col2 = pds.Rows[i][2].ToString().Trim(); + string col3 = pds.Rows[i][3].ToString().Trim(); + string col4 = pds.Rows[i][4].ToString().Trim(); + string col5 = pds.Rows[i][5].ToString().Trim(); + string col6 = pds.Rows[i][6].ToString().Trim(); + string col7 = pds.Rows[i][7].ToString().Trim(); + WeekPlan.WeekNo = weekNo; + WeekPlan.StartDate = startDate; + WeekPlan.EndDate = endDate; + if (!string.IsNullOrEmpty(col0))//单位工程 + { + var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkName == col0); + if (unitWork != null) + { + WeekPlan.UnitWork = unitWork.UnitWorkId; + } + } + if (!string.IsNullOrEmpty(col1))//专业 + { + var cn = cns.FirstOrDefault(x => x.ProfessionalName == col1); + if (cn != null) + { + WeekPlan.Major = cn.CNProfessionalId; + } + } + if (!string.IsNullOrEmpty(col2))//工作项 + { + WeekPlan.WorkContent = col2; + } + if (!string.IsNullOrEmpty(col3))//责任单位 + { + var projectUnit = projectUnits.FirstOrDefault(x => x.UnitName == col3); + if (projectUnit != null) + { + WeekPlan.UnitId = projectUnit.UnitId; + } + } + if (!string.IsNullOrEmpty(col4))//五环责任人 + { + var projectUser = projectUsers.FirstOrDefault(x => x.UserName == col4); + if (projectUser != null) + { + WeekPlan.DutyPerson = projectUser.UserId; + } + } + if (!string.IsNullOrEmpty(col5))//计划完成时间 + { + WeekPlan.PlanDate = Funs.GetNewDateTime(col5); + + } + if (!string.IsNullOrEmpty(col6))//完成状态 + { + WeekPlan.IsOK = col6 == "已完成" ? true : false; + } + if (!string.IsNullOrEmpty(col7))//备注 + { + WeekPlan.Remark = col7; + } + int num = (from x in Funs.DB.JDGL_WeekPlan where x.WeekNo == weekNo && x.ProjectId == this.CurrUser.LoginProjectId select x).Count(); + WeekPlan.SortIndex = num + 1; + WeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan)); + WeekPlans.Add(WeekPlan); + } + if (WeekPlans.Count > 0) + { + this.Grid1.Hidden = false; + this.Grid1.DataSource = WeekPlans; + this.Grid1.DataBind(); + } + } + else + { + ShowNotify("导入数据为空!", MessageBoxIcon.Warning); + } + return true; + } + #endregion + #endregion + + #region 保存 + /// + /// 保存 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (string.IsNullOrEmpty(this.txtWeekNo.Text.Trim())) + { + ShowNotify("请选择周号!", MessageBoxIcon.Warning); + return; + } + if (string.IsNullOrEmpty(errorInfos)) + { + 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(); + + for (int i = 0; i < a; i++) + { + var oldWeekPlan = WeekPlanLists.FirstOrDefault(x => x.ProjectId == this.ProjectId && x.WeekNo == weekNo && x.UnitId == WeekPlans[i].UnitId && x.WorkContent == WeekPlans[i].WorkContent); + if (oldWeekPlan == null) + { + Model.JDGL_WeekPlan newWeekPlan = new Model.JDGL_WeekPlan(); + newWeekPlan.WeekPlanId = SQLHelper.GetNewID(typeof(Model.JDGL_WeekPlan)); + newWeekPlan.ProjectId = this.ProjectId; + newWeekPlan.WeekNo = weekNo; + newWeekPlan.StartDate= WeekPlans[i].StartDate; + newWeekPlan.EndDate = WeekPlans[i].EndDate; + newWeekPlan.UnitWork = WeekPlans[i].UnitWork; + newWeekPlan.Major = WeekPlans[i].Major; + newWeekPlan.WorkContent = WeekPlans[i].WorkContent; + newWeekPlan.UnitId = WeekPlans[i].UnitId; + newWeekPlan.DutyPerson = WeekPlans[i].DutyPerson; + newWeekPlan.PlanDate = WeekPlans[i].PlanDate; + newWeekPlan.IsOK = WeekPlans[i].IsOK; + newWeekPlan.Remark = WeekPlans[i].Remark; + newWeekPlan.SortIndex = WeekPlans[i].SortIndex; + newWeekPlan.CompileMan = this.CurrUser.UserId; + newWeekPlan.CompileDate = DateTime.Now; + BLL.WeekPlanService.AddWeekPlan(newWeekPlan); + } + else + { + oldWeekPlan.UnitWork = WeekPlans[i].UnitWork; + oldWeekPlan.Major = WeekPlans[i].Major; + oldWeekPlan.WorkContent = WeekPlans[i].WorkContent; + oldWeekPlan.UnitId = WeekPlans[i].UnitId; + oldWeekPlan.DutyPerson = WeekPlans[i].DutyPerson; + oldWeekPlan.PlanDate = WeekPlans[i].PlanDate; + oldWeekPlan.IsOK = WeekPlans[i].IsOK; + oldWeekPlan.Remark = WeekPlans[i].Remark; + BLL.WeekPlanService.UpdateWeekPlan(oldWeekPlan); + } + } + string rootPath = Server.MapPath("~/"); + string initFullPath = rootPath + initPath; + string filePath = initFullPath + this.hdFileName.Text; + if (filePath != string.Empty && System.IO.File.Exists(filePath)) + { + System.IO.File.Delete(filePath);//删除上传的XLS文件 + } + ShowNotify("导入成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHidePostBackReference()); + } + else + { + Alert.ShowInTop("请先将错误数据修正,再重新导入保存!", MessageBoxIcon.Warning); + } + } + #endregion + + #region 导出错误提示 + /// + /// 导出错误提示 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + //string strFileName = DateTime.Now.ToString("yyyyMMdd-hhmmss"); + //System.Web.HttpContext HC = System.Web.HttpContext.Current; + //HC.Response.Clear(); + //HC.Response.Buffer = true; + //HC.Response.ContentEncoding = System.Text.Encoding.UTF8;//设置输出流为简体中文 + + ////---导出为Excel文件 + //HC.Response.AddHeader("Content-Disposition", "attachment;filename=" + HttpUtility.UrlEncode(strFileName, System.Text.Encoding.UTF8) + ".xls"); + //HC.Response.ContentType = "application/ms-excel";//设置输出文件类型为excel文件。 + + //System.IO.StringWriter sw = new System.IO.StringWriter(); + //System.Web.UI.HtmlTextWriter htw = new System.Web.UI.HtmlTextWriter(sw); + //this.gvErrorInfo.RenderControl(htw); + //HC.Response.Write(sw.ToString()); + //HC.Response.End(); + } + + /// + /// 重载VerifyRenderingInServerForm方法,否则运行的时候会出现如下错误提示:“类型“GridView”的控件“GridView1”必须放在具有 runat=server 的窗体标记内” + /// + /// + public override void VerifyRenderingInServerForm(Control control) + { + } + #endregion + + #region 下载模板 + /// + /// 下载模板按钮 + /// + /// + /// + protected void btnDownLoad_Click(object sender, EventArgs e) + { + PageContext.RegisterStartupScript(Confirm.GetShowReference("确定下载导入模板吗?", String.Empty, MessageBoxIcon.Question, PageManager1.GetCustomEventReference(false, "Confirm_OK"), PageManager1.GetCustomEventReference("Confirm_Cancel"))); + } + + /// + /// 下载导入模板 + /// + /// + /// + protected void PageManager1_CustomEvent(object sender, CustomEventArgs e) + { + if (e.EventArgument == "Confirm_OK") + { + string rootPath = Server.MapPath("~/"); + string uploadfilepath = rootPath + Const.WeekPlanTemplateUrl; + string filePath = Const.WeekPlanTemplateUrl; + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(uploadfilepath); + long fileSize = info.Length; + Response.ClearContent(); + Response.AddHeader("Content-Disposition", "attachment;filename=" + System.Web.HttpUtility.UrlEncode(fileName, System.Text.Encoding.UTF8)); + Response.ContentType = "excel/plain"; + Response.ContentEncoding = System.Text.Encoding.UTF8; + Response.AddHeader("Content-Length", fileSize.ToString().Trim()); + Response.TransmitFile(uploadfilepath, 0, fileSize); + Response.End(); + } + } + #endregion + + /// + /// + /// + /// + /// + protected string ConvertUnitName(object UnitId) + { + string name = string.Empty; + if (UnitId != null) + { + name = BLL.UnitService.GetUnitNameByUnitId(UnitId.ToString()); + } + return name; + } + + /// + /// + /// + /// + /// + protected string ConvertDutyPersonName(object DutyPerson) + { + string name = string.Empty; + if (DutyPerson != null) + { + name = BLL.UserService.GetUserNameByUserId(DutyPerson.ToString()); + } + return name; + } + + /// + /// + /// + /// + /// + protected string ConvertUnitWorkName(object UnitWork) + { + string name = string.Empty; + if (UnitWork != null) + { + Model.WBS_UnitWork uw = BLL.UnitWorkService.GetUnitWorkByUnitWorkId(UnitWork.ToString()); + if (uw != null) + { + name = uw.UnitWorkName; + } + } + return name; + } + + /// + /// + /// + /// + /// + protected string ConvertProfessionalName(object Major) + { + string name = string.Empty; + if (Major != null) + { + Model.Base_CNProfessional major = BLL.CNProfessionalService.GetCNProfessional(Major.ToString()); + if (major != null) + { + name = major.ProfessionalName; + } + } + return name; + } + + /// + /// + /// + /// + /// + protected string ConvertIsOK(object IsOK) + { + string name = string.Empty; + if (IsOK != null) + { + if (IsOK.ToString() == "True") + { + name = "已完成"; + } + else + { + name = "未完成"; + } + } + return name; + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs new file mode 100644 index 00000000..f23fddd1 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/WeekPlanIn.aspx.designer.cs @@ -0,0 +1,204 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class WeekPlanIn { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// txtWeekNo 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtWeekNo; + + /// + /// txtStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartDate; + + /// + /// txtEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndDate; + + /// + /// btnAudit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnAudit; + + /// + /// btnImport 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnImport; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnDownLoad 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnDownLoad; + + /// + /// fuAttachUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.FileUpload fuAttachUrl; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + + /// + /// lbImageUrl 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label lbImageUrl; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label5; + + /// + /// hdFileName 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdFileName; + + /// + /// hdCheckResult 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.HiddenField hdCheckResult; + } +} diff --git a/SGGL/FineUIPro.Web/Web.config b/SGGL/FineUIPro.Web/Web.config index 7912ba7d..eafda425 100644 --- a/SGGL/FineUIPro.Web/Web.config +++ b/SGGL/FineUIPro.Web/Web.config @@ -12,7 +12,7 @@ - + @@ -77,7 +77,7 @@ - + diff --git a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs index 8968a929..f926ddf3 100644 --- a/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs +++ b/SGGL/FineUIPro.Web/ZHGL/InspectionSummary/InspectionSummary.aspx.cs @@ -250,15 +250,12 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary }).ToList(); //一次共检合格数 - var list20 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail - join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId - where y.IsOnceQualified == true && y.InspectionDate != null - select new { y.ProjectId,y.InspectionDate,y.IsOnceQualified,x.InspectionId, Isid= y.InspectionId }).ToList(); + var list20 = (from x in Funs.DB.ProcessControl_InspectionManagement + where x.IsOnceQualified == true + select new { x.ProjectId,x.CompileDate,x.IsOnceQualified,x.InspectionId, Isid= x.InspectionId }).ToList(); ////总数 - var list21 = (from x in Funs.DB.ProcessControl_InspectionManagementDetail - join y in Funs.DB.ProcessControl_InspectionManagement on x.InspectionId equals y.InspectionId - where y.InspectionDate != null - select new { y.ProjectId, x.InspectionId, Isid = y.InspectionId,y.InspectionDate }).ToList(); + var list21 = (from x in Funs.DB.ProcessControl_InspectionManagement + select new { x.ProjectId, x.InspectionId, Isid = x.InspectionId,x.CompileDate }).ToList(); //关键事项 var list22 = (from x in Funs.DB.GJSX @@ -639,7 +636,7 @@ namespace FineUIPro.Web.ZHGL.InspectionSummary if (hgs>0) { //验收日期 - model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.InspectionDate).FirstOrDefault().InspectionDate; + model.CompileDate = list20.Where(x => x.ProjectId == pid).OrderByDescending(x => x.CompileDate).FirstOrDefault().CompileDate; } model.SummeryResult = hgs.ToString(); allList.Add(model); diff --git a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml index 2fac288a..b34c5503 100644 --- a/SGGL/FineUIPro.Web/common/Menu_JDGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_JDGL.xml @@ -11,6 +11,7 @@ + diff --git a/SGGL/FineUIPro.Web/common/Menu_Personal.xml b/SGGL/FineUIPro.Web/common/Menu_Personal.xml index 2854ffd9..a9d07855 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Personal.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Personal.xml @@ -6,4 +6,7 @@ + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml index 26f32e6a..e9688f49 100644 --- a/SGGL/FineUIPro.Web/common/Menu_TestRun.xml +++ b/SGGL/FineUIPro.Web/common/Menu_TestRun.xml @@ -69,10 +69,12 @@ + + diff --git a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml index 91d9fd84..4d3b9e97 100644 --- a/SGGL/FineUIPro.Web/common/Menu_Transfer.xml +++ b/SGGL/FineUIPro.Web/common/Menu_Transfer.xml @@ -1,3 +1,21 @@  + + + + + + + + + + + + + + + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml index ed44c8fe..69859890 100644 --- a/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml +++ b/SGGL/FineUIPro.Web/common/Menu_ZHGL.xml @@ -83,4 +83,8 @@ + + + + \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx index 4e1a7268..e209644b 100644 --- a/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx +++ b/SGGL/FineUIPro.Web/common/mainMenu_CQMS.aspx @@ -291,9 +291,9 @@ var one1 =<%=One1 %> var one2 =<%=One2 %> var one3 =<%=One3 %> - category_One('one1', "质量验收一次合格率", one1, one1 + "%") + category_One('one1', "施工质量一次共检合格率", one1, one1 + "%") category_One('one2', "焊接一次拍片合格率", one2, one2 + "%") - category_One('one3', "质量问题整改完成率", one3, one3 + "%") + category_One('one3', "质量巡检问题整改率", one3, one3 + "%")