From 0bf6d1efd79fdeee56b07e12b3093740ea3b8a9e Mon Sep 17 00:00:00 2001
From: gaofei <231232131@163.com>
Date: Tue, 21 Dec 2021 16:10:02 +0800
Subject: [PATCH] 1221-002-gaofei
---
.../SGGLDB_V2021-12-21-001.sql | 51 ++
SGGL/BLL/JDGL/WBS/CostControlService.cs | 12 +
.../BLL/JDGL/WBS/WorkloadStatisticsService.cs | 2 +-
SGGL/FineUIPro.Web/FineUIPro.Web.csproj | 8 +
.../JDGL/WBS/CostControlEdit.aspx | 4 +-
.../JDGL/WBS/CostControlEdit.aspx.cs | 25 +-
.../JDGL/WBS/CostControlEdit.aspx.designer.cs | 18 -
SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx | 38 +-
.../JDGL/WBS/WBSSetAudit.aspx.cs | 57 +-
.../JDGL/WBS/WBSSetAudit.aspx.designer.cs | 45 --
.../FineUIPro.Web/JDGL/WBS/WorkloadInput.aspx | 46 +-
.../JDGL/WBS/WorkloadInput.aspx.cs | 620 ++++++++++--------
.../JDGL/WBS/WorkloadInput.aspx.designer.cs | 54 +-
.../JDGL/WBS/WorkloadInputEdit.aspx | 89 +++
.../JDGL/WBS/WorkloadInputEdit.aspx.cs | 612 +++++++++++++++++
.../WBS/WorkloadInputEdit.aspx.designer.cs | 123 ++++
.../JDGL/WBS/WorkloadStatistics.aspx | 9 +-
.../JDGL/WBS/WorkloadStatistics.aspx.cs | 116 ++--
.../WBS/WorkloadStatistics.aspx.designer.cs | 9 -
SGGL/Model/CostControlDetailItem.cs | 120 ++++
SGGL/Model/Model.cs | 42 ++
SGGL/Model/Model.csproj | 1 +
22 files changed, 1553 insertions(+), 548 deletions(-)
create mode 100644 DataBase/版本日志/已更新脚本/SGGLDB_V2021-12-21-001.sql
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInputEdit.aspx
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInputEdit.aspx.cs
create mode 100644 SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInputEdit.aspx.designer.cs
create mode 100644 SGGL/Model/CostControlDetailItem.cs
diff --git a/DataBase/版本日志/已更新脚本/SGGLDB_V2021-12-21-001.sql b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-12-21-001.sql
new file mode 100644
index 00000000..78a2ab59
--- /dev/null
+++ b/DataBase/版本日志/已更新脚本/SGGLDB_V2021-12-21-001.sql
@@ -0,0 +1,51 @@
+alter table [dbo].[WBS_CostControl] add IsSelected bit null
+GO
+
+
+
+ALTER VIEW [dbo].[View_WBS_CostControlDetailStatistics]
+AS
+select InstallationId as Id,null as SupId ,InstallationCode as Code, InstallationName as Name,'Installation' as WBSType,null as OldCnProfessionId,null as OldUnitProjectCode,null as OldWbsSetCode,
+ProjectId from dbo.Project_Installation where SuperInstallationId is null
+Union
+select InstallationId as Id,SuperInstallationId as SupId ,InstallationCode as Code, '['+InstallationCode+']'+InstallationName as Name,'Installation' as WBSType,null as OldCnProfessionId,null as OldUnitProjectCode,null as OldWbsSetCode,
+ProjectId from dbo.Project_Installation where SuperInstallationId is not null
+Union
+select CnProfessionId as Id , InstallationId as SupId,CnProfessionCode as Code, CnProfessionName as Name,'CnProfession' as WBSType,OldId as OldCnProfessionId,null as OldUnitProjectCode,null as OldWbsSetCode,
+ProjectId from dbo.WBS_CnProfession where IsApprove=1
+Union all
+select UnitProjectId as Id, isnull(CnProfessionId,InstallationId) as SupId,UnitProjectCode as Code,UnitProjectName as Name,'UnitProject' as WBSType,
+(case when u.CnProfessionId is null then (select CnProfessionId from WBS_CnProfessionInit where CnProfessionName=(select InstallationName from Project_Installation where InstallationId=u.InstallationId)) else (select OldId from WBS_CnProfession c where c.CnProfessionId=u.CnProfessionId) end) as OldCnProfessionId,UnitProjectCode as OldUnitProjectCode,null as OldWbsSetCode,
+ProjectId from dbo.Wbs_UnitProject u where IsApprove=1
+Union all
+select WbsSetId as id,UnitProjectId as SupId,WbsSetCode as Code, WbsSetName as Name,'WbsSet' as WBSType,
+(case when w.CnProfessionId is null then (select CnProfessionId from WBS_CnProfessionInit where CnProfessionName=(select InstallationName from Project_Installation where InstallationId=w.InstallationId)) else (select OldId from WBS_CnProfession c where c.CnProfessionId=w.CnProfessionId) end) as OldCnProfessionId,(select UnitProjectCode from Wbs_UnitProject c where c.UnitProjectId=w.UnitProjectId) as OldUnitProjectCode,
+WbsSetCode as OldWbsSetCode,
+ProjectId from dbo.Wbs_WbsSet w where IsApprove=1 and SuperWbsSetId is null
+Union all
+select WbsSetId as id,SuperWbsSetId as SupId,WbsSetCode as Code, WbsSetName as Name,'WbsSet' as WBSType,
+(case when w.CnProfessionId is null then (select CnProfessionId from WBS_CnProfessionInit where CnProfessionName=(select InstallationName from Project_Installation where InstallationId=w.InstallationId)) else (select OldId from WBS_CnProfession c where c.CnProfessionId=w.CnProfessionId) end) as OldCnProfessionId,(select UnitProjectCode from Wbs_UnitProject c where c.UnitProjectId=w.UnitProjectId) as OldUnitProjectCode,
+(select WbsSetCode from Wbs_WbsSet ws where ws.WbsSetId=w.SuperWbsSetId) as OldWbsSetCode,
+ProjectId from dbo.Wbs_WbsSet w where IsApprove=1 and SuperWbsSetId is not null
+Union all
+select c.CostControlId as id,c.WbsSetId as SupId,CostControlCode as Code,c.CostControlName as Name,'CostControl' as WBSType,
+(case when ws.CnProfessionId is null then (select CnProfessionId from WBS_CnProfessionInit where CnProfessionName=(select InstallationName from Project_Installation where InstallationId=ws.InstallationId)) else (select OldId from WBS_CnProfession cn where cn.CnProfessionId=(select top 1 CnProfessionId from Wbs_WbsSet w where w.WbsSetId=c.WbsSetId)) end) as OldCnProfessionId,
+(select UnitProjectCode from Wbs_UnitProject u where u.UnitProjectId=(select top 1 UnitProjectId from Wbs_WbsSet w where w.WbsSetId=c.WbsSetId)) as OldUnitProjectCode,
+(select WbsSetCode from Wbs_WbsSet u where u.WbsSetId=(select top 1 w.SuperWbsSetId from Wbs_WbsSet w where w.WbsSetId=c.WbsSetId)) as OldWbsSetCode,
+c.ProjectId from dbo.WBS_CostControl c
+left join dbo.Wbs_WbsSet ws on ws.WbsSetId=c.WbsSetId
+where c.IsSelected=1
+
+
+
+
+
+
+
+
+
+
+
+GO
+
+
diff --git a/SGGL/BLL/JDGL/WBS/CostControlService.cs b/SGGL/BLL/JDGL/WBS/CostControlService.cs
index 198d86db..630a7239 100644
--- a/SGGL/BLL/JDGL/WBS/CostControlService.cs
+++ b/SGGL/BLL/JDGL/WBS/CostControlService.cs
@@ -38,6 +38,16 @@ namespace BLL
return (from x in Funs.DB.WBS_CostControl where x.WbsSetId == wbsSetId select x).ToList();
}
+ ///
+ /// 根据费控项编号集合获取勾选的费控项信息
+ ///
+ /// 费控项编号集合
+ ///
+ public static List GetSelectedCostControlsByWbsSetId(string wbsSetId)
+ {
+ return (from x in Funs.DB.WBS_CostControl where x.WbsSetId == wbsSetId && x.IsSelected == true orderby x.CostControlCode, x.CostControlName select x).ToList();
+ }
+
///
/// 增加费控项
///
@@ -52,6 +62,7 @@ namespace BLL
newUP.CostControlCode = costControl.CostControlCode;
newUP.CostControlName = costControl.CostControlName;
newUP.Unit = costControl.Unit;
+ newUP.IsSelected = costControl.IsSelected;
newUP.TotalNum = costControl.TotalNum;
newUP.RealPrice = costControl.RealPrice;
@@ -72,6 +83,7 @@ namespace BLL
newUP.CostControlName = costControl.CostControlName;
newUP.Unit = costControl.Unit;
newUP.TotalNum = costControl.TotalNum;
+ newUP.IsSelected = costControl.IsSelected;
newUP.RealPrice = costControl.RealPrice;
newUP.PlanPrice = costControl.PlanPrice;
db.SubmitChanges();
diff --git a/SGGL/BLL/JDGL/WBS/WorkloadStatisticsService.cs b/SGGL/BLL/JDGL/WBS/WorkloadStatisticsService.cs
index b6721cd8..cc81eb9e 100644
--- a/SGGL/BLL/JDGL/WBS/WorkloadStatisticsService.cs
+++ b/SGGL/BLL/JDGL/WBS/WorkloadStatisticsService.cs
@@ -2473,7 +2473,7 @@ namespace BLL
private static void AddDetail(List newList, List oldList, string id)
{
- var items = oldList.Where(x => x.SupId == id);
+ var items = oldList.Where(x => x.SupId == id).OrderBy(x => x.Code);
foreach (var item in items)
{
newList.Add(item);
diff --git a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
index c9e7b064..c4b9cb1f 100644
--- a/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
+++ b/SGGL/FineUIPro.Web/FineUIPro.Web.csproj
@@ -1184,6 +1184,7 @@
+
@@ -12222,6 +12223,13 @@
WorkloadInput.aspx
+
+ WorkloadInputEdit.aspx
+ ASPXCodeBehind
+
+
+ WorkloadInputEdit.aspx
+
WorkloadStatistics.aspx
ASPXCodeBehind
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx
index 15708a66..8af67647 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx
@@ -29,7 +29,7 @@
-
+ <%--
@@ -42,7 +42,7 @@
runat="server">
-
+ --%>
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.cs
index 9fceec87..95f72ddd 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.cs
@@ -32,14 +32,14 @@ namespace FineUIPro.Web.JDGL.WBS
this.txtCostControlCode.Text = costControl.CostControlCode;
this.txtCostControlName.Text = costControl.CostControlName;
this.txtUnit.Text = costControl.Unit;
- if (costControl.TotalNum != null)
- {
- this.txtTotalNum.Text = costControl.TotalNum.ToString();
- }
- if (costControl.RealPrice != null)
- {
- this.txtRealPrice.Text = costControl.RealPrice.ToString();
- }
+ //if (costControl.TotalNum != null)
+ //{
+ // this.txtTotalNum.Text = costControl.TotalNum.ToString();
+ //}
+ //if (costControl.RealPrice != null)
+ //{
+ // this.txtRealPrice.Text = costControl.RealPrice.ToString();
+ //}
}
}
}
@@ -71,8 +71,9 @@ namespace FineUIPro.Web.JDGL.WBS
costControl.ProjectId = wbsSet.ProjectId;
costControl.WbsSetId = wbsSet.WbsSetId;
costControl.Unit = txtUnit.Text.Trim();
- costControl.TotalNum = Funs.GetNewDecimal(txtTotalNum.Text.Trim());
- costControl.RealPrice = Funs.GetNewDecimal(txtRealPrice.Text.Trim());
+ costControl.IsSelected = true;
+ //costControl.TotalNum = Funs.GetNewDecimal(txtTotalNum.Text.Trim());
+ //costControl.RealPrice = Funs.GetNewDecimal(txtRealPrice.Text.Trim());
BLL.CostControlService.AddCostControl(costControl);
//增加对应关系内容
Model.WBS_WbsSetMatchCostControl wbsSetMatchCostControl = new WBS_WbsSetMatchCostControl();
@@ -99,8 +100,8 @@ namespace FineUIPro.Web.JDGL.WBS
costControl.CostControlCode = txtCostControlCode.Text.Trim();
costControl.CostControlName = txtCostControlName.Text.Trim();
costControl.Unit = txtUnit.Text.Trim();
- costControl.TotalNum = Funs.GetNewDecimal(txtTotalNum.Text.Trim());
- costControl.RealPrice = Funs.GetNewDecimal(txtRealPrice.Text.Trim());
+ //costControl.TotalNum = Funs.GetNewDecimal(txtTotalNum.Text.Trim());
+ //costControl.RealPrice = Funs.GetNewDecimal(txtRealPrice.Text.Trim());
BLL.CostControlService.UpdateCostControl(costControl);
}
BLL.LogService.AddSys_Log(this.CurrUser, id, id, BLL.Const.WBSSetMenuId, "修改费用清单项!");
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.designer.cs
index b55be731..447e2c9c 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/CostControlEdit.aspx.designer.cs
@@ -66,24 +66,6 @@ namespace FineUIPro.Web.JDGL.WBS {
///
protected global::FineUIPro.TextBox txtUnit;
- ///
- /// txtTotalNum 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox txtTotalNum;
-
- ///
- /// txtRealPrice 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox txtRealPrice;
-
///
/// Toolbar1 控件。
///
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx
index e74abb11..e57ccaf6 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx
@@ -62,7 +62,7 @@
Title="中间面板" ShowBorder="true" ShowHeader="false" BodyPadding="10px">
@@ -87,7 +87,7 @@
-
-
+ --%>
@@ -177,12 +177,6 @@
-
-
@@ -235,32 +229,6 @@
}
}
- function onGridAfterEdit(event, value, params) {
- var me = this, columnId = params.columnId, rowId = params.rowId;
- if (columnId === 'StartDate') {
- me.updateCellValue(rowId, 'ChangeId', rowId);
- me.updateCellValue(rowId, 'ChangeColumn', 'StartDate');
- }
- if (columnId === 'EndDate') {
- me.updateCellValue(rowId, 'ChangeId', rowId);
- me.updateCellValue(rowId, 'ChangeColumn', 'EndDate');
- }
- if (columnId === 'ControlPoint') {
- me.updateCellValue(rowId, 'ChangeId', rowId);
- me.updateCellValue(rowId, 'ChangeColumn', 'ControlPoint');
- }
- if (columnId === 'Cycle') {
- me.updateCellValue(rowId, 'ChangeId', rowId);
- me.updateCellValue(rowId, 'ChangeColumn', 'Cycle');
- }
- if (columnId === 'Frequency') {
- me.updateCellValue(rowId, 'ChangeId', rowId);
- me.updateCellValue(rowId, 'ChangeColumn', 'Frequency');
- }
- // updateDate();
- show();
- }
-
function updateDate() {
// 回发到后台更新
__doPostBack('', 'UPDATE_Date');
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.cs b/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.cs
index cc714ab7..27128c45 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.cs
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.cs
@@ -56,7 +56,7 @@ namespace FineUIPro.Web.JDGL.WBS
// }
//}
Model.Project_Installation installation = BLL.Project_InstallationService.GetProjectInstallationByProjectId(this.CurrUser.LoginProjectId);
- if(installation!=null)
+ if (installation != null)
{
TreeNode newNode = new TreeNode();
newNode.Text = "[" + installation.InstallationCode + "]" + installation.InstallationName;
@@ -1394,42 +1394,29 @@ namespace FineUIPro.Web.JDGL.WBS
bool isPass = true;
if (isPass)
{
+ foreach (var item in this.Grid1.SelectedRowIDArray)
+ {
+ Model.WBS_CostControl costControl = BLL.CostControlService.GetCostControlByCostControlId(item);
+
+ }
+
foreach (JObject mergedRow in mergedData)
{
JObject values = mergedRow.Value("values");
string costControlId = values.Value("CostControlId");
- string totalNum = values.Value("TotalNum");
- string realPrice = values.Value("RealPrice");
- string planPrice = values.Value("PlanPrice");
+ //string totalNum = values.Value("TotalNum");
+ //string realPrice = values.Value("RealPrice");
+ //string planPrice = values.Value("PlanPrice");
Model.WBS_CostControl costControl = BLL.CostControlService.GetCostControlByCostControlId(costControlId);
- if (costControl != null)
+ if (this.Grid1.SelectedRowIDArray.Contains(costControlId))
{
- if (!string.IsNullOrEmpty(totalNum))
- {
- costControl.TotalNum = Convert.ToDecimal(totalNum);
- }
- else
- {
- costControl.TotalNum = null;
- }
- if (!string.IsNullOrEmpty(realPrice))
- {
- costControl.RealPrice = Convert.ToDecimal(realPrice);
- }
- else
- {
- costControl.RealPrice = null;
- }
- if (!string.IsNullOrEmpty(planPrice))
- {
- costControl.PlanPrice = Convert.ToDecimal(planPrice);
- }
- else
- {
- costControl.RealPrice = null;
- }
- BLL.CostControlService.UpdateCostControl(costControl);
+ costControl.IsSelected = true;
}
+ else
+ {
+ costControl.IsSelected = false;
+ }
+ BLL.CostControlService.UpdateCostControl(costControl);
}
}
BindGrid();
@@ -1513,6 +1500,12 @@ namespace FineUIPro.Web.JDGL.WBS
Grid1.DataSource = table;
Grid1.DataBind();
+ var costControls = BLL.CostControlService.GetSelectedCostControlsByWbsSetId(this.trWBS.SelectedNodeID);
+ if (costControls.Count > 0)
+ {
+ var selectIds = costControls.Select(x => x.CostControlId).ToArray();
+ this.Grid1.SelectedRowIDArray = selectIds;
+ }
}
else
{
@@ -2402,8 +2395,8 @@ namespace FineUIPro.Web.JDGL.WBS
this.btnMenuAdd.Hidden = false;
this.btnAdd.Hidden = false;
this.btnMenuCopy.Hidden = false;
- this.btnMenuDetail.Hidden = false;
- this.btnMenuWeekDetail.Hidden = false;
+ //this.btnMenuDetail.Hidden = false;
+ //this.btnMenuWeekDetail.Hidden = false;
//this.btnMenuCopy2.Hidden = false;
}
if (buttonList.Contains(BLL.Const.BtnModify))
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.designer.cs b/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.designer.cs
index 1fdcd7c2..931a7bfd 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.designer.cs
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/WBSSetAudit.aspx.designer.cs
@@ -111,33 +111,6 @@ namespace FineUIPro.Web.JDGL.WBS {
///
protected global::FineUIPro.Button btnSave;
- ///
- /// nbTotalNum 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox nbTotalNum;
-
- ///
- /// nbRealPrice 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox nbRealPrice;
-
- ///
- /// nbPlanPrice 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.NumberBox nbPlanPrice;
-
///
/// ToolbarSeparator1 控件。
///
@@ -264,24 +237,6 @@ namespace FineUIPro.Web.JDGL.WBS {
///
protected global::FineUIPro.MenuButton btnMenuModify;
- ///
- /// btnMenuDetail 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.MenuButton btnMenuDetail;
-
- ///
- /// btnMenuWeekDetail 控件。
- ///
- ///
- /// 自动生成的字段。
- /// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
- ///
- protected global::FineUIPro.MenuButton btnMenuWeekDetail;
-
///
/// btnMenuDel 控件。
///
diff --git a/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInput.aspx b/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInput.aspx
index ab8aeb92..c811fb44 100644
--- a/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInput.aspx
+++ b/SGGL/FineUIPro.Web/JDGL/WBS/WorkloadInput.aspx
@@ -48,11 +48,14 @@
Width="300px" Title="工作量录入" ShowBorder="true" ShowHeader="true" BodyPadding="10px" Layout="Fit">
-
-
-
+ OnNodeExpand="trWBS_NodeExpand"
+ AutoLeafIdentification="true" runat="server">
+
+
+
+
+
+
-
+ <%----%>
-
-
+ <%--
+ --%>
@@ -100,11 +103,6 @@
-
-
-
-
@@ -131,8 +129,30 @@
+
+
+