|
|
@ -382,14 +382,14 @@ public class BsSgcjsjdBuiProInfoService extends BaseService<BsSgcjsjdBuiProInfoM |
|
|
|
return dto; |
|
|
|
} |
|
|
|
|
|
|
|
public StageStatistics getStageStatistics(SearchParam<BsSgcjsjdBuiProInfo> sp){ |
|
|
|
public StageStatistics getStageStatistics(SearchParam<BsSgcjsjdBuiProInfo> sp) { |
|
|
|
|
|
|
|
StageStatistics stageStatistics=new StageStatistics(); |
|
|
|
StageStatistics stageStatistics = new StageStatistics(); |
|
|
|
|
|
|
|
BsSgcJsjdBuiConstrMeas bsSgcJsjdBuiConstrMeas = bsSgcJsjdBuiConstrMeasMapper.selectOne(new QueryWrapper<BsSgcJsjdBuiConstrMeas>() |
|
|
|
.eq("proNo", sp.getData().getProNo()).eq("proCode", sp.getData().getProCode())); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiConstrMeas)){ |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiConstrMeas.getReportTime1())){ |
|
|
|
.eq("pro_no", sp.getData().getProNo()).eq("pro_code", sp.getData().getProCode())); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiConstrMeas)) { |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiConstrMeas.getReportTime1())) { |
|
|
|
stageStatistics.setPreliminaryApprovalDate(bsSgcJsjdBuiConstrMeas.getReportTime1()); |
|
|
|
stageStatistics.setCurrentStage("0"); |
|
|
|
} |
|
|
@ -397,42 +397,75 @@ public class BsSgcjsjdBuiProInfoService extends BaseService<BsSgcjsjdBuiProInfoM |
|
|
|
|
|
|
|
|
|
|
|
BsSgcjsjdBuiProInfo bsSgcjsjdBuiProInfo = bsSgcjsjdBuiProInfoMapper.selectOne(new QueryWrapper<BsSgcjsjdBuiProInfo>() |
|
|
|
.eq("proNo", sp.getData().getProNo()).eq("proCode", sp.getData().getProCode())); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcjsjdBuiProInfo)){ |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcjsjdBuiProInfo.getCommencementDate())){ |
|
|
|
stageStatistics.setProjectStartedDate(bsSgcjsjdBuiProInfo.getCommencementDate()); |
|
|
|
if (!bsSgcjsjdBuiProInfo.getCommencementDate().before(new Date())){ |
|
|
|
stageStatistics.setCurrentStage("1"); |
|
|
|
} |
|
|
|
.eq("pro_no", sp.getData().getProNo()).eq("pro_code", sp.getData().getProCode())); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcjsjdBuiProInfo)) { |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcjsjdBuiProInfo.getCommencementDate())) { |
|
|
|
stageStatistics.setProjectStartedDate(bsSgcjsjdBuiProInfo.getCommencementDate()); |
|
|
|
if (!bsSgcjsjdBuiProInfo.getCommencementDate().before(new Date())) { |
|
|
|
stageStatistics.setCurrentStage("1"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
BsSgcJsjdBuiComAcc bsSgcJsjdBuiComAcc = bsSgcJsjdBuiComAccMapper.selectOne(new QueryWrapper<BsSgcJsjdBuiComAcc>() |
|
|
|
.eq("proNo", sp.getData().getProNo()).eq("proCode", sp.getData().getProCode())); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiComAcc)){ |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiComAcc.getContractAcceptTime())){ |
|
|
|
.eq("pro_no", sp.getData().getProNo()).eq("pro_code", sp.getData().getProCode())); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiComAcc)) { |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiComAcc.getContractAcceptTime())) { |
|
|
|
stageStatistics.setProjectCompletedDate(bsSgcJsjdBuiComAcc.getContractAcceptTime()); |
|
|
|
stageStatistics.setCurrentStage("2"); |
|
|
|
} |
|
|
|
|
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiComAcc.getContractAcceptTime())){ |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcJsjdBuiComAcc.getContractAcceptTime())) { |
|
|
|
stageStatistics.setCompletionAcceptanceDate(bsSgcJsjdBuiComAcc.getContractAcceptTime()); |
|
|
|
stageStatistics.setCurrentStage("3"); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String mm = String.format(DateUtil.formatBetween(bsSgcjsjdBuiProInfo.getCommencementDate(), bsSgcjsjdBuiProInfo.getPlannedCompletionDate()), "MM"); |
|
|
|
stageStatistics.setTotalConstructionPeriod(mm); |
|
|
|
|
|
|
|
String mmn = String.format(DateUtil.formatBetween(bsSgcjsjdBuiProInfo.getCommencementDate(), new Date()), "MM"); |
|
|
|
if (!ObjectUtil.isEmpty(bsSgcjsjdBuiProInfo.getCommencementDate()) && !ObjectUtil.isEmpty(bsSgcjsjdBuiProInfo.getPlannedCompletionDate())) { |
|
|
|
String mm = String.valueOf(Math.round(DateUtil.betweenMonth(bsSgcjsjdBuiProInfo.getCommencementDate(), bsSgcjsjdBuiProInfo.getPlannedCompletionDate(),true))); stageStatistics.setTotalConstructionPeriod(mm); |
|
|
|
String mmn = String.valueOf(Math.round(DateUtil.betweenMonth(bsSgcjsjdBuiProInfo.getCommencementDate(), new Date(),true))); |
|
|
|
stageStatistics.setElapseConstructionPeriod(mmn); |
|
|
|
|
|
|
|
} |
|
|
|
BsSgcJsjdBuiProgressPlan bp = bsSgcJsjdBuiProgressPlanMapper.selectOne(new QueryWrapper<BsSgcJsjdBuiProgressPlan>() |
|
|
|
.eq("proNo", sp.getData().getProNo()).eq("proCode", sp.getData().getProCode())); |
|
|
|
BigDecimal total=bp.getV1().add(bp.getV2()).add(bp.getV3()).add(bp.getV4()) |
|
|
|
.add(bp.getV5()).add(bp.getV6()).add(bp.getV7()).add(bp.getV8()) |
|
|
|
.add(bp.getV9()).add(bp.getV10()).add(bp.getV11()).add(bp.getV12()); |
|
|
|
.eq("pro_no", sp.getData().getProNo()).eq("pro_code", sp.getData().getProCode())); |
|
|
|
|
|
|
|
BigDecimal total=BigDecimal.ZERO; |
|
|
|
if (bp.getV1() != null) { |
|
|
|
total = total.add(bp.getV1()); |
|
|
|
} |
|
|
|
if (bp.getV2() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV3() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV4() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV5() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV6() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV7() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV8() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV9() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV10() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV11() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
if (bp.getV12() != null) { |
|
|
|
total = total.add(bp.getV2()); |
|
|
|
} |
|
|
|
stageStatistics.setCompleteInvestmentAmount(total); |
|
|
|
|
|
|
|
stageStatistics.setPlanInvestmentAmount(bsSgcjsjdBuiProInfo.getCentralArrangedFunds() |
|
|
|