|
@@ -3077,7 +3077,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 中间支付申请表获取pdfUrl CR1
|
|
|
+ * 中间支付申请表获取pdfUrl
|
|
|
* @param url
|
|
|
* @return
|
|
|
*/
|
|
@@ -3151,7 +3151,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
}
|
|
|
/**
|
|
|
- * 工程支付月报获取pdfUrl CR2
|
|
|
+ * 工程支付月报获取pdfUrl
|
|
|
* @param url
|
|
|
* @return
|
|
|
*/
|
|
@@ -3162,6 +3162,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
LocalDate endDate = contractMeterPeriodNow.getEndDate();
|
|
|
String sql="SELECT id from s_contract_inventory_form where contract_id="+contractId+" and parent_id=0";
|
|
|
Long id = jdbcTemplate.queryForObject(sql, Long.class);
|
|
|
+ //获取计量的清单详情
|
|
|
InventoryFormDetailVO detail = iContractInventoryFormClient.detail(id);
|
|
|
List<ContractInventoryFormVO> list1 = detail.getList();
|
|
|
List<MonthlyReportVo> values=new ArrayList<>();
|
|
@@ -3177,13 +3178,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
OptionalInt index=IntStream.range(0, list.size())
|
|
|
.filter(i -> list.get(i).getId().equals(periodId))
|
|
|
.findFirst();
|
|
|
- //i大于0 说明需要计算之前的值
|
|
|
+ //j大于0 说明需要计算之前的值
|
|
|
//到上期末完成金额 从redis里面取
|
|
|
BigDecimal beforeEndMoney=BigDecimal.ZERO;
|
|
|
- if(index.isPresent()){
|
|
|
+ if(index.isPresent()){
|
|
|
int j = index.getAsInt();
|
|
|
if(j>0){
|
|
|
- //期数ID,章节号
|
|
|
+ //根据期数ID,章节号获取
|
|
|
Object o = bladeRedis.get("periodId:"+list.get(j-1).getId()+"formNumber:"+key+"nowEndMoney");
|
|
|
if(ObjectUtil.isNotEmpty(o)){
|
|
|
beforeEndMoney=beforeEndMoney.add ((BigDecimal) o);
|
|
@@ -3199,9 +3200,9 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
|
|
|
}
|
|
|
}
|
|
|
+ }
|
|
|
}
|
|
|
- }
|
|
|
- //本期完成
|
|
|
+ //本期完成,计算清单支付表时存在redis里的值。期数ID+章编号
|
|
|
Object o = bladeRedis.get("periodId:"+periodId+"formNumber:"+key+"nowMoney");
|
|
|
if(ObjectUtil.isNotEmpty(o)){
|
|
|
monthlyReport.setNowMoney((BigDecimal)o);
|
|
@@ -3214,13 +3215,13 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
}
|
|
|
//到本期末完成
|
|
|
//如果有到上期末完成金额,和本期完成金额 则到本期末完成金额=到上期末完成金额+本期完成金额
|
|
|
-
|
|
|
if(ObjectUtil.isNotEmpty(monthlyReport.getBeforeEndMoney())&&ObjectUtil.isNotEmpty(monthlyReport.getNowMoney())){
|
|
|
monthlyReport.setNowEndMoney(monthlyReport.getBeforeEndMoney().add(monthlyReport.getNowMoney()));
|
|
|
- }//如果到上期末完成金额为空,本期完成金额不为空 本期末完成金额=本期完成金额
|
|
|
+ }//如果到上期末完成金额为空,本期完成金额不为空 到本期末完成金额=本期完成金额
|
|
|
else if(ObjectUtil.isEmpty(monthlyReport.getBeforeEndMoney())&&ObjectUtil.isNotEmpty(monthlyReport.getNowMoney())){
|
|
|
monthlyReport.setNowEndMoney(monthlyReport.getNowMoney());
|
|
|
- }else if(ObjectUtil.isEmpty(monthlyReport.getNowMoney())&&ObjectUtil.isNotEmpty(monthlyReport.getBeforeEndMoney())){
|
|
|
+ }//如果本期完成金额为空,到上期末完成金额不为空 到本期末完成金额=到上期末完成金额
|
|
|
+ else if(ObjectUtil.isEmpty(monthlyReport.getNowMoney())&&ObjectUtil.isNotEmpty(monthlyReport.getBeforeEndMoney())){
|
|
|
monthlyReport.setNowEndMoney(monthlyReport.getBeforeEndMoney());
|
|
|
}else {
|
|
|
monthlyReport.setNowEndMoney(BigDecimal.ZERO);
|
|
@@ -3408,7 +3409,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
if(percentage6.compareTo(BigDecimal.ZERO)!=0){
|
|
|
m19.setNowEndC(percentage6+"%");
|
|
|
}
|
|
|
-
|
|
|
+ //本期实际支付金额
|
|
|
bladeRedis.set("periodId:"+periodId+"nowMoney",m19.getNowMoney());
|
|
|
values.add(m19);
|
|
|
setZeroBigDecimalFieldsToNullInList(values);
|
|
@@ -3430,10 +3431,10 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
String[] letters = new String[] {
|
|
|
"A", "B", "D", "E", "F", "G", "I",
|
|
|
"J", "K", "L", "M"};
|
|
|
- //循环一次 就是8到21的一行
|
|
|
+ //循环一次 就是9到35的一行
|
|
|
for (int ii = 0; ii < values.size()&& startRow <= endRow; ii++,startRow++) {
|
|
|
MonthlyReportVo vo = values.get(ii);
|
|
|
- //循环一次 就是A到S的一列
|
|
|
+ //循环一次 就是A到M的一列
|
|
|
for (int j = 0; j < 11; j++) {
|
|
|
String index=letters[j]+startRow;
|
|
|
Cell c = getCellByAddress(sheet,index);
|
|
@@ -3495,7 +3496,7 @@ public class FormulaServiceImpl extends BaseServiceImpl<FormulaMapper, Formula>
|
|
|
|
|
|
|
|
|
/**
|
|
|
- * 清单支付报表获取PDF CR3
|
|
|
+ * 清单支付报表获取PDF
|
|
|
* @param url
|
|
|
* @return
|
|
|
*/
|