yangyj 3 tygodni temu
rodzic
commit
8901e52151

+ 36 - 0
blade-service/blade-manager/src/main/java/org/springblade/manager/formula/impl/ExecutorMeter.java

@@ -249,6 +249,8 @@ public class ExecutorMeter extends FormulaExecutor {
             this.specialList.add(new InterimSum());
             /*分项工程中期支付汇总*/
             /*this.specialList.add(new SubIMeterPaySw());*/
+            /*材料回扣款预览版*/
+            this.specialList.add(new MaterialWithheldSp());
             this.specialList.add(new SubIPaySum());
             this.specialList.add(new SubIPaySumSw());
             /*施工进度表*/
@@ -1458,6 +1460,40 @@ public class ExecutorMeter extends FormulaExecutor {
         @Override
         public void parse() {
             builderFormDatas(MaterialWithheld.class);
+            MaterialWithheld mw = new MaterialWithheld();
+
+            mw.setYear(tec.periodInfo.getYear());
+            mw.setMonth(tec.periodInfo.getMonth());
+            /*获取已经计算完成的支付项目信息*/
+            LinkedHashMap<String,InterimPayCertificateItem> itemPaysGroup = tec.meterInfo.getInterimPayCertificateItemGroup().getOrDefault(tec.periodInfo.getReportId(),new LinkedHashMap<>());
+            InterimPayCertificateItem clyfk =itemPaysGroup.get("材料预付款");
+            /*累计*/
+            mw.setCurPeriodEndPayMt(clyfk.getCurrentPeriodEndPay());
+            mw.setCurPeriodEndPayEi("");
+            mw.setCurPeriodEndPaySum(addFc.apply(mw.getCurPeriodEndPayMt(),mw.getCurPeriodEndPayEi()));
+            /*本期*/
+            mw.setCurPeriodPayMt(clyfk.getCurrentPeriodPay());
+            mw.setCurPeriodPayEi("0");
+            mw.setCurPeriodPaySum(addFc.apply(mw.getCurPeriodPayMt(),mw.getCurPeriodPayEi()));
+
+
+            InterimPayCertificateItem kh =itemPaysGroup.get("扣回材料预付款");
+            /*回扣本期累计*/
+            mw.setCurPeriodEndBackMt(kh.getCurrentPeriodEndPay());
+            mw.setCurPeriodEndBackEi("0");
+            mw.setCurPeriodEndBackSum(addFc.apply(mw.getCurPeriodEndBackMt(),mw.getCurPeriodEndBackEi()));
+            /*回扣上期累计*/
+            mw.setPrePeriodEndBackMt(kh.getPreviousPeriodEndPay());
+            mw.setPrePeriodEndBackEi("0");
+            mw.setPrePeriodEndBackSum(addFc.apply(mw.getPrePeriodEndBackMt(),mw.getPrePeriodEndBackEi()));
+            /*回扣笨球*/
+            mw.setCurPeriodBackMt(kh.getCurrentPeriodPay());
+            mw.setCurPeriodBackEi("0");
+            mw.setCurPeriodBackSum(addFc.apply(mw.getCurPeriodBackMt(),mw.getCurPeriodBackEi()));
+            if(!BaseUtils.isZero(mw.getCurPeriodEndPaySum())||!BaseUtils.isZero(mw.getCurPeriodEndBackSum())) {
+                /*任意累积和不为零才显示*/
+                dataList.add(mw);
+            }
             if(dataList.size()>0){
                 putOut();
             }