|
@@ -61,6 +61,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
|
|
|
/*本期材料支付信息*/
|
|
|
List<Material>materials;
|
|
|
+ /*本期材料垫付款*/
|
|
|
+ private String materialSum;
|
|
|
|
|
|
/**是否是浙江模版*/
|
|
|
private boolean isZJ=false;
|
|
@@ -206,8 +208,10 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
this.specialList.add(new MaterialSp());
|
|
|
this.specialList.add(new MaterialsArrivalSp());
|
|
|
}else if(MeterType.INTERIM.equals(tec.getMeterType())){
|
|
|
- this.specialList.add(new InterimPayCert());
|
|
|
+ /*材料*/
|
|
|
this.specialList.add(new MaterialsArrivalSp());
|
|
|
+ /*中期支付证书*/
|
|
|
+ this.specialList.add(new InterimPayCert());
|
|
|
this.specialList.add(new InterimSum());
|
|
|
/*分项工程中期支付汇总*/
|
|
|
this.specialList.add(new SubIPaySum());
|
|
@@ -727,6 +731,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
@Override
|
|
|
public void parse() {
|
|
|
builderFormDatas(MaterialsArrival.class);
|
|
|
+ materials=tec.meterInfo.getMaterialsAll();
|
|
|
if(materials!=null&&materials.size()>0){
|
|
|
String ratio = BaseUtils.str2BigDecimal(tec.meterInfo.getBaseInfo().getDeductRatio()).toPlainString();
|
|
|
List<MaterialsArrival> list =materials.stream().map(e->{
|
|
@@ -781,6 +786,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
hj.setQuantity(v.stream().map(e->BaseUtils.str2BigDecimal(e.getQuantity())).reduce(BigDecimal.ZERO,BigDecimal::add).toPlainString());
|
|
|
hj.setAmount(v.stream().map(e->BaseUtils.str2BigDecimal(e.getAmount())).reduce(BigDecimal.ZERO,BigDecimal::add).toPlainString());
|
|
|
hj.setTotal(divideFc.apply(multiFc.apply(hj.getAmount(),ratio),"100"));
|
|
|
+ materialSum=hj.getTotal();
|
|
|
tmp.add(hj);
|
|
|
dataList.addAll(tmp);
|
|
|
});
|
|
@@ -1039,7 +1045,10 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
payItemZj.add(startPay);
|
|
|
payItemZj.add(new InterimPaymentCertificate("扣回动员预付款"));
|
|
|
- payItemZj.add(new InterimPaymentCertificate("材料设备垫付款"));
|
|
|
+ InterimPaymentCertificate clsbdfk=new InterimPaymentCertificate("材料设备垫付款");
|
|
|
+ /*材料预付款关联*/
|
|
|
+ clsbdfk.setCurrentPeriodPay(materialSum);
|
|
|
+ payItemZj.add(clsbdfk);
|
|
|
payItemZj.add(new InterimPaymentCertificate("扣回材料设备垫付款"));
|
|
|
blj=new InterimPaymentCertificate("保留金",MINUS_ONE);
|
|
|
payItemZj.add(blj);
|
|
@@ -1116,6 +1125,12 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
+ }else if("材料设备垫付款".equals(certificate.getChapterSeq())){
|
|
|
+ InterimPayCertificateItem preMaterial = previousMap.get("材料设备垫付款");
|
|
|
+ if(preMaterial!=null){
|
|
|
+ certificate.setPreviousPeriodEndPay(preMaterial.getCurrentPeriodEndPay());
|
|
|
+ }
|
|
|
+ certificate.setCurrentPeriodEndPay(addFc.apply(certificate.getPreviousPeriodEndPay(),certificate.getCurrentPeriodPay()));
|
|
|
}else if("扣回动员预付款".equals(certificate.getChapterSeq())){
|
|
|
certificate.setCurrentPeriodEndPay(rebateIncentiveAdvPay.getEndPay());
|
|
|
certificate.setCurrentPeriodPay(rebateIncentiveAdvPay.getCurrentPay());
|
|
@@ -1201,8 +1216,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*内容输出*/
|
|
|
putOut();
|
|
|
|
|
|
- /*材料预付款关联*/
|
|
|
- materials=tec.meterInfo.getMaterialsAll();
|
|
|
+
|
|
|
}
|
|
|
|
|
|
public void periodCount(InterimPaymentCertificate last){
|
|
@@ -2065,22 +2079,11 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
dataList.addAll(Collections.nCopies(add,new InterimMeterPaySummary()));
|
|
|
}
|
|
|
InterimMeterPaySummary chapter = new InterimMeterPaySummary("章小计");
|
|
|
- double sum=v.stream().map(Payment::getMoney).filter(StringUtils::isNumber).mapToDouble(Double::parseDouble).sum();
|
|
|
- chapter.setMoney(StringUtils.number2StringZero(sum,tec.getScale()));
|
|
|
+ String sum=v.stream().map(Payment::getMoney).map(p->BaseUtils.str2BigDecimal(p).setScale(0,RoundingMode.HALF_UP)).reduce(BigDecimal.ZERO,BigDecimal::add).toPlainString();
|
|
|
+ chapter.setMoney(sum);
|
|
|
dataList.add(chapter);
|
|
|
tec.periodInfo.setSummaryNumber(String.valueOf(BaseUtils.sliceNumber(dataList.size(),capacity)));
|
|
|
});
|
|
|
-/* if(dataList.size()>0){
|
|
|
- int add= capacity-dataList.size()%capacity-1;
|
|
|
- for(int i=0;i<add;i++){
|
|
|
- dataList.add(new InterimMeterPaySummary());
|
|
|
- }
|
|
|
- InterimMeterPaySummary summary = new InterimMeterPaySummary("合计");
|
|
|
- double sum=dataList.stream().map(InterimMeterPaySummary::getMoney).filter(StringUtils::isNumber).mapToDouble(Double::parseDouble).sum();
|
|
|
- summary.setMoney(StringUtils.number2StringZero(sum,tec.getScale()));
|
|
|
- dataList.add(summary);
|
|
|
- tec.periodInfo.setSummaryNumber(String.valueOf(BaseUtils.sliceNumber(dataList.size(),capacity)));
|
|
|
- }*/
|
|
|
putOut(InterimMeterPaySummary.class);
|
|
|
}
|
|
|
}
|