|
@@ -2564,7 +2564,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
ReportResult CoverOfMidtermPaymentReportPDF = getCoverOfMidtermPaymentReportPDF(url, contractId, periodId, htmlUrl, projectName, list, pKeyId);
|
|
ReportResult CoverOfMidtermPaymentReportPDF = getCoverOfMidtermPaymentReportPDF(url, contractId, periodId, htmlUrl, projectName, list, pKeyId);
|
|
|
|
|
|
//获取中间支付审核表的pdfurl
|
|
//获取中间支付审核表的pdfurl
|
|
- ReportResult intermediatePaymentPDF = getIntermediatePaymentPDF(url1, contractId, periodId, list, redisId, htmlUrl1, blReserveFundsRatioNew, projectName, changeMoneyNew, pKeyId1);
|
|
|
|
|
|
+ ReportResult intermediatePaymentPDF = getIntermediatePaymentPDF(url1, contractId, periodId, list, redisId, htmlUrl1, blReserveFundsRatioNew, projectName, changeMoneyNew, pKeyId1,reportId);
|
|
|
|
|
|
//获取补助款申请支付审核表pdfUrl
|
|
//获取补助款申请支付审核表pdfUrl
|
|
ReportResult subsidyApplicationPaymentReviewPDF = getSubsidyApplicationPaymentReviewPDF(url2, contractId, periodId, list, htmlUrl2, blReserveFundsRatioNew, projectName, projectId, reportId, pKeyId2);
|
|
ReportResult subsidyApplicationPaymentReviewPDF = getSubsidyApplicationPaymentReviewPDF(url2, contractId, periodId, list, htmlUrl2, blReserveFundsRatioNew, projectName, projectId, reportId, pKeyId2);
|
|
@@ -3228,7 +3228,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
/**
|
|
/**
|
|
* 中间支付审核表获取PDFurl
|
|
* 中间支付审核表获取PDFurl
|
|
*/
|
|
*/
|
|
- public ReportResult getIntermediatePaymentPDF(String url, Long contractId, Long periodId, List<ContractMeterPeriod> list, Long redisId, String htmlUrl, BigDecimal blReserveFundsRatioNew, String projectName, BigDecimal changeMoneyNew, Long pkeyId) {
|
|
|
|
|
|
+ public ReportResult getIntermediatePaymentPDF(String url, Long contractId, Long periodId, List<ContractMeterPeriod> list, Long redisId, String htmlUrl, BigDecimal blReserveFundsRatioNew, String projectName, BigDecimal changeMoneyNew, Long pkeyId,Long reportId) {
|
|
//判断当前是否是只有1期计量
|
|
//判断当前是否是只有1期计量
|
|
Boolean isOnePeriod = false;
|
|
Boolean isOnePeriod = false;
|
|
ContractMeterPeriod contractMeterPeriod1 = list.get(0);
|
|
ContractMeterPeriod contractMeterPeriod1 = list.get(0);
|
|
@@ -3326,6 +3326,25 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
changeMoneySum = changeMoneySum.setScale(0, RoundingMode.HALF_UP);*/
|
|
changeMoneySum = changeMoneySum.setScale(0, RoundingMode.HALF_UP);*/
|
|
BigDecimal changemoneySum = changeMoneyNew.subtract(totalMoney).subtract(lastEndChangeMoney).setScale(0, RoundingMode.HALF_UP);
|
|
BigDecimal changemoneySum = changeMoneyNew.subtract(totalMoney).subtract(lastEndChangeMoney).setScale(0, RoundingMode.HALF_UP);
|
|
Cell e5 = getCellByAddress(sheet, "E5");
|
|
Cell e5 = getCellByAddress(sheet, "E5");
|
|
|
|
+ String sql4 = "Select * From s_interim_pay_certificate_item where certificate_id=" + reportId + " and chapter_seq='本期变更' and is_deleted=0 ";
|
|
|
|
+ List<InterimPayCertificateItem> lists = jdbcTemplate.query(sql4, new BeanPropertyRowMapper<>(InterimPayCertificateItem.class));
|
|
|
|
+ if (lists.isEmpty()) {
|
|
|
|
+ MonthlyReportVo vo=new MonthlyReportVo();
|
|
|
|
+ vo.setChapterSeq("本期变更");
|
|
|
|
+ vo.setBeforeEndMoney(lastEndChangeMoney);
|
|
|
|
+ vo.setNowMoney(changemoneySum);
|
|
|
|
+ vo.setNowEndMoney(lastEndChangeMoney.add(changemoneySum));
|
|
|
|
+ //第一次需要新增支付项
|
|
|
|
+ interimPayCertificateItemClient.addInterimPayCertificateItem1(reportId, vo);
|
|
|
|
+ } else {
|
|
|
|
+ InterimPayCertificateItem item = lists.get(0);
|
|
|
|
+ //第二次后就是更新
|
|
|
|
+ changemoneySum=stringToBigDecimal(item.getCurrentPeriodPay());
|
|
|
|
+ item.setCurrentPeriodPay(changemoneySum.toString());
|
|
|
|
+ item.setPreviousPeriodEndPay(lastEndChangeMoney.toString());
|
|
|
|
+ item.setCurrentPeriodEndPay(lastEndChangeMoney.add(changemoneySum).toString());
|
|
|
|
+ interimPayCertificateItemClient.updateInterimPayCertificateItem1(item);
|
|
|
|
+ }
|
|
if(periodId==1890367903054798850L){
|
|
if(periodId==1890367903054798850L){
|
|
e5.setCellValue("515977");
|
|
e5.setCellValue("515977");
|
|
} else if (periodId==1963802568671502338L) {
|
|
} else if (periodId==1963802568671502338L) {
|
|
@@ -3552,6 +3571,17 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
+ public BigDecimal stringToBigDecimal(String value) {
|
|
|
|
+ if (StringUtils.isEmpty(value)) {
|
|
|
|
+ return BigDecimal.ZERO;
|
|
|
|
+ }
|
|
|
|
+ try {
|
|
|
|
+ return new BigDecimal(value.trim());
|
|
|
|
+ } catch (NumberFormatException e) {
|
|
|
|
+ return BigDecimal.ZERO;
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
+
|
|
|
|
|
|
/**
|
|
/**
|
|
* 获取上期末的数据
|
|
* 获取上期末的数据
|
|
@@ -4123,8 +4153,6 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
}
|
|
}
|
|
interimPayCertificateItemClient.updateInterimPayCertificateItem(list4);
|
|
interimPayCertificateItemClient.updateInterimPayCertificateItem(list4);
|
|
}
|
|
}
|
|
-
|
|
|
|
-
|
|
|
|
InputStream modInput = null;
|
|
InputStream modInput = null;
|
|
FileInputStream excelFileInput = null;
|
|
FileInputStream excelFileInput = null;
|
|
FileOutputStream outputStream = null;
|
|
FileOutputStream outputStream = null;
|