From 8e32d0d8bacaa2e96cfc187f6117476fd7b4dcfa Mon Sep 17 00:00:00 2001 From: gaofei1985 <181547018@qq.com> Date: Thu, 31 Aug 2023 09:49:02 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E6=94=B9=E8=BF=9B=E5=BA=A6=E8=AE=A1?= =?UTF-8?q?=E5=88=92=E7=BC=96=E5=88=B6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- SGGL/BLL/CQMS/WBS/WorkPackageService.cs | 35 ++++++++++++++++++++++--- 1 file changed, 31 insertions(+), 4 deletions(-) diff --git a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs index 99ffa9fa..e3f23512 100644 --- a/SGGL/BLL/CQMS/WBS/WorkPackageService.cs +++ b/SGGL/BLL/CQMS/WBS/WorkPackageService.cs @@ -328,12 +328,12 @@ namespace BLL if (item.WBSType == "WorkPackage") { var childWorkPackages = from x in workPackages where x.SuperWorkPackageId == item.Id && x.IsApprove == true select x; - if (childWorkPackages.Count() == 0) + var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id); + if (workPackage != null) { - row[5] = item.Id; - var workPackage = workPackages.FirstOrDefault(x => x.WorkPackageId == item.Id); - if (workPackage != null) + if (childWorkPackages.Count() == 0) { + row[5] = item.Id; if (workPackage.JDWeights != null) { row[6] = decimal.Round(Convert.ToDecimal(workPackage.JDWeights), 2); @@ -386,6 +386,33 @@ namespace BLL } } } + else + { + if (workPackage.JDWeights != null) + { + row[6] = decimal.Round(Convert.ToDecimal(workPackage.JDWeights), 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.PlanCost != null) + { + row[15] = decimal.Round(Convert.ToDecimal(workPackage.PlanCost), 2); + } + } } } else if (item.WBSType == "UnitWork")