0718-修改进度数据录入保存方法

This commit is contained in:
高飞 2022-07-18 15:33:29 +08:00
parent 1f471c2f56
commit bec6bc5fc0
4 changed files with 29 additions and 17 deletions

View File

@ -361,6 +361,8 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControl costControl = BLL.CostControlService.GetCostControlByCostControlId(costControlId);
if (costControl != null)
{
decimal oldPlanPrice = costControl.PlanPrice ?? 0;
decimal oldRealPrice = costControl.RealPrice ?? 0;
string totalNum = values.Value<string>("TotalNum");
string planPrice = values.Value<string>("PlanPrice");
string realPrice = values.Value<string>("RealPrice");
@ -381,9 +383,9 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlIdAndMonths(costControlId, months[j]);
if (costControlDetail != null)
{
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * oldPlanPrice;
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * oldRealPrice;
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * oldPlanPrice;
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);

View File

@ -174,6 +174,7 @@ namespace FineUIPro.Web.JDGL.WBS
where x.ProjectId == this.CurrUser.LoginProjectId
select x;
foreach (JObject mergedRow in Grid1.GetMergedData())
//foreach (JObject mergedRow in Grid1.GetModifiedData())
{
JObject values = mergedRow.Value<JObject>("values");
int i = mergedRow.Value<int>("index");
@ -182,6 +183,8 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControl costControl = oldViewInfos.FirstOrDefault(x => x.CostControlId == this.Grid1.Rows[i].DataKeys[2].ToString());
if (costControl != null)
{
decimal oldPlanPrice = costControl.PlanPrice ?? 0;
decimal oldRealPrice = costControl.RealPrice ?? 0;
string costControlId = costControl.CostControlId;
string totalNum = values.Value<string>("TotalNum");
string planPrice = values.Value<string>("PlanPrice");
@ -211,9 +214,9 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlIdAndMonths(costControlId, months[j]);
if (costControlDetail != null)
{
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * oldPlanPrice;
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * oldRealPrice;
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * oldPlanPrice;
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);

View File

@ -337,7 +337,7 @@ namespace FineUIPro.Web.JDGL.WBS
{
result += "第" + (i + 2).ToString() + "行," + "实际开始时间" + "," + "[" + row + "]格式错误!" + "|";
}
else if (j == 8)
else if (j == 8)
{
result += "第" + (i + 2).ToString() + "行," + "实际完成时间" + "," + "[" + row + "]格式错误!" + "|";
}
@ -480,6 +480,8 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControl costControl = oldViewInfos.FirstOrDefault(x => x.CostControlId == pds.Rows[i][Cols - 1].ToString());
if (costControl != null)
{
decimal oldPlanPrice = costControl.PlanPrice ?? 0;
decimal oldRealPrice = costControl.RealPrice ?? 0;
costControl.TotalNum = Funs.GetNewDecimal(pds.Rows[i][2].ToString().Trim());
costControl.PlanPrice = Funs.GetNewDecimal(pds.Rows[i][3].ToString().Trim());
costControl.RealPrice = Funs.GetNewDecimal(pds.Rows[i][4].ToString().Trim());
@ -501,9 +503,9 @@ namespace FineUIPro.Web.JDGL.WBS
Model.WBS_CostControlDetail costControlDetail = BLL.CostControlDetailService.GetCostControlDetailByCostControlIdAndMonths(costControl.CostControlId, months[j]);
if (costControlDetail != null)
{
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * (costControl.RealPrice ?? 0);
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * (costControl.PlanPrice ?? 0);
oldThisPlanValue = (costControlDetail.PlanNum ?? 0) * oldPlanPrice;
oldThisRealCost = (costControlDetail.ThisNum ?? 0) * oldRealPrice;
oldThisPlanCost = (costControlDetail.ThisNum ?? 0) * oldPlanPrice;
costControlDetail.PlanNum = Funs.GetNewDecimalOrZero(planNum);
costControlDetail.ThisNum = Funs.GetNewDecimalOrZero(thisNum);
thisPlanValue = (costControlDetail.PlanNum ?? 0) * (costControl.PlanPrice ?? 0);

View File

@ -31,16 +31,15 @@
<WarningLevel>4</WarningLevel>
</PropertyGroup>
<ItemGroup>
<Reference Include="AipSdk, Version=3.5.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\FineUIPro\Reference BLL\AipSdk.dll</HintPath>
<Reference Include="AipSdk, Version=4.15.9.0, Culture=neutral, processorArchitecture=MSIL">
<HintPath>..\packages\Baidu.AI.4.15.9\lib\net45\AipSdk.dll</HintPath>
</Reference>
<Reference Include="AOP.Common">
<Reference Include="AOP.Common, Version=1.0.0.0, Culture=neutral, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>bin\Debug\AOP.Common.dll</HintPath>
</Reference>
<Reference Include="Newtonsoft.Json, Version=6.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<SpecificVersion>False</SpecificVersion>
<HintPath>..\packages\Newtonsoft.Json.12.0.1\lib\net40\Newtonsoft.Json.dll</HintPath>
<Reference Include="Newtonsoft.Json, Version=10.0.0.0, Culture=neutral, PublicKeyToken=30ad4fe6b2a6aeed, processorArchitecture=MSIL">
<HintPath>..\packages\Newtonsoft.Json.10.0.3\lib\net45\Newtonsoft.Json.dll</HintPath>
</Reference>
<Reference Include="System" />
<Reference Include="System.configuration" />
@ -73,6 +72,12 @@
<Compile Include="PostMail.cs" />
<Compile Include="Properties\AssemblyInfo.cs" />
</ItemGroup>
<ItemGroup>
<WCFMetadata Include="Connected Services\" />
</ItemGroup>
<ItemGroup>
<None Include="packages.config" />
</ItemGroup>
<Import Project="$(MSBuildToolsPath)\Microsoft.CSharp.targets" />
<!-- To modify your build process, add your task inside one of the targets below and uncomment it.
Other similar extension points exist, see Microsoft.Common.targets.