diff --git a/.vs/SGGL_SeDin/v17/.wsuo b/.vs/SGGL_SeDin/v17/.wsuo index 8326a29a..eac87757 100644 Binary files a/.vs/SGGL_SeDin/v17/.wsuo and b/.vs/SGGL_SeDin/v17/.wsuo differ diff --git a/DataBase/版本日志/SGGLDB_V2023-08-30.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-08-30.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-08-30.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-08-30.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-09-01-lpf.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-01-lpf.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-09-01-lpf.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-01-lpf.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-09-01.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-01.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-09-01.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-01.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-09-04.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-04.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-09-04.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-04.sql diff --git a/DataBase/版本日志/SGGLDB_V2023-09-05.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-05.sql similarity index 100% rename from DataBase/版本日志/SGGLDB_V2023-09-05.sql rename to DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-05.sql diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-06.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-06.sql new file mode 100644 index 00000000..4d5b69f6 --- /dev/null +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-06.sql @@ -0,0 +1,24 @@ +DELETE FROM Sys_Menu WHERE MenuId IN +('4911D344-3182-4B46-B01F-B10DB058E550','4F7C556C-DAC1-4BC4-BCF6-1B401F771204','D01D3916-743A-4F97-9ADB-815712A89FAC','0443E704-45F4-40BE-8069-13E5554F5700') +GO +UPDATE Sys_Menu SET Url='DigData/ProjectDataDW.aspx',IsEnd=1 WHERE MenuId='775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC' +GO + +--ȫݿ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('E1ABD1B1-1563-433A-972B-555076A96D06','ȫݿ','DigData/HSEDataDW.aspx',5,'AA670914-6EAA-4CFA-8BD6-E0648F8FD21C','Menu_DigData',1,1,1) +GO +--ݿ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('15D01AB6-F959-4ABD-B861-C5C2EE6FA906','ݿ','DigData/CQMSDataDW.aspx',10,'7EC74F30-B2F7-454E-B0AE-8E993211F763','Menu_DigData',1,1,1) +GO + +--ݿ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('44D51E89-267D-4D72-AB6D-1F4CA4E7D19D','ݿ','DigData/JDGLDataDW.aspx',10,'E7F7BC38-7357-49C0-9242-68289031F618','Menu_DigData',1,1,1) +GO + +--ͬݿ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('ABC4323E-2F6F-4147-AA7A-8726131D7044','ͬݿ','DigData/JDGLDataDW.aspx',10,'381A4608-2CDE-42AF-BC4D-FF554785B9F8','Menu_DigData',1,1,1) +GO \ No newline at end of file diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-07.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-07.sql new file mode 100644 index 00000000..4b000fbf --- /dev/null +++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2023-09-07.sql @@ -0,0 +1,21 @@ +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('A20E2443-A118-4C67-9084-FFEB685CA539','嵥Ŀʹʼ۸ͼ','',20,'381A4608-2CDE-42AF-BC4D-FF554785B9F8','Menu_DigData',1,1,1) +GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('6D1F3A3F-EFD1-420A-87E7-8CFAEF971165','չЧͳ','',30,'381A4608-2CDE-42AF-BC4D-FF554785B9F8','Menu_DigData',1,1,1) +GO + +update Sys_Menu set Url='DigData/WBSAnalysis.aspx' where MenuId='CFEF47C0-8EFA-46FF-8648-5B1922519DCC' +GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('DD960B76-1F33-468B-9FEF-76328235C079','Ŀݻ','',20,'B146FC96-B199-426B-8504-4BE093C0DCB1','Menu_DigData',1,1,1) +GO + +INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) +VALUES('A705738B-D0A2-41D2-A01A-18774B5AED49','Ŀʩݻ','',30,'B146FC96-B199-426B-8504-4BE093C0DCB1','Menu_DigData',1,1,1) +GO + +update Sys_Menu set Url='DigData/ProjectWBSAnalysis.aspx' where MenuId='B6C1706F-685D-4BAF-B8F7-99C9561C8F5B' +GO \ No newline at end of file diff --git a/DataBase/菜单初始化脚本/0-2大数据中心(Menu_DigData).sql b/DataBase/菜单初始化脚本/0-2大数据中心(Menu_DigData).sql index 42fbcd01..54a04811 100644 --- a/DataBase/菜单初始化脚本/0-2大数据中心(Menu_DigData).sql +++ b/DataBase/菜单初始化脚本/0-2大数据中心(Menu_DigData).sql @@ -14,7 +14,11 @@ GO GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('AA670914-6EAA-4CFA-8BD6-E0648F8FD21C','ȫݿ','',10,'92B50285-30BD-4B62-9E23-A0D6B4BA1577','Menu_DigData',1,0,1) - GO + GO + --ȫݿ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('E1ABD1B1-1563-433A-972B-555076A96D06','ȫݿ','DigData/HSEDataDW.aspx',5,'AA670914-6EAA-4CFA-8BD6-E0648F8FD21C','Menu_DigData',1,1,1) + GO --ȫճ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('04B182E4-D31E-449F-9803-322F3F380D89','HSEճ','DigData/DailyProblemAnalysis.aspx',10,'AA670914-6EAA-4CFA-8BD6-E0648F8FD21C','Menu_DigData',1,1,1) @@ -29,13 +33,35 @@ GO GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('7EC74F30-B2F7-454E-B0AE-8E993211F763','ݿ','',20,'92B50285-30BD-4B62-9E23-A0D6B4BA1577','Menu_DigData',1,0,1) - GO + GO + --ݿ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('15D01AB6-F959-4ABD-B861-C5C2EE6FA906','ݿ','DigData/CQMSDataDW.aspx',10,'7EC74F30-B2F7-454E-B0AE-8E993211F763','Menu_DigData',1,1,1) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('E7F7BC38-7357-49C0-9242-68289031F618','ݿ','',30,'92B50285-30BD-4B62-9E23-A0D6B4BA1577','Menu_DigData',1,0,1) - GO + GO + --ݿ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('44D51E89-267D-4D72-AB6D-1F4CA4E7D19D','ݿ','DigData/JDGLDataDW.aspx',10,'E7F7BC38-7357-49C0-9242-68289031F618','Menu_DigData',1,1,1) + GO + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('381A4608-2CDE-42AF-BC4D-FF554785B9F8','ͬݿ','',40,'92B50285-30BD-4B62-9E23-A0D6B4BA1577','Menu_DigData',1,0,1) GO + --ͬݿ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('ABC4323E-2F6F-4147-AA7A-8726131D7044','ͬݿ','DigData/HTGLDataDW.aspx',10,'381A4608-2CDE-42AF-BC4D-FF554785B9F8','Menu_DigData',1,1,1) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A20E2443-A118-4C67-9084-FFEB685CA539','嵥Ŀʹʼ۸ͼ','',20,'381A4608-2CDE-42AF-BC4D-FF554785B9F8','Menu_DigData',1,1,1) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('6D1F3A3F-EFD1-420A-87E7-8CFAEF971165','չЧͳ','',30,'381A4608-2CDE-42AF-BC4D-FF554785B9F8','Menu_DigData',1,1,1) + GO --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) --VALUES('5BE7F83B-C02D-4481-815F-153279B44C39','ݿ','',50,'92B50285-30BD-4B62-9E23-A0D6B4BA1577','Menu_DigData',1,0,1) --GO @@ -44,19 +70,27 @@ INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffi VALUES('B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','ݷ','',50,'0','Menu_DigData',1,0,1) GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('CFEF47C0-8EFA-46FF-8648-5B1922519DCC','WBSݷ','',10,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,1,1) + VALUES('CFEF47C0-8EFA-46FF-8648-5B1922519DCC','WBSݷ','DigData/WBSAnalysis.aspx',10,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,1,1) GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('B146FC96-B199-426B-8504-4BE093C0DCB1','Ŀݻܷ','',20,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,0,1) GO - --ĿHSEϢ - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('427AB060-2510-4568-B85B-AD6796EBE569','ĿHSEݻ','DigData/HSEDataCollect.aspx',10,'B146FC96-B199-426B-8504-4BE093C0DCB1','Menu_DigData',1,1,1) - GO - --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - --VALUES('AF5C32FD-F0CB-404E-B56D-C4AE79A8A050','ԱЧ','',10,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,1,1) - --GO - --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - --VALUES('0DB6BB5F-B17A-4A38-AABB-278300EA9E39','Աֵ','',20,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,1,1) - --GO + --ĿHSEϢ + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('427AB060-2510-4568-B85B-AD6796EBE569','ĿHSEݻ','DigData/HSEDataCollect.aspx',10,'B146FC96-B199-426B-8504-4BE093C0DCB1','Menu_DigData',1,1,1) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('DD960B76-1F33-468B-9FEF-76328235C079','Ŀݻ','',20,'B146FC96-B199-426B-8504-4BE093C0DCB1','Menu_DigData',1,1,1) + GO + + INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + VALUES('A705738B-D0A2-41D2-A01A-18774B5AED49','Ŀʩݻ','',30,'B146FC96-B199-426B-8504-4BE093C0DCB1','Menu_DigData',1,1,1) + GO + --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + --VALUES('AF5C32FD-F0CB-404E-B56D-C4AE79A8A050','ԱЧ','',10,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,1,1) + --GO + --INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) + --VALUES('0DB6BB5F-B17A-4A38-AABB-278300EA9E39','Աֵ','',20,'B87413D8-4EFB-42F3-A4F6-9D21C0CD3DFE','Menu_DigData',1,1,1) + --GO diff --git a/DataBase/菜单初始化脚本/1-10大数据中心(Menu_PDigData).sql b/DataBase/菜单初始化脚本/1-10大数据中心(Menu_PDigData).sql index 1f1e3f6e..694fba65 100644 --- a/DataBase/菜单初始化脚本/1-10大数据中心(Menu_PDigData).sql +++ b/DataBase/菜单初始化脚本/1-10大数据中心(Menu_PDigData).sql @@ -7,26 +7,14 @@ VALUES('5704B651-2172-45D3-8206-448612C5BA11','WBS GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) -VALUES('775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC','Ŀݲֿ','',20,'0','Menu_PDigData',1,0,1) -GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('4911D344-3182-4B46-B01F-B10DB058E550','ȫ','',10,'775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC','Menu_PDigData',1,0,1) - GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('4F7C556C-DAC1-4BC4-BCF6-1B401F771204','','',20,'775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC','Menu_PDigData',1,0,1) - GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('D01D3916-743A-4F97-9ADB-815712A89FAC','','',30,'775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC','Menu_PDigData',1,0,1) - GO - INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('0443E704-45F4-40BE-8069-13E5554F5700','ͬ','',40,'775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC','Menu_PDigData',1,0,1) - GO +VALUES('775A5D3C-CB1C-4EC8-A7E1-F4FCD77E85DC','Ŀݲֿ','DigData/ProjectDataDW.aspx',20,'0','Menu_PDigData',1,1,1) +GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) VALUES('D9252E0B-3956-473A-8ECC-12C0933469C3','ݷ','',30,'0','Menu_PDigData',1,0,1) GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('B6C1706F-685D-4BAF-B8F7-99C9561C8F5B','WBSݷ','',10,'D9252E0B-3956-473A-8ECC-12C0933469C3','Menu_PDigData',1,1,1) + VALUES('B6C1706F-685D-4BAF-B8F7-99C9561C8F5B','WBSݷ','DigData/ProjectWBSAnalysis.aspx',10,'D9252E0B-3956-473A-8ECC-12C0933469C3','Menu_PDigData',1,1,1) GO diff --git a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql index 4c762b12..20cc9602 100644 --- a/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql +++ b/DataBase/菜单初始化脚本/1-5焊接管理(Menu_HJGL).sql @@ -365,7 +365,7 @@ GO GO INSERT INTO dbo.Sys_Menu(MenuId,MenuName,Url,SortIndex,SuperMenu,MenuType,IsOffice,IsEnd,IsUsed) - VALUES('27AA3C4C-D424-4CBA-ABBE-EDA953A196A4','޼ⵥ¼','HJGL/NDT/NDTBatch.aspx?Type=R',30,'E7533566-73A9-4507-8FCB-1FE713819A24','Menu_HJGL',0,1,1) + VALUES('27AA3C4C-D424-4CBA-ABBE-EDA953A196A4','޼ⵥ¼','HJGL/NDT/NDTBatch.arspx?Type=R',30,'E7533566-73A9-4507-8FCB-1FE713819A24','Menu_HJGL',0,1,1) GO /*ⵥ¼*/ INSERT INTO Sys_ButtonToMenu(ButtonToMenuId,MenuId,ButtonName,SortIndex) VALUES('A4284CC7-4F99-4188-8CAB-A2CF578A0F2A','27AA3C4C-D424-4CBA-ABBE-EDA953A196A4','',1) diff --git a/SGGL/BLL/BLL.csproj b/SGGL/BLL/BLL.csproj index 54c8d3bc..24a2c197 100644 --- a/SGGL/BLL/BLL.csproj +++ b/SGGL/BLL/BLL.csproj @@ -339,6 +339,11 @@ + + + + + diff --git a/SGGL/BLL/DigData/CQMSDataDWService .cs b/SGGL/BLL/DigData/CQMSDataDWService .cs new file mode 100644 index 00000000..1c2127c5 --- /dev/null +++ b/SGGL/BLL/DigData/CQMSDataDWService .cs @@ -0,0 +1,68 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Linq; + +namespace BLL +{ + /// + /// 质量数据仓库 + /// + public static class CQMSDataDWService + { + public static Model.SGGLDB db = Funs.DB; + + #region 质量数据仓库 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.Base_Project + select x; + + /// + /// 质量数据仓库 + /// + /// + /// + /// + /// + /// + public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + { + var getDataList = from x in Funs.DB.Base_Project select x; + if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) + { + getDataList = getDataList.Where(x => x.ProjectId == projectId); + } + + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + select new + { + x.ProjectId, + x.ProjectName, + x.ProjectCode, + Rate1 = "0%", //质量验收问题整改率 + Rate2 = "0%", //控制点完成率 + Rate3 = "0%", //质量检查问题整改率 + Rate4 = "0%", //管道焊接一次合格率 + }; + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/BLL/DigData/HSEDataDWService.cs b/SGGL/BLL/DigData/HSEDataDWService.cs new file mode 100644 index 00000000..3805288c --- /dev/null +++ b/SGGL/BLL/DigData/HSEDataDWService.cs @@ -0,0 +1,68 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Linq; + +namespace BLL +{ + /// + /// 安全数据仓库 + /// + public static class HSEDataDWService + { + public static Model.SGGLDB db = Funs.DB; + + #region 安全数据仓库 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.Base_Project + select x; + + /// + /// 安全数据仓库 + /// + /// + /// + /// + /// + /// + public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + { + var getDataList = from x in Funs.DB.Base_Project select x; + if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) + { + getDataList = getDataList.Where(x => x.ProjectId == projectId); + } + + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + select new + { + x.ProjectId, + x.ProjectName, + x.ProjectCode, + Count1=0, //人员数量 + Count2 =0, //安全人工时 + Count3 =0, //安全培训次数 + ProblemRate = "0%", //安全巡检整改率 + }; + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/BLL/DigData/HTGLDataDWService.cs b/SGGL/BLL/DigData/HTGLDataDWService.cs new file mode 100644 index 00000000..9d980c22 --- /dev/null +++ b/SGGL/BLL/DigData/HTGLDataDWService.cs @@ -0,0 +1,65 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Linq; + +namespace BLL +{ + /// + /// 合同管理数据仓库 + /// + public static class HTGLDataDWService + { + public static Model.SGGLDB db = Funs.DB; + + #region 合同管理数据仓库 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.Base_Project + select x; + + /// + /// 合同管理数据仓库 + /// + /// + /// + /// + /// + /// + public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + { + var getDataList = from x in Funs.DB.Base_Project select x; + if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) + { + getDataList = getDataList.Where(x => x.ProjectId == projectId); + } + + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + select new + { + x.ProjectId, + x.ProjectName, + x.ProjectCode, + Count1=0, + }; + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/BLL/DigData/JDGLDataDWService.cs b/SGGL/BLL/DigData/JDGLDataDWService.cs new file mode 100644 index 00000000..be372d94 --- /dev/null +++ b/SGGL/BLL/DigData/JDGLDataDWService.cs @@ -0,0 +1,65 @@ +using FineUIPro; +using System; +using System.Collections; +using System.Linq; + +namespace BLL +{ + /// + /// 进度数据仓库 + /// + public static class JDGLDataDWService + { + public static Model.SGGLDB db = Funs.DB; + + #region 进度数据仓库 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.Base_Project + select x; + + /// + /// 进度数据仓库 + /// + /// + /// + /// + /// + /// + public static IEnumerable getDataDWList( string projectId, DateTime? startTime, DateTime? endTime, Grid Grid1) + { + var getDataList = from x in Funs.DB.Base_Project select x; + if (!string.IsNullOrEmpty(projectId) && projectId != Const._Null) + { + getDataList = getDataList.Where(x => x.ProjectId == projectId); + } + + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + select new + { + x.ProjectId, + x.ProjectName, + x.ProjectCode, + JDRate = "0%", //项目进度完成百分比 + }; + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/BLL/DigData/WBSAnalysisService.cs b/SGGL/BLL/DigData/WBSAnalysisService.cs new file mode 100644 index 00000000..69e53550 --- /dev/null +++ b/SGGL/BLL/DigData/WBSAnalysisService.cs @@ -0,0 +1,109 @@ +using FineUIPro; +using NPOI.SS.Formula.Functions; +using System; +using System.Collections; +using System.Collections.Generic; +using System.Linq; + +namespace BLL +{ + /// + /// WBS分析 + /// + public static class WBSAnalysisService + { + public static Model.SGGLDB db = Funs.DB; + + #region WBS分析 + /// + /// 记录数 + /// + public static int count + { + get; + set; + } + + /// + /// 定义变量 + /// + private static IQueryable getDataLists = from x in db.WBS_WorkPackageInit + select x; + + /// + /// 合同管理数据仓库 + /// + /// + /// + /// + /// + /// + public static IEnumerable getDataDWList(string level,string workPackageId, Grid Grid1) + { + var getDataList = getDataLists; + if (level == "0") + { + List listWork = new List(); + if (string.IsNullOrEmpty(workPackageId) || workPackageId == "1") + { + Model.WBS_WorkPackageInit work1 = new Model.WBS_WorkPackageInit + { + WorkPackageCode = "1", + PackageContent = "建筑工程", + }; + listWork.Add(work1); + } + if (string.IsNullOrEmpty(workPackageId) || workPackageId == "2") + { + Model.WBS_WorkPackageInit work2 = new Model.WBS_WorkPackageInit + { + WorkPackageCode = "2", + PackageContent = "安装工程", + }; + listWork.Add(work2); + } + getDataList = listWork.AsQueryable(); + } + else + { + if (level == "1") + { + getDataList = getDataList.Where(x => x.SuperWorkPack == null); + } + + if (!string.IsNullOrEmpty(workPackageId)) + { + if (workPackageId != "1" && workPackageId != "2") + { + getDataList = getDataList.Where(x => x.SuperWorkPack == workPackageId); + } + else + { + getDataList = getDataList.Where(x => x.ProjectType == workPackageId); + } + } + } + + count = getDataList.Count(); + if (count == 0) + { + return null; + } + getDataList = SortConditionHelper.SortingAndPaging(getDataList, Grid1.SortField, Grid1.SortDirection, Grid1.PageIndex, Grid1.PageSize); + return from x in getDataList + select new + { + x.WorkPackageCode, + x.PackageContent, + Count1=0, + Count2 = 0, + Count3 = 0, + Count4 = 0, + Count5 = 0, + Count6 = 0, + }; + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/BLL/ProjectData/ProjectService.cs b/SGGL/BLL/ProjectData/ProjectService.cs index 4b58db4f..77c8ddc5 100644 --- a/SGGL/BLL/ProjectData/ProjectService.cs +++ b/SGGL/BLL/ProjectData/ProjectService.cs @@ -464,6 +464,28 @@ } #endregion + /// + /// 获取项目各单位类型单位名称 + /// + /// + /// + /// + public static string getProjectUnitIdByUnitType(string projectId, string unitType) + { + string unitId = string.Empty; + if (!string.IsNullOrEmpty(projectId)) + { + var getUnit = from x in Funs.DB.Project_ProjectUnit + where x.ProjectId == projectId && x.UnitType == unitType + select x.UnitId; + if (getUnit.Count() > 0) + { + unitId = Funs.GetStringByArray(getUnit.ToArray()); + } + } + return unitId; + } + /// /// 获取项目各单位类型单位名称 /// @@ -477,7 +499,7 @@ { var getUnitName = from x in Funs.DB.Project_ProjectUnit join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == projectId.ToString() && x.UnitType == unitType + where x.ProjectId == projectId && x.UnitType == unitType select y.UnitName; if (getUnitName.Count() > 0) { @@ -500,7 +522,7 @@ { var getShortUnitName = from x in Funs.DB.Project_ProjectUnit join y in Funs.DB.Base_Unit on x.UnitId equals y.UnitId - where x.ProjectId == projectId.ToString() && x.UnitType == unitType + where x.ProjectId == projectId && x.UnitType == unitType select y.ShortUnitName; if (getShortUnitName.Count() > 0) { diff --git a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx index bf5762d7..d981bc61 100644 --- a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx +++ b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx @@ -4,8 +4,8 @@ - + diff --git a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs index 4f61fcf0..f9f42da1 100644 --- a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs +++ b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.cs @@ -19,6 +19,25 @@ namespace FineUIPro.Web.Controls } } + public string Level + { + get + { + return (string)ViewState["Level"]; + } + set + { + ViewState["Level"] = value; + } + } + + public bool IsShowAll + { + get; + set; + } = true; + + #region 加载页面 /// /// 加载页面 @@ -29,8 +48,15 @@ namespace FineUIPro.Web.Controls { if (!IsPostBack) { + if (!IsShowAll) + { + this.ckLevel.Items.Remove(this.ckLevel.Items[0]); + this.ckLevel.SelectedIndex = 0; + } + ////加载树 SetSubUnitProjectTree(this.trWBS); + } } #endregion @@ -42,6 +68,7 @@ namespace FineUIPro.Web.Controls /// protected void trWBS_NodeCommand(object sender, TreeCommandEventArgs e) { + this.Level = this.ckLevel.SelectedValue; if (this.trWBS != null && !string.IsNullOrEmpty(this.trWBS.SelectedNodeID)) { this.WorkPackageCode = this.trWBS.SelectedNodeID; @@ -52,6 +79,21 @@ namespace FineUIPro.Web.Controls } } + protected void ckLevel_SelectedIndexChanged(object sender, EventArgs e) + { + this.Level = this.ckLevel.SelectedValue; + if (this.trWBS != null && !string.IsNullOrEmpty(this.trWBS.SelectedNodeID)) + { + this.WorkPackageCode = this.trWBS.SelectedNodeID; + } + ////加载树 + SetSubUnitProjectTree(this.trWBS); + if (this.change != null) + { + this.change(this, e); + } + } + public delegate void userEvent(object sender, EventArgs arg); public event userEvent change; @@ -153,11 +195,5 @@ namespace FineUIPro.Web.Controls } } #endregion - - protected void ckState_SelectedIndexChanged(object sender, EventArgs e) - { - ////加载树 - SetSubUnitProjectTree(this.trWBS); - } } } \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.designer.cs b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.designer.cs index e735160f..63114651 100644 --- a/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.designer.cs +++ b/SGGL/FineUIPro.Web/Controls/WBSControl.ascx.designer.cs @@ -33,13 +33,13 @@ namespace FineUIPro.Web.Controls protected global::FineUIPro.Toolbar Toolbar1; /// - /// ckState 控件。 + /// ckLevel 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.RadioButtonList ckState; + protected global::FineUIPro.RadioButtonList ckLevel; /// /// trWBS 控件。 diff --git a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx new file mode 100644 index 00000000..2450ad19 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx @@ -0,0 +1,90 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="CQMSDataDW.aspx.cs" + Inherits="FineUIPro.Web.DigData.CQMSDataDW" %> + + + + + + 质量数据库 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs new file mode 100644 index 00000000..b0661adb --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.cs @@ -0,0 +1,116 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DigData +{ + public partial class CQMSDataDW : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ProjectService.InitProjectDropDownList(this.drpProject, false); + Funs.FineUIPleaseSelect(drpProject, "请选择项目"); + // 绑定表格 + this.BindGrid(); + } + } + #endregion + + #region 绑定数据Grid1 + /// + /// 绑定数据Grid1 + /// + private void BindGrid() + { + var getData =CQMSDataDWService.getDataDWList( this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + Grid1.RecordCount = CQMSDataDWService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + /// + /// 查询 + /// + /// + /// + protected void btSearch_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("质量数据仓库" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.designer.cs new file mode 100644 index 00000000..ed635b97 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/CQMSDataDW.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class CQMSDataDW + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// ToolbarFill2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill2; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + } +} diff --git a/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx new file mode 100644 index 00000000..a8bdfc9c --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx @@ -0,0 +1,91 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HSEDataDW.aspx.cs" + Inherits="FineUIPro.Web.DigData.HSEDataDW" %> + + + + + + HSE数据库 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs new file mode 100644 index 00000000..4acf6af5 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.cs @@ -0,0 +1,141 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DigData +{ + public partial class HSEDataDW : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ProjectService.InitProjectDropDownList(this.drpProject, false); + Funs.FineUIPleaseSelect(drpProject, "请选择项目"); + // 绑定表格 + this.BindGrid(); + } + } + #endregion + + #region 绑定数据Grid1 + /// + /// 绑定数据Grid1 + /// + private void BindGrid() + { + var getData = HSEDataDWService.getDataDWList( this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + Grid1.RecordCount = HSEDataDWService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + this.OutputSummaryData(); ///取合计值 + } + + /// + /// 计算合计 + /// + private void OutputSummaryData( ) + { + int aCount1 = 0, aCount2 = 0, aCount3 = 0; + for (int i = 0; i < Grid1.Rows.Count(); i++) + { + aCount1 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[3].ToString()); + aCount2 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[4].ToString()); + aCount3 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[5].ToString()); + } + + JObject summary = new JObject + { + { "ProjectName", "合计" }, + { "Count1", aCount1.ToString() }, + { "Count2", aCount2.ToString() }, + { "Count3", aCount3.ToString() }, + }; + Grid1.SummaryData = summary; + } + + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + /// + /// 查询 + /// + /// + /// + protected void btSearch_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 导出按钮 + /// 导出按钮 + ///
+ /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("HSE数据仓库" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.designer.cs new file mode 100644 index 00000000..6a5c5055 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/HSEDataDW.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class HSEDataDW + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// ToolbarFill2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill2; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + } +} diff --git a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx new file mode 100644 index 00000000..a4da4bcc --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx @@ -0,0 +1,81 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="HTGLDataDW.aspx.cs" + Inherits="FineUIPro.Web.DigData.HTGLDataDW" %> + + + + + + 合同数据库 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs new file mode 100644 index 00000000..75c79984 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.cs @@ -0,0 +1,137 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DigData +{ + public partial class HTGLDataDW : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ProjectService.InitProjectDropDownList(this.drpProject, false); + Funs.FineUIPleaseSelect(drpProject, "请选择项目"); + // 绑定表格 + this.BindGrid(); + } + } + #endregion + + #region 绑定数据Grid1 + /// + /// 绑定数据Grid1 + /// + private void BindGrid() + { + var getData = HTGLDataDWService.getDataDWList( this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + Grid1.RecordCount = HTGLDataDWService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + //this.OutputSummaryData(); ///取合计值 + } + + /// + /// 计算合计 + /// + //private void OutputSummaryData( ) + //{ + // int aCount1 = 0; + // for (int i = 0; i < Grid1.Rows.Count(); i++) + // { + // aCount1 += Funs.GetNewIntOrZero(Grid1.Rows[i].Values[3].ToString()); + // } + + // JObject summary = new JObject + // { + // { "ProjectName", "合计" }, + // { "Count1", aCount1.ToString() }, + // }; + // Grid1.SummaryData = summary; + //} + + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + /// + /// 查询 + /// + /// + /// + protected void btSearch_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("合同数据仓库" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.designer.cs new file mode 100644 index 00000000..83094669 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/HTGLDataDW.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class HTGLDataDW + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// ToolbarFill2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill2; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + } +} diff --git a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx new file mode 100644 index 00000000..5c77240f --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx @@ -0,0 +1,81 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="JDGLDataDW.aspx.cs" + Inherits="FineUIPro.Web.DigData.JDGLDataDW" %> + + + + + + 进度数据库 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + <%-- --%> + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs new file mode 100644 index 00000000..65f5c7a7 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.cs @@ -0,0 +1,116 @@ +using BLL; +using Newtonsoft.Json.Linq; +using System; +using System.Linq; +using System.Text; + +namespace FineUIPro.Web.DigData +{ + public partial class JDGLDataDW : PageBase + { + #region 加载 + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + Funs.DropDownPageSize(this.ddlPageSize); + ProjectService.InitProjectDropDownList(this.drpProject, false); + Funs.FineUIPleaseSelect(drpProject, "请选择项目"); + // 绑定表格 + this.BindGrid(); + } + } + #endregion + + #region 绑定数据Grid1 + /// + /// 绑定数据Grid1 + /// + private void BindGrid() + { + var getData = JDGLDataDWService.getDataDWList( this.drpProject.SelectedValue, + Funs.GetNewDateTime(this.txtStartTime.Text), Funs.GetNewDateTime(this.txtEndTime.Text),this.Grid1); + Grid1.RecordCount = JDGLDataDWService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + #region 查询 + /// + /// 查询 + /// + /// + /// + protected void TextBox_TextChanged(object sender, EventArgs e) + { + this.BindGrid(); + } + #endregion + + /// + /// 查询 + /// + /// + /// + protected void btSearch_Click(object sender, EventArgs e) + { + this.BindGrid(); + } + + #region 导出按钮 + /// 导出按钮 + /// + /// + /// + protected void btnOut_Click(object sender, EventArgs e) + { + Response.ClearContent(); + string filename = Funs.GetNewFileName(); + Response.AddHeader("content-disposition", "attachment; filename=" + System.Web.HttpUtility.UrlEncode("进度数据仓库" + filename, System.Text.Encoding.UTF8) + ".xls"); + Response.ContentType = "application/excel"; + Response.ContentEncoding = Encoding.UTF8; + this.Grid1.PageSize = this.Grid1.RecordCount; + this.BindGrid(); + Response.Write(GetGridTableHtml(Grid1)); + Response.End(); + } + #endregion + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.designer.cs new file mode 100644 index 00000000..c320aeb8 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/JDGLDataDW.aspx.designer.cs @@ -0,0 +1,161 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class JDGLDataDW + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// Toolbar1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar1; + + /// + /// drpProject 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList drpProject; + + /// + /// txtStartTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtStartTime; + + /// + /// txtEndTime 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DatePicker txtEndTime; + + /// + /// ToolbarFill2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarFill ToolbarFill2; + + /// + /// btSearch 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btSearch; + + /// + /// btnOut 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Button btnOut; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + + /// + /// Menu1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Menu Menu1; + } +} diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx new file mode 100644 index 00000000..1e23034d --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx @@ -0,0 +1,189 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectDataDW.aspx.cs" Inherits="FineUIPro.Web.DigData.ProjectDataDW" %> + + + + + + 项目WBS数据仓库 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs new file mode 100644 index 00000000..137ce1f2 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.cs @@ -0,0 +1,192 @@ +using BLL; +using System; +using System.Data; +using System.Data.SqlTypes; +using System.Linq; + +namespace FineUIPro.Web.DigData +{ + public partial class ProjectDataDW : PageBase + { + /// + /// 项目ID + /// + public string ProjectId + { + get + { + return (string)ViewState["ProjectId"]; + } + set + { + ViewState["ProjectId"] = value; + } + } + + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ProjectId = this.CurrUser.LoginProjectId; + } + } + + + /// + /// + /// + /// + /// + protected void ckType_SelectedIndexChanged(object sender, EventArgs e) + { + this.gpHSSE.Hidden = true; + this.gpCQMS.Hidden = true; + this.gpJDGL.Hidden = true; + this.gpHTGL.Hidden = true; + this.gpLW.Hidden = true; + SetData(); + } + + /// + /// 数据展示 + /// + private void SetData() + { + if (!string.IsNullOrEmpty(this.ProjectId)) + { + foreach (var item in this.ckType.SelectedValueArray) + { + if (item == "HSSE") + { + this.gpHSSE.Hidden = false; + this.lbSitePersons.Text = (from x in Funs.DB.SitePerson_Person + where x.ProjectId == this.ProjectId //&& y.States == Const.State_1 + select x).Count().ToString(); + var getPersonInOutNumber = (from x in Funs.DB.SitePerson_PersonInOutNumber + where x.ProjectId == this.ProjectId + select x).OrderByDescending(x => x.InOutDate).FirstOrDefault(); + if (getPersonInOutNumber != null) + { + this.lbWorkHours.Text = (getPersonInOutNumber.WorkHours ?? 0).ToString(); + } + else + { + this.lbWorkHours.Text = "0"; + } + this.lbEduCount.Text = (from x in Funs.DB.EduTrain_TrainRecord + where x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2 + select x).Count().ToString(); + + var getAllHazardRegister = from x in Funs.DB.HSSE_Hazard_HazardRegister + where x.ProjectId == this.ProjectId && x.States != null && x.States != "4" && x.States != "0" + select x; + int allHazardCount = getAllHazardRegister.Count(); + int cHazardCount = getAllHazardRegister.Where(x => x.States == "3").Count(); + this.lbRectifyRate.Text = allHazardCount > 0 ? Math.Round(cHazardCount * 100.0 / (allHazardCount * 1.0)).ToString() + "%" : "0%"; + + this.lbMeetingCount.Text = (Funs.DB.Meeting_AttendMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_ClassMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_MonthMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_SpecialMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count() + + Funs.DB.Meeting_WeekMeeting.Where(x => x.ProjectId == this.ProjectId && x.States == BLL.Const.State_2).Count()).ToString(); + + var getCostManges = Funs.DB.CostGoods_CostManage.Where(x => x.ProjectId == this.ProjectId && x.States == Const.State_2); + if (getCostManges.Count() > 0) + { + this.lbHSECost.Text = getCostManges.Sum(x => x.SumMoney ?? 0).ToString(); + } + else + { + this.lbHSECost.Text = "0"; + } + } + if (item == "CQMS") + { + this.gpCQMS.Hidden = false; + //// 实体验收 资料验收 + var getSpotCheckDetail = from x in Funs.DB.Check_SpotCheckDetail + join y in Funs.DB.Check_SpotCheck on x.SpotCheckCode equals y.SpotCheckCode + where y.ProjectId == this.ProjectId && y.State == "8" + select x; + int all = getSpotCheckDetail.Count(); + // this.lbSpotCheck1.Text = all.ToString(); + int onesOKCount = getSpotCheckDetail.Where(x => x.IsOnesOK == true).Count(); //一次合格 + // this.lbSpotCheck2.Text= okCount.ToString(); + + this.lbSpotCheckRate.Text = all > 0 ? Math.Round(onesOKCount * 100.0 / (all * 1.0)).ToString() + "%" : "0%"; + + /// 资料验收合格项目 + var getOKSpotCheckDetail = getSpotCheckDetail.Where(x => x.IsOK == true); + int okYSCount = getOKSpotCheckDetail.Count(); //验收合格 + int okDateCount = getSpotCheckDetail.Where(x => x.IsDataOK == "1").Count(); //资料合格 + this.lbSpotCheckDataRate.Text = okYSCount > 0 ? Math.Round(okDateCount * 100.0 / (okYSCount * 1.0)).ToString() + "%" : "0%"; + + ///实体质量问题整改率 + //int allNoOk = all - onesOKCount; ///问题数 + //int oKCount = getSpotCheckDetail.Where(x => x.IsOK == true).Count(); //合格数 + //int zgCount = oKCount - onesOKCount; ///整改数 + //this.lbSpotCheckOkRate.Text = allNoOk > 0 ? Math.Round(zgCount * 100.0 / (allNoOk * 1.0)).ToString() + "%" : "0%"; + + ////控制点 + //var getControlItemAndCycle=from x in Funs.DB.WBS_ControlItemAndCycle + // where x.ProjectId == this.ProjectId && x.WorkPackageId.Contains(workPackageId) + // && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId)) + // && x.ControlPoint.Contains("A") && x.CheckNum >0 + // select x; + /////A级控制点总量 + //int allControlItemCount = getControlItemAndCycle.Count(); + /////已完成A级控制点数 + //var getOKSpotCheckDetailCheckNum = from x in getOKSpotCheckDetail + // group x by x.ControlItemAndCycleId + // into g select new { g.First().ControlItemAndCycleId, num = g.Count() }; + + //var getOKControlItemAndCycle = from x in getControlItemAndCycle + // join y in getOKSpotCheckDetailCheckNum on x.ControlItemAndCycleId equals y.ControlItemAndCycleId + // where x.CheckNum == y.num + // select x; + //int okControlItemCount= getOKControlItemAndCycle.Count(); + //this.lbControlItemRate.Text = allControlItemCount > 0 ? Math.Round(okControlItemCount * 100.0 / (allControlItemCount * 1.0)).ToString() + "%" : "0%"; + } + if (item == "JDGL") + { + this.gpJDGL.Hidden = false; + + double totalSJCost = 0; ////累计实际费用 + decimal totalPlanCost = 0; ////计划费用 + var getViewWorkPackageParentDetail = from x in Funs.DB.View_WBS_WorkPackageParentDetail + where x.ProjectId == this.ProjectId && (x.ParentId == "1" || x.ParentId == "2") + select x; + if (getViewWorkPackageParentDetail.Count() > 0) + { + totalSJCost = getViewWorkPackageParentDetail.Sum(x => x.TotalThisValue ?? 0); + } + + var getUnitWork = from x in Funs.DB.WBS_UnitWork where x.ProjectId == this.ProjectId select x; + if (getUnitWork.Count() > 0) + { + totalPlanCost = getUnitWork.Sum(x => x.PlanCost ?? 0); + } + + ///项目进度完成百分比 + decimal s = Convert.ToDecimal(totalSJCost); + this.lbJDRate.Text = totalPlanCost > 0 ? Math.Round(s / totalPlanCost).ToString() + "%" : "0%"; + + } + if (item == "HTGL") + { + this.gpHTGL.Hidden = false; + } + if (item == "LW") + { + this.gpLW.Hidden = false; + } + } + } + } + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs new file mode 100644 index 00000000..894b8118 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/ProjectDataDW.aspx.designer.cs @@ -0,0 +1,386 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class ProjectDataDW + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Toolbar2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Toolbar Toolbar2; + + /// + /// ckType 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.CheckBoxList ckType; + + /// + /// gpHSSE 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel gpHSSE; + + /// + /// SimpleForm1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form SimpleForm1; + + /// + /// lbSitePersons 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbSitePersons; + + /// + /// lbWorkHours 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbWorkHours; + + /// + /// lbEduCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbEduCount; + + /// + /// lbRectifyRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbRectifyRate; + + /// + /// lbMeetingCount 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbMeetingCount; + + /// + /// lbHSECost 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbHSECost; + + /// + /// gpCQMS 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel gpCQMS; + + /// + /// Form2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form2; + + /// + /// lbSpotCheckRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbSpotCheckRate; + + /// + /// lbSpotCheckDataRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbSpotCheckDataRate; + + /// + /// Label2 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label2; + + /// + /// Label10 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label10; + + /// + /// gpJDGL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel gpJDGL; + + /// + /// Form3 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form3; + + /// + /// lbJDRate 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label lbJDRate; + + /// + /// gpHTGL 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel gpHTGL; + + /// + /// Form4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form4; + + /// + /// Label4 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label4; + + /// + /// Label1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label1; + + /// + /// Label11 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label11; + + /// + /// Label6 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label6; + + /// + /// Label12 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label12; + + /// + /// Label13 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label13; + + /// + /// Label14 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label14; + + /// + /// Label15 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label15; + + /// + /// Label16 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label16; + + /// + /// Label17 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label17; + + /// + /// Label18 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label18; + + /// + /// Label19 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label19; + + /// + /// gpLW 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.GroupPanel gpLW; + + /// + /// Form5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Form Form5; + + /// + /// Label5 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Label Label5; + + /// + /// Window1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Window Window1; + } +} diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx new file mode 100644 index 00000000..2da39ca2 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx @@ -0,0 +1,93 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="ProjectWBSAnalysis.aspx.cs" Inherits="FineUIPro.Web.DigData.ProjectWBSAnalysis" %> + +<%@ Register Src="~/Controls/WBSControl.ascx" TagName="WBSControl" TagPrefix="uc1" %> + + + + + WBS数据分析 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs new file mode 100644 index 00000000..a9015453 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.cs @@ -0,0 +1,79 @@ +using BLL; +using FineUIPro.Web.CQMS.WBS; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; + +namespace FineUIPro.Web.DigData +{ + public partial class ProjectWBSAnalysis : PageBase + { + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ucTree.IsShowAll = false; + this.ucTree.Level= this.hdLevel.Text = "0"; + BindGrid(); + } + } + + protected void changeTree(object sender, EventArgs e) + { + this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode; + this.hdLevel.Text = this.ucTree.Level; + BindGrid(); + } + + #region 绑定数据Grid1 + /// + /// 绑定数据Grid1 + /// + private void BindGrid() + { + var getData = WBSAnalysisService.getDataDWList(this.hdLevel.Text,this.hdWorkPackageCode.Text, this.Grid1); + Grid1.RecordCount = WBSAnalysisService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs new file mode 100644 index 00000000..c308ef13 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSAnalysis.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class ProjectWBSAnalysis + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.WBSControl ucTree; + + /// + /// hdWorkPackageCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdWorkPackageCode; + + /// + /// hdLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdLevel; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx index 3e3e41d3..426eb1d2 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx @@ -64,7 +64,7 @@ - +
diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs index 3f67a293..c7182d9a 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.cs @@ -114,6 +114,10 @@ namespace FineUIPro.Web.DigData && x.States == Const.State_2 && (controlItemAndCycleId == null || x.WorkPackageId.Contains(controlItemAndCycleId)) select x).Count().ToString(); + + this.lbHSEProblemCount.Text= (from x in Funs.DB.HSSE_Hazard_HazardRegister + where x.ProjectId == this.ProjectId && x.States != null && x.States !="4" && x.States != "0" + select x).Count().ToString(); } if (item == "CQMS") { diff --git a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs index f8ae1512..caf5ffa5 100644 --- a/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs +++ b/SGGL/FineUIPro.Web/DigData/ProjectWBSDW.aspx.designer.cs @@ -159,13 +159,13 @@ namespace FineUIPro.Web.DigData protected global::FineUIPro.Label lbAccident; /// - /// Label3 控件。 + /// lbHSEProblemCount 控件。 /// /// /// 自动生成的字段。 /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 /// - protected global::FineUIPro.Label Label3; + protected global::FineUIPro.Label lbHSEProblemCount; /// /// gpCQMS 控件。 diff --git a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx new file mode 100644 index 00000000..ba8ab06f --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx @@ -0,0 +1,93 @@ +<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WBSAnalysis.aspx.cs" Inherits="FineUIPro.Web.DigData.WBSAnalysis" %> + +<%@ Register Src="~/Controls/WBSControl.ascx" TagName="WBSControl" TagPrefix="uc1" %> + + + + + WBS数据分析 + + + +
+ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs new file mode 100644 index 00000000..d2a493eb --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.cs @@ -0,0 +1,79 @@ +using BLL; +using FineUIPro.Web.CQMS.WBS; +using System; +using System.Collections.Generic; +using System.Data; +using System.Linq; + +namespace FineUIPro.Web.DigData +{ + public partial class WBSAnalysis : PageBase + { + /// + /// 加载页面 + /// + /// + /// + protected void Page_Load(object sender, EventArgs e) + { + if (!IsPostBack) + { + this.ucTree.IsShowAll = false; + this.ucTree.Level= this.hdLevel.Text = "0"; + BindGrid(); + } + } + + protected void changeTree(object sender, EventArgs e) + { + this.hdWorkPackageCode.Text = this.ucTree.WorkPackageCode; + this.hdLevel.Text = this.ucTree.Level; + BindGrid(); + } + + #region 绑定数据Grid1 + /// + /// 绑定数据Grid1 + /// + private void BindGrid() + { + var getData = WBSAnalysisService.getDataDWList(this.hdLevel.Text,this.hdWorkPackageCode.Text, this.Grid1); + Grid1.RecordCount = WBSAnalysisService.count; + Grid1.DataSource = getData; + Grid1.DataBind(); + } + + /// + /// 改变索引事件 + /// + /// + /// + protected void Grid1_PageIndexChange(object sender, GridPageEventArgs e) + { + BindGrid(); + } + + /// + /// 分页下拉选择事件 + /// + /// + /// + protected void ddlPageSize_SelectedIndexChanged(object sender, EventArgs e) + { + this.Grid1.PageSize = Convert.ToInt32(this.ddlPageSize.SelectedValue); + BindGrid(); + } + + /// + /// 排序 + /// + /// + /// + protected void Grid1_Sort(object sender, FineUIPro.GridSortEventArgs e) + { + this.BindGrid(); + } + #endregion + + } +} \ No newline at end of file diff --git a/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.designer.cs b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.designer.cs new file mode 100644 index 00000000..470bca96 --- /dev/null +++ b/SGGL/FineUIPro.Web/DigData/WBSAnalysis.aspx.designer.cs @@ -0,0 +1,143 @@ +//------------------------------------------------------------------------------ +// <自动生成> +// 此代码由工具生成。 +// +// 对此文件的更改可能导致不正确的行为,如果 +// 重新生成代码,则所做更改将丢失。 +// +//------------------------------------------------------------------------------ + +namespace FineUIPro.Web.DigData +{ + + + public partial class WBSAnalysis + { + + /// + /// form1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.HtmlControls.HtmlForm form1; + + /// + /// PageManager1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.PageManager PageManager1; + + /// + /// Panel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel Panel1; + + /// + /// panelLeftRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelLeftRegion; + + /// + /// ContentPanel1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ContentPanel ContentPanel1; + + /// + /// ucTree 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Web.Controls.WBSControl ucTree; + + /// + /// hdWorkPackageCode 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdWorkPackageCode; + + /// + /// hdLevel 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.TextBox hdLevel; + + /// + /// panelCenterRegion 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Panel panelCenterRegion; + + /// + /// Grid1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.Grid Grid1; + + /// + /// labNumber 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::System.Web.UI.WebControls.Label labNumber; + + /// + /// ToolbarSeparator1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarSeparator ToolbarSeparator1; + + /// + /// ToolbarText1 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.ToolbarText ToolbarText1; + + /// + /// ddlPageSize 控件。 + /// + /// + /// 自动生成的字段。 + /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。 + /// + protected global::FineUIPro.DropDownList ddlPageSize; + } +} diff --git a/SGGL/FineUIPro.Web/ErrLog.txt b/SGGL/FineUIPro.Web/ErrLog.txt index e69de29b..9e8fc3d8 100644 --- a/SGGL/FineUIPro.Web/ErrLog.txt +++ b/SGGL/FineUIPro.Web/ErrLog.txt @@ -0,0 +1,19 @@ + +错误信息开始=====> +错误类型:NullReferenceException +错误信息:未将对象引用设置到对象的实例。 +错误堆栈: + 在 (TreeNode ) + 在 FineUIPro.TreeCommandEventArgs..ctor(TreeNode node, String commandName, String commandArgument) + 在 (TreeNode , String , String ) + 在 FineUIPro.Tree.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) +出错时间:09/07/2023 21:53:15 +出错文件:http://localhost:6422/DigData/WBSAnalysis.aspx +IP地址:::1 +操作人员:JT + +出错时间:09/07/2023 21:53:15 + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx index f6f23483..59c3cb35 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口检测委托单NoPic.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -89,7 +89,7 @@ namespace FastReport } - + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx new file mode 100644 index 00000000..539d7f15 --- /dev/null +++ b/SGGL/FineUIPro.Web/File/Fastreport/管道焊口返修委托单NoPic.frx @@ -0,0 +1,344 @@ + + + using System; +using System.Collections; +using System.Collections.Generic; +using System.ComponentModel; +using System.Windows.Forms; +using System.Drawing; +using System.Data; +using FastReport; +using FastReport.Data; +using FastReport.Dialog; +using FastReport.Barcode; +using FastReport.Table; +using FastReport.Utils; + +namespace FastReport +{ + public class ReportScript + { + + + private void Table4_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Table1"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + Table4.PrintRow(0); + // each PrintRow call must be followed by either PrintColumn or PrintColumns call + // to print cells on the row + Table4.PrintColumns(); + + // now enumerate the data source and print the table body + + // print the table body + Table4.PrintRow(1); + Table4.PrintColumns(); + Table4.PrintRow(2); + Table4.PrintColumns(); + Table4.PrintRow(3); + Table4.PrintColumns(); + Table4.PrintRow(4); + Table4.PrintColumns(); + Table4.PrintRow(5); + Table4.PrintColumns(); + + // go next data source row + rowData.Next(); + + } + + private void Table5_ManualBuild(object sender, EventArgs e) + { + Table5.PrintRow(0); + Table5.PrintColumns(); + Table5.PrintRow(1); + Table5.PrintColumns(); + } + + + private int x; + private void Tabel_Data_ManualBuild(object sender, EventArgs e) + { + DataSourceBase rowData = Report.GetDataSource("Data"); + // init the data source + rowData.Init(); + + // print the first table row - it is a header + Tabel_Data.PrintRow(0); + // each PrintRow call must be followed by either PrintColumn or PrintColumns call + // to print cells on the row + Tabel_Data.PrintColumns(); + x=0; + // now enumerate the data source and print the table body + while (rowData.HasMoreRows) + { + x++; + // print the table body + Tabel_Data.PrintRow(1); + Tabel_Data.PrintColumns(); + + // go next data source row + rowData.Next(); + } + } + } +} + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx index 5d47cd9a..9938dabe 100644 --- a/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx +++ b/SGGL/FineUIPro.Web/File/Fastreport/组件打印.frx @@ -1,5 +1,5 @@  - + using System; using System.Collections; using System.Collections.Generic; @@ -99,7 +99,7 @@ namespace FastReport } - + @@ -114,15 +114,8 @@ namespace FastReport - - - - - - - - + @@ -153,15 +146,15 @@ namespace FastReport - + - - + + - + @@ -174,28 +167,28 @@ namespace FastReport - + - + - + - + - + diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj index aea91ac7..0459e9e6 100644 --- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj +++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj @@ -525,6 +525,11 @@ + + + + + @@ -532,6 +537,8 @@ + + @@ -7605,6 +7612,41 @@ WorkingHoursItem.aspx + + CQMSDataDW.aspx + ASPXCodeBehind + + + CQMSDataDW.aspx + + + HSEDataDW.aspx + ASPXCodeBehind + + + HSEDataDW.aspx + + + HTGLDataDW.aspx + ASPXCodeBehind + + + HTGLDataDW.aspx + + + JDGLDataDW.aspx + ASPXCodeBehind + + + JDGLDataDW.aspx + + + ProjectDataDW.aspx + ASPXCodeBehind + + + ProjectDataDW.aspx + ShowProjectWBS.aspx ASPXCodeBehind @@ -7654,6 +7696,20 @@ HSEDataCollect.aspx + + ProjectWBSAnalysis.aspx + ASPXCodeBehind + + + ProjectWBSAnalysis.aspx + + + WBSAnalysis.aspx + ASPXCodeBehind + + + WBSAnalysis.aspx + WBSDW.aspx ASPXCodeBehind @@ -10389,7 +10445,6 @@ EPSummaryReport.aspx - ASPXCodeBehind EPSummaryReport.aspx @@ -14161,7 +14216,7 @@ True 0 / - http://localhost:8797/ + http://localhost:6422/ False False diff --git a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs index aab12ce5..cb7f9fb9 100644 --- a/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PointTrust/PointBatch.aspx.cs @@ -572,7 +572,8 @@ namespace FineUIPro.Web.HJGL.PointTrust { if (!batch.EndDate.HasValue) { - PointBatchService.UpdateBatchIsClosed2(this.PointBatchId, DateTime.Now); + PointBatchService.UpdateBatchIsClosed(this.PointBatchId, DateTime.Now); + /*PointBatchService.UpdateBatchIsClosed2(this.PointBatchId, DateTime.Now); //生成委托单 Model.HJGL_Batch_BatchTrust newBatchTrust = new Model.HJGL_Batch_BatchTrust(); var project = BLL.ProjectService.GetProjectByProjectId(batch.ProjectId); @@ -595,7 +596,7 @@ namespace FineUIPro.Web.HJGL.PointTrust newBatchTrust.DetectionTypeId = batch.DetectionTypeId; newBatchTrust.DetectionRateId = batch.DetectionRateId; newBatchTrust.PointBatchId = this.PointBatchId; - BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单 + BLL.Batch_BatchTrustService.AddBatchTrust(newBatchTrust); // 新增委托单*/ this.BindGrid(); Alert.ShowInTop("关批成功!", MessageBoxIcon.Success); } diff --git a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs index cd01605b..14b62b2f 100644 --- a/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs +++ b/SGGL/FineUIPro.Web/HJGL/PreDesign/PrePipeline.aspx.cs @@ -355,13 +355,68 @@ namespace FineUIPro.Web.HJGL.PreDesign } protected void btnPrint_Click(object sender, EventArgs e) { - Print(tvControlItem.SelectedNodeID,""); + Print(tvControlItem.SelectedNodeID, Grid1.SelectedRowIDArray); } - private void Print(string PipelineId ,string PipelineComponentId) + private void Print(string PipelineId ,string[] PipelineComponentId) { + var db = Funs.DB; BLL.FastReportService.ResetData(); - string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName, + var query = + from com in db.HJGL_Pipeline_Component + join mat in db.HJGL_PipeLineMat on com.PipeLineMatId equals mat.PipeLineMatId into matJoin + from mat in matJoin.DefaultIfEmpty() + join pipe in db.HJGL_Pipeline on com.PipelineId equals pipe.PipelineId into pipeJoin + from pipe in pipeJoin.DefaultIfEmpty() + join punit in db.Base_Unit on com.PreUnit equals punit.UnitId into punitJoin + from punit in punitJoin.DefaultIfEmpty() + join aunit in db.Base_Unit on com.AssembleUnit equals aunit.UnitId into aunitJoin + from aunit in aunitJoin.DefaultIfEmpty() + join unitwork in db.WBS_UnitWork on pipe.UnitWorkId equals unitwork.UnitWorkId into unitworkJoin + from unitwork in unitworkJoin.DefaultIfEmpty() + join mater in db.Base_Material on pipe.MaterialId equals mater.MaterialId into materJoin + from mater in materJoin.DefaultIfEmpty() + where com.QRCode != "" & com.PipelineId == PipelineId + select new + { + com.PipelineComponentId, + com.PipelineComponentCode, + com.BoxNumber, + UnitWorkName = unitwork.UnitWorkName, + com.PipelineId, + PreUnit = punit.UnitName, + AssembleUnit = aunit.UnitName, + mat.PrefabricatedComponents, + com.QRCode, + com.State, + PlanStartDate = string.Format("yyyy-MM-dd", pipe.PlanStartDate), + pipe.PipelineCode, + pipe.FlowingSection, + QRCode2 = "PrePipeline$" + com.PipelineComponentId, + mater.MaterialCode + }; + + var result = query.ToList(); + if (PipelineComponentId.Length>0) + { + result = result.Where(x => PipelineComponentId.Contains(x.PipelineComponentId)).ToList(); + } + var tb = LINQToDataTable(result); + if (tb != null) + { + tb.TableName = "Table1"; + } + BLL.FastReportService.AddFastreportTable(tb); + string initTemplatePath = ""; + string rootPath = Server.MapPath("~/"); + initTemplatePath = "File\\Fastreport\\组件打印.frx"; + + if (File.Exists(rootPath + initTemplatePath)) + { + PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); + + } + /*string strSql = @" SELECT com.PipelineComponentId,com.PipelineComponentCode,com.BoxNumber,unitwork.UnitWorkName, com.PipelineId, punit.UnitName AS PreUnit,aunit.UnitName AS AssembleUnit,mat.PrefabricatedComponents, com.QRCode,com.State,CONVERT(varchar(100), pipe.PlanStartDate, 23) as PlanStartDate,pipe.PipelineCode,pipe.FlowingSection, ('PrePipeline$'+com.PipelineComponentId )as QRCode2,mater.* @@ -377,11 +432,7 @@ namespace FineUIPro.Web.HJGL.PreDesign strSql += " AND com.PipelineId =@PipelineId"; listStr.Add(new SqlParameter("@PipelineId", PipelineId)); - if (PipelineComponentId!="") - { - strSql += " AND com.PipelineComponentId =@PipelineComponentId"; - listStr.Add(new SqlParameter("@PipelineComponentId", PipelineComponentId)); - } + SqlParameter[] parameter = listStr.ToArray(); DataTable tb = SQLHelper.GetDataTableRunText(strSql, parameter); if (tb != null) @@ -397,8 +448,9 @@ namespace FineUIPro.Web.HJGL.PreDesign { PageContext.RegisterStartupScript(Window2.GetShowReference(String.Format("~/Controls/Fastreport.aspx?ReportPath={0}", rootPath + initTemplatePath))); - } + }*/ } + /// /// 增加焊口信息 /// @@ -500,11 +552,6 @@ namespace FineUIPro.Web.HJGL.PreDesign } } } - else if (e.CommandName == "cmd_print") - { - string Id = this.Grid1.SelectedRowID; - Print(tvControlItem.SelectedNodeID, Id); - } } protected void btnSearch_Click(object sender, EventArgs e) diff --git a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx index 21bc9392..56cd9dbc 100644 --- a/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx +++ b/SGGL/FineUIPro.Web/HJGL/RepairAndExpand/RepairTrust.aspx @@ -170,6 +170,11 @@ EnableMaximize="true" Target="Top" EnableResize="false" runat="server" OnClose="Window1_Close" IsModal="true" Width="1050px" Height="650px"> + +