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")