|
@@ -37,10 +37,6 @@ import java.util.stream.IntStream;
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
@Data
|
|
|
public class ExecutorMeter extends FormulaExecutor {
|
|
|
- /* private Function<Long, List<Material>> materialFormFc;*/
|
|
|
- /* private Function<Long, List<Payment>> paymentListFc;*/
|
|
|
- /* private Function<Long, List<MidPayItem>> midPayItemListFc;*/
|
|
|
- /*private Function<Long, List<InventoryForm>> inventoryFormFc;*/
|
|
|
private Function<Long, List<MeterApply>> meterApplyFc;
|
|
|
private Function<Long, List<StartPayForm>> stayPayFormFc;
|
|
|
private ElementWriter elementWriter;
|
|
@@ -145,6 +141,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*监理*/
|
|
|
this.specialList.add(new SupervisionCertificateSp());
|
|
|
}else if(MeterType.START.equals(tec.getMeterType())){
|
|
|
+ /*监理中期支付证书*/
|
|
|
+ this.specialList.add(new InterimPayCert());
|
|
|
/*开工预付款支付证书处理*/
|
|
|
this.specialList.add(new StayPayCalc());
|
|
|
}
|
|
@@ -180,7 +178,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
sum= startPayForms.stream().filter(s->s.getPeriodSort()<=one.getPeriodSort()).mapToDouble(s->Double.parseDouble(s.getMeterMoney())).sum();
|
|
|
/*累计*/
|
|
|
elementWriter.write(fdm.get(AdvancePaymentCertificate.TBN+":key_3"),StringUtils.number2String(sum,2));
|
|
|
- currentD=startPayForms.stream().mapToDouble(s->Double.parseDouble(s.getMeterMoney())).sum();
|
|
|
+ currentD=current.stream().mapToDouble(s->Double.parseDouble(s.getMeterMoney())).sum();
|
|
|
elementWriter.write(fdm.get(AdvancePaymentCertificate.TBN+":key_2"),StringUtils.number2String(currentD,2));
|
|
|
/*上一期*/
|
|
|
Optional<Integer> op=startPayForms.stream().map(StartPayForm::getPeriodSort).filter(s->s<one.getPeriodSort()).max(Comparator.comparingInt(s->s));
|
|
@@ -190,6 +188,9 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
+ /*监理中期支付证书*/
|
|
|
+
|
|
|
}
|
|
|
|
|
|
}
|
|
@@ -465,28 +466,6 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
itemList.add(current);
|
|
|
|
|
|
- /* t.stream().findFirst().ifPresent(payment->{
|
|
|
- sc.setPrice(payment.getPrice());
|
|
|
- sc.setContractAmount(payment.getContractMoney());
|
|
|
- *//*本期*//*
|
|
|
- sc.setCurrentAmount(paymentSumFc.apply(c));
|
|
|
- sc.setCurrentRatio(ratioFc.apply(sc.getCurrentAmount(),sc.getContractAmount()));
|
|
|
- *//*上期末*//*
|
|
|
- sc.setPreviousEndAmount(paymentSumFc.apply(p));
|
|
|
- sc.setPreviousEndRatio(ratioFc.apply(sc.getPreviousEndAmount(),sc.getContractAmount()));
|
|
|
- *//*本期末*//*
|
|
|
- sc.setPeriodEndAmount(paymentSumFc.apply(t));
|
|
|
- sc.setPeriodEndRatio(ratioFc.apply(sc.getPeriodEndAmount(),sc.getContractAmount()));
|
|
|
-
|
|
|
- current.setFormName(v);
|
|
|
- current.setChapterSeq(k);
|
|
|
- current.setContractAmount(payment.getContractMoney());
|
|
|
- current.setPreviousPeriodEndPay(sc.getPreviousEndAmount());
|
|
|
- current.setCurrentPeriodPay(sc.getCurrentAmount());
|
|
|
- current.setCurrentPeriodEndPay(sc.getPeriodEndAmount());
|
|
|
- itemList.add(current);
|
|
|
- });*/
|
|
|
-
|
|
|
}
|
|
|
dataList.add(sc);
|
|
|
});
|
|
@@ -540,6 +519,21 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ @Data
|
|
|
+ @EqualsAndHashCode(callSuper = true)
|
|
|
+ public class InterimPayCertJL extends BaseSpecial<InterimPaymentCertificate> implements Special{
|
|
|
+ /*甬台温,开工预付款款,中期支付证书*/
|
|
|
+ @Override
|
|
|
+ public boolean ready() {
|
|
|
+ return true;
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void parse() {
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
@Data
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
public class InterimPayCert extends BaseSpecial<InterimPaymentCertificate> implements Special{
|
|
@@ -576,8 +570,6 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
public void parse() {
|
|
|
builderFormDatas(InterimPaymentCertificate.class);
|
|
|
/*数据获取start*/
|
|
|
- /*支付数据*/
|
|
|
- //List<Payment> paymentList=paymentListFc.apply(tec.getContractId());
|
|
|
/*合同计量清单*/
|
|
|
List<InventoryForm> inventoryForms = tec.meterInfo.getInventoryForms();
|
|
|
InventoryForm root = null;
|
|
@@ -617,7 +609,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
Map<String,BigDecimal> currentMoney= this.moneySum.apply(current);
|
|
|
/*合同金额*/
|
|
|
Map<String,BigDecimal[]> contractMoney = this.contractMoneySum.apply(inventoryForms);
|
|
|
- Map<String,InventoryForm> dictMap= chapters.stream().collect(Collectors.toMap(InventoryForm::getFormNumber, e->e));
|
|
|
+ Map<String,InventoryForm> dictMap= chapters.stream().collect(Collectors.toMap(InventoryForm::getFormNumber, e->e,(v1,v2)->v1));
|
|
|
for(Map.Entry<String,BigDecimal[]> cm:contractMoney.entrySet()){
|
|
|
if(Func.isEmpty(cm.getKey()))continue;
|
|
|
InventoryForm inventoryForm=dictMap.get(cm.getKey());
|
|
@@ -751,9 +743,11 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
RebateIncentiveAdvPay rebateIncentiveAdvPay = new RebateIncentiveAdvPay();
|
|
|
payItemZj.stream().filter(t->t.getFormName()!=null&&t.getFormName().contains("小计")).findFirst().ifPresent(t->{
|
|
|
rebateIncentiveAdvPay.setSubtotal(t.getCurrentPeriodEndPay());
|
|
|
+ });
|
|
|
+ payItemZj.stream().filter(t->t.getFormName()!=null&&t.getFormName().contains("扣回动员预付款")).findFirst().ifPresent(t->{
|
|
|
|
|
|
- tec.formDataMap.putAll(FormulaUtils.toFormDataMap(rebateIncentiveAdvPay));
|
|
|
});
|
|
|
+ tec.formDataMap.putAll(FormulaUtils.toFormDataMap(rebateIncentiveAdvPay));
|
|
|
dataList.addAll(payItemZj);
|
|
|
/*分行合计列,合计的时候需要计入手填部分*/
|
|
|
fieldGetSet(summaryConfigMap,x->!x.getIsSummary(),InterimPaymentCertificate::getInvertState);
|