diff --git a/.gitignore b/.gitignore index 5bfb7699..17882b41 100644 --- a/.gitignore +++ b/.gitignore @@ -30,3 +30,4 @@ SGGL/.svn /FineUIPro.Mobile/obj /SGGL/FineUIPro.Web/FileUpload/CQMS/Meeting/2022-09 /SGGL/FineUIPro.Web/FileUpload/ +/DataBase/版本日志/SGGLDB_V2023-07-28.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-07-11.sql b/DataBase/版本日志/SGGLDB_V2023-07-11.sql new file mode 100644 index 00000000..7bb00535 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-07-11.sql @@ -0,0 +1,2 @@ +alter table dbo.ActionPlan_ActionPlanListApprove drop constraint FK_ActionPlan_ActionPlanListApprove_ActionPlan_ActionPlanList +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2023-07-12.sql b/DataBase/版本日志/SGGLDB_V2023-07-12.sql new file mode 100644 index 00000000..15c8ecf2 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-07-12.sql @@ -0,0 +1,4 @@ +alter table [dbo].[Information_EPSummaryReport] add Quarter int null +GO +alter table [dbo].[InformationProject_EPSummaryReport] add Quarter int null +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2023-07-20.sql b/DataBase/版本日志/SGGLDB_V2023-07-20.sql new file mode 100644 index 00000000..4c2257be --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-07-20.sql @@ -0,0 +1,12 @@ +alter table WBS_ControlItemInit add CheckAcceptType char(1) null +GO +alter table WBS_ControlItemProject add CheckAcceptType char(1) null +GO +alter table WBS_ControlItemAndCycle add CheckAcceptType char(1) null +GO +alter table WBS_WorkPackageInit add SubItemType char(1) null +GO +alter table WBS_WorkPackageProject add SubItemType char(1) null +GO +alter table WBS_WorkPackage add SubItemType char(1) null +GO \ No newline at end of file diff --git a/DataBase/版本日志/SGGLDB_V2023-07-21.sql b/DataBase/版本日志/SGGLDB_V2023-07-21.sql new file mode 100644 index 00000000..8eadd009 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-07-21.sql @@ -0,0 +1,44 @@ +ALTER VIEW [dbo].[View_InformationProject_ConstructionStandardSelectedItem] +/*׼淶ʶѡбͼ*/ +AS +SELECT Item.ConstructionStandardSelectedItemId, + Item.ConstructionStandardIdentifyId, + Item.StandardId, + Identify.ProjectId, + List.StandardGrade, + List.StandardNo, + List.StandardName, + List.AttachUrl, + List.IsSelected1, + List.IsSelected2, + List.IsSelected3, + List.IsSelected4, + List.IsSelected5, + List.IsSelected6, + List.IsSelected7, + List.IsSelected8, + List.IsSelected9, + List.IsSelected10, + List.IsSelected11, + List.IsSelected12, + List.IsSelected13, + List.IsSelected14, + List.IsSelected15, + List.IsSelected16, + List.IsSelected17, + List.IsSelected18, + List.IsSelected19, + List.IsSelected20, + List.IsSelected21, + List.IsSelected22, + List.IsSelected23, + List.IsSelected90 +FROM dbo.Law_HSSEStandardsList AS List +LEFT JOIN dbo.InformationProject_ConstructionStandardSelectedItem AS Item ON List.StandardId =Item.StandardId +LEFT JOIN dbo.InformationProject_ConstructionStandardIdentify AS Identify ON Item.ConstructionStandardIdentifyId =Identify.ConstructionStandardIdentifyId + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2023-07-23.sql b/DataBase/版本日志/SGGLDB_V2023-07-23.sql new file mode 100644 index 00000000..c6e804dc --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-07-23.sql @@ -0,0 +1,4 @@ +ALTER TABLE Base_Certificate ADD Type VARCHAR(10) NULL +GO +EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'ͣ1ظڣ2ܣ3豸-1' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'Base_Certificate', @level2type=N'COLUMN',@level2name=N'Type' +GO diff --git a/DataBase/版本日志/SGGLDB_V2023-07-25.sql b/DataBase/版本日志/SGGLDB_V2023-07-25.sql new file mode 100644 index 00000000..92e4826a --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-07-25.sql @@ -0,0 +1,50 @@ +alter table [dbo].[WBS_WorkPackage] add PreJobId nvarchar(50) null +GO +alter table [dbo].[WBS_WorkPackage] add PlanProjectQuantity decimal(18,2) null +GO +alter table [dbo].[WBS_WorkPackage] add RealProjectQuantity decimal(18,2) null +GO +alter table [dbo].[WBS_WorkPackage] add PlanStartDate datetime null +GO +alter table [dbo].[WBS_WorkPackage] add PlanEndDate datetime null +GO +alter table [dbo].[WBS_WorkPackage] add RealStartDate datetime null +GO +alter table [dbo].[WBS_WorkPackage] add RealEndDate datetime null +GO +alter table [dbo].[WBS_WorkPackage] add Unit nvarchar(50) null +GO +alter table [dbo].[WBS_WorkPackage] add IsMileStone bit null +GO + +alter table [dbo].[WBS_UnitWork] add PlanStartDate datetime null +GO +alter table [dbo].[WBS_UnitWork] add PlanEndDate datetime null +GO +alter table [dbo].[WBS_UnitWork] add RealStartDate datetime null +GO +alter table [dbo].[WBS_UnitWork] add RealEndDate datetime null +GO + + +CREATE VIEW [dbo].[View_WBS] +AS +select '1' as Id,'0' as SupId ,'JZ' as Code, '' as Name,'ProjectType' as WBSType, +ProjectId from dbo.WBS_UnitWork +Union +select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkCode+'-'+UnitWorkName as Name,'UnitWork' as WBSType, +ProjectId from dbo.WBS_UnitWork +Union all +select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType, +ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null +Union all +select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, PackageContent as Name,'WorkPackage' as WBSType, +ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null + + + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2023-08-01.sql b/DataBase/版本日志/SGGLDB_V2023-08-01.sql new file mode 100644 index 00000000..3756c1b4 --- /dev/null +++ b/DataBase/版本日志/SGGLDB_V2023-08-01.sql @@ -0,0 +1,38 @@ +alter table [dbo].[WBS_WorkPackage] add PlanCost decimal(18,2) null +GO +alter table [dbo].[WBS_WorkPackage] add JDWeights decimal(9,2) null +GO +alter table [dbo].[WBS_WorkPackage] add PreWorkCode nvarchar(50) null +GO + +alter table [dbo].[WBS_UnitWork] add PlanCost decimal(18,2) null +GO +alter table [dbo].[WBS_UnitWork] add JDWeights decimal(9,2) null +GO +alter table [dbo].[WBS_ControlItemAndCycle] add RealEndDate datetime null +GO + +ALTER VIEW [dbo].[View_WBS] +AS +select '1' as Id,'0' as SupId ,'JZ' as Code, '' as Name,'ProjectType' as WBSType, +ProjectId from dbo.WBS_UnitWork +Union +select '2' as Id,'0' as SupId ,'AZ' as Code, 'װ' as Name,'ProjectType' as WBSType, +ProjectId from dbo.WBS_UnitWork +Union +select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkCode+'-'+UnitWorkName as Name,'UnitWork' as WBSType, +ProjectId from dbo.WBS_UnitWork +Union all +select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,WorkPackageCode+'-'+PackageContent as Name,'WorkPackage' as WBSType, +ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null +Union all +select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, WorkPackageCode+'-'+PackageContent as Name,'WorkPackage' as WBSType, +ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null + + + + + +GO + + diff --git a/DataBase/版本日志/SGGLDB_V2023-06-26.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-26.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-26.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-26.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-27.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-27.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-27修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-27修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-27修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-28.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-28.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-28修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-28修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-28修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-29.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-29.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-06-29修改明细.txt b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29修改明细.txt similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-29修改明细.txt rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-29修改明细.txt diff --git a/DataBase/版本日志/SGGLDB_V2023-06-30.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-30.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-06-30.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-06-30.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-07-03.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-03.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-07-03.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-03.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-07-04.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-04.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-07-04.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-07-04.sql diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql index 94d52f2c..e682de42 100644 --- a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql +++ b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql @@ -1,55 +1,63 @@ ---delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_JDGL') ---go ---delete from Sys_Menu where MenuType='Menu_JDGL' ---go +delete from Sys_ButtonToMenu where MenuId in (select MenuId from Sys_Menu where MenuType='Menu_JDGL') +go +delete from Sys_Menu where MenuType='Menu_JDGL' +go --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('6890E0DD-9606-41BC-8700-D32FA5B65B66','施工进度','',10,'0','Menu_JDGL',0,0,1) --GO -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('BAC3D994-03A8-466C-8975-A31039998BCC','施工进度统计','JDGL/Check/ProgressShow.aspx',10,'0','Menu_JDGL',0,1,1) -GO +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('BAC3D994-03A8-466C-8975-A31039998BCC','施工进度统计','JDGL/Check/ProgressShow.aspx',10,'0','Menu_JDGL',0,1,1) +--GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('1172B112-2A12-4410-AD66-E5BA6B461475','施工进度赢得值曲线','JDGL/Check/ProgressStatistics.aspx',20,'0','Menu_JDGL',0,1,1) +--GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('4288426D-E49B-4E5D-A495-7E6A76F269B5','周计划','',30,'0','Menu_JDGL',0,1,1) +--GO +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('98E9B88C-5BB8-4673-9B6C-69B446E57C11','4288426D-E49B-4E5D-A495-7E6A76F269B5','增加',1) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('B69119FC-F0AB-4C07-83FB-48D2CEF00C5F','4288426D-E49B-4E5D-A495-7E6A76F269B5','修改',2) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('DC33D5E2-2C3B-4C9B-9887-1CF2EB2A3C7F','4288426D-E49B-4E5D-A495-7E6A76F269B5','删除',3) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('CBF94555-B633-44CC-9919-3CE579D368CD','4288426D-E49B-4E5D-A495-7E6A76F269B5','保存',4) +--GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('C75F0853-8A2B-4B32-83B7-509278D11957','项目里程碑节点','',40,'0','Menu_JDGL',0,1,1) +--GO +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('3BCA8C5D-C781-4BF7-90C5-1EE569D0F810','C75F0853-8A2B-4B32-83B7-509278D11957','增加',1) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('1AC052E6-0FA0-45C4-A8AB-A8C71931DEC6','C75F0853-8A2B-4B32-83B7-509278D11957','修改',2) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('08B9E2EB-2998-4225-A6E5-F51597608000','C75F0853-8A2B-4B32-83B7-509278D11957','删除',3) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('FAF17C45-6D8A-4679-90A8-B8AF4F86EFB8','C75F0853-8A2B-4B32-83B7-509278D11957','保存',4) +--GO + +--INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +--VALUES('3550F422-E520-4962-9816-B691B0EE2865','形象进度照片','',50,'0','Menu_JDGL',0,1,1) +--GO +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('92792060-5ED8-4A87-A355-93728321D4E8','3550F422-E520-4962-9816-B691B0EE2865','增加',1) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('6859B3C5-A8CF-48CF-8F7C-EA707ED5710A','3550F422-E520-4962-9816-B691B0EE2865','修改',2) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('274A6E9E-193A-498F-ABD3-A78437C79C00','3550F422-E520-4962-9816-B691B0EE2865','删除',3) +--INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +--VALUES('947CD34B-57C0-40EE-9773-53A75925D9AD','3550F422-E520-4962-9816-B691B0EE2865','保存',4) +--GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('1172B112-2A12-4410-AD66-E5BA6B461475','施工进度赢得值曲线','JDGL/Check/ProgressStatistics.aspx',20,'0','Menu_JDGL',0,1,1) +VALUES('E23F0879-3E9F-4E7B-9A2D-EFF34798D629','进度计划编制','JDGL/Check/PlanSet.aspx',10,'0','Menu_JDGL',0,1,1) +GO +INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) +VALUES('F5055103-6182-43E0-93EC-7DD7BEF2B71C','E23F0879-3E9F-4E7B-9A2D-EFF34798D629','保存',4) GO -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('4288426D-E49B-4E5D-A495-7E6A76F269B5','周计划','',30,'0','Menu_JDGL',0,1,1) -GO -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('98E9B88C-5BB8-4673-9B6C-69B446E57C11','4288426D-E49B-4E5D-A495-7E6A76F269B5','增加',1) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('B69119FC-F0AB-4C07-83FB-48D2CEF00C5F','4288426D-E49B-4E5D-A495-7E6A76F269B5','修改',2) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('DC33D5E2-2C3B-4C9B-9887-1CF2EB2A3C7F','4288426D-E49B-4E5D-A495-7E6A76F269B5','删除',3) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('CBF94555-B633-44CC-9919-3CE579D368CD','4288426D-E49B-4E5D-A495-7E6A76F269B5','保存',4) -GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('C75F0853-8A2B-4B32-83B7-509278D11957','项目里程碑节点','',40,'0','Menu_JDGL',0,1,1) -GO -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('3BCA8C5D-C781-4BF7-90C5-1EE569D0F810','C75F0853-8A2B-4B32-83B7-509278D11957','增加',1) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('1AC052E6-0FA0-45C4-A8AB-A8C71931DEC6','C75F0853-8A2B-4B32-83B7-509278D11957','修改',2) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('08B9E2EB-2998-4225-A6E5-F51597608000','C75F0853-8A2B-4B32-83B7-509278D11957','删除',3) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('FAF17C45-6D8A-4679-90A8-B8AF4F86EFB8','C75F0853-8A2B-4B32-83B7-509278D11957','保存',4) -GO - -INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('3550F422-E520-4962-9816-B691B0EE2865','形象进度照片','',50,'0','Menu_JDGL',0,1,1) -GO -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('92792060-5ED8-4A87-A355-93728321D4E8','3550F422-E520-4962-9816-B691B0EE2865','增加',1) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('6859B3C5-A8CF-48CF-8F7C-EA707ED5710A','3550F422-E520-4962-9816-B691B0EE2865','修改',2) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('274A6E9E-193A-498F-ABD3-A78437C79C00','3550F422-E520-4962-9816-B691B0EE2865','删除',3) -INSERT INTO dbo.Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) -VALUES('947CD34B-57C0-40EE-9773-53A75925D9AD','3550F422-E520-4962-9816-B691B0EE2865','保存',4) -GO \ No newline at end of file diff --git a/SGGL/BLL/API/APIPersonService.cs b/SGGL/BLL/API/APIPersonService.cs index f0f1aaa6..d9bb1aca 100644 --- a/SGGL/BLL/API/APIPersonService.cs +++ b/SGGL/BLL/API/APIPersonService.cs @@ -443,13 +443,13 @@ namespace BLL /// 培训岗位ID /// 培训类型ID /// - public static List getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId) + public static List getTrainingPersonListByTrainTypeId(string projectId, string unitIds, string workPostIds, string trainTypeId,string name) { using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - List unitIdList = Funs.GetStrListByStr(unitIds, ','); + var getPersons = from x in db.View_SitePerson_Person - where x.ProjectId == projectId && unitIdList.Contains(x.UnitId) && x.States == Const.ProjectPersonStates_1 + where x.ProjectId == projectId && x.States == Const.ProjectPersonStates_1 select new Model.PersonItem { SitePersonId = x.SitePersonId, @@ -476,12 +476,23 @@ namespace BLL PhotoUrl = x.PhotoUrl, DepartName = x.DepartName, }; + if (!string.IsNullOrEmpty(unitIds)) + { + List unitIdList = Funs.GetStrListByStr(unitIds, ','); + getPersons = getPersons.Where(x => unitIdList.Contains(x.UnitId)); + } + if (!string.IsNullOrEmpty(workPostIds)) { List workPostIdList = Funs.GetStrListByStr(workPostIds, ','); getPersons = getPersons.Where(x => workPostIdList.Contains(x.WorkPostId)); } + if (!string.IsNullOrEmpty(name)) + { + getPersons = getPersons.Where(x => x.PersonName.Contains(name)); + } + List getTrainPersonList = new List(); var getTrainType = TrainTypeService.GetTrainTypeById(trainTypeId); if (getTrainType != null && (!getTrainType.IsRepeat.HasValue || getTrainType.IsRepeat == false)) diff --git a/SGGL/BLL/BaseInfo/CertificateService.cs b/SGGL/BLL/BaseInfo/CertificateService.cs index 04f8b360..9b2f6113 100644 --- a/SGGL/BLL/BaseInfo/CertificateService.cs +++ b/SGGL/BLL/BaseInfo/CertificateService.cs @@ -34,6 +34,7 @@ namespace BLL CertificateName = certificate.CertificateName, CertificateType = certificate.CertificateType, IsRegisterHSSE = certificate.IsRegisterHSSE, + Type= certificate.Type, Remark = certificate.Remark }; db.Base_Certificate.InsertOnSubmit(newCertificate); @@ -54,6 +55,7 @@ namespace BLL newCertificate.CertificateName = certificate.CertificateName; newCertificate.CertificateType = certificate.CertificateType; newCertificate.IsRegisterHSSE = certificate.IsRegisterHSSE; + newCertificate.Type = certificate.Type; newCertificate.Remark = certificate.Remark; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs b/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs index 59496167..3bd3e464 100644 --- a/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs +++ b/SGGL/BLL/CQMS/WBS/ControlItemAndCycleService.cs @@ -65,6 +65,7 @@ namespace BLL newControlItemAndCycle.InitControlItemCode = ControlItemAndCycle.InitControlItemCode; newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate; newControlItemAndCycle.Costs = ControlItemAndCycle.Costs; + newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType; db.WBS_ControlItemAndCycle.InsertOnSubmit(newControlItemAndCycle); db.SubmitChanges(); @@ -97,6 +98,8 @@ namespace BLL newControlItemAndCycle.CheckNum = ControlItemAndCycle.CheckNum; newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate; newControlItemAndCycle.Costs = ControlItemAndCycle.Costs; + newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType; + newControlItemAndCycle.RealEndDate = ControlItemAndCycle.RealEndDate; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs b/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs index 11bb6591..bbd0b196 100644 --- a/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs +++ b/SGGL/BLL/CQMS/WBS/ControlItemInitService.cs @@ -50,6 +50,7 @@ namespace BLL newControlItem.SHForms = controlItem.SHForms; newControlItem.Standard = controlItem.Standard; newControlItem.ClauseNo = controlItem.ClauseNo; + newControlItem.CheckAcceptType = controlItem.CheckAcceptType; db.WBS_ControlItemInit.InsertOnSubmit(newControlItem); db.SubmitChanges(); @@ -73,6 +74,7 @@ namespace BLL newControlItem.SHForms = controlItem.SHForms; newControlItem.Standard = controlItem.Standard; newControlItem.ClauseNo = controlItem.ClauseNo; + newControlItem.CheckAcceptType = controlItem.CheckAcceptType; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/ControlItemProjectService.cs b/SGGL/BLL/CQMS/WBS/ControlItemProjectService.cs index 885e7fe6..35f1ac0b 100644 --- a/SGGL/BLL/CQMS/WBS/ControlItemProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/ControlItemProjectService.cs @@ -52,6 +52,7 @@ namespace BLL newControlItem.Standard = controlItem.Standard; newControlItem.ClauseNo = controlItem.ClauseNo; newControlItem.CheckNum = controlItem.CheckNum; + newControlItem.CheckAcceptType = controlItem.CheckAcceptType; db.WBS_ControlItemProject.InsertOnSubmit(newControlItem); db.SubmitChanges(); @@ -76,6 +77,7 @@ namespace BLL newControlItem.Standard = controlItem.Standard; newControlItem.ClauseNo = controlItem.ClauseNo; newControlItem.CheckNum = controlItem.CheckNum; + newControlItem.CheckAcceptType = controlItem.CheckAcceptType; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs index 2c727198..7914b888 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageInitService.cs @@ -20,6 +20,7 @@ namespace BLL newPack.PackageContent = workPack.PackageContent; newPack.IsChild = workPack.IsChild; newPack.ProjectType = workPack.ProjectType; + newPack.SubItemType = workPack.SubItemType; db.WBS_WorkPackageInit.InsertOnSubmit(newPack); db.SubmitChanges(); } @@ -34,7 +35,7 @@ namespace BLL Model.WBS_WorkPackageInit newPack = db.WBS_WorkPackageInit.First(e => e.WorkPackageCode == workPack.WorkPackageCode); newPack.IsChild = workPack.IsChild; newPack.PackageContent = workPack.PackageContent; - + newPack.SubItemType = workPack.SubItemType; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs index 8886024f..9c252348 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageProjectService.cs @@ -20,6 +20,7 @@ namespace BLL newPack.PackageContent = workPack.PackageContent; newPack.IsChild = workPack.IsChild; newPack.ProjectType = workPack.ProjectType; + newPack.SubItemType = workPack.SubItemType; db.WBS_WorkPackageProject.InsertOnSubmit(newPack); db.SubmitChanges(); } @@ -35,6 +36,7 @@ namespace BLL newPack.WorkPackageCode = workPack.WorkPackageCode; newPack.IsChild = workPack.IsChild; newPack.PackageContent = workPack.PackageContent; + newPack.SubItemType = workPack.SubItemType; db.SubmitChanges(); } diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs index abe97a70..cacebc16 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs @@ -1,4 +1,6 @@ -using System.Collections.Generic; +using System; +using System.Collections.Generic; +using System.Data; using System.Linq; namespace BLL @@ -29,6 +31,15 @@ namespace BLL newWorkPackage.ProjectType = WorkPackage.ProjectType; newWorkPackage.IsApprove = WorkPackage.IsApprove; newWorkPackage.Costs = WorkPackage.Costs; + newWorkPackage.SubItemType = WorkPackage.SubItemType; + newWorkPackage.PreJobId = WorkPackage.PreJobId; + newWorkPackage.PlanProjectQuantity = WorkPackage.PlanProjectQuantity; + newWorkPackage.RealProjectQuantity = WorkPackage.RealProjectQuantity; + newWorkPackage.PlanStartDate = WorkPackage.PlanStartDate; + newWorkPackage.PlanEndDate = WorkPackage.PlanEndDate; + newWorkPackage.RealStartDate = WorkPackage.RealStartDate; + newWorkPackage.RealEndDate = WorkPackage.RealEndDate; + newWorkPackage.Unit = WorkPackage.Unit; db.WBS_WorkPackage.InsertOnSubmit(newWorkPackage); db.SubmitChanges(); @@ -52,6 +63,19 @@ namespace BLL newWorkPackage.Weights = WorkPackage.Weights; newWorkPackage.IsApprove = WorkPackage.IsApprove; newWorkPackage.Costs = WorkPackage.Costs; + newWorkPackage.SubItemType = WorkPackage.SubItemType; + newWorkPackage.PreJobId = WorkPackage.PreJobId; + newWorkPackage.PlanProjectQuantity = WorkPackage.PlanProjectQuantity; + newWorkPackage.RealProjectQuantity = WorkPackage.RealProjectQuantity; + newWorkPackage.PlanStartDate = WorkPackage.PlanStartDate; + newWorkPackage.PlanEndDate = WorkPackage.PlanEndDate; + newWorkPackage.RealStartDate = WorkPackage.RealStartDate; + newWorkPackage.RealEndDate = WorkPackage.RealEndDate; + newWorkPackage.Unit = WorkPackage.Unit; + newWorkPackage.IsMileStone = WorkPackage.IsMileStone; + newWorkPackage.PlanCost = WorkPackage.PlanCost; + newWorkPackage.JDWeights = WorkPackage.JDWeights; + newWorkPackage.PreWorkCode = WorkPackage.PreWorkCode; db.SubmitChanges(); } @@ -216,5 +240,326 @@ namespace BLL Funs.FineUIPleaseSelect(dropName); } } + + /// + /// 获取模拟树表格 + /// + /// + public static DataTable GetAllTreeDataTable(string projectId, string IsOut) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + IQueryable workPackages = from x in db.WBS_WorkPackage where x.ProjectId == projectId select x; + IQueryable unitWorks = from x in db.WBS_UnitWork where x.ProjectId == projectId select x; + List getWBSs = (from x in db.View_WBS where x.ProjectId == projectId select x).ToList(); + List WBSList = new List(); + DataTable table = new DataTable(); + table.Columns.Add(new DataColumn("Id", typeof(String))); + table.Columns.Add(new DataColumn("SupId", typeof(String))); + table.Columns.Add(new DataColumn("Name", typeof(String))); + table.Columns.Add(new DataColumn("WBSType", typeof(String))); + table.Columns.Add(new DataColumn("ProjectId", typeof(String))); + table.Columns.Add(new DataColumn("ShowId", typeof(String))); + table.Columns.Add(new DataColumn("JDWeights", typeof(String))); + table.Columns.Add(new DataColumn("Unit", typeof(String))); + table.Columns.Add(new DataColumn("PlanProjectQuantity", typeof(String))); + table.Columns.Add(new DataColumn("RealProjectQuantity", typeof(String))); + table.Columns.Add(new DataColumn("PlanStartDate", typeof(DateTime))); + table.Columns.Add(new DataColumn("PlanEndDate", typeof(DateTime))); + table.Columns.Add(new DataColumn("RealStartDate", typeof(DateTime))); + table.Columns.Add(new DataColumn("RealEndDate", typeof(DateTime))); + table.Columns.Add(new DataColumn("IsMileStone", typeof(bool))); + table.Columns.Add(new DataColumn("PlanCost", typeof(String))); + table.Columns.Add(new DataColumn("PreWorkCode", typeof(String))); + table.Columns.Add(new DataColumn("Code", typeof(String))); + if (getWBSs.Count() > 0) + { + List newList = new List(); + var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0"); + int a = 1; + foreach (var item in projectTypes) + { + item.Code = a.ToString(); + newList.Add(item); + if (string.IsNullOrEmpty(IsOut)) + { + AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString()); + } + else + { + AddDetail(newList, getWBSs.ToList(), item.Id, a.ToString(), string.Empty); + } + a++; + } + DataRow row; + foreach (Model.View_WBS item in newList) + { + row = table.NewRow(); + row[0] = item.Id; + row[1] = item.SupId; + row[2] = item.Name; + row[3] = item.WBSType; + row[4] = item.ProjectId; + if (item.WBSType == "WorkPackage") + { + var childWorkPackages = from x in workPackages where x.SuperWorkPackageId == item.Id && x.IsApprove == true select x; + if (childWorkPackages.Count() == 0) + { + row[5] = item.Id; + var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id); + if (workPackage != null) + { + if (workPackage.JDWeights != null) + { + row[6] = decimal.Round(Convert.ToDecimal(workPackage.JDWeights), 2); + } + row[7] = workPackage.Unit; + if (workPackage.PlanProjectQuantity != null) + { + row[8] = decimal.Round(Convert.ToDecimal(workPackage.PlanProjectQuantity), 2); + } + if (workPackage.RealProjectQuantity != null) + { + row[9] = decimal.Round(Convert.ToDecimal(workPackage.RealProjectQuantity), 2); + } + if (workPackage.PlanStartDate != null) + { + row[10] = workPackage.PlanStartDate; + } + if (workPackage.PlanEndDate != null) + { + row[11] = workPackage.PlanEndDate; + } + if (workPackage.RealStartDate != null) + { + row[12] = workPackage.RealStartDate; + } + if (workPackage.RealEndDate != null) + { + row[13] = workPackage.RealEndDate; + } + if (workPackage.IsMileStone != null) + { + row[14] = workPackage.IsMileStone; + } + if (workPackage.PlanCost != null) + { + row[15] = decimal.Round(Convert.ToDecimal(workPackage.PlanCost), 2); + } + row[16] = workPackage.PreWorkCode; + } + } + } + else if (item.WBSType == "UnitWork") + { + var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == item.Id); + if (unitWork != null) + { + if (unitWork.JDWeights != null) + { + row[6] = decimal.Round(Convert.ToDecimal(unitWork.JDWeights), 2); + } + if (unitWork.PlanStartDate != null) + { + row[10] = unitWork.PlanStartDate; + } + if (unitWork.PlanEndDate != null) + { + row[11] = unitWork.PlanEndDate; + } + if (unitWork.RealStartDate != null) + { + row[12] = unitWork.RealStartDate; + } + if (unitWork.RealEndDate != null) + { + row[13] = unitWork.RealEndDate; + } + if (unitWork.PlanCost != null) + { + row[15] = decimal.Round(Convert.ToDecimal(unitWork.PlanCost), 2); + } + } + } + row[17] = item.Code; + table.Rows.Add(row); + } + } + return table; + } + } + + private static void AddDetail(List newList, List oldList, string id, string preCode) + { + var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code); + int b = 1; + foreach (var item in items) + { + item.Code = preCode + "." + b.ToString(); + newList.Add(item); + AddDetail(newList, oldList, item.Id, item.Code); + b++; + } + } + + private static void AddDetail(List newList, List oldList, string id, string preCode, string prefix) + { + var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code); + int b = 1; + foreach (var item in items) + { + item.Code = preCode + "." + b.ToString(); + item.Name = prefix + "...." + item.Name; + newList.Add(item); + AddDetail(newList, oldList, item.Id, item.Code, prefix + "...."); + b++; + } + } + + #region 更新工作包、工作项 + /// + /// 更新月工作包、工作项 + /// + /// + /// + /// + /// + public static void UpdateWorkPackages(Model.SGGLDB db, Model.WBS_WorkPackage workPackage, DateTime? planStartDate, DateTime? planEndDate, DateTime? realStartDate, DateTime? realEndDate) + { + if (workPackage != null) + { + Model.WBS_WorkPackage parentWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackage.SuperWorkPackageId); + if (parentWorkPackage != null) + { + if (planStartDate != null) + { + if (parentWorkPackage.PlanStartDate == null) + { + parentWorkPackage.PlanStartDate = planStartDate; + } + else + { + if (parentWorkPackage.PlanStartDate > planStartDate) + { + parentWorkPackage.PlanStartDate = planStartDate; + } + } + } + if (planEndDate != null) + { + if (parentWorkPackage.PlanEndDate == null) + { + parentWorkPackage.PlanEndDate = planEndDate; + } + else + { + if (parentWorkPackage.PlanEndDate < planEndDate) + { + parentWorkPackage.PlanEndDate = planEndDate; + } + } + } + if (realStartDate != null) + { + if (parentWorkPackage.RealStartDate == null) + { + parentWorkPackage.RealStartDate = realStartDate; + } + else + { + if (parentWorkPackage.RealStartDate > realStartDate) + { + parentWorkPackage.RealStartDate = realStartDate; + } + } + } + if (realEndDate != null) + { + if (parentWorkPackage.RealEndDate == null) + { + parentWorkPackage.RealEndDate = realEndDate; + } + else + { + if (parentWorkPackage.RealEndDate < realEndDate) + { + parentWorkPackage.RealEndDate = realEndDate; + } + } + } + UpdateWorkPackages(db, parentWorkPackage, planStartDate, planEndDate, realStartDate, realEndDate); + } + } + } + #endregion + + /// + /// 更新分部分项工程实际完成时间 + /// + /// + public static void UpdateWorkPackageRealEndDate(string workPackageId) + { + using (var db = new Model.SGGLDB(Funs.ConnString)) + { + var controlItemAndCycles = from x in db.WBS_ControlItemAndCycle where x.WorkPackageId == workPackageId && x.IsApprove == true select x; + var spotCheckDetails = from x in db.Check_SpotCheckDetail where x.IsOK == true select x; + bool b = true; + if (controlItemAndCycles.Count() > 0) + { + foreach (var c in controlItemAndCycles) + { + if (c.CheckNum != null && c.CheckNum != 0) //检查次数为0表示一直检查 + { + var okSpotCheckDetails = spotCheckDetails.Where(x => x.ControlItemAndCycleId == c.ControlItemAndCycleId); + if (okSpotCheckDetails.Count() != c.CheckNum) + { + b = false; + break; + } + } + else + { + b = false; + break; + } + } + if (b) + { + var LastEndControlItemAndCycle = controlItemAndCycles.OrderByDescending(x => x.RealEndDate).FirstOrDefault(); + if (LastEndControlItemAndCycle != null) + { + var workPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.WorkPackageId == LastEndControlItemAndCycle.WorkPackageId); + if (workPackage != null) + { + workPackage.RealEndDate = LastEndControlItemAndCycle.RealEndDate; + UpdateWorkPackages(db, workPackage, null, null, null, workPackage.RealEndDate); + db.SubmitChanges(); + var unitWork = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId); + //获取是否存在其他未完成的分部分项 + var notEndOthenWorkPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.UnitWorkId == unitWork.UnitWorkId && x.IsApprove == true && x.RealEndDate == null); + if (notEndOthenWorkPackage == null) + { + if (workPackage.RealEndDate != null) + { + if (unitWork.RealEndDate == null) + { + unitWork.RealEndDate = workPackage.RealEndDate; + } + else + { + if (unitWork.RealEndDate < workPackage.RealEndDate) + { + unitWork.RealEndDate = workPackage.RealEndDate; + } + } + } + } + } + } + db.SubmitChanges(); + } + } + } + } } } diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs index 12f4d746..6d7473a8 100644 --- a/SGGL/BLL/Common/Const.cs +++ b/SGGL/BLL/Common/Const.cs @@ -217,6 +217,11 @@ namespace BLL /// public const string Depart_constructionId = "ab1eb44a-1821-48ee-86f2-64b7e6425efa"; + /// + ///公司领导部门id + /// + public const string Depart_CompanyLeaderId = "c09c17b7-742a-4d1e-aa26-5470b6782d1e"; + /// ///测试项目id /// @@ -3343,6 +3348,11 @@ namespace BLL /// public const string OpinionTemplateUrl = "File\\Excel\\DataOut\\策划评审意见收集汇总表.xlsx"; + /// + /// 进度计划编制模板文件原始虚拟路径 + /// + public const string JDPlanTemplateUrl = "File\\Excel\\DataOut\\进度计划编制.xls"; + #endregion #region 初始化上传路径 @@ -4458,6 +4468,13 @@ namespace BLL #endregion + #region 进度 + /// + /// 项目施工WBS定制 + /// + public const string PlanSetMenuId = "E23F0879-3E9F-4E7B-9A2D-EFF34798D629"; + #endregion + #region 施工综合 #region 菜单Id /// diff --git a/SGGL/BLL/Common/Funs.cs b/SGGL/BLL/Common/Funs.cs index 1a17c65b..af4e6cb6 100644 --- a/SGGL/BLL/Common/Funs.cs +++ b/SGGL/BLL/Common/Funs.cs @@ -1220,15 +1220,15 @@ namespace BLL { if (score >= 80) { - value = "ϸ"; + value = "Aϸ"; } else if (score >= 71 && score <= 79) { - value = "ϸ"; + value = "Bϸ"; } else if (score <= 70) { - value = "ϸ"; + value = "Cϸ"; } } return value; diff --git a/SGGL/BLL/DropListService.cs b/SGGL/BLL/DropListService.cs index 343bac2d..dd8cf87a 100644 --- a/SGGL/BLL/DropListService.cs +++ b/SGGL/BLL/DropListService.cs @@ -36,6 +36,10 @@ namespace BLL { dropName.DataSource = HSSE_getContractType(); } + else if (groupId == Group_CertificateType) + { + dropName.DataSource = HSSE_getCertificateType(); + } dropName.DataBind(); if (isShowPlease) { @@ -104,6 +108,11 @@ namespace BLL /// 合同类型 组id /// public const string Group_ContractType = "ContractType"; + + /// + /// 证书类型 组id + /// + public const string Group_CertificateType = "CertificateType"; #endregion #region 公共平台 @@ -350,6 +359,20 @@ namespace BLL list[2] = new ListItem("以完成一定工作量", "3"); return list; } + + /// + /// 证书类型 + /// + /// + public static ListItem[] HSSE_getCertificateType() + { + ListItem[] list = new ListItem[4]; + list[0] = new ListItem("特岗", "1"); + list[1] = new ListItem("安管", "2"); + list[2] = new ListItem("特种设备", "3"); + list[3] = new ListItem("其他", "-1"); + return list; + } #endregion #endregion diff --git a/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs b/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs index 54b63751..adc32ad9 100644 --- a/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs +++ b/SGGL/BLL/HSSE/InformationProject/ProjectEPSummaryReportService.cs @@ -33,6 +33,7 @@ namespace BLL ProjectId = ePSummaryReport.ProjectId, UnitId = ePSummaryReport.UnitId, YearId = ePSummaryReport.YearId, + Quarter= ePSummaryReport.Quarter, ResponsiblePerson = ePSummaryReport.ResponsiblePerson, ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel, ContactPerson = ePSummaryReport.ContactPerson, @@ -63,6 +64,7 @@ namespace BLL { newReport.UnitId = ePSummaryReport.UnitId; newReport.YearId = ePSummaryReport.YearId; + newReport.Quarter = ePSummaryReport.Quarter; newReport.ResponsiblePerson = ePSummaryReport.ResponsiblePerson; newReport.ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel; newReport.ContactPerson = ePSummaryReport.ContactPerson; diff --git a/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs b/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs index 82a372c2..4738fca9 100644 --- a/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs +++ b/SGGL/BLL/OfficeCheck/Check/CheckNoticeService.cs @@ -25,19 +25,18 @@ namespace BLL public static void AddCheckNotice(Model.ProjectSupervision_CheckNotice checkNotice) { Model.ProjectSupervision_CheckNotice newCheckNotice = new Model.ProjectSupervision_CheckNotice(); - newCheckNotice.CheckNoticeId = checkNotice.CheckNoticeId; - //newCheckNotice.SubjectUnitId = checkNotice.SubjectUnitId; + newCheckNotice.CheckNoticeId = checkNotice.CheckNoticeId; newCheckNotice.SubjectUnitAdd = checkNotice.SubjectUnitAdd; newCheckNotice.SubjectUnitMan = checkNotice.SubjectUnitMan; newCheckNotice.SubjectUnitTel = checkNotice.SubjectUnitTel; newCheckNotice.CheckStartTime = checkNotice.CheckStartTime; - newCheckNotice.CheckEndTime = checkNotice.CheckEndTime; - //newCheckNotice.SubjectObject = checkNotice.SubjectObject; + newCheckNotice.CheckEndTime = checkNotice.CheckEndTime; newCheckNotice.CheckTeamLeader = checkNotice.CheckTeamLeader; newCheckNotice.CompileMan = checkNotice.CompileMan; newCheckNotice.CompileDate = checkNotice.CompileDate; newCheckNotice.CheckTeamLeaderName = checkNotice.CheckTeamLeaderName; newCheckNotice.UnitId = checkNotice.UnitId; + newCheckNotice.DepartId = checkNotice.DepartId; newCheckNotice.SexName = checkNotice.SexName; newCheckNotice.SubjectProjectId = checkNotice.SubjectProjectId; Funs.DB.ProjectSupervision_CheckNotice.InsertOnSubmit(newCheckNotice); @@ -48,7 +47,7 @@ namespace BLL { Model.ProjectSupervision_CheckTeam newCheckTeam = new Model.ProjectSupervision_CheckTeam { - CheckTeamId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_CheckTeam)) + CheckTeamId = SQLHelper.GetNewID() }; ; newCheckTeam.CheckNoticeId = newCheckNotice.CheckNoticeId; @@ -84,6 +83,7 @@ namespace BLL newCheckNotice.CompileDate = checkNotice.CompileDate; newCheckNotice.CheckTeamLeaderName = checkNotice.CheckTeamLeaderName; newCheckNotice.UnitId = checkNotice.UnitId; + newCheckNotice.DepartId = checkNotice.DepartId; newCheckNotice.SexName = checkNotice.SexName; newCheckNotice.SubjectProjectId = checkNotice.SubjectProjectId; Funs.DB.SubmitChanges(); diff --git a/SGGL/BLL/Person/Person_PersonsService.cs b/SGGL/BLL/Person/Person_PersonsService.cs index 43cabbc3..5f3a5849 100644 --- a/SGGL/BLL/Person/Person_PersonsService.cs +++ b/SGGL/BLL/Person/Person_PersonsService.cs @@ -59,10 +59,9 @@ namespace BLL } if (!string.IsNullOrEmpty(projetcId) && projetcId != Const._Null) { - getDataList = from x in getDataList - join y in db.SitePerson_PersonItem on x.PersonId equals y.PersonId - where y.ProjectId == projetcId && !y.OutTime.HasValue - select x; + var idLists=(from x in db.SitePerson_PersonItem where x.ProjectId == projetcId && !x.OutTime.HasValue + select x.PersonId).Distinct().ToList(); + getDataList = getDataList.Where(x => idLists.Contains(x.PersonId)); } if (!string.IsNullOrEmpty(personType) && personType != Const._Null) @@ -1031,7 +1030,7 @@ namespace BLL Model.Person_Persons newPerson = db.Person_Persons.FirstOrDefault(e => e.PersonId == person.PersonId); if (newPerson != null) { - //newPerson.UnitId = person.UnitId; + newPerson.UnitId = person.UnitId; //newPerson.DepartId = person.DepartId; // newPerson.WorkPostId = person.WorkPostId; // newPerson.JobNum = person.JobNum; diff --git a/SGGL/BLL/ProjectData/UnitWorkService.cs b/SGGL/BLL/ProjectData/UnitWorkService.cs index adde94de..5b75b8bd 100644 --- a/SGGL/BLL/ProjectData/UnitWorkService.cs +++ b/SGGL/BLL/ProjectData/UnitWorkService.cs @@ -58,6 +58,12 @@ namespace BLL newUnitWork.NDEUnit = UnitWork.NDEUnit; newUnitWork.Costs = UnitWork.Costs; newUnitWork.MainItemAndDesignProfessionalIds = UnitWork.MainItemAndDesignProfessionalIds; + newUnitWork.PlanStartDate = UnitWork.PlanStartDate; + newUnitWork.PlanEndDate = UnitWork.PlanEndDate; + newUnitWork.RealStartDate = UnitWork.RealStartDate; + newUnitWork.RealEndDate = UnitWork.RealEndDate; + newUnitWork.PlanCost = UnitWork.PlanCost; + newUnitWork.JDWeights = UnitWork.JDWeights; db.SubmitChanges(); } GetWeights(UnitWork.ProjectId); diff --git a/SGGL/BLL/WebService/CNCECHSSEWebService.cs b/SGGL/BLL/WebService/CNCECHSSEWebService.cs index 5b530780..1974eb9d 100644 --- a/SGGL/BLL/WebService/CNCECHSSEWebService.cs +++ b/SGGL/BLL/WebService/CNCECHSSEWebService.cs @@ -89,7 +89,7 @@ { try { - + var upReport = from x in db.Information_MillionsMonthlyReport where x.MillionsMonthlyReportId == millionsMonthlyReportId select new Information_MillionsMonthlyReport @@ -226,7 +226,7 @@ { try { - + var upReport = from x in db.Information_AccidentCauseReport where x.AccidentCauseReportId == accidentCauseReportId select new Information_AccidentCauseReport @@ -612,7 +612,7 @@ { try { - + var upReport = from x in db.Information_DrillConductedQuarterlyReport where x.DrillConductedQuarterlyReportId == drillConductedQuarterlyReportId select new Information_DrillConductedQuarterlyReport @@ -714,7 +714,7 @@ { try { - + var upReport = from x in db.Information_DrillPlanHalfYearReport where x.DrillPlanHalfYearReportId == drillPlanHalfYearReportId select new Information_DrillPlanHalfYearReport @@ -808,7 +808,7 @@ { try { - + var upReport = from x in db.Environmental_ChemicalReport where x.ChemicalReportId == chemicalReportId select new Model.ChemicalReport @@ -970,7 +970,7 @@ { try { - + var upReport = from x in db.Environmental_EnergyReport where x.EnergyReportId == energyReportId select new Model.EnergyReport @@ -1077,7 +1077,7 @@ { try { - + var upReport = from x in db.Environmental_ArchitectureReport where x.ArchitectureReportId == chemicalReportId select new Model.ArchitectureReport @@ -1174,7 +1174,7 @@ { try { - + var upReport = from x in db.Information_WorkSummaryReport where x.WorkSummaryReportId == workSummaryReportId select new Model.WorkSummaryReport @@ -1266,7 +1266,7 @@ { try { - + var upReport = from x in db.Information_QualityWorkSummaryReport where x.QualityWorkSummaryReportId == qualityWorkSummaryReportId select new Model.QualityWorkSummaryReport @@ -1357,7 +1357,7 @@ { try { - + var upReport = from x in db.Information_SafetyBriefing where x.SafetyBriefingId == safetyBriefingId select new Model.SafetyBriefing @@ -1450,7 +1450,7 @@ { try { - + var upReport = from x in db.Information_QuarterlyProjectQuality where x.QuarterlyProjectQualityId == quarterlyProjectQualityId select new Model.QuarterlyProjectQuality @@ -1556,7 +1556,7 @@ { try { - + var upReport = from x in db.Information_EPSummaryReport where x.EPSummaryReportId == ePSummaryReportId select new Model.EPSummaryReport @@ -1564,6 +1564,7 @@ EPSummaryReportId = x.EPSummaryReportId, UnitId = x.UnitId, YearId = x.YearId, + Quarter = x.Quarter, ResponsiblePerson = x.ResponsiblePerson, ResponsiblePersonTel = x.ResponsiblePersonTel, ContactPerson = x.ContactPerson, diff --git a/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs b/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs index 0d0ac6e3..690e8fc2 100644 --- a/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs +++ b/SGGL/BLL/ZHGL/Information/EPSummaryReportService.cs @@ -27,9 +27,9 @@ namespace BLL /// /// /// - public static Model.Information_EPSummaryReport GetEPSummaryReportByUnitIdAndYearId(string unitId, int yearId) + public static Model.Information_EPSummaryReport GetEPSummaryReportByUnitIdAndYearIdAndQuarters(string unitId, int yearId, int quarters) { - return Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId); + return Funs.DB.Information_EPSummaryReport.FirstOrDefault(e => e.UnitId == unitId && e.YearId == yearId && e.Quarter == quarters); } /// @@ -43,6 +43,7 @@ namespace BLL EPSummaryReportId = ePSummaryReport.EPSummaryReportId, UnitId = ePSummaryReport.UnitId, YearId = ePSummaryReport.YearId, + Quarter = ePSummaryReport.Quarter, ResponsiblePerson = ePSummaryReport.ResponsiblePerson, ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel, ContactPerson = ePSummaryReport.ContactPerson, @@ -73,6 +74,7 @@ namespace BLL { newReport.UnitId = ePSummaryReport.UnitId; newReport.YearId = ePSummaryReport.YearId; + newReport.Quarter = ePSummaryReport.Quarter; newReport.ResponsiblePerson = ePSummaryReport.ResponsiblePerson; newReport.ResponsiblePersonTel = ePSummaryReport.ResponsiblePersonTel; newReport.ContactPerson = ePSummaryReport.ContactPerson; diff --git a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs index b1a4cf6f..5ae369f5 100644 --- a/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs +++ b/SGGL/BLL/ZHGL/RealName/SynchroSetService.cs @@ -1518,12 +1518,13 @@ namespace BLL join v in Funs.DB.ProjectData_TeamGroup on p.TeamGroupId equals v.TeamGroupId join r in Funs.DB.RealName_CollTeam on v.TeamId equals r.TeamId join pu in Funs.DB.Project_ProjectUnit on new { x.UnitId, x.ProjectId } equals new { pu.UnitId, pu.ProjectId } - where x.IdcardNumber != null && x.ChangeTime.HasValue + where x.ChangeTime.HasValue && (proCode == null || x.ProCode == proCode) && v.TeamId.HasValue && r.TeamId.HasValue && p.States == Const.State_1 && !x.RealNamePushTime.HasValue - && z.JTproCode != null && pu.IsSynchro == true + && z.JTproCode.Length> 0 + && pu.IsSynchro == true orderby x.ChangeTime descending select new { diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx index 1fd9ae69..cd268280 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx +++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx @@ -21,20 +21,20 @@
- - + + - + - + @@ -43,8 +43,13 @@ RendererFunction="renderIsHsse" HeaderText="注安师" HeaderTextAlign="Center" TextAlign="Center"> - + + + + + + @@ -62,7 +67,7 @@ + LabelWidth="110px" BodyPadding="5px" Width="450px" > @@ -141,6 +147,8 @@ var txtNameClientID = '<%= txtCertificateName.ClientID %>'; var drpCertificateTypeClientID = '<%= drpCertificateType.ClientID %>'; var ckbIsRegisterHSSEClientID = '<%= ckbIsRegisterHSSE.ClientID %>'; + + var drpTypeClientID = '<%= drpType.ClientID %>'; var txtRemarkClientID = '<%=txtRemark.ClientID %>'; function onGridRowSelect(event, rowId) { @@ -158,6 +166,7 @@ F(txtNameClientID).setValue(rowValue['CertificateName']); F(drpCertificateTypeClientID).setValue(rowValue['CertificateType']); F(ckbIsRegisterHSSEClientID).setValue(rowValue['IsRegisterHSSE']); + F(drpTypeClientID).setValue(rowValue['Type']); F(txtRemarkClientID).setValue(rowValue['Remark']); // 更新保存按钮文本 diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs index 8f42129b..961dc17b 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.cs @@ -24,6 +24,7 @@ namespace FineUIPro.Web.BaseInfo this.GetButtonPower(); Funs.DropDownPageSize(this.ddlPageSize); Funs.FineUIPleaseSelect(this.drpCertificateType); + BLL.DropListService.InitConstDropDownList(this.drpType, DropListService.Group_CertificateType, true); ddlPageSize.SelectedValue = Grid1.PageSize.ToString(); // 绑定表格 BindGrid(); @@ -190,6 +191,10 @@ namespace FineUIPro.Web.BaseInfo { this.ckbIsRegisterHSSE.Checked = true; } + if (!string.IsNullOrEmpty(certificate.Type)) + { + this.drpType.SelectedValue = certificate.Type; + } this.txtRemark.Text = certificate.Remark; hfFormID.Text = Id; this.btnDelete.Enabled = true; @@ -219,9 +224,13 @@ namespace FineUIPro.Web.BaseInfo { certificate.CertificateType = this.drpCertificateType.SelectedValue; } + if (this.drpType.SelectedValue != BLL.Const._Null) + { + certificate.Type = this.drpType.SelectedValue; + } if (string.IsNullOrEmpty(strRowID)) { - certificate.CertificateId = SQLHelper.GetNewID(typeof(Model.Base_Certificate)); + certificate.CertificateId = SQLHelper.GetNewID(); BLL.CertificateService.AddCertificate(certificate); BLL.LogService.AddSys_Log(this.CurrUser, certificate.CertificateCode, certificate.CertificateId, BLL.Const.CertificateMenuId, BLL.Const.BtnAdd); } @@ -302,5 +311,26 @@ namespace FineUIPro.Web.BaseInfo } } #endregion + + #region 根据身份证号码获取年龄 + /// + /// 根据身份证号码获取年龄 + /// + /// + /// + protected string ConvertType(object Type) + { + string name = string.Empty; + if (Type != null) + { + var doplist = DropListService.HSSE_getCertificateType().FirstOrDefault(x => x.Value == Type.ToString()); + if (doplist != null) + { + name = doplist.Text; + } + } + return name; + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs index 24e3ba02..59640ba2 100644 --- a/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/BaseInfo/Certificate.aspx.designer.cs @@ -7,11 +7,13 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.BaseInfo { - - - public partial class Certificate { - +namespace FineUIPro.Web.BaseInfo +{ + + + public partial class Certificate + { + /// /// form1 控件。 /// @@ -20,7 +22,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -29,7 +31,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -38,7 +40,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -47,7 +49,16 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + /// /// ToolbarSeparator1 控件。 /// @@ -56,7 +67,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -65,7 +76,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// @@ -74,7 +85,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList ddlPageSize; - + /// /// SimpleForm1 控件。 /// @@ -83,7 +94,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.SimpleForm SimpleForm1; - + /// /// hfFormID 控件。 /// @@ -92,7 +103,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox hfFormID; - + /// /// txtCertificateCode 控件。 /// @@ -101,7 +112,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCertificateCode; - + /// /// txtCertificateName 控件。 /// @@ -110,7 +121,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextBox txtCertificateName; - + /// /// drpCertificateType 控件。 /// @@ -119,7 +130,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpCertificateType; - + /// /// ckbIsRegisterHSSE 控件。 /// @@ -128,7 +139,16 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.CheckBox ckbIsRegisterHSSE; - + + /// + /// drpType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpType; + /// /// txtRemark 控件。 /// @@ -137,7 +157,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.TextArea txtRemark; - + /// /// Toolbar1 控件。 /// @@ -146,7 +166,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar1; - + /// /// btnNew 控件。 /// @@ -155,7 +175,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnNew; - + /// /// btnDelete 控件。 /// @@ -164,7 +184,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnDelete; - + /// /// ToolbarFill1 控件。 /// @@ -173,7 +193,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarFill ToolbarFill1; - + /// /// btnSave 控件。 /// @@ -182,7 +202,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnSave; - + /// /// Menu1 控件。 /// @@ -191,7 +211,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Menu Menu1; - + /// /// btnMenuEdit 控件。 /// @@ -200,7 +220,7 @@ namespace FineUIPro.Web.BaseInfo { /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.MenuButton btnMenuEdit; - + /// /// btnMenuDelete 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs b/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs index 6fd8a683..d999a89d 100644 --- a/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/Check/EditSpotCheck.aspx.cs @@ -972,7 +972,26 @@ namespace FineUIPro.Web.CQMS.Check if (!string.IsNullOrEmpty(c.HGForms) || !string.IsNullOrEmpty(c.SHForms)) { isExitForms = true; - break; + } + //处理工作包实际完成时间 + if (c.CheckNum != null && c.CheckNum != 0) //检查次数为0表示一直检查 + { + if (c.CheckNum == 1) //检查一次 + { + c.RealEndDate = DateTime.Now; + BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); + BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + } + else //检查多次 + { + List details = BLL.SpotCheckDetailService.GetSpotCheckDetailsByControlItemAndCycleId(c.ControlItemAndCycleId); + if (details.Count == c.CheckNum) //检查次数已达到最大值 + { + c.RealEndDate = DateTime.Now; + BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c); + BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId); + } + } } } } diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx index 176bda3e..08a3d856 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx @@ -87,8 +87,21 @@ + + + + + + + + + + + + HeaderTextAlign="Center" TextAlign="Center" Width="200px" FieldType="String" > diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs index eb08f8b0..46214861 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.cs @@ -572,6 +572,7 @@ namespace FineUIPro.Web.CQMS.WBS Model.WBS_ControlItemAndCycle controlItemAndCycle = BLL.ControlItemAndCycleService.GetControlItemAndCycleById(controlItemAndCycleId); controlItemAndCycle.ControlPoint = values.Value("ControlPoint"); controlItemAndCycle.ControlItemDef = values.Value("ControlItemDef"); + controlItemAndCycle.CheckAcceptType = GetCheckAcceptTypeId(values.Value("CheckAcceptType")); controlItemAndCycle.Standard = values.Value("Standard"); controlItemAndCycle.ClauseNo = values.Value("ClauseNo"); try @@ -792,7 +793,7 @@ namespace FineUIPro.Web.CQMS.WBS ///
private void BindGrid() { - string strSql = @"SELECT ControlItemAndCycleId,ControlItemAndCycleCode,InitControlItemCode,ControlItemContent,ControlPoint,ControlItemDef,HGForms,SHForms,Standard,ClauseNo,CheckNum" + string strSql = @"SELECT ControlItemAndCycleId,ControlItemAndCycleCode,InitControlItemCode,ControlItemContent,ControlPoint,ControlItemDef,HGForms,SHForms,Standard,ClauseNo,CheckNum,case CheckAcceptType when '1' then '关键工序验收' when '2' then '特殊过程验收' when '3' then '隐蔽工程验收' when '4' then '单位工程一次验收' when '5' then '材料进场复验' else '' end as CheckAcceptType " + @" FROM WBS_ControlItemAndCycle "; List listStr = new List(); strSql += " where WorkPackageId = @WorkPackageId and IsApprove=1 "; diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.designer.cs index 29a73832..b992ccdf 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycle.aspx.designer.cs @@ -147,6 +147,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.DropDownList drpControlPoint; + /// + /// drpCheckAcceptType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckAcceptType; + /// /// txtControlItemDef 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx index 5d0b6da5..1a293e5b 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx @@ -36,6 +36,17 @@ + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.cs index 0dbc829b..35a63942 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.cs @@ -42,6 +42,7 @@ namespace FineUIPro.Web.CQMS.WBS { //Funs.FineUIPleaseSelect(this.drpControlPoint); WorkPackageId = Request.Params["WorkPackageId"]; + Funs.FineUIPleaseSelect(this.drpCheckAcceptType); var workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(WorkPackageId); if (workPackage.ProjectType == "1") //建筑工程 { @@ -93,6 +94,10 @@ namespace FineUIPro.Web.CQMS.WBS { this.txtWeights.Text = controlItemAndCycle.Weights.ToString(); } + if (!string.IsNullOrEmpty(controlItemAndCycle.CheckAcceptType)) + { + this.drpCheckAcceptType.SelectedValue = controlItemAndCycle.CheckAcceptType; + } this.txtHGForms.Text = controlItemAndCycle.HGForms; this.txtSHForms.Text = controlItemAndCycle.SHForms; this.txtStandard.Text = controlItemAndCycle.Standard; @@ -127,6 +132,10 @@ namespace FineUIPro.Web.CQMS.WBS { newControlItemAndCycle.Weights = Convert.ToDecimal(this.txtWeights.Text.Trim()); } + if (this.drpCheckAcceptType.SelectedValue != BLL.Const._Null) + { + newControlItemAndCycle.CheckAcceptType = this.drpCheckAcceptType.SelectedValue; + } newControlItemAndCycle.HGForms = this.txtHGForms.Text.Trim(); newControlItemAndCycle.SHForms = this.txtSHForms.Text.Trim(); newControlItemAndCycle.Standard = this.txtStandard.Text.Trim(); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.designer.cs index d9f893a3..a16de723 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemAndCycleEdit.aspx.designer.cs @@ -66,6 +66,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.DropDownList drpControlPoint; + /// + /// drpCheckAcceptType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckAcceptType; + /// /// txtControlItemDef 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx index 2a3b368a..2c8dd5ea 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx @@ -36,6 +36,17 @@ + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs index 0b1ca90d..d81af6f6 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.cs @@ -41,6 +41,7 @@ namespace FineUIPro.Web.CQMS.WBS if (!IsPostBack) { Funs.FineUIPleaseSelect(this.drpControlPoint); + Funs.FineUIPleaseSelect(this.drpCheckAcceptType); WorkPackageCode = Request.Params["WorkPackageCode"]; var workPackage = BLL.WorkPackageInitService.GetWorkPackageInitByWorkPackageCode(WorkPackageCode); if (workPackage.ProjectType == "1") //建筑工程 @@ -93,6 +94,10 @@ namespace FineUIPro.Web.CQMS.WBS { this.txtWeights.Text = controlItem.Weights.ToString(); } + if (!string.IsNullOrEmpty(controlItem.CheckAcceptType)) + { + this.drpCheckAcceptType.SelectedValue = controlItem.CheckAcceptType; + } this.txtHGForms.Text = controlItem.HGForms; this.txtSHForms.Text = controlItem.SHForms; this.txtStandard.Text = controlItem.Standard; @@ -117,6 +122,10 @@ namespace FineUIPro.Web.CQMS.WBS { newControlItem.Weights = Convert.ToDecimal(this.txtWeights.Text.Trim()); } + if (this.drpCheckAcceptType.SelectedValue != BLL.Const._Null) + { + newControlItem.CheckAcceptType = this.drpCheckAcceptType.SelectedValue; + } newControlItem.HGForms = this.txtHGForms.Text.Trim(); newControlItem.SHForms = this.txtSHForms.Text.Trim(); newControlItem.Standard = this.txtStandard.Text.Trim(); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs index 99dde237..52473a32 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemInitEdit.aspx.designer.cs @@ -66,6 +66,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.DropDownList drpControlPoint; + /// + /// drpCheckAcceptType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckAcceptType; + /// /// txtControlItemDef 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx index e62878a8..c32c1768 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx @@ -36,6 +36,17 @@ + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.cs index 73acc3e3..85c0d316 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.cs @@ -41,6 +41,7 @@ namespace FineUIPro.Web.CQMS.WBS if (!IsPostBack) { Funs.FineUIPleaseSelect(this.drpControlPoint); + Funs.FineUIPleaseSelect(this.drpCheckAcceptType); WorkPackageCode = Request.Params["WorkPackageCode"]; var workPackage = BLL.WorkPackageProjectService.GetWorkPackageProjectByWorkPackageCode(WorkPackageCode, this.CurrUser.LoginProjectId); if (workPackage.ProjectType == "1") //建筑工程 @@ -93,6 +94,10 @@ namespace FineUIPro.Web.CQMS.WBS { this.txtWeights.Text = controlItem.Weights.ToString(); } + if (!string.IsNullOrEmpty(controlItem.CheckAcceptType)) + { + this.drpCheckAcceptType.SelectedValue = controlItem.CheckAcceptType; + } this.txtHGForms.Text = controlItem.HGForms; this.txtSHForms.Text = controlItem.SHForms; this.txtStandard.Text = controlItem.Standard; @@ -122,6 +127,10 @@ namespace FineUIPro.Web.CQMS.WBS { newControlItemProject.Weights = Convert.ToDecimal(this.txtWeights.Text.Trim()); } + if (this.drpCheckAcceptType.SelectedValue != BLL.Const._Null) + { + newControlItemProject.CheckAcceptType = this.drpCheckAcceptType.SelectedValue; + } newControlItemProject.HGForms = this.txtHGForms.Text.Trim(); newControlItemProject.SHForms = this.txtSHForms.Text.Trim(); newControlItemProject.Standard = this.txtStandard.Text.Trim(); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.designer.cs index cdafdb0c..e325fb05 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ControlItemProjectEdit.aspx.designer.cs @@ -66,6 +66,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.DropDownList drpControlPoint; + /// + /// drpCheckAcceptType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckAcceptType; + /// /// txtControlItemDef 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx index a0c0f3f0..ddb41ffd 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx @@ -28,7 +28,7 @@ RegionPercent="20%" Title="项目WBS基础数据库" TitleToolTip="项目WBS基础数据库" ShowBorder="true" ShowHeader="true" BodyPadding="10px"> - @@ -98,8 +98,21 @@ + + + + + + + + + + + + HeaderTextAlign="Center" TextAlign="Center" Width="200px" FieldType="String"> diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.cs index 3125f59d..c8b335e0 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.cs @@ -460,6 +460,7 @@ namespace FineUIPro.Web.CQMS.WBS string controlItemCode = values.Value("ControlItemCode"); Model.WBS_ControlItemProject controlItemProject = BLL.ControlItemProjectService.GetControlItemProjectByCode(controlItemCode, this.CurrUser.LoginProjectId); controlItemProject.ControlPoint = values.Value("ControlPoint"); + controlItemProject.CheckAcceptType = GetCheckAcceptTypeId(values.Value("CheckAcceptType")); controlItemProject.ControlItemDef = values.Value("ControlItemDef"); controlItemProject.Standard = values.Value("Standard"); controlItemProject.ClauseNo = values.Value("ClauseNo"); @@ -621,7 +622,7 @@ namespace FineUIPro.Web.CQMS.WBS /// private void BindGrid() { - string strSql = @"SELECT ControlItemCode,WorkPackageCode,ControlItemContent,ControlPoint,ControlItemDef,HGForms,SHForms,Standard,ClauseNo,CheckNum" + string strSql = @"SELECT ControlItemCode,WorkPackageCode,ControlItemContent,ControlPoint,ControlItemDef,HGForms,SHForms,Standard,ClauseNo,CheckNum,case CheckAcceptType when '1' then '关键工序验收' when '2' then '特殊过程验收' when '3' then '隐蔽工程验收' when '4' then '单位工程一次验收' when '5' then '材料进场复验' else '' end as CheckAcceptType " + @" FROM WBS_ControlItemProject "; List listStr = new List(); strSql += " where WorkPackageCode = @WorkPackageCode and ProjectId=@ProjectId"; @@ -977,6 +978,7 @@ namespace FineUIPro.Web.CQMS.WBS cp.SHForms = item.SHForms; cp.Standard = item.Standard; cp.ClauseNo = item.ClauseNo; + cp.CheckAcceptType = item.CheckAcceptType; cp.CheckNum = 1; BLL.ControlItemProjectService.UpdateControlItemProject(cp); } @@ -994,6 +996,7 @@ namespace FineUIPro.Web.CQMS.WBS controlItemProject.Standard = item.Standard; controlItemProject.ClauseNo = item.ClauseNo; controlItemProject.CheckNum = 1; + controlItemProject.CheckAcceptType = item.CheckAcceptType; BLL.ControlItemProjectService.AddControlItemProject(controlItemProject); } } @@ -1043,6 +1046,7 @@ namespace FineUIPro.Web.CQMS.WBS controlItemProject.Standard = controlItemInit.Standard; controlItemProject.ClauseNo = controlItemInit.ClauseNo; controlItemProject.CheckNum = 1; + controlItemProject.CheckAcceptType = controlItemInit.CheckAcceptType; BLL.ControlItemProjectService.AddControlItemProject(controlItemProject); } ShowNotify("全部恢复默认成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.designer.cs index 06eea00a..28ee95c8 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/ProjectControlItemInitSet.aspx.designer.cs @@ -201,6 +201,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.DropDownList drpControlPoint; + /// + /// drpCheckAcceptType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpCheckAcceptType; + /// /// txtControlItemDef 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx index 6d790805..54bb0b19 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx @@ -24,6 +24,16 @@ + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.cs index 539096e0..06cbd8cc 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.cs @@ -73,6 +73,7 @@ namespace FineUIPro.Web.CQMS.WBS if (!IsPostBack) { WorkPackageCode = Request.Params["Id"]; + Funs.FineUIPleaseSelect(this.drpSubItemType); if (Request.Params["type"] == "add") { List codelist = null; @@ -130,6 +131,10 @@ namespace FineUIPro.Web.CQMS.WBS { this.drpIsChild.SelectedValue = "False"; } + if (!string.IsNullOrEmpty(workPackageInit.SubItemType)) + { + this.drpSubItemType.SelectedValue = workPackageInit.SubItemType; + } SuperWorkPack = workPackageInit.SuperWorkPack; } } @@ -140,6 +145,11 @@ namespace FineUIPro.Web.CQMS.WBS { if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ControlItemInitSetMenuId, BLL.Const.BtnSave)) { + if (this.drpSubItemType.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择分部分项类型!", MessageBoxIcon.Warning); + return; + } if (!BLL.WorkPackageInitService.IsExistWorkPackageInitName(this.SuperWorkPack, this.txtWorkPackageName.Text.Trim(), this.txtWorkPackageCode.Text.Trim())) { Model.WBS_WorkPackageInit newWorkPackage = new Model.WBS_WorkPackageInit(); @@ -147,6 +157,7 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.PackageContent = this.txtWorkPackageName.Text.Trim(); newWorkPackage.SuperWorkPack = SuperWorkPack; newWorkPackage.IsChild = Convert.ToBoolean(this.drpIsChild.SelectedValue.Trim()); + newWorkPackage.SubItemType = this.drpSubItemType.SelectedValue; newWorkPackage.ProjectType = ProjectType; if (Request.Params["type"] == "add") { diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.designer.cs index 61cede1e..ebcb31e2 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageInitEdit.aspx.designer.cs @@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.TextBox txtWorkPackageName; + /// + /// drpSubItemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSubItemType; + /// /// drpIsChild 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx index 4542d50b..95eeabf6 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx @@ -24,6 +24,16 @@ + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.cs index 2f5c2619..5dce0dee 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.cs @@ -73,6 +73,7 @@ namespace FineUIPro.Web.CQMS.WBS if (!IsPostBack) { WorkPackageCode = Request.Params["Id"]; + Funs.FineUIPleaseSelect(this.drpSubItemType); if (Request.Params["type"] == "add") { List codelist = null; @@ -130,6 +131,10 @@ namespace FineUIPro.Web.CQMS.WBS { this.drpIsChild.SelectedValue = "False"; } + if (!string.IsNullOrEmpty(workPackageProject.SubItemType)) + { + this.drpSubItemType.SelectedValue = workPackageProject.SubItemType; + } SuperWorkPack = workPackageProject.SuperWorkPack; } } @@ -140,6 +145,11 @@ namespace FineUIPro.Web.CQMS.WBS { if (BLL.CommonService.GetAllButtonPowerList(CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.ControlItemProjectSetMenuId, BLL.Const.BtnSave)) { + if (this.drpSubItemType.SelectedValue == BLL.Const._Null) + { + ShowNotify("请选择分部分项类型!", MessageBoxIcon.Warning); + return; + } if (!BLL.WorkPackageProjectService.IsExistWorkPackageProjectName(this.SuperWorkPack, this.txtWorkPackageName.Text.Trim(), this.txtWorkPackageCode.Text.Trim(), this.CurrUser.LoginProjectId)) { Model.WBS_WorkPackageProject newWorkPackage = new Model.WBS_WorkPackageProject(); @@ -147,6 +157,7 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.ProjectId = this.CurrUser.LoginProjectId; newWorkPackage.PackageContent = this.txtWorkPackageName.Text.Trim(); newWorkPackage.SuperWorkPack = SuperWorkPack; + newWorkPackage.SubItemType = this.drpSubItemType.SelectedValue; newWorkPackage.IsChild = Convert.ToBoolean(this.drpIsChild.SelectedValue.Trim()); newWorkPackage.ProjectType = ProjectType; if (Request.Params["type"] == "add") diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.designer.cs index e3f907af..4ce3d956 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageProjectEdit.aspx.designer.cs @@ -57,6 +57,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.TextBox txtWorkPackageName; + /// + /// drpSubItemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSubItemType; + /// /// drpIsChild 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx index 5d4ffe74..eb7a5da5 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx @@ -58,6 +58,18 @@ + + + + + + + + + + x.WorkPackageCode).ToList(); @@ -559,12 +561,15 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.PackageCode = code; newWorkPackage.ProjectType = workPackageProject.ProjectType; newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.AddWorkPackage(newWorkPackage); num++; } else { + oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode; oldWorkPackage.PackageContent = workPackageProject.PackageContent + name; + oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage); } } @@ -660,13 +665,16 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.IsApprove = true; newWorkPackage.ProjectType = workPackageProject.ProjectType; newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.AddWorkPackage(newWorkPackage); num++; } else { + oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode; oldWorkPackage.PackageContent = workPackageProject.PackageContent + name; oldWorkPackage.IsApprove = true; + oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage); } } @@ -727,6 +735,7 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.PackageCode = code; newWorkPackage.ProjectType = workPackageProject.ProjectType; newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.AddWorkPackage(newWorkPackage); num++; } diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx.designer.cs index 1c2cf933..7cc54f86 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet1.aspx.designer.cs @@ -147,6 +147,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.TextBox txtName; + /// + /// drpSubItemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSubItemType; + /// /// Region2 控件。 /// diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx index c179585b..9a9ee096 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx @@ -61,6 +61,18 @@ + + + + + + + + + + x.WorkPackageCode).ToList(); @@ -591,12 +593,15 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.PackageCode = code; newWorkPackage.ProjectType = workPackageProject.ProjectType; newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.AddWorkPackage(newWorkPackage); num++; } else { + oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode; oldWorkPackage.PackageContent = workPackageProject.PackageContent + name; + oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage); } } @@ -689,13 +694,16 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.IsApprove = true; newWorkPackage.ProjectType = workPackageProject.ProjectType; newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.AddWorkPackage(newWorkPackage); num++; } else { + oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode; oldWorkPackage.PackageContent = workPackageProject.PackageContent + name; oldWorkPackage.IsApprove = true; + oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage); } } @@ -757,6 +765,7 @@ namespace FineUIPro.Web.CQMS.WBS newWorkPackage.PackageCode = code; newWorkPackage.ProjectType = workPackageProject.ProjectType; newWorkPackage.InitWorkPackageCode = workPackageProject.WorkPackageCode; + newWorkPackage.SubItemType = GetSubItemTypeId(values.Value("SubItemType")); BLL.WorkPackageService.AddWorkPackage(newWorkPackage); num++; } diff --git a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs index 33749076..ad7e5a05 100644 --- a/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/CQMS/WBS/WorkPackageSet2.aspx.designer.cs @@ -156,6 +156,15 @@ namespace FineUIPro.Web.CQMS.WBS { /// protected global::FineUIPro.TextBox txtName; + /// + /// drpSubItemType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpSubItemType; + /// /// Region2 控件。 /// diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx index 901ec05d..20cc9dc2 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx @@ -8,25 +8,40 @@ 质量验收 + + ShowHeader="true" Layout="VBox" BoxConfigAlign="Stretch"> - + EnableTextSelection="True" EnableSummary="true" SummaryPosition="Bottom"> - @@ -61,18 +76,26 @@ - - - - - - - - + + + + + + + + + + + + + + + + + + + + @@ -115,7 +138,7 @@ } function closePage() { - if (navigator.userAgent.indexOf("Firefox") !== -1 || navigator.userAgent.indexOf("Chrome") !== -1) { + if (navigator.userAgent.indexOf('Firefox') !== -1 || navigator.userAgent.indexOf('Chrome') !== -1) { window.location.href = "about:blank"; window.close(); } else { diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs index 39868aed..a4c47383 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.cs @@ -1,8 +1,11 @@ using BLL; +using FineUIPro.Web.BaseInfo; +using Newtonsoft.Json.Linq; using System; using System.Collections.Generic; using System.Data; using System.Data.SqlClient; +using System.Linq; namespace FineUIPro.Web.DataShow { @@ -23,36 +26,25 @@ namespace FineUIPro.Web.DataShow BLL.ProjectService.InitProjectDropDownList(this.drpProject, true); // 绑定表格t BindGrid(); + + // 合计 + OutputSummaryData(); + this.Panel1.Title = "质量验收数据(" + BLL.UnitService.GetUnitNameByUnitId(BLL.Const.UnitId_SEDIN) + ")"; } } #endregion - #region 加载页面 /// /// 绑定数据 /// private void BindGrid() { - string strSql = @"select NEWID() as ID, v.ProjectId,v.ProjectCode,v.ProjectName,v.allcount,v.ccount,isnull(v.allCount,0)-ISNULL(v.cCount,0) as ucCount, - (case when isnull(v.allCount,0) > 0 then cast((isnull(v.allCount,0)-ISNULL(v.cCount,0)) *1.0 /isnull(v.allCount,0)*100 as decimal(18, 2)) - else 0 end) as rateV - from (select B.ProjectId,p.ProjectCode,p.ProjectName,COUNT(*) as allCount, - isnull((select COUNT(*) - from ProcessControl_InspectionManagementDetail AS Detail - LEFT JOIN WBS_BreakdownProject AS Breakp ON Detail.ControlPointType=Breakp.BreakdownProjectId - LEFT JOIN ProcessControl_InspectionManagement AS Inspection ON Detail.InspectionId=Inspection.InspectionId - where Breakp.CheckAcceptType =@type AND Inspection.IsOnceQualified = 1 - group by Breakp.ProjectId),0) as cCount - FROM ProcessControl_InspectionManagementDetail AS A - LEFT JOIN WBS_BreakdownProject AS B ON A.ControlPointType=B.BreakdownProjectId - left join Base_Project as p on B.ProjectId=p.ProjectId - where p.projectId is not null AND B.CheckAcceptType =@type "; - + string strSql = @"select ProjectId,ProjectCode, ProjectName from Base_Project where ProjectState =1 "; List listStr = new List(); - listStr.Add(new SqlParameter("@type", this.rbType.SelectedValue)); + string cpara = string.Empty; if (this.drpProject.SelectedValue != Const._Null) { - strSql += " AND B.projectId = @projectId"; ///状态为已完成 + strSql += " AND projectId = @projectId"; ///状态为已完成 listStr.Add(new SqlParameter("@projectId", this.drpProject.SelectedValue)); } @@ -60,13 +52,17 @@ namespace FineUIPro.Web.DataShow //{ // strSql += " AND h.RegisterDate >=@StartTime"; // listStr.Add(new SqlParameter("@StartTime", this.txtStartTime.Text)); + + // cpara += " AND c.RegisterDate >=" + this.txtStartTime.Text; //} //if (!string.IsNullOrEmpty(this.txtEndTime.Text)) //{ // strSql += " AND h.RegisterDate <=@EndTime"; // listStr.Add(new SqlParameter("@EndTime", this.txtEndTime.Text)); + + // cpara += " AND c.RegisterDate <=" + this.txtEndTime.Text; //} - strSql += " group by B.ProjectId,p.ProjectCode,p.ProjectName) as v"; + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); Grid1.RecordCount = tb.Rows.Count; @@ -74,7 +70,6 @@ namespace FineUIPro.Web.DataShow Grid1.DataSource = table; Grid1.DataBind(); } - #endregion #region 查询 /// @@ -130,5 +125,124 @@ namespace FineUIPro.Web.DataShow BindGrid(); } #endregion + + /// + /// 定义变量 + /// + private static IQueryable getDataItemLists = from x in Funs.DB.Check_SpotCheckDetail + join z in Funs.DB.WBS_ControlItemAndCycle on x.ControlItemAndCycleId equals z.ControlItemAndCycleId + select new Model.QualityAcceptanceItem + { + InspectionDetailId = x.SpotCheckDetailId, + ProjectId = z.ProjectId, + CheckAcceptType = z.CheckAcceptType, + IsOnceQualified = x.IsOK + }; + + /// + /// 数量 + /// + /// + /// + protected int Count1(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var getT = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue); + cout1 = getT.Count(); + } + return cout1; + } + + /// + /// 数量 + /// + /// + /// + protected int Count2(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var getT = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true); + cout1 = getT.Count(); + } + return cout1; + } + + /// + /// 数量 + /// + /// + /// + protected int Count3(object projectId) + { + int cout1 = 0; + if (projectId != null) + { + var getT1 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue); + var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true); + cout1 = getT1.Count() - getT2.Count(); + } + return cout1; + } + + /// + /// 数量 + /// + /// + /// + protected string Count4(object projectId) + { + string rate = string.Empty; + if (projectId != null) + { + var getT1 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue); + var getT2 = getDataItemLists.Where(x => x.ProjectId == projectId.ToString() && x.CheckAcceptType == this.rbType.SelectedValue && x.IsOnceQualified == true); + if (getT1.Count() > 0) + { + rate = Math.Round(getT2.Count() * 1.0 / getT1.Count() * 100, 2).ToString(); + } + } + return rate; + } + + #region 合计 + private void OutputSummaryData() + { + string strSql = @"select a.ProjectId,a.ProjectCode, a.ProjectName,a.UnitId,isnull(Count1,0) as Count1, + isnull(Count2,0) as Count2 + from Base_Project a + + left join (select count(*) as Count1,z.ProjectId From Check_SpotCheckDetail x + left join WBS_ControlItemAndCycle z on x.ControlItemAndCycleId=z.ControlItemAndCycleId group by z.ProjectId) as b + on a.ProjectId= b.ProjectId + + left join (select count(*) as Count2,z.ProjectId,IsOK From Check_SpotCheckDetail x + left join WBS_ControlItemAndCycle z on x.ControlItemAndCycleId=z.ControlItemAndCycleId + group by z.ProjectId,x.IsOK) as c + on a.ProjectId= c.ProjectId and IsOK=1 + + where ProjectState =1 "; + List listStr = new List(); + + SqlParameter[] parameter = listStr.ToArray(); + DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); + int Count1 = 0, Count2 = 0; + foreach (DataRow row in tb.Rows) + { + Count1 += Convert.ToInt32(row["Count1"]); + Count2 += Convert.ToInt32(row["Count2"]); + } + JObject summary = new JObject(); + summary.Add("ProjectName", "合计:"); + summary.Add("Count1", Count1.ToString()); + summary.Add("Count2", Count2.ToString()); + summary.Add("Count3", (Count1- Count2).ToString()); + summary.Add("Count4", Math.Round(Count2 * 1.0 / Count1 * 100, 2).ToString()); + Grid1.SummaryData = summary; + } + #endregion } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs index d628a759..7926e041 100644 --- a/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DataShow/QualityAcceptance.aspx.designer.cs @@ -7,13 +7,11 @@ // //------------------------------------------------------------------------------ -namespace FineUIPro.Web.DataShow -{ - - - public partial class QualityAcceptance - { - +namespace FineUIPro.Web.DataShow { + + + public partial class QualityAcceptance { + /// /// form1 控件。 /// @@ -22,7 +20,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.HtmlControls.HtmlForm form1; - + /// /// PageManager1 控件。 /// @@ -31,7 +29,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.PageManager PageManager1; - + /// /// Panel1 控件。 /// @@ -40,7 +38,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Panel Panel1; - + /// /// Grid1 控件。 /// @@ -49,7 +47,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Grid Grid1; - + /// /// Toolbar2 控件。 /// @@ -58,7 +56,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Toolbar Toolbar2; - + /// /// drpProject 控件。 /// @@ -67,7 +65,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.DropDownList drpProject; - + /// /// rbType 控件。 /// @@ -76,7 +74,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.RadioButtonList rbType; - + /// /// btnClose 控件。 /// @@ -85,7 +83,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.Button btnClose; - + /// /// labNumber 控件。 /// @@ -94,7 +92,43 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::System.Web.UI.WebControls.Label labNumber; - + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label2; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label1; + + /// + /// Label3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label3; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label Label4; + /// /// ToolbarSeparator1 控件。 /// @@ -103,7 +137,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; - + /// /// ToolbarText1 控件。 /// @@ -112,7 +146,7 @@ namespace FineUIPro.Web.DataShow /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// protected global::FineUIPro.ToolbarText ToolbarText1; - + /// /// ddlPageSize 控件。 /// diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index 08402686..cff0c93d 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -1,67 +1,86 @@ 错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 +错误类型:SqlException +错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。 错误堆栈: - 在 BLL.ServerService.GetCNCECToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 32 - 在 BLL.ServerService.GetToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 85 - 在 BLL.ServerService.PushCNCEC(String JsonBody, String apiurl) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 58 - 在 BLL.HSSEData_HSSEService.PushCNCEC(String Id) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\HSSEData_HSSEService.cs:行号 517 - 在 FineUIPro.Web.ZHGL.DataSync.HSSEData_HSSEEdit.btnSyn_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\DataSync\HSSEData_HSSEEdit.aspx.cs:行号 516 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.ExecuteReader() + 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) + 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) + 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) + 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 BLL.ProjectService.GetSortIndexProjectByUserIdDropDownList(String userId) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\ProjectData\ProjectService.cs:行号 348 + 在 FineUIPro.Web.indexProject.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 324 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:07/05/2023 09:52:50 -出错文件:http://localhost:2146/ZHGL/DataSync/HSSEData_HSSEEdit.aspx?Id=0925a698-9188-455c-8b86-32e3b1e88680 +----错误类型:Win32Exception +----错误信息: +----等待的操作过时。 +----错误堆栈: + 出错时间:07/28/2023 10:20:21 +出错文件:http://localhost:12528/indexProject.aspx?projectId=d93b0835-ffbd-4039-bed3-2df806adae56 IP地址:::1 操作人员:JT -出错时间:07/05/2023 09:52:50 +出错时间:07/28/2023 10:20:21 错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 +错误类型:SqlException +错误信息:执行超时已过期。完成操作之前已超时或服务器未响应。 错误堆栈: - 在 BLL.ServerService.GetCNCECToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 32 - 在 BLL.ServerService.GetToken() 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 85 - 在 BLL.ServerService.PushCNCEC(String JsonBody, String apiurl) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\ServerService.cs:行号 58 - 在 BLL.HSSEData_HSSEService.PushCNCEC(String Id) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\BLL\ZHGL\DataSync\HSSEData_HSSEService.cs:行号 517 - 在 FineUIPro.Web.ZHGL.DataSync.HSSEData_HSSEEdit.btnSyn_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\ZHGL\DataSync\HSSEData_HSSEEdit.aspx.cs:行号 516 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) + 在 System.Data.SqlClient.SqlConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.SqlInternalConnection.OnError(SqlException exception, Boolean breakConnection, Action`1 wrapCloseInAction) + 在 System.Data.SqlClient.TdsParser.ThrowExceptionAndWarning(TdsParserStateObject stateObj, Boolean callerHasConnectionLock, Boolean asyncClose) + 在 System.Data.SqlClient.TdsParser.TryRun(RunBehavior runBehavior, SqlCommand cmdHandler, SqlDataReader dataStream, BulkCopySimpleResultSet bulkCopyHandler, TdsParserStateObject stateObj, Boolean& dataReady) + 在 System.Data.SqlClient.SqlDataReader.TryConsumeMetaData() + 在 System.Data.SqlClient.SqlDataReader.get_MetaData() + 在 System.Data.SqlClient.SqlCommand.FinishExecuteReader(SqlDataReader ds, RunBehavior runBehavior, String resetOptionsString, Boolean isInternal, Boolean forDescribeParameterEncryption, Boolean shouldCacheForAlwaysEncrypted) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReaderTds(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, Boolean async, Int32 timeout, Task& task, Boolean asyncWrite, Boolean inRetry, SqlDataReader ds, Boolean describeParameterEncryptionRequest) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method, TaskCompletionSource`1 completion, Int32 timeout, Task& task, Boolean& usedCache, Boolean asyncWrite, Boolean inRetry) + 在 System.Data.SqlClient.SqlCommand.RunExecuteReader(CommandBehavior cmdBehavior, RunBehavior runBehavior, Boolean returnStream, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteReader(CommandBehavior behavior, String method) + 在 System.Data.SqlClient.SqlCommand.ExecuteDbDataReader(CommandBehavior behavior) + 在 System.Data.Common.DbCommand.ExecuteReader() + 在 System.Data.Linq.SqlClient.SqlProvider.Execute(Expression query, QueryInfo queryInfo, IObjectReaderFactory factory, Object[] parentArgs, Object[] userArgs, ICompiledSubQuery[] subQueries, Object lastResult) + 在 System.Data.Linq.SqlClient.SqlProvider.ExecuteAll(Expression query, QueryInfo[] queryInfos, IObjectReaderFactory factory, Object[] userArguments, ICompiledSubQuery[] subQueries) + 在 System.Data.Linq.SqlClient.SqlProvider.System.Data.Linq.Provider.IProvider.Execute(Expression query) + 在 System.Data.Linq.DataQuery`1.System.Collections.Generic.IEnumerable.GetEnumerator() + 在 System.Collections.Generic.List`1..ctor(IEnumerable`1 collection) + 在 System.Linq.Enumerable.ToList[TSource](IEnumerable`1 source) + 在 BLL.ProjectService.GetSortIndexProjectByUserIdDropDownList(String userId) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\BLL\ProjectData\ProjectService.cs:行号 348 + 在 FineUIPro.Web.indexProject.Page_Load(Object sender, EventArgs e) 位置 E:\工作\赛鼎施工平台\SGGL_SeDin(New)\SGGL_SeDin_New\SGGL\FineUIPro.Web\indexProject.aspx.cs:行号 324 + 在 System.Web.Util.CalliEventHandlerDelegateProxy.Callback(Object sender, EventArgs e) + 在 System.EventHandler.Invoke(Object sender, EventArgs e) + 在 System.Web.UI.Control.OnLoad(EventArgs e) + 在 System.Web.UI.Control.LoadRecursive() 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:07/05/2023 10:00:45 -出错文件:http://localhost:2146/ZHGL/DataSync/HSSEData_HSSEEdit.aspx?Id=0925a698-9188-455c-8b86-32e3b1e88680 +----错误类型:Win32Exception +----错误信息: +----等待的操作过时。 +----错误堆栈: + 出错时间:07/28/2023 10:21:54 +出错文件:http://localhost:12528/indexProject.aspx?projectId=d93b0835-ffbd-4039-bed3-2df806adae56 IP地址:::1 操作人员:JT -出错时间:07/05/2023 10:00:45 - - -错误信息开始=====> -错误类型:NullReferenceException -错误信息:未将对象引用设置到对象的实例。 -错误堆栈: - 在 FineUIPro.Web.SysManage.SysConstSet.btnApply_Click(Object sender, EventArgs e) 位置 E:\SEDIN\SGGL_SeDin_New\SGGL\FineUIPro.Web\SysManage\SysConstSet.aspx.cs:行号 972 - 在 FineUIPro.Button.OnClick(EventArgs e) - 在 (Button , EventArgs ) - 在 FineUIPro.Button.RaisePostBackEvent(String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(IPostBackEventHandler sourceControl, String eventArgument) - 在 System.Web.UI.Page.RaisePostBackEvent(NameValueCollection postData) - 在 System.Web.UI.Page.ProcessRequestMain(Boolean includeStagesBeforeAsyncPoint, Boolean includeStagesAfterAsyncPoint) -出错时间:07/05/2023 10:05:10 -出错文件:http://localhost:2146/SysManage/SysConstSet.aspx -IP地址:::1 -操作人员:JT - -出错时间:07/05/2023 10:05:10 +出错时间:07/28/2023 10:21:54 错误信息开始=====> diff --git a/SGGL/FineUIPro.Web/File/Excel/DataOut/进度计划编制.xls b/SGGL/FineUIPro.Web/File/Excel/DataOut/进度计划编制.xls new file mode 100644 index 00000000..90af43b5 Binary files /dev/null and b/SGGL/FineUIPro.Web/File/Excel/DataOut/进度计划编制.xls differ diff --git a/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc b/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc index c0a689c3..64393096 100644 Binary files a/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc and b/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc differ diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index a3089bac..d87d647b 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -75,6 +75,9 @@ False ..\FineUIPro\Reference BLL\AxInterop.SYNCARDOCXLib.dll + + ..\packages\Portable.BouncyCastle.1.8.9\lib\net40\BouncyCastle.Crypto.dll + False ..\FineUIPro\Reference BLL\FastReport.dll @@ -95,8 +98,8 @@ False ..\FineUIPro\FineUIPro.dll - - ..\packages\SharpZipLib.1.2.0\lib\net45\ICSharpCode.SharpZipLib.dll + + ..\packages\SharpZipLib.1.3.3\lib\net45\ICSharpCode.SharpZipLib.dll False @@ -113,17 +116,17 @@ ..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll - - ..\FineUIPro\Reference BLL\NPOI.dll + + ..\packages\NPOI.2.5.6\lib\net45\NPOI.dll - - ..\FineUIPro\Reference BLL\NPOI.OOXML.dll + + ..\packages\NPOI.2.5.6\lib\net45\NPOI.OOXML.dll - - ..\FineUIPro\Reference BLL\NPOI.OpenXml4Net.dll + + ..\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXml4Net.dll - - ..\FineUIPro\Reference BLL\NPOI.OpenXmlFormats.dll + + ..\packages\NPOI.2.5.6\lib\net45\NPOI.OpenXmlFormats.dll ..\packages\RestSharp.106.15.0\lib\net452\RestSharp.dll @@ -1123,6 +1126,7 @@ + @@ -11505,6 +11509,13 @@ index.aspx + + PlanSet.aspx + ASPXCodeBehind + + + PlanSet.aspx + ProgressShow.aspx ASPXCodeBehind @@ -13991,7 +14002,7 @@ True 0 / - http://localhost:2146/ + http://localhost:12528/ False False diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs index 9610f5c5..6f9e23af 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanList.aspx.cs @@ -389,7 +389,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan string Id = Grid1.SelectedRowID; Model.ActionPlan_ActionPlanList actionPlanList = BLL.ActionPlanListService.GetActionPlanListById(Id); - if (actionPlanList.States != BLL.Const.ActionPlanList_Complete) + if (actionPlanList.States != BLL.Const.ActionPlanList_Complete && this.CurrUser.PersonId != BLL.Const.sysglyId && this.CurrUser.PersonId != BLL.Const.hfnbdId) { Alert.ShowInTop("状态必须为审批完成的才能导出!", MessageBoxIcon.Warning); return; @@ -410,57 +410,59 @@ namespace FineUIPro.Web.HSSE.ActionPlan { projectName = "(" + projectName + ")"; } + else + { + projectName = "(无项目)"; + } + projectName = projectName.Replace("/", "_"); newUrl = uploadfilepath.Replace(".doc", projectName + ".doc"); + filePath = uploadfilepath.Replace(".doc", projectName + ".pdf"); if (File.Exists(newUrl)) { File.Delete(newUrl); } File.Copy(uploadfilepath, newUrl); + + + ///更新书签 Document doc = new Aspose.Words.Document(newUrl); - Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc); - builder.MoveToBookmark("tab"); - builder.StartTable(); - builder.CellFormat.Borders.LineStyle = LineStyle.Single; - builder.CellFormat.Borders.Color = System.Drawing.Color.Black; - builder.Bold = false; - builder.RowFormat.Height = 20; - builder.Font.Size = 9; - #region 工程名称和项目部编制人员 - //工程名称和项目部编制人员 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 100; - builder.Font.Bold = true; - builder.Write("工程名称"); + //写入第一行 + Bookmark bookmarkProjectName = doc.Range.Bookmarks["ProjectName"]; using (Model.SGGLDB db = new Model.SGGLDB(Funs.ConnString)) { - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 130; - builder.Font.Bold = false; var project = ProjectService.GetProjectByProjectId(actionPlanList.ProjectId); var ActionPlan_ActionPlanListApproveList = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "2").ToList(); - if (project != null) - { - if (project.ProjectName.Length > 20 && ActionPlan_ActionPlanListApproveList.Count != 0) - { - builder.Write(project.ProjectName.Substring(0, 20) + "\n" + - project.ProjectName.Substring(20)); - } - else - { - builder.Write(project.ProjectName); - } + + + if (bookmarkProjectName != null) + { + + if (project != null) + { + if (project.ProjectName.Length > 20 && ActionPlan_ActionPlanListApproveList.Count != 0) + { + bookmarkProjectName.Text = project.ProjectName.Substring(0, 20) + "\n" + + project.ProjectName.Substring(20); + } + else + { + bookmarkProjectName.Text = project.ProjectName; + } + + } } - builder.EndRow(); + + Aspose.Words.DocumentBuilder builder = new Aspose.Words.DocumentBuilder(doc); + builder.MoveToBookmark("tab"); + builder.StartTable(); + builder.CellFormat.Borders.LineStyle = LineStyle.Single; + builder.CellFormat.Borders.Color = System.Drawing.Color.Black; + builder.Bold = false; + builder.RowFormat.Height = 20; + builder.Font.Size = 9; + #region 工程名称和项目部编制人员 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; @@ -475,9 +477,18 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 130; + builder.CellFormat.Width = 300; builder.Font.Bold = false; - builder.Write(BLL.Person_PersonsService.GetPersonsNameById(actionPlanList.CompileMan)); + var getCompileMan = Person_PersonsService.GetPerson_PersonsById(actionPlanList.CompileMan); + if (!string.IsNullOrEmpty(getCompileMan.SignatureUrl) && File.Exists(rootPath + getCompileMan.SignatureUrl)) + { + var file = rootPath + getCompileMan.SignatureUrl; + builder.InsertImage(file, 80, 20); + } + else + { + builder.Write(getCompileMan.PersonName); + } builder.EndRow(); #endregion @@ -503,27 +514,43 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - string manname = man(ActionPlan_ActionPlanListApproveList[i].ApproveMan); + var getApproveMan = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i].ApproveMan); //判断是不是最后一个 if (ActionPlan_ActionPlanListApproveList.Count == i + 1) { - builder.CellFormat.Width = 40; + builder.CellFormat.Width = 150; builder.Font.Bold = false; - builder.Write(manname); + if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl)) + { + var file = rootPath + getApproveMan.SignatureUrl; + builder.InsertImage(file, 80, 20); + } + else + { + builder.Write(getApproveMan.PersonName); + } builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 90; + builder.CellFormat.Width = 150; builder.Write(""); } else { - builder.CellFormat.Width = 40; + builder.CellFormat.Width = 150; builder.Font.Bold = false; - builder.Write(manname); + if (!string.IsNullOrEmpty(getApproveMan.SignatureUrl) && File.Exists(rootPath + getApproveMan.SignatureUrl)) + { + var file = rootPath + getApproveMan.SignatureUrl; + builder.InsertImage(file, 80, 20); + } + else + { + builder.Write(getApproveMan.PersonName); + } } @@ -535,7 +562,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 70; + builder.CellFormat.Width = 100; builder.Font.Bold = true; builder.Write("项目部审核人"); @@ -544,10 +571,18 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 20; - string manname2 = man(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan); + builder.CellFormat.Width = 50; + var getApproveMan2 = Person_PersonsService.GetPerson_PersonsById(ActionPlan_ActionPlanListApproveList[i + 1].ApproveMan); builder.Font.Bold = false; - builder.Write(manname2); + if (!string.IsNullOrEmpty(getApproveMan2.SignatureUrl) && File.Exists(rootPath + getApproveMan2.SignatureUrl)) + { + var file = rootPath + getApproveMan2.SignatureUrl; + builder.InsertImage(file, 80, 20); + } + else + { + builder.Write(getApproveMan2.PersonName); + } builder.EndRow(); i += 1; } @@ -563,9 +598,12 @@ namespace FineUIPro.Web.HSSE.ActionPlan { } + var approves = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == BLL.Const.ActionPlanList_Reviewing).ToList(); var ActionPlan_ActionPlanListApproveList2 = db.ActionPlan_ActionPlanListApprove.Where(x => x.ActionPlanListId == Id && x.ApproveType == "6").ToList(); - if (ActionPlan_ActionPlanListApproveList2.Count > 0) + DateTime date = DateTime.Now; + if (ActionPlan_ActionPlanListApproveList2.Count > 0 || approves.Count > 0) { + date = ActionPlan_ActionPlanListApproveList2.OrderByDescending(x => x.ApproveDate).FirstOrDefault().ApproveDate.Value; #region 主要评审部门 //主要评审部门 builder.InsertCell(); @@ -573,7 +611,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 230; + builder.CellFormat.Width = 400; builder.Font.Bold = true; builder.Write("主要评审部门"); builder.EndRow(); @@ -583,7 +621,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 80; + builder.CellFormat.Width = 150; builder.Font.Bold = true; builder.Write("评审部门"); @@ -592,7 +630,7 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 80; + builder.CellFormat.Width = 100; builder.Font.Bold = true; builder.Write("评审意见"); @@ -601,62 +639,134 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 70; + builder.CellFormat.Width = 150; builder.Font.Bold = true; builder.Write("评审部门负责人/日期"); builder.EndRow(); #endregion - foreach (var item in ActionPlan_ActionPlanListApproveList2) + foreach (var item in approves) { - //部门名称 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 80; - var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); - builder.Font.Bold = false; - if (departModel != null) - { - builder.Write(departModel.DepartName); - } - //评审意见 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 80; - builder.Font.Bold = false; - if (!string.IsNullOrEmpty(item.ApproveIdea)) - { - builder.Write(item.ApproveIdea); - } - else - { - builder.Write("无"); - } - - - //评审日期 - builder.InsertCell(); - builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; - builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; - builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 - builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 - builder.CellFormat.Width = 70; - builder.Font.Bold = false; if (item.ApproveDate != null) { - string personName = Person_PersonsService.GetPersonsNameById(item.ApproveMan); - builder.Write(personName + " " + item.ApproveDate.ToString().Split(' ')[0]); + //部门名称 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + builder.Font.Bold = false; + builder.Write("施工管理部"); + //评审意见 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 100; + builder.Font.Bold = false; + if (!string.IsNullOrEmpty(item.ApproveIdea)) + { + builder.Write(item.ApproveIdea); + } + else + { + builder.Write("无"); + } + + + //评审日期 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + builder.Font.Bold = false; + if (item.ApproveDate != null) + { + var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } + } + else + { + builder.Write(""); + } + builder.EndRow(); } - else + } + foreach (var item in ActionPlan_ActionPlanListApproveList2) + { + if (item.ApproveMan != "905a75d6-e733-449f-9742-4dcd71e8d2e1" && item.DepartId != BLL.Const.Depart_CompanyLeaderId && item.ApproveDate != null) { - builder.Write(""); + //部门名称 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + var departModel = db.Base_Depart.FirstOrDefault(x => x.DepartId == item.DepartId); + builder.Font.Bold = false; + if (departModel != null) + { + builder.Write(departModel.DepartName); + } + //评审意见 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 100; + builder.Font.Bold = false; + if (!string.IsNullOrEmpty(item.ApproveIdea)) + { + builder.Write(item.ApproveIdea); + } + else + { + builder.Write("无"); + } + + + //评审日期 + builder.InsertCell(); + builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; + builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; + builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Center;//垂直居中对齐 + builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 + builder.CellFormat.Width = 150; + builder.Font.Bold = false; + if (item.ApproveDate != null) + { + var getUser = Person_PersonsService.GetPerson_PersonsById(item.ApproveMan); + if (!string.IsNullOrEmpty(getUser.SignatureUrl) && File.Exists(rootPath + getUser.SignatureUrl)) + { + var file = rootPath + getUser.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(item.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(getUser.PersonName + " " + item.ApproveDate.ToString().Split(' ')[0]); + } + } + else + { + builder.Write(""); + } + builder.EndRow(); } - builder.EndRow(); } #endregion } @@ -676,13 +786,31 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Bottom;//底部对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐 - builder.CellFormat.Width = 130; + builder.CellFormat.Width = 300; builder.Font.Bold = true; builder.RowFormat.Height = 40; + var AQApprove = (from x in db.ActionPlan_ActionPlanListApprove + where x.ApproveMan == "905a75d6-e733-449f-9742-4dcd71e8d2e1" + select x).FirstOrDefault(); + if (AQApprove != null) + { + builder.Write(AQApprove.ApproveIdea + "\n\n"); + } builder.Write("公司安全总监/部门负责人:"); - builder.Write(" 年"); - builder.Write(" 月"); - builder.Write(" 日"); + var personAQ = BLL.Person_PersonsService.GetPerson_PersonsById("905a75d6-e733-449f-9742-4dcd71e8d2e1"); //安全总监任学宁 + if (!string.IsNullOrEmpty(personAQ.SignatureUrl) && File.Exists(rootPath + personAQ.SignatureUrl)) + { + var file = rootPath + personAQ.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(date.ToString().Split(' ')[0]); + } + else + { + builder.Write(personAQ.PersonName + " " + date.ToString().Split(' ')[0]); + } + //builder.Write(" 年"); + //builder.Write(" 月"); + //builder.Write(" 日"); builder.EndRow(); builder.InsertCell(); @@ -692,20 +820,46 @@ namespace FineUIPro.Web.HSSE.ActionPlan builder.ParagraphFormat.Alignment = ParagraphAlignment.Center;//水平居中对齐 builder.CellFormat.Width = 100; builder.Font.Bold = true; - builder.Write("审核"); + builder.Write("审批"); //公司安全总监/部门负责人 builder.InsertCell(); builder.CellFormat.VerticalMerge = Aspose.Words.Tables.CellMerge.None; builder.CellFormat.HorizontalMerge = Aspose.Words.Tables.CellMerge.First; builder.CellFormat.VerticalAlignment = Aspose.Words.Tables.CellVerticalAlignment.Bottom;//底部对齐 builder.ParagraphFormat.Alignment = ParagraphAlignment.Left;//水平居中对齐 - builder.CellFormat.Width = 130; + builder.CellFormat.Width = 300; builder.Font.Bold = true; builder.RowFormat.Height = 40; + var GSLDApprove = (from x in db.ActionPlan_ActionPlanListApprove + join y in db.Person_Persons + on x.ApproveMan equals y.PersonId + where x.ActionPlanListId == Id && x.DepartId == BLL.Const.Depart_CompanyLeaderId + select x).FirstOrDefault(); + if (GSLDApprove != null) + { + builder.Write(GSLDApprove.ApproveIdea + "\n\n"); + } builder.Write("公司主管生产/安全领导:"); - builder.Write(" 年"); - builder.Write(" 月"); - builder.Write(" 日"); + if (GSLDApprove != null) + { + var personGSLD = BLL.Person_PersonsService.GetPerson_PersonsById(GSLDApprove.ApproveMan); + if (!string.IsNullOrEmpty(personGSLD.SignatureUrl) && File.Exists(rootPath + personGSLD.SignatureUrl)) + { + var file = rootPath + personGSLD.SignatureUrl; + builder.InsertImage(file, 80, 20); + builder.Write(GSLDApprove.ApproveDate.ToString().Split(' ')[0]); + } + else + { + builder.Write(personGSLD.PersonName + " " + GSLDApprove.ApproveDate.ToString().Split(' ')[0]); + } + } + else + { + builder.Write(" 年"); + builder.Write(" 月"); + builder.Write(" 日"); + } builder.EndRow(); builder.Font.Bold = false; @@ -715,17 +869,24 @@ namespace FineUIPro.Web.HSSE.ActionPlan } doc.Save(newUrl); - string fileName = Path.GetFileName(newUrl); - FileInfo info = new FileInfo(newUrl); + //生成PDF文件 + string pdfUrl = newUrl.Replace(".doc", ".pdf"); + Document doc1 = new Aspose.Words.Document(newUrl); + //验证参数 + if (doc1 == null) { throw new Exception("Word文件无效"); } + doc1.Save(pdfUrl, Aspose.Words.SaveFormat.Pdf);//还可以改成其它格式 + string fileName = Path.GetFileName(filePath); + FileInfo info = new FileInfo(pdfUrl); 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.TransmitFile(pdfUrl, 0, fileSize); Response.Flush(); Response.Close(); File.Delete(newUrl); + File.Delete(pdfUrl); } catch (Exception ex) { diff --git a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs index 41047be1..4d73a32d 100644 --- a/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/ActionPlan/ActionPlanListEdit.aspx.cs @@ -473,8 +473,8 @@ namespace FineUIPro.Web.HSSE.ActionPlan actionPlanList.States = actionPlanList1.States; } - if (!CurrUser.PersonId.Equals(actionPlanList1.CompileMan)) - { + //if (!CurrUser.PersonId.Equals(actionPlanList1.CompileMan)) + //{ Model.ActionPlan_ActionPlanListApprove approve = ActionPlanListApproveService.GetConstructSoluAppByApproveMan(ActionPlanListId, CurrUser.PersonId, Convert.ToInt32(actionPlanList1.Edition)); if (type == BLL.Const.BtnSubmit) { @@ -484,30 +484,30 @@ namespace FineUIPro.Web.HSSE.ActionPlan approve.IsAgree = Convert.ToBoolean(rblIsAgree.SelectedValue); approve.ApproveIdea = txtOptions.Text.Trim(); ActionPlanListApproveService.UpdateActionPlanListApprove(approve); - } - else - { - if (type == BLL.Const.BtnSubmit) - { - if (actionPlanList1.States == Const.ActionPlanList_Audit)//==会签状态升级版本 - { - Model.ActionPlan_ActionPlanListApprove reApprove = new Model.ActionPlan_ActionPlanListApprove(); - reApprove.ActionPlanListId = actionPlanList.ActionPlanListId; - reApprove.ApproveDate = DateTime.Now; - reApprove.ApproveMan = actionPlanList1.CompileMan; - reApprove.ApproveType = Const.ActionPlanList_ReCompile; - edtion++; - reApprove.Edition = edtion; - ActionPlanListApproveService.AddActionPlanListApprove(reApprove); - } - else - { - Model.ActionPlan_ActionPlanListApprove approves = ActionPlanListApproveService.GetConstructSolApproveByApproveMan(ActionPlanListId, actionPlanList1.CompileMan); - approves.ApproveDate = DateTime.Now; - ActionPlanListApproveService.UpdateActionPlanListApprove(approves); - } - } - } + //} + //else + //{ + // if (type == BLL.Const.BtnSubmit) + // { + // if (actionPlanList1.States == Const.ActionPlanList_Audit)//==会签状态升级版本 + // { + // Model.ActionPlan_ActionPlanListApprove reApprove = new Model.ActionPlan_ActionPlanListApprove(); + // reApprove.ActionPlanListId = actionPlanList.ActionPlanListId; + // reApprove.ApproveDate = DateTime.Now; + // reApprove.ApproveMan = actionPlanList1.CompileMan; + // reApprove.ApproveType = Const.ActionPlanList_ReCompile; + // edtion++; + // reApprove.Edition = edtion; + // ActionPlanListApproveService.AddActionPlanListApprove(reApprove); + // } + // else + // { + // Model.ActionPlan_ActionPlanListApprove approves = ActionPlanListApproveService.GetConstructSolApproveByApproveMan(ActionPlanListId, actionPlanList1.CompileMan); + // approves.ApproveDate = DateTime.Now; + // ActionPlanListApproveService.UpdateActionPlanListApprove(approves); + // } + // } + //} } else { diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx b/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx index 8c1435a4..552dbbcf 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx @@ -10,7 +10,7 @@ 编辑标准规范辨识 - + @@ -37,9 +37,9 @@ - + - @@ -49,10 +49,10 @@ + EnableColumnLines="true" EnableCheckBoxSelect="true"> diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs index 2476e4d9..4f4a65d2 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/ConstructionStandardIdentifyEdit.aspx.cs @@ -143,13 +143,56 @@ namespace FineUIPro.Web.HSSE.InformationProject /// private void BindGrid() { - var q = from x in Funs.DB.View_InformationProject_ConstructionStandardSelectedItem - where x.StandardName != null - select x; - if (!this.ckbAll.Checked) + IQueryable q; + if (this.ckbAll.Checked) { - q = q.Where(e => e.ConstructionStandardIdentifyId == this.ConstructionStandardIdentifyId); + q = from x in Funs.DB.Law_HSSEStandardsList + join y in Funs.DB.InformationProject_ConstructionStandardSelectedItem on x.StandardId equals y.StandardId + join z in Funs.DB.InformationProject_ConstructionStandardIdentify on y.ConstructionStandardIdentifyId equals z.ConstructionStandardIdentifyId + where x.StandardName != null && z.ProjectId == this.CurrUser.LoginProjectId + select new Model.View_InformationProject_ConstructionStandardSelectedItem + { + ConstructionStandardSelectedItemId =y.ConstructionStandardSelectedItemId, + ConstructionStandardIdentifyId = y.ConstructionStandardIdentifyId, + ProjectId = this.CurrUser.LoginProjectId, + StandardId = x.StandardId, + StandardGrade = x.StandardGrade, + StandardNo = x.StandardNo, + StandardName = x.StandardName, + AttachUrl = x.AttachUrl, + IsSelected1 = x.IsSelected1, + IsSelected2 = x.IsSelected2, + IsSelected3 = x.IsSelected3, + IsSelected4 = x.IsSelected4, + IsSelected5 = x.IsSelected5, + IsSelected6 = x.IsSelected6, + IsSelected7 = x.IsSelected7, + IsSelected8 = x.IsSelected8, + IsSelected9 = x.IsSelected9, + IsSelected10 = x.IsSelected10, + IsSelected11 = x.IsSelected11, + IsSelected12 = x.IsSelected12, + IsSelected13 = x.IsSelected13, + IsSelected14 = x.IsSelected14, + IsSelected15 = x.IsSelected15, + IsSelected16 = x.IsSelected16, + IsSelected17 = x.IsSelected17, + IsSelected18 = x.IsSelected18, + IsSelected19 = x.IsSelected19, + IsSelected20 = x.IsSelected20, + IsSelected21 = x.IsSelected21, + IsSelected22 = x.IsSelected22, + IsSelected23 = x.IsSelected23, + IsSelected90 = x.IsSelected90 + }; } + else + { + q = from x in Funs.DB.View_InformationProject_ConstructionStandardSelectedItem + where x.ConstructionStandardIdentifyId == this.ConstructionStandardIdentifyId + select x; + } + if (!string.IsNullOrEmpty(this.txtStandardGrade.Text.Trim())) { q = q.Where(e => e.StandardGrade.Contains(this.txtStandardGrade.Text.Trim())); diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx index b8e12ec3..5e7590ff 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReport.aspx @@ -26,6 +26,9 @@ + + diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs index cd4ba016..d1996dfb 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.cs @@ -59,7 +59,7 @@ namespace FineUIPro.Web.HSSE.InformationProject this.ProjectId = Request.Params["projectId"]; } BLL.ConstValue.InitConstValueDropDownList(this.ddlYearId, BLL.ConstValue.Group_0008, true); - + BLL.ConstValue.InitConstValueDropDownList(this.ddlQuarter, BLL.ConstValue.Group_0011, true); this.EPSummaryReportId = Request.Params["EPSummaryReportId"]; if (!string.IsNullOrEmpty(this.EPSummaryReportId)) { @@ -71,6 +71,10 @@ namespace FineUIPro.Web.HSSE.InformationProject if (report.YearId != null) { this.ddlYearId.SelectedValue = report.YearId.ToString(); + if (report.Quarter.HasValue) + { + this.ddlQuarter.SelectedValue = report.Quarter.ToString(); + } this.txtReportDate.Text = report.ReportDate.HasValue ? string.Format("{0:yyyy-MM-dd}", report.ReportDate) : ""; this.txtResponsiblePerson.Text = report.ResponsiblePerson; this.txtResponsiblePersonTel.Text = report.ResponsiblePersonTel; @@ -91,7 +95,9 @@ namespace FineUIPro.Web.HSSE.InformationProject } else { + DateTime showDate = DateTime.Now.AddMonths(-3); this.ddlYearId.SelectedValue = DateTime.Now.Year.ToString(); + this.ddlQuarter.SelectedValue = Funs.GetNowQuarterlyByTime(showDate).ToString(); this.txtReportDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); } } @@ -124,13 +130,16 @@ namespace FineUIPro.Web.HSSE.InformationProject Model.InformationProject_EPSummaryReport report = new Model.InformationProject_EPSummaryReport { ProjectId = this.ProjectId, - UnitId = string.IsNullOrEmpty(this.CurrUser.UnitId) ? Const.UnitId_SEDIN : this.CurrUser.UnitId, + UnitId = string.IsNullOrEmpty(this.CurrUser.UnitId) ? BLL.Const.UnitId_SEDIN : this.CurrUser.UnitId, }; - if (this.ddlYearId.SelectedValue != BLL.Const._Null) { report.YearId = Funs.GetNewIntOrZero(this.ddlYearId.SelectedValue); } + if (this.ddlQuarter.SelectedValue != BLL.Const._Null) + { + report.Quarter = Funs.GetNewIntOrZero(this.ddlQuarter.SelectedValue); + } report.ResponsiblePerson = this.txtResponsiblePerson.Text.Trim(); report.ResponsiblePersonTel = this.txtResponsiblePersonTel.Text.Trim(); report.ContactPerson = this.txtContactPerson.Text.Trim(); @@ -154,8 +163,8 @@ namespace FineUIPro.Web.HSSE.InformationProject else { Model.InformationProject_EPSummaryReport oldReport = (from x in Funs.DB.InformationProject_EPSummaryReport - where x.ProjectId == report.ProjectId && x.YearId == report.YearId - select x).FirstOrDefault(); + where x.ProjectId == report.ProjectId && x.YearId == report.YearId && x.Quarter == report.Quarter + select x).FirstOrDefault(); if (oldReport == null) { this.EPSummaryReportId = SQLHelper.GetNewID(typeof(Model.InformationProject_EPSummaryReport)); @@ -166,7 +175,7 @@ namespace FineUIPro.Web.HSSE.InformationProject } else { - Alert.ShowInTop("该年度记录已存在", MessageBoxIcon.Warning); + Alert.ShowInTop("该季度记录已存在", MessageBoxIcon.Warning); return; } } diff --git a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.designer.cs index a0c877c2..b7f2e02b 100644 --- a/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/HSSE/InformationProject/EPSummaryReportEdit.aspx.designer.cs @@ -48,6 +48,15 @@ namespace FineUIPro.Web.HSSE.InformationProject { /// protected global::FineUIPro.DropDownList ddlYearId; + /// + /// ddlQuarter 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlQuarter; + /// /// txtReportDate 控件。 /// diff --git a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs index 0eb3af86..785a5f03 100644 --- a/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs +++ b/SGGL/FineUIPro.Web/HSSE/SitePerson/PersonInfo.aspx.cs @@ -1,6 +1,9 @@ using BLL; +using FineUIPro.Web.DataShow; +using Model; using System; using System.Linq; +using System.Runtime.InteropServices.ComTypes; using System.Text; using AspNet = System.Web.UI.WebControls; @@ -327,15 +330,48 @@ namespace FineUIPro.Web.HSSE.SitePerson protected void btnInRealName_Click(object sender, EventArgs e) { - foreach (var item in Grid1.Rows) + int count = 0; + IQueryable getDataList = Funs.DB.SitePerson_PersonInOut.Where(x => x.ProjectId == this.CurrUser.LoginProjectId); + if (this.rbInOutWay.SelectedValue != "0") { - var getInOut = Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == item.RowID); + getDataList = getDataList.Where(x => x.InOutWay == this.rbInOutWay.SelectedValue); + } + if (!string.IsNullOrEmpty(this.drpUnit.SelectedValue) && this.drpUnit.SelectedValue != Const._Null) + { + getDataList = getDataList.Where(x => x.UnitId == this.drpUnit.SelectedValue); + } + if (!string.IsNullOrEmpty(this.txtPersonName.Text)) + { + getDataList = getDataList.Where(x => x.PersonName.Contains(this.txtPersonName.Text.Trim())); + } + if (!string.IsNullOrEmpty(this.txtIdCard.Text)) + { + getDataList = getDataList.Where(x => x.IdentityCard.Contains(this.txtIdCard.Text.Trim())); + } + + DateTime? startDate = Funs.GetNewDateTime(this.txtStartDate.Text); + DateTime? endDate = Funs.GetNewDateTime(this.txtEndDate.Text); + if (startDate.HasValue) + { + getDataList = getDataList.Where(x => x.ChangeTime >= startDate); + } + if (endDate.HasValue) + { + getDataList = getDataList.Where(x => x.ChangeTime <= endDate); + } + + foreach (var item in getDataList) + { + var getInOut = Funs.DB.SitePerson_PersonInOut.FirstOrDefault(x => x.PersonInOutId == item.PersonInOutId); if (getInOut != null) { - getInOut.PersonInOutId = SQLHelper.GetNewID(); + item.PersonInOutId = SQLHelper.GetNewID(); PersonInOutService.InsertPersonInOutNowNow(getInOut); + count++; } } + + Alert.ShowInTop("写入考勤" + count.ToString() + "条。", MessageBoxIcon.Success); } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx new file mode 100644 index 00000000..c71bec83 --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx @@ -0,0 +1,141 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="PlanSet.aspx.cs" Inherits="FineUIPro.Web.JDGL.Check.PlanSet" %> + + + + + +进度计划设置 + + + + + + + + + + + + + + + + + + + + + + <%----%> + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs new file mode 100644 index 00000000..cbde1d5b --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.cs @@ -0,0 +1,361 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Collections.Generic; +using System.Data; +using System.IO; +using System.Linq; +using System.Web.UI.WebControls; + +namespace FineUIPro.Web.JDGL.Check +{ + public partial class PlanSet : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + BindGrid(); + } + } + #endregion + + private void BindGrid() + { + DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, string.Empty); + Grid1.DataSource = table; + Grid1.DataBind(); + for (int i = 0; i < this.Grid1.Rows.Count; i++) + { + if (string.IsNullOrEmpty(this.Grid1.Rows[i].DataKeys[2].ToString())) + { + System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone")); + cbIsMileStone.Visible = false; + foreach (GridColumn column in Grid1.Columns) + { + if (column.ColumnIndex != 0 && column.ColumnIndex != 1) + { + this.Grid1.Rows[i].CellCssClasses[column.ColumnIndex] = "f-grid-cell-uneditable"; + } + } + } + else + { + System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone")); + Model.WBS_WorkPackage workPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(this.Grid1.Rows[i].DataKeys[2].ToString()); + if (workPackage != null && workPackage.IsMileStone == true) + { + cbIsMileStone.Checked = true; + } + } + } + } + + #region 保存 + /// + /// 保存按钮 + /// + /// + /// + protected void btnSave_Click(object sender, EventArgs e) + { + if (BLL.CommonService.GetAllButtonPowerList(this.CurrUser.LoginProjectId, this.CurrUser.PersonId, BLL.Const.PlanSetMenuId, BLL.Const.BtnSave)) + { + Save(); + BindGrid(); + ShowNotify("保存成功!", MessageBoxIcon.Success); + PageContext.RegisterStartupScript(ActiveWindow.GetHideReference()); + } + else + { + ShowNotify("您没有这个权限,请与管理员联系!", MessageBoxIcon.Warning); + } + } + + private void Save() + { + Model.SGGLDB db = Funs.DB; + var workPackages = from x in db.WBS_WorkPackage + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + var unitWorks = from x in db.WBS_UnitWork + where x.ProjectId == this.CurrUser.LoginProjectId + select x; + string[] ids = this.hdId.Text.Split(','); + if (ids.Length > 0) + { + foreach (JObject mergedRow in Grid1.GetMergedData()) + { + JObject values = mergedRow.Value("values"); + int i = mergedRow.Value("index"); + if (this.Grid1.Rows[i].DataKeys[2] != null) + { + Model.WBS_WorkPackage workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == this.Grid1.Rows[i].DataKeys[2].ToString()); + if (workPackage != null) + { + string weights = values.Value("JDWeights"); + string unit = values.Value("Unit"); + string planProjectQuantity = values.Value("PlanProjectQuantity"); + string realProjectQuantity = values.Value("RealProjectQuantity"); + string planStartDate = values.Value("PlanStartDate"); + string planEndDate = values.Value("PlanEndDate"); + string realStartDate = values.Value("RealStartDate"); + string preWorkCode = values.Value("PreWorkCode"); + System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone")); + workPackage.JDWeights = Funs.GetNewDecimal(weights); + workPackage.Unit = unit; + workPackage.PlanProjectQuantity = Funs.GetNewDecimal(planProjectQuantity); + workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity); + workPackage.PlanStartDate = Funs.GetNewDateTime(planStartDate); + workPackage.PlanEndDate = Funs.GetNewDateTime(planEndDate); + workPackage.RealStartDate = Funs.GetNewDateTime(realStartDate); + workPackage.IsMileStone = cbIsMileStone.Checked; + workPackage.PreWorkCode = preWorkCode; + BLL.WorkPackageService.UpdateWorkPackage(workPackage); + if (workPackage.PlanStartDate != null || workPackage.PlanEndDate != null || workPackage.RealStartDate != null) + { + BLL.WorkPackageService.UpdateWorkPackages(db, workPackage, workPackage.PlanStartDate, workPackage.PlanEndDate, workPackage.RealStartDate, null); + var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId); + if (workPackage.PlanStartDate != null) + { + if (unitWork.PlanStartDate == null) + { + unitWork.PlanStartDate = workPackage.PlanStartDate; + } + else + { + if (unitWork.PlanStartDate > workPackage.PlanStartDate) + { + unitWork.PlanStartDate = workPackage.PlanStartDate; + } + } + } + if (workPackage.PlanEndDate != null) + { + if (unitWork.PlanEndDate == null) + { + unitWork.PlanEndDate = workPackage.PlanEndDate; + } + else + { + if (unitWork.PlanEndDate < workPackage.PlanEndDate) + { + unitWork.PlanEndDate = workPackage.PlanEndDate; + } + } + } + if (workPackage.RealStartDate != null) + { + if (unitWork.RealStartDate == null) + { + unitWork.RealStartDate = workPackage.RealStartDate; + } + else + { + if (unitWork.RealStartDate > workPackage.RealStartDate) + { + unitWork.RealStartDate = workPackage.RealStartDate; + } + } + } + } + db.SubmitChanges(); + } + } + } + } + } + #endregion + + #region 导出(excel按钮) + protected void btnOutExcel_Click(object sender, EventArgs e) + { + if (this.Grid1.Rows.Count > 0) + { + try + { + DataTable table = BLL.WorkPackageService.GetAllTreeDataTable(this.CurrUser.LoginProjectId, "Out"); + string projectNmae = BLL.ProjectService.GetProjectNameByProjectId(this.CurrUser.LoginProjectId); + if (!string.IsNullOrEmpty(projectNmae)) + { + projectNmae = "(" + projectNmae + ")"; + } + string rootPath = Server.MapPath("~/"); + string initTemplatePath = string.Empty; + string uploadfilepath = string.Empty; + string newUrl = string.Empty; + string filePath = string.Empty; + initTemplatePath = Const.JDPlanTemplateUrl; + uploadfilepath = rootPath + initTemplatePath; + newUrl = uploadfilepath.Replace(".xls", projectNmae + ".xls"); + File.Copy(uploadfilepath, newUrl); + // 第一步:读取文件流 + NPOI.SS.UserModel.IWorkbook workbook; + using (FileStream stream = new FileStream(newUrl, FileMode.Open, FileAccess.Read)) + { + workbook = new NPOI.HSSF.UserModel.HSSFWorkbook(stream); + } + + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle0 = workbook.CreateCellStyle(); + cellStyle0.BorderTop = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.BorderRight = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.BorderBottom = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.BorderLeft = NPOI.SS.UserModel.BorderStyle.None; + cellStyle0.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle0.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + var font = workbook.CreateFont(); + font.FontHeightInPoints = 12; + font.IsBold = true; + //font.FontHeightInPoints = (short)8.5;字号为小数时要转为short + cellStyle0.SetFont(font); + + // 第二步:创建新数据行 + NPOI.SS.UserModel.ISheet sheet = workbook.GetSheet("Sheet1"); + NPOI.SS.UserModel.IRow row1 = sheet.CreateRow(1); + NPOI.SS.UserModel.ICell cell2; + // 添加测试数据 + cell2 = row1.CreateCell(14); + cell2.CellStyle = cellStyle0; + cell2.SetCellValue("123"); + var font2 = workbook.CreateFont(); + font2.FontHeightInPoints = 10; + + + + // 创建单元格样式 + NPOI.SS.UserModel.ICellStyle cellStyle1 = workbook.CreateCellStyle(); + cellStyle1.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle1.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Center; + cellStyle1.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + var font3 = workbook.CreateFont(); + font3.FontHeightInPoints = 14; + cellStyle1.SetFont(font3); + + NPOI.SS.UserModel.ICellStyle cellStyle2 = workbook.CreateCellStyle(); + cellStyle2.BorderTop = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.BorderRight = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.BorderBottom = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.BorderLeft = NPOI.SS.UserModel.BorderStyle.Thin; + cellStyle2.Alignment = NPOI.SS.UserModel.HorizontalAlignment.Left; + cellStyle2.VerticalAlignment = NPOI.SS.UserModel.VerticalAlignment.Center; + cellStyle2.SetFont(font3); + + int rowCount = 1; + NPOI.SS.UserModel.IRow row; + NPOI.SS.UserModel.ICell cell; + + #region 填充内容 + foreach (DataRow tr in table.Rows) + { + row = sheet.CreateRow(rowCount); + cell = row.CreateCell(0); + cell.CellStyle = cellStyle2; + cell.SetCellValue(tr["Code"].ToString()); + cell = row.CreateCell(1); + cell.CellStyle = cellStyle2; + cell.SetCellValue(tr["Name"].ToString()); + cell = row.CreateCell(2); + cell.CellStyle = cellStyle1; + cell.SetCellValue(tr["PreWorkCode"].ToString()); + cell = row.CreateCell(3); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["IsMileStone"].ToString()) && Convert.ToBoolean(tr["IsMileStone"].ToString()) == true) + { + cell.SetCellValue("是"); + } + cell = row.CreateCell(4); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["JDWeights"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["JDWeights"]), 2).ToString("0.##")); + } + cell = row.CreateCell(5); + cell.CellStyle = cellStyle1; + cell.SetCellValue(tr["Unit"].ToString()); + cell = row.CreateCell(6); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["PlanProjectQuantity"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["PlanProjectQuantity"]), 2).ToString("0.##")); + } + cell = row.CreateCell(7); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["PlanCost"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["PlanCost"]), 2).ToString("0.##")); + } + cell = row.CreateCell(8); + cell.CellStyle = cellStyle1; + if (!string.IsNullOrEmpty(tr["RealProjectQuantity"].ToString())) + { + cell.SetCellValue(decimal.Round(Convert.ToDecimal(tr["RealProjectQuantity"]), 2).ToString("0.##")); + } + cell = row.CreateCell(9); + cell.CellStyle = cellStyle1; + if (tr["PlanStartDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["PlanStartDate"])); + } + cell = row.CreateCell(10); + cell.CellStyle = cellStyle1; + if (tr["PlanEndDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["PlanEndDate"])); + } + cell = row.CreateCell(11); + cell.CellStyle = cellStyle1; + if (tr["RealStartDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["RealStartDate"])); + } + cell = row.CreateCell(12); + cell.CellStyle = cellStyle1; + if (tr["RealEndDate"] != null) + { + cell.SetCellValue(string.Format("{0:yyyy-MM-dd}", tr["RealEndDate"])); + } + rowCount++; + } + #endregion + // 第三步:写入文件流 + 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); + } + catch (Exception ex) + { + + throw ex; + } + } + else + { + ShowNotify("没有数据,无法导出!", MessageBoxIcon.Warning); + } + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs new file mode 100644 index 00000000..0da2811c --- /dev/null +++ b/SGGL/FineUIPro.Web/JDGL/Check/PlanSet.aspx.designer.cs @@ -0,0 +1,177 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.JDGL.Check { + + + public partial class PlanSet { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// hdId 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdId; + + /// + /// btnSave 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnSave; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// txtPreWorkCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtPreWorkCode; + + /// + /// IsMileStone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TemplateField IsMileStone; + + /// + /// cbIsMileStone 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.CheckBox cbIsMileStone; + + /// + /// nbJDWeights 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox nbJDWeights; + + /// + /// txtUnit 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox txtUnit; + + /// + /// nbPlanProjectQuantity 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox nbPlanProjectQuantity; + + /// + /// nbRealProjectQuantity 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.NumberBox nbRealProjectQuantity; + + /// + /// txtPlanStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanStartDate; + + /// + /// txtPlanEndDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtPlanEndDate; + + /// + /// txtRealStartDate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtRealStartDate; + } +} diff --git a/SGGL/FineUIPro.Web/Login.aspx.cs b/SGGL/FineUIPro.Web/Login.aspx.cs index 5144806d..d2fbdaf3 100644 --- a/SGGL/FineUIPro.Web/Login.aspx.cs +++ b/SGGL/FineUIPro.Web/Login.aspx.cs @@ -109,7 +109,8 @@ else { this.CurrUser.LoginProjectId = this.CurrUser.LastProjectId; - url = "indexProject.aspx?projectId=" + this.CurrUser.LastProjectId + "#/SysManage/UpdatePassword.aspx"; + url = "indexProject.aspx?projectId=" + this.CurrUser.LastProjectId; + //url = "indexProject.aspx?projectId=" + this.CurrUser.LastProjectId + "#/SysManage/UpdatePassword.aspx"; } } else diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx index c6c3ea7b..22489796 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx @@ -45,7 +45,7 @@ @@ -55,13 +55,13 @@ HeaderTextAlign="Center" TextAlign="Center" Width="60px"> + HeaderTextAlign="Center" TextAlign="Left" Width="150px"> + HeaderTextAlign="Center" TextAlign="Left" Width="400px" ExpandUnusedSpace="true"> + HeaderTextAlign="Center" TextAlign="Left" Width="300px" > @@ -71,21 +71,21 @@ + HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double"> + HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double"> + HeaderTextAlign="Center" TextAlign="Left" Width="100px" FieldType="Double"> @@ -96,25 +96,20 @@ - + - - - - - - - + <%-- --%> + - - - + + + @@ -131,6 +126,12 @@ \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs index 50dc2389..2589fa6b 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.cs @@ -46,27 +46,26 @@ namespace FineUIPro.Web.OfficeCheck.Check if (checkInfo != null) { this.drpSubjectProject.SelectedValue = checkInfo.SubjectProjectId; + this.txtCheckLeader.Text = Person_PersonsService.GetPersonsNameById(checkInfo.CheckTeamLeader); + this. txtSubjectUnitMan.Text= Person_PersonsService.GetPersonsNameById(checkInfo.SubjectUnitMan); } + this.txtCheckMan.Text = this.CurrUser.PersonName; + this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); + this.txtSubjectUnitDate.Text = string.Format("{0:yyyy-MM-dd}", DateTime.Now); - var table1 = BLL.CheckTable1Service.GetCheckTable1ByCheckNoticeId(this.CheckNoticeId); + var table1 = BLL.CheckTable1Service.GetCheckTable1ByCheckNoticeId(this.CheckNoticeId); if (table1 != null) { if (!string.IsNullOrEmpty(table1.SubjectProjectId)) { this.drpSubjectProject.SelectedValue = table1.SubjectProjectId; } - if (!string.IsNullOrEmpty(table1.CheckMan)) - { - this.txtCheckMan.Text = table1.CheckMan; - } - else - { - this.txtCheckMan.Text = this.CurrUser.PersonName; - } + this.txtCheckMan.Text = table1.CheckMan; this.txtCheckLeader.Text = table1.CheckLeader; this.txtSubjectUnitMan.Text = table1.SubjectUnitMan; this.txtCheckDate.Text = string.Format("{0:yyyy-MM-dd}", table1.CheckDate); this.txtSubjectUnitDate.Text = string.Format("{0:yyyy-MM-dd}", table1.SubjectUnitDate); + if (table1.Total100Score.HasValue) { this.lbTotal100Score.Text = "本表百分制得分 = (实查项实得分之和/实查项应得满分之和*100) " + table1.Total100Score + " 分"; @@ -76,14 +75,14 @@ namespace FineUIPro.Web.OfficeCheck.Check this.lbTotal100Score.Text = "本表百分制得分 = (实查项实得分之和/实查项应得满分之和*100) 分"; } - if (table1.TotalLastScore.HasValue) - { - this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = " + table1.TotalLastScore + " 分"; - } - else - { - this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = 分"; - } + //if (table1.TotalLastScore.HasValue) + //{ + // this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = " + table1.TotalLastScore + " 分"; + //} + //else + //{ + // this.lbTotalLastScore.Text = "综合评定得分 = 本表得分 - 负面清单罚分 = 分"; + //} this.lbEvaluationResult.Text = table1.EvaluationResult; } @@ -142,6 +141,7 @@ namespace FineUIPro.Web.OfficeCheck.Check } this.Grid1.DataBind(); } + /// /// 合计值 /// @@ -229,7 +229,7 @@ namespace FineUIPro.Web.OfficeCheck.Check if (checks == null) { Model.ProjectSupervision_Check1 newCheck = new Model.ProjectSupervision_Check1(); - newCheck.ID = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_Check1)); + newCheck.ID = SQLHelper.GetNewID(); newCheck.SortIndex = Funs.GetNewInt(values.Value("SortIndex")); newCheck.CheckItem = values.Value("CheckItem"); newCheck.CheckStandard = values.Value("CheckStandard"); @@ -245,7 +245,7 @@ namespace FineUIPro.Web.OfficeCheck.Check else { Model.ProjectSupervision_Check1 newCheck = new Model.ProjectSupervision_Check1(); - newCheck.ID = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_Check1)); + newCheck.ID = SQLHelper.GetNewID(); newCheck.SortIndex = checks.SortIndex; newCheck.CheckItem = checks.CheckItem; newCheck.CheckStandard = values.Value("CheckStandard"); @@ -286,7 +286,7 @@ namespace FineUIPro.Web.OfficeCheck.Check totalGetScore = totalBaseScore - totalDeletScore; decimal sS = (totalGetScore / totalBaseScore) * 100; total100Score = Math.Round(sS, 2); - totalLastScore = (total100Score - Funs.GetNewDecimalOrZero(this.hdTotalDeletScore6_7.Text)); + totalLastScore = total100Score; //total100Score - Funs.GetNewDecimalOrZero(this.hdTotalDeletScore6_7.Text)); } } @@ -309,7 +309,7 @@ namespace FineUIPro.Web.OfficeCheck.Check table1.TotalLastScore = totalLastScore; table1.EvaluationResult = Funs.ReturnEvaluationResultByScore(table1.TotalLastScore); table1.CheckNoticeId = this.CheckNoticeId; - table1.CheckItemId = SQLHelper.GetNewID(typeof(Model.ProjectSupervision_CheckTable1)); + table1.CheckItemId = SQLHelper.GetNewID(); BLL.CheckTable1Service.AddCheckTable1(table1); ShowNotify("保存成功!", MessageBoxIcon.Success); diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs index 75952462..937a6269 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckContentEdit.aspx.designer.cs @@ -140,24 +140,6 @@ namespace FineUIPro.Web.OfficeCheck.Check /// protected global::FineUIPro.Label lbTotal100Score; - /// - /// hdTotalDeletScore6_7 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.HiddenField hdTotalDeletScore6_7; - - /// - /// lbTotalLastScore 控件。 - /// - /// - /// 自动生成的字段。 - /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 - /// - protected global::FineUIPro.Label lbTotalLastScore; - /// /// lbEvaluationResult 控件。 /// diff --git a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx index 86a4e8d8..1013b150 100644 --- a/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx +++ b/SGGL/FineUIPro.Web/OfficeCheck/Check/CheckInfo.aspx @@ -52,9 +52,9 @@ --%> -