diff --git a/DataBase/版本日志/SGGLDB_V2023-07-25.sql b/DataBase/版本日志/SGGLDB_V2023-07-25.sql
new file mode 100644
index 00000000..97a8e7a0
--- /dev/null
+++ b/DataBase/版本日志/SGGLDB_V2023-07-25.sql
@@ -0,0 +1,27 @@
+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
\ No newline at end of file
diff --git a/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql b/DataBase/菜单初始化脚本/1-4进度管理(Menu_JDGL).sql
index 94d52f2c..02b777c5 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/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs
index f82496c3..644354cb 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
@@ -30,6 +32,14 @@ namespace BLL
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();
@@ -54,6 +64,15 @@ namespace BLL
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;
db.SubmitChanges();
}
@@ -218,5 +237,136 @@ namespace BLL
Funs.FineUIPleaseSelect(dropName);
}
}
+
+ ///
+ /// 获取模拟树表格
+ ///
+ ///
+ public static DataTable GetAllTreeDataTable(string projectId)
+ {
+ 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("Weights", 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)));
+ if (getWBSs.Count() > 0)
+ {
+ List newList = new List();
+ var projectTypes = getWBSs.Where(x => x.WBSType == "ProjectType" && x.SupId == "0");
+ foreach (var item in projectTypes)
+ {
+ newList.Add(item);
+ AddDetail(newList, getWBSs.ToList(), item.Id);
+ }
+ 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.Weights != null)
+ {
+ row[6] = decimal.Round(Convert.ToDecimal(workPackage.Weights), 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;
+ }
+ }
+ }
+ }
+ else if (item.WBSType == "UnitWork")
+ {
+ var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == item.Id);
+ if (unitWork != null)
+ {
+ 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;
+ }
+ }
+ }
+ table.Rows.Add(row);
+ }
+ }
+ return table;
+ }
+ }
+
+ private static void AddDetail(List newList, List oldList, string id)
+ {
+ var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code);
+ foreach (var item in items)
+ {
+ newList.Add(item);
+ AddDetail(newList, oldList, item.Id);
+ }
+ }
}
}
diff --git a/SGGL/BLL/Common/Const.cs b/SGGL/BLL/Common/Const.cs
index b8934340..e5b1a509 100644
--- a/SGGL/BLL/Common/Const.cs
+++ b/SGGL/BLL/Common/Const.cs
@@ -4452,6 +4452,13 @@
#endregion
+ #region 进度
+ ///
+ /// 项目施工WBS定制
+ ///
+ public const string PlanSetMenuId = "E23F0879-3E9F-4E7B-9A2D-EFF34798D629";
+ #endregion
+
#region 施工综合
#region 菜单Id
///
diff --git a/SGGL/BLL/ProjectData/UnitWorkService.cs b/SGGL/BLL/ProjectData/UnitWorkService.cs
index adde94de..92425604 100644
--- a/SGGL/BLL/ProjectData/UnitWorkService.cs
+++ b/SGGL/BLL/ProjectData/UnitWorkService.cs
@@ -58,6 +58,10 @@ 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;
db.SubmitChanges();
}
GetWeights(UnitWork.ProjectId);
diff --git a/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc b/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc
index c0a689c3..64393096 100644
--- a/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc
+++ b/SGGL/FineUIPro.Web/File/Word/ZHGL/项目安全生产策划书评审表.doc
@@ -1,12 +1,3 @@
-ࡱ >
-
R o o t E n t r y F a o S u m m a r y I n f o r m a t i o n ( D o c u m e n t S u m m a r y I n f o r m a t i o n 8 W o r d D o c u m e n t 7
-
! " # $ % &