修改进度模块
This commit is contained in:
parent
947413323e
commit
c13283b8e1
|
|
@ -0,0 +1,38 @@
|
||||||
|
alter table [dbo].[WBS_WorkPackage] add PlanCost decimal(18,2) null
|
||||||
|
GO
|
||||||
|
alter table [dbo].[WBS_WorkPackage] add JDWeights decimal(9,2) null
|
||||||
|
GO
|
||||||
|
alter table [dbo].[WBS_WorkPackage] add PreWorkCode nvarchar(50) null
|
||||||
|
GO
|
||||||
|
|
||||||
|
alter table [dbo].[WBS_UnitWork] add PlanCost decimal(18,2) null
|
||||||
|
GO
|
||||||
|
alter table [dbo].[WBS_UnitWork] add JDWeights decimal(9,2) null
|
||||||
|
GO
|
||||||
|
alter table [dbo].[WBS_ControlItemAndCycle] add RealEndDate datetime null
|
||||||
|
GO
|
||||||
|
|
||||||
|
ALTER VIEW [dbo].[View_WBS]
|
||||||
|
AS
|
||||||
|
select '1' as Id,'0' as SupId ,'JZ' as Code, '½¨Öþ¹¤³Ì' as Name,'ProjectType' as WBSType,
|
||||||
|
ProjectId from dbo.WBS_UnitWork
|
||||||
|
Union
|
||||||
|
select '2' as Id,'0' as SupId ,'AZ' as Code, '°²×°¹¤³Ì' as Name,'ProjectType' as WBSType,
|
||||||
|
ProjectId from dbo.WBS_UnitWork
|
||||||
|
Union
|
||||||
|
select UnitWorkId as Id,ProjectType as SupId ,UnitWorkCode as Code, UnitWorkCode+'-'+UnitWorkName as Name,'UnitWork' as WBSType,
|
||||||
|
ProjectId from dbo.WBS_UnitWork
|
||||||
|
Union all
|
||||||
|
select WorkPackageId as id,UnitWorkId as SupId,WorkPackageCode as Code,WorkPackageCode+'-'+PackageContent as Name,'WorkPackage' as WBSType,
|
||||||
|
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is null
|
||||||
|
Union all
|
||||||
|
select WorkPackageId as id,SuperWorkPackageId as SupId,WorkPackageCode as Code, WorkPackageCode+'-'+PackageContent as Name,'WorkPackage' as WBSType,
|
||||||
|
ProjectId from dbo.WBS_WorkPackage w where IsApprove=1 and SuperWorkPackageId is not null
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
GO
|
||||||
|
|
||||||
|
|
||||||
|
|
@ -99,6 +99,7 @@ namespace BLL
|
||||||
newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate;
|
newControlItemAndCycle.PlanCompleteDate = ControlItemAndCycle.PlanCompleteDate;
|
||||||
newControlItemAndCycle.Costs = ControlItemAndCycle.Costs;
|
newControlItemAndCycle.Costs = ControlItemAndCycle.Costs;
|
||||||
newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType;
|
newControlItemAndCycle.CheckAcceptType = ControlItemAndCycle.CheckAcceptType;
|
||||||
|
newControlItemAndCycle.RealEndDate = ControlItemAndCycle.RealEndDate;
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -73,6 +73,9 @@ namespace BLL
|
||||||
newWorkPackage.RealEndDate = WorkPackage.RealEndDate;
|
newWorkPackage.RealEndDate = WorkPackage.RealEndDate;
|
||||||
newWorkPackage.Unit = WorkPackage.Unit;
|
newWorkPackage.Unit = WorkPackage.Unit;
|
||||||
newWorkPackage.IsMileStone = WorkPackage.IsMileStone;
|
newWorkPackage.IsMileStone = WorkPackage.IsMileStone;
|
||||||
|
newWorkPackage.PlanCost = WorkPackage.PlanCost;
|
||||||
|
newWorkPackage.JDWeights = WorkPackage.JDWeights;
|
||||||
|
newWorkPackage.PreWorkCode = WorkPackage.PreWorkCode;
|
||||||
|
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
@ -266,6 +269,8 @@ namespace BLL
|
||||||
table.Columns.Add(new DataColumn("RealStartDate", typeof(DateTime)));
|
table.Columns.Add(new DataColumn("RealStartDate", typeof(DateTime)));
|
||||||
table.Columns.Add(new DataColumn("RealEndDate", typeof(DateTime)));
|
table.Columns.Add(new DataColumn("RealEndDate", typeof(DateTime)));
|
||||||
table.Columns.Add(new DataColumn("IsMileStone", typeof(bool)));
|
table.Columns.Add(new DataColumn("IsMileStone", typeof(bool)));
|
||||||
|
table.Columns.Add(new DataColumn("PlanCost", typeof(String)));
|
||||||
|
table.Columns.Add(new DataColumn("PreWorkCode", typeof(String)));
|
||||||
if (getWBSs.Count() > 0)
|
if (getWBSs.Count() > 0)
|
||||||
{
|
{
|
||||||
List<Model.View_WBS> newList = new List<Model.View_WBS>();
|
List<Model.View_WBS> newList = new List<Model.View_WBS>();
|
||||||
|
|
@ -293,9 +298,9 @@ namespace BLL
|
||||||
var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id);
|
var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id);
|
||||||
if (workPackage != null)
|
if (workPackage != null)
|
||||||
{
|
{
|
||||||
if (workPackage.Weights != null)
|
if (workPackage.JDWeights != null)
|
||||||
{
|
{
|
||||||
row[6] = decimal.Round(Convert.ToDecimal(workPackage.Weights), 2);
|
row[6] = decimal.Round(Convert.ToDecimal(workPackage.JDWeights), 2);
|
||||||
}
|
}
|
||||||
row[7] = workPackage.Unit;
|
row[7] = workPackage.Unit;
|
||||||
if (workPackage.PlanProjectQuantity != null)
|
if (workPackage.PlanProjectQuantity != null)
|
||||||
|
|
@ -326,6 +331,11 @@ namespace BLL
|
||||||
{
|
{
|
||||||
row[14] = workPackage.IsMileStone;
|
row[14] = workPackage.IsMileStone;
|
||||||
}
|
}
|
||||||
|
if (workPackage.PlanCost != null)
|
||||||
|
{
|
||||||
|
row[15] = decimal.Round(Convert.ToDecimal(workPackage.PlanCost), 2);
|
||||||
|
}
|
||||||
|
row[16] = workPackage.PreWorkCode;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -334,6 +344,10 @@ namespace BLL
|
||||||
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == item.Id);
|
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == item.Id);
|
||||||
if (unitWork != null)
|
if (unitWork != null)
|
||||||
{
|
{
|
||||||
|
if (unitWork.JDWeights != null)
|
||||||
|
{
|
||||||
|
row[6] = decimal.Round(Convert.ToDecimal(unitWork.JDWeights), 2);
|
||||||
|
}
|
||||||
if (unitWork.PlanStartDate != null)
|
if (unitWork.PlanStartDate != null)
|
||||||
{
|
{
|
||||||
row[10] = unitWork.PlanStartDate;
|
row[10] = unitWork.PlanStartDate;
|
||||||
|
|
@ -350,6 +364,10 @@ namespace BLL
|
||||||
{
|
{
|
||||||
row[13] = unitWork.RealEndDate;
|
row[13] = unitWork.RealEndDate;
|
||||||
}
|
}
|
||||||
|
if (unitWork.PlanCost != null)
|
||||||
|
{
|
||||||
|
row[15] = decimal.Round(Convert.ToDecimal(unitWork.PlanCost), 2);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
table.Rows.Add(row);
|
table.Rows.Add(row);
|
||||||
|
|
@ -368,5 +386,151 @@ namespace BLL
|
||||||
AddDetail(newList, oldList, item.Id);
|
AddDetail(newList, oldList, item.Id);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
#region 更新工作包、工作项
|
||||||
|
/// <summary>
|
||||||
|
/// 更新月工作包、工作项
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="years"></param>
|
||||||
|
/// <param name="months"></param>
|
||||||
|
/// <param name="planValue"></param>
|
||||||
|
/// <param name="parentId"></param>
|
||||||
|
public static void UpdateWorkPackages(Model.SGGLDB db, Model.WBS_WorkPackage workPackage, DateTime? planStartDate, DateTime? planEndDate, DateTime? realStartDate, DateTime? realEndDate)
|
||||||
|
{
|
||||||
|
if (workPackage != null)
|
||||||
|
{
|
||||||
|
Model.WBS_WorkPackage parentWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackage.SuperWorkPackageId);
|
||||||
|
if (parentWorkPackage != null)
|
||||||
|
{
|
||||||
|
if (planStartDate != null)
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.PlanStartDate == null)
|
||||||
|
{
|
||||||
|
parentWorkPackage.PlanStartDate = planStartDate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.PlanStartDate > planStartDate)
|
||||||
|
{
|
||||||
|
parentWorkPackage.PlanStartDate = planStartDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (planEndDate != null)
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.PlanEndDate == null)
|
||||||
|
{
|
||||||
|
parentWorkPackage.PlanEndDate = planEndDate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.PlanEndDate < planEndDate)
|
||||||
|
{
|
||||||
|
parentWorkPackage.PlanEndDate = planEndDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (realStartDate != null)
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.RealStartDate == null)
|
||||||
|
{
|
||||||
|
parentWorkPackage.RealStartDate = realStartDate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.RealStartDate > realStartDate)
|
||||||
|
{
|
||||||
|
parentWorkPackage.RealStartDate = realStartDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (realEndDate != null)
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.RealEndDate == null)
|
||||||
|
{
|
||||||
|
parentWorkPackage.RealEndDate = realEndDate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (parentWorkPackage.RealEndDate < realEndDate)
|
||||||
|
{
|
||||||
|
parentWorkPackage.RealEndDate = realEndDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
UpdateWorkPackages(db, parentWorkPackage, planStartDate, planEndDate, realStartDate, realEndDate);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
#endregion
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// 更新分部分项工程实际完成时间
|
||||||
|
/// </summary>
|
||||||
|
/// <param name="WorkPackage"></param>
|
||||||
|
public static void UpdateWorkPackageRealEndDate(string workPackageId)
|
||||||
|
{
|
||||||
|
using (var db = new Model.SGGLDB(Funs.ConnString))
|
||||||
|
{
|
||||||
|
var controlItemAndCycles = from x in db.WBS_ControlItemAndCycle where x.WorkPackageId == workPackageId && x.IsApprove == true select x;
|
||||||
|
var spotCheckDetails = from x in db.Check_SpotCheckDetail where x.IsOK == true select x;
|
||||||
|
bool b = true;
|
||||||
|
if (controlItemAndCycles.Count() > 0)
|
||||||
|
{
|
||||||
|
foreach (var c in controlItemAndCycles)
|
||||||
|
{
|
||||||
|
if (c.CheckNum != null && c.CheckNum != 0) //检查次数为0表示一直检查
|
||||||
|
{
|
||||||
|
var okSpotCheckDetails = spotCheckDetails.Where(x => x.ControlItemAndCycleId == c.ControlItemAndCycleId);
|
||||||
|
if (okSpotCheckDetails.Count() != c.CheckNum)
|
||||||
|
{
|
||||||
|
b = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
b = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
if (b)
|
||||||
|
{
|
||||||
|
var LastEndControlItemAndCycle = controlItemAndCycles.OrderByDescending(x => x.RealEndDate).FirstOrDefault();
|
||||||
|
if (LastEndControlItemAndCycle != null)
|
||||||
|
{
|
||||||
|
var workPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.WorkPackageId == LastEndControlItemAndCycle.WorkPackageId);
|
||||||
|
if (workPackage != null)
|
||||||
|
{
|
||||||
|
workPackage.RealEndDate = LastEndControlItemAndCycle.RealEndDate;
|
||||||
|
UpdateWorkPackages(db, workPackage, null, null, null, workPackage.RealEndDate);
|
||||||
|
db.SubmitChanges();
|
||||||
|
var unitWork = db.WBS_UnitWork.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId);
|
||||||
|
//获取是否存在其他未完成的分部分项
|
||||||
|
var notEndOthenWorkPackage = db.WBS_WorkPackage.FirstOrDefault(x => x.UnitWorkId == unitWork.UnitWorkId && x.IsApprove == true && x.RealEndDate == null);
|
||||||
|
if (notEndOthenWorkPackage == null)
|
||||||
|
{
|
||||||
|
if (workPackage.RealEndDate != null)
|
||||||
|
{
|
||||||
|
if (unitWork.RealEndDate == null)
|
||||||
|
{
|
||||||
|
unitWork.RealEndDate = workPackage.RealEndDate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (unitWork.RealEndDate < workPackage.RealEndDate)
|
||||||
|
{
|
||||||
|
unitWork.RealEndDate = workPackage.RealEndDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
db.SubmitChanges();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -62,6 +62,8 @@ namespace BLL
|
||||||
newUnitWork.PlanEndDate = UnitWork.PlanEndDate;
|
newUnitWork.PlanEndDate = UnitWork.PlanEndDate;
|
||||||
newUnitWork.RealStartDate = UnitWork.RealStartDate;
|
newUnitWork.RealStartDate = UnitWork.RealStartDate;
|
||||||
newUnitWork.RealEndDate = UnitWork.RealEndDate;
|
newUnitWork.RealEndDate = UnitWork.RealEndDate;
|
||||||
|
newUnitWork.PlanCost = UnitWork.PlanCost;
|
||||||
|
newUnitWork.JDWeights = UnitWork.JDWeights;
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
GetWeights(UnitWork.ProjectId);
|
GetWeights(UnitWork.ProjectId);
|
||||||
|
|
|
||||||
|
|
@ -972,7 +972,26 @@ namespace FineUIPro.Web.CQMS.Check
|
||||||
if (!string.IsNullOrEmpty(c.HGForms) || !string.IsNullOrEmpty(c.SHForms))
|
if (!string.IsNullOrEmpty(c.HGForms) || !string.IsNullOrEmpty(c.SHForms))
|
||||||
{
|
{
|
||||||
isExitForms = true;
|
isExitForms = true;
|
||||||
break;
|
}
|
||||||
|
//处理工作包实际完成时间
|
||||||
|
if (c.CheckNum != null && c.CheckNum != 0) //检查次数为0表示一直检查
|
||||||
|
{
|
||||||
|
if (c.CheckNum == 1) //检查一次
|
||||||
|
{
|
||||||
|
c.RealEndDate = DateTime.Now;
|
||||||
|
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||||
|
BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId);
|
||||||
|
}
|
||||||
|
else //检查多次
|
||||||
|
{
|
||||||
|
List<Model.Check_SpotCheckDetail> details = BLL.SpotCheckDetailService.GetSpotCheckDetailsByControlItemAndCycleId(c.ControlItemAndCycleId);
|
||||||
|
if (details.Count == c.CheckNum) //检查次数已达到最大值
|
||||||
|
{
|
||||||
|
c.RealEndDate = DateTime.Now;
|
||||||
|
BLL.ControlItemAndCycleService.UpdateControlItemAndCycle(c);
|
||||||
|
BLL.WorkPackageService.UpdateWorkPackageRealEndDate(c.WorkPackageId);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -567,6 +567,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode;
|
||||||
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
||||||
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
||||||
BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage);
|
BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage);
|
||||||
|
|
@ -670,6 +671,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode;
|
||||||
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
||||||
oldWorkPackage.IsApprove = true;
|
oldWorkPackage.IsApprove = true;
|
||||||
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
||||||
|
|
|
||||||
|
|
@ -599,6 +599,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode;
|
||||||
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
||||||
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
||||||
BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage);
|
BLL.WorkPackageService.UpdateWorkPackage(oldWorkPackage);
|
||||||
|
|
@ -699,6 +700,7 @@ namespace FineUIPro.Web.CQMS.WBS
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
{
|
{
|
||||||
|
oldWorkPackage.WorkPackageCode = workPackageProject.WorkPackageCode;
|
||||||
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
oldWorkPackage.PackageContent = workPackageProject.PackageContent + name;
|
||||||
oldWorkPackage.IsApprove = true;
|
oldWorkPackage.IsApprove = true;
|
||||||
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
oldWorkPackage.SubItemType = GetSubItemTypeId(values.Value<string>("SubItemType"));
|
||||||
|
|
|
||||||
|
|
@ -40,6 +40,12 @@
|
||||||
<%--<f:RowNumberField HeaderText="序号"/>--%>
|
<%--<f:RowNumberField HeaderText="序号"/>--%>
|
||||||
<f:BoundField Width="350px" ColumnID="Name" DataField="Name" HeaderTextAlign="Center"
|
<f:BoundField Width="350px" ColumnID="Name" DataField="Name" HeaderTextAlign="Center"
|
||||||
HeaderText="工作内容" />
|
HeaderText="工作内容" />
|
||||||
|
<f:RenderField Width="100px" ColumnID="PreWorkCode" DataField="PreWorkCode" FieldType="String"
|
||||||
|
HeaderText="前置工作内容编号" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
|
<Editor>
|
||||||
|
<f:TextBox runat="server" ID="txtPreWorkCode" MaxLength="50"></f:TextBox>
|
||||||
|
</Editor>
|
||||||
|
</f:RenderField>
|
||||||
<f:TemplateField Width="90px" HeaderText="里程碑点" HeaderTextAlign="Center" ID="IsMileStone" TextAlign="Center">
|
<f:TemplateField Width="90px" HeaderText="里程碑点" HeaderTextAlign="Center" ID="IsMileStone" TextAlign="Center">
|
||||||
<ItemTemplate>
|
<ItemTemplate>
|
||||||
<asp:CheckBox ID="cbIsMileStone" runat="server"></asp:CheckBox>
|
<asp:CheckBox ID="cbIsMileStone" runat="server"></asp:CheckBox>
|
||||||
|
|
@ -67,6 +73,9 @@
|
||||||
</f:NumberBox>
|
</f:NumberBox>
|
||||||
</Editor>
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
|
<f:RenderField Width="100px" ColumnID="PlanCost" DataField="PlanCost" FieldType="Double"
|
||||||
|
HeaderText="概算费用" HeaderTextAlign="Center" TextAlign="Center">
|
||||||
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
|
<f:RenderField Width="100px" ColumnID="RealProjectQuantity" DataField="RealProjectQuantity" FieldType="Double"
|
||||||
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
|
HeaderText="实际工程量" HeaderTextAlign="Center" TextAlign="Left">
|
||||||
<Editor>
|
<Editor>
|
||||||
|
|
@ -91,6 +100,10 @@
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="RealStartDate" DataField="RealStartDate" FieldType="Date"
|
<f:RenderField Width="100px" ColumnID="RealStartDate" DataField="RealStartDate" FieldType="Date"
|
||||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际开始时间" HeaderTextAlign="Center">
|
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际开始时间" HeaderTextAlign="Center">
|
||||||
|
<Editor>
|
||||||
|
<f:DatePicker ID="txtRealStartDate" Required="true" runat="server">
|
||||||
|
</f:DatePicker>
|
||||||
|
</Editor>
|
||||||
</f:RenderField>
|
</f:RenderField>
|
||||||
<f:RenderField Width="100px" ColumnID="RealEndDate" DataField="RealEndDate" FieldType="Date"
|
<f:RenderField Width="100px" ColumnID="RealEndDate" DataField="RealEndDate" FieldType="Date"
|
||||||
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际完成时间" HeaderTextAlign="Center">
|
Renderer="Date" RendererArgument="yyyy-MM-dd" HeaderText="实际完成时间" HeaderTextAlign="Center">
|
||||||
|
|
|
||||||
|
|
@ -104,6 +104,8 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
string realProjectQuantity = values.Value<string>("RealProjectQuantity");
|
string realProjectQuantity = values.Value<string>("RealProjectQuantity");
|
||||||
string planStartDate = values.Value<string>("PlanStartDate");
|
string planStartDate = values.Value<string>("PlanStartDate");
|
||||||
string planEndDate = values.Value<string>("PlanEndDate");
|
string planEndDate = values.Value<string>("PlanEndDate");
|
||||||
|
string realStartDate = values.Value<string>("RealStartDate");
|
||||||
|
string preWorkCode = values.Value<string>("PreWorkCode");
|
||||||
System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone"));
|
System.Web.UI.WebControls.CheckBox cbIsMileStone = (System.Web.UI.WebControls.CheckBox)(this.Grid1.Rows[i].FindControl("cbIsMileStone"));
|
||||||
workPackage.Weights = Funs.GetNewDecimal(weights);
|
workPackage.Weights = Funs.GetNewDecimal(weights);
|
||||||
workPackage.Unit = unit;
|
workPackage.Unit = unit;
|
||||||
|
|
@ -111,11 +113,13 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity);
|
workPackage.RealProjectQuantity = Funs.GetNewDecimal(realProjectQuantity);
|
||||||
workPackage.PlanStartDate = Funs.GetNewDateTime(planStartDate);
|
workPackage.PlanStartDate = Funs.GetNewDateTime(planStartDate);
|
||||||
workPackage.PlanEndDate = Funs.GetNewDateTime(planEndDate);
|
workPackage.PlanEndDate = Funs.GetNewDateTime(planEndDate);
|
||||||
|
workPackage.RealStartDate = Funs.GetNewDateTime(realStartDate);
|
||||||
workPackage.IsMileStone = cbIsMileStone.Checked;
|
workPackage.IsMileStone = cbIsMileStone.Checked;
|
||||||
|
workPackage.PreWorkCode = preWorkCode;
|
||||||
BLL.WorkPackageService.UpdateWorkPackage(workPackage);
|
BLL.WorkPackageService.UpdateWorkPackage(workPackage);
|
||||||
if (workPackage.PlanStartDate != null || workPackage.PlanEndDate != null)
|
if (workPackage.PlanStartDate != null || workPackage.PlanEndDate != null || workPackage.RealStartDate != null)
|
||||||
{
|
{
|
||||||
UpdateWorkPackages(db, workPackage, workPackage.PlanStartDate, workPackage.PlanEndDate);
|
BLL.WorkPackageService.UpdateWorkPackages(db, workPackage, workPackage.PlanStartDate, workPackage.PlanEndDate, workPackage.RealStartDate, null);
|
||||||
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId);
|
var unitWork = unitWorks.FirstOrDefault(x => x.UnitWorkId == workPackage.UnitWorkId);
|
||||||
if (workPackage.PlanStartDate != null)
|
if (workPackage.PlanStartDate != null)
|
||||||
{
|
{
|
||||||
|
|
@ -145,6 +149,20 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
if (workPackage.RealStartDate != null)
|
||||||
|
{
|
||||||
|
if (unitWork.RealStartDate == null)
|
||||||
|
{
|
||||||
|
unitWork.RealStartDate = workPackage.RealStartDate;
|
||||||
|
}
|
||||||
|
else
|
||||||
|
{
|
||||||
|
if (unitWork.RealStartDate > workPackage.RealStartDate)
|
||||||
|
{
|
||||||
|
unitWork.RealStartDate = workPackage.RealStartDate;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
db.SubmitChanges();
|
db.SubmitChanges();
|
||||||
}
|
}
|
||||||
|
|
@ -152,55 +170,6 @@ namespace FineUIPro.Web.JDGL.Check
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
#region 更新工作包、工作项
|
|
||||||
/// <summary>
|
|
||||||
/// 更新月工作包、工作项
|
|
||||||
/// </summary>
|
|
||||||
/// <param name="years"></param>
|
|
||||||
/// <param name="months"></param>
|
|
||||||
/// <param name="planValue"></param>
|
|
||||||
/// <param name="parentId"></param>
|
|
||||||
private void UpdateWorkPackages(Model.SGGLDB db, Model.WBS_WorkPackage workPackage, DateTime? planStartDate, DateTime? planEndDate)
|
|
||||||
{
|
|
||||||
if (workPackage != null)
|
|
||||||
{
|
|
||||||
Model.WBS_WorkPackage parentWorkPackage = BLL.WorkPackageService.GetWorkPackageByWorkPackageId(workPackage.SuperWorkPackageId);
|
|
||||||
if (parentWorkPackage != null)
|
|
||||||
{
|
|
||||||
if (planStartDate != null)
|
|
||||||
{
|
|
||||||
if (parentWorkPackage.PlanStartDate == null)
|
|
||||||
{
|
|
||||||
parentWorkPackage.PlanStartDate = planStartDate;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (parentWorkPackage.PlanStartDate > planStartDate)
|
|
||||||
{
|
|
||||||
parentWorkPackage.PlanStartDate = planStartDate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (planEndDate != null)
|
|
||||||
{
|
|
||||||
if (parentWorkPackage.PlanEndDate == null)
|
|
||||||
{
|
|
||||||
parentWorkPackage.PlanEndDate = planEndDate;
|
|
||||||
}
|
|
||||||
else
|
|
||||||
{
|
|
||||||
if (parentWorkPackage.PlanEndDate < planEndDate)
|
|
||||||
{
|
|
||||||
parentWorkPackage.PlanEndDate = planEndDate;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
UpdateWorkPackages(db, parentWorkPackage, planStartDate, planEndDate);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
|
||||||
#endregion
|
|
||||||
#endregion
|
#endregion
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
@ -75,6 +75,15 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.Button btnSave;
|
protected global::FineUIPro.Button btnSave;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtPreWorkCode 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.TextBox txtPreWorkCode;
|
||||||
|
|
||||||
/// <summary>
|
/// <summary>
|
||||||
/// IsMileStone 控件。
|
/// IsMileStone 控件。
|
||||||
/// </summary>
|
/// </summary>
|
||||||
|
|
@ -146,5 +155,14 @@ namespace FineUIPro.Web.JDGL.Check {
|
||||||
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
/// </remarks>
|
/// </remarks>
|
||||||
protected global::FineUIPro.DatePicker txtPlanEndDate;
|
protected global::FineUIPro.DatePicker txtPlanEndDate;
|
||||||
|
|
||||||
|
/// <summary>
|
||||||
|
/// txtRealStartDate 控件。
|
||||||
|
/// </summary>
|
||||||
|
/// <remarks>
|
||||||
|
/// 自动生成的字段。
|
||||||
|
/// 若要进行修改,请将字段声明从设计器文件移到代码隐藏文件。
|
||||||
|
/// </remarks>
|
||||||
|
protected global::FineUIPro.DatePicker txtRealStartDate;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -287846,7 +287846,7 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(50)")]
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_Name", DbType="NVarChar(81)")]
|
||||||
public string Name
|
public string Name
|
||||||
{
|
{
|
||||||
get
|
get
|
||||||
|
|
@ -289894,6 +289894,8 @@ namespace Model
|
||||||
|
|
||||||
private string _CheckAcceptType;
|
private string _CheckAcceptType;
|
||||||
|
|
||||||
|
private System.Nullable<System.DateTime> _RealEndDate;
|
||||||
|
|
||||||
private EntityRef<WBS_WorkPackage> _WBS_WorkPackage;
|
private EntityRef<WBS_WorkPackage> _WBS_WorkPackage;
|
||||||
|
|
||||||
#region 可扩展性方法定义
|
#region 可扩展性方法定义
|
||||||
|
|
@ -289940,6 +289942,8 @@ namespace Model
|
||||||
partial void OnCostsChanged();
|
partial void OnCostsChanged();
|
||||||
partial void OnCheckAcceptTypeChanging(string value);
|
partial void OnCheckAcceptTypeChanging(string value);
|
||||||
partial void OnCheckAcceptTypeChanged();
|
partial void OnCheckAcceptTypeChanged();
|
||||||
|
partial void OnRealEndDateChanging(System.Nullable<System.DateTime> value);
|
||||||
|
partial void OnRealEndDateChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public WBS_ControlItemAndCycle()
|
public WBS_ControlItemAndCycle()
|
||||||
|
|
@ -290352,6 +290356,26 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_RealEndDate", DbType="DateTime")]
|
||||||
|
public System.Nullable<System.DateTime> RealEndDate
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._RealEndDate;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._RealEndDate != value))
|
||||||
|
{
|
||||||
|
this.OnRealEndDateChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._RealEndDate = value;
|
||||||
|
this.SendPropertyChanged("RealEndDate");
|
||||||
|
this.OnRealEndDateChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_WorkPackage", ThisKey="WorkPackageId", OtherKey="WorkPackageId", IsForeignKey=true)]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_WorkPackage", ThisKey="WorkPackageId", OtherKey="WorkPackageId", IsForeignKey=true)]
|
||||||
public WBS_WorkPackage WBS_WorkPackage
|
public WBS_WorkPackage WBS_WorkPackage
|
||||||
{
|
{
|
||||||
|
|
@ -291511,6 +291535,10 @@ namespace Model
|
||||||
|
|
||||||
private System.Nullable<System.DateTime> _RealEndDate;
|
private System.Nullable<System.DateTime> _RealEndDate;
|
||||||
|
|
||||||
|
private System.Nullable<decimal> _PlanCost;
|
||||||
|
|
||||||
|
private System.Nullable<decimal> _JDWeights;
|
||||||
|
|
||||||
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
private EntitySet<Accident_AccidentPersonRecord> _Accident_AccidentPersonRecord;
|
||||||
|
|
||||||
private EntitySet<Accident_AccidentReport> _Accident_AccidentReport;
|
private EntitySet<Accident_AccidentReport> _Accident_AccidentReport;
|
||||||
|
|
@ -291597,6 +291625,10 @@ namespace Model
|
||||||
partial void OnRealStartDateChanged();
|
partial void OnRealStartDateChanged();
|
||||||
partial void OnRealEndDateChanging(System.Nullable<System.DateTime> value);
|
partial void OnRealEndDateChanging(System.Nullable<System.DateTime> value);
|
||||||
partial void OnRealEndDateChanged();
|
partial void OnRealEndDateChanged();
|
||||||
|
partial void OnPlanCostChanging(System.Nullable<decimal> value);
|
||||||
|
partial void OnPlanCostChanged();
|
||||||
|
partial void OnJDWeightsChanging(System.Nullable<decimal> value);
|
||||||
|
partial void OnJDWeightsChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public WBS_UnitWork()
|
public WBS_UnitWork()
|
||||||
|
|
@ -291980,6 +292012,46 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanCost", DbType="Decimal(18,2)")]
|
||||||
|
public System.Nullable<decimal> PlanCost
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._PlanCost;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._PlanCost != value))
|
||||||
|
{
|
||||||
|
this.OnPlanCostChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._PlanCost = value;
|
||||||
|
this.SendPropertyChanged("PlanCost");
|
||||||
|
this.OnPlanCostChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JDWeights", DbType="Decimal(9,2)")]
|
||||||
|
public System.Nullable<decimal> JDWeights
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._JDWeights;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._JDWeights != value))
|
||||||
|
{
|
||||||
|
this.OnJDWeightsChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._JDWeights = value;
|
||||||
|
this.SendPropertyChanged("JDWeights");
|
||||||
|
this.OnJDWeightsChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_ProjectData_WorkArea", Storage="_Accident_AccidentPersonRecord", ThisKey="UnitWorkId", OtherKey="WorkAreaId", DeleteRule="NO ACTION")]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_Accident_AccidentPersonRecord_ProjectData_WorkArea", Storage="_Accident_AccidentPersonRecord", ThisKey="UnitWorkId", OtherKey="WorkAreaId", DeleteRule="NO ACTION")]
|
||||||
public EntitySet<Accident_AccidentPersonRecord> Accident_AccidentPersonRecord
|
public EntitySet<Accident_AccidentPersonRecord> Accident_AccidentPersonRecord
|
||||||
{
|
{
|
||||||
|
|
@ -292688,6 +292760,12 @@ namespace Model
|
||||||
|
|
||||||
private System.Nullable<bool> _IsMileStone;
|
private System.Nullable<bool> _IsMileStone;
|
||||||
|
|
||||||
|
private System.Nullable<decimal> _PlanCost;
|
||||||
|
|
||||||
|
private System.Nullable<decimal> _JDWeights;
|
||||||
|
|
||||||
|
private string _PreWorkCode;
|
||||||
|
|
||||||
private EntitySet<WBS_ControlItemAndCycle> _WBS_ControlItemAndCycle;
|
private EntitySet<WBS_ControlItemAndCycle> _WBS_ControlItemAndCycle;
|
||||||
|
|
||||||
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
private EntityRef<WBS_UnitWork> _WBS_UnitWork;
|
||||||
|
|
@ -292750,6 +292828,12 @@ namespace Model
|
||||||
partial void OnUnitChanged();
|
partial void OnUnitChanged();
|
||||||
partial void OnIsMileStoneChanging(System.Nullable<bool> value);
|
partial void OnIsMileStoneChanging(System.Nullable<bool> value);
|
||||||
partial void OnIsMileStoneChanged();
|
partial void OnIsMileStoneChanged();
|
||||||
|
partial void OnPlanCostChanging(System.Nullable<decimal> value);
|
||||||
|
partial void OnPlanCostChanged();
|
||||||
|
partial void OnJDWeightsChanging(System.Nullable<decimal> value);
|
||||||
|
partial void OnJDWeightsChanged();
|
||||||
|
partial void OnPreWorkCodeChanging(string value);
|
||||||
|
partial void OnPreWorkCodeChanged();
|
||||||
#endregion
|
#endregion
|
||||||
|
|
||||||
public WBS_WorkPackage()
|
public WBS_WorkPackage()
|
||||||
|
|
@ -293303,6 +293387,66 @@ namespace Model
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PlanCost", DbType="Decimal(18,2)")]
|
||||||
|
public System.Nullable<decimal> PlanCost
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._PlanCost;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._PlanCost != value))
|
||||||
|
{
|
||||||
|
this.OnPlanCostChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._PlanCost = value;
|
||||||
|
this.SendPropertyChanged("PlanCost");
|
||||||
|
this.OnPlanCostChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_JDWeights", DbType="Decimal(9,2)")]
|
||||||
|
public System.Nullable<decimal> JDWeights
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._JDWeights;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._JDWeights != value))
|
||||||
|
{
|
||||||
|
this.OnJDWeightsChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._JDWeights = value;
|
||||||
|
this.SendPropertyChanged("JDWeights");
|
||||||
|
this.OnJDWeightsChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
|
[global::System.Data.Linq.Mapping.ColumnAttribute(Storage="_PreWorkCode", DbType="NVarChar(50)")]
|
||||||
|
public string PreWorkCode
|
||||||
|
{
|
||||||
|
get
|
||||||
|
{
|
||||||
|
return this._PreWorkCode;
|
||||||
|
}
|
||||||
|
set
|
||||||
|
{
|
||||||
|
if ((this._PreWorkCode != value))
|
||||||
|
{
|
||||||
|
this.OnPreWorkCodeChanging(value);
|
||||||
|
this.SendPropertyChanging();
|
||||||
|
this._PreWorkCode = value;
|
||||||
|
this.SendPropertyChanged("PreWorkCode");
|
||||||
|
this.OnPreWorkCodeChanged();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_ControlItemAndCycle", ThisKey="WorkPackageId", OtherKey="WorkPackageId", DeleteRule="NO ACTION")]
|
[global::System.Data.Linq.Mapping.AssociationAttribute(Name="FK_WBS_ControlItemAndCycle_WBS_ControlItemAndCycle", Storage="_WBS_ControlItemAndCycle", ThisKey="WorkPackageId", OtherKey="WorkPackageId", DeleteRule="NO ACTION")]
|
||||||
public EntitySet<WBS_ControlItemAndCycle> WBS_ControlItemAndCycle
|
public EntitySet<WBS_ControlItemAndCycle> WBS_ControlItemAndCycle
|
||||||
{
|
{
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue