yangyj 8 mesiacov pred
rodič
commit
d1dbedd781

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

@@ -607,26 +607,26 @@ public class ExecutorMeter extends FormulaExecutor {
                 sis.setPayRatio(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
                 totalList.add(sis);
             });
-            if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
-                /*把所有计量期根据打印日期按自然月分类,支付信息按计量期分类*/
+        /*    if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
+                *//*把所有计量期根据打印日期按自然月分类,支付信息按计量期分类*//*
                LinkedHashMap<Long,MeterPeriodInfo> meterPeriodInfoMap = tec.meterInfo.getMeterPeriodInfoLinkedHashMap();
                LinkedHashMap<Integer,MeterPeriodInfo> monthMeterMap=meterPeriodInfoMap.values().stream().collect(Collectors.toMap(e->e.getFormPrintDate().getMonthValue(),t->t,(v1,v2)->v2,LinkedHashMap::new));
-               /*根据清单编号、计量期分组*/
+               *//*根据清单编号、计量期分组*//*
                 Map<String,Map<Long,List<Payment>>> paymentGroup=paymentsPeriodEnd.stream().collect(Collectors.groupingBy(Payment::getNumber,Collectors.groupingBy(Payment::getPeriodId,Collectors.toList())));
                int max=monthMeterMap.keySet().stream().max(Comparator.comparingInt(t->t)).orElse(12);
                 BaseInfo baseInfo =tec.meterInfo.getBaseInfo();
                 totalList.forEach(sis->{
-                   /*单项占合同价的比例*/
+                   *//*单项占合同价的比例*//*
                    sis.setItemPercent(ratioFc.apply(sis.getChangeMoney(),baseInfo.getTotalAmount().toString()));
-                   /*单项计划完成完成比例*/
+                   *//*单项计划完成完成比例*//*
                    sis.setItemProgress(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
-                   /*本期占合同金额*/
+                   *//*本期占合同金额*//*
                    sis.setCurrentPayPercent(ratioFc.apply(sis.getCurrentPeriodPay(), sis.getChangeMoney()));
-                   /*本期末累计支付金额占合同比*/
+                   *//*本期末累计支付金额占合同比*//*
                    sis.setPayPercent(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
-                   /*根据月份来获取payment*/
+                   *//*根据月份来获取payment*//*
                    Map<Long,List<Payment>> meterPaymentGroup = paymentGroup.get(sis.getFormNumber());
-                   /*当前月已经累计的*/
+                   *//*当前月已经累计的*//*
                    List<Payment> pl =new ArrayList<>();
                    for(int i=1;i<=max;i++){
                        MeterPeriodInfo period = monthMeterMap.get(i);
@@ -641,8 +641,8 @@ public class ExecutorMeter extends FormulaExecutor {
                        }
                    }
                });
-                /*输出设置*/
-                /*合同按月计划完成进度*/
+                *//*输出设置*//*
+                *//*合同按月计划完成进度*//*
                 fieldDataFcMap.put(SubprojectInterimPaymentSummary.TBN+":key_21",dl->dl.stream().flatMap(e->{
                     List<List<Payment>> l= e.getMonthlyCompletion();
                     return  IntStream.range(0,12).boxed().map(month->{
@@ -656,24 +656,24 @@ public class ExecutorMeter extends FormulaExecutor {
                         }
                     });
                }).collect(Collectors.toList()));
-                /*分页*/
+                *//*分页*//*
                 List<List<SubprojectInterimPaymentSummary>> pageList = BaseUtils.splitList(totalList,capacity);
                 BiFunction<List<SubprojectInterimPaymentSummary>,Function<SubprojectInterimPaymentSummary,String>,String> sumFc= (page,fc)->page.stream().map(fc).map(BaseUtils::str2BigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString();
                 pageList.forEach(page->{
                         dataList.addAll(page);
                         SubprojectInterimPaymentSummary sis = new SubprojectInterimPaymentSummary("合计 (万元)");
-                        /*合同金额*/
+                        *//*合同金额*//*
                         sis.setContractMoney(sumFc.apply(page,SubprojectInterimPaymentSummary::getContractMoney));
-                        /*变更后的金额*/
+                        *//*变更后的金额*//*
                         sis.setChangeMoney(sumFc.apply(page,SubprojectInterimPaymentSummary::getChangeMoney));
-                        /*实际工程量金额*/
+                        *//*实际工程量金额*//*
                         sis.setCurrentPeriodPay(page.stream().map(SubprojectInterimPaymentSummary::getCurrentPeriodPay).map(BaseUtils::str2BigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
                         dataList.add(sis);
                 });
-                /*实际完成,累计完成、按月完成*/
+                *//*实际完成,累计完成、按月完成*//*
                 List<List<List<Payment>>> all =totalList.stream().map(SubprojectInterimPaymentSummary::getMonthlyCompletion).collect(Collectors.toList());
                 FormulaUtils.beRelyFrom(tec.getFormDataMap(),SubprojectInterimPaymentSummary.TBN,"key_22,key_23,key_24").forEach(e->e.setRepeat(true));
-                /*每月合计进度*/
+                *//*每月合计进度*//*
                 List<String> monthlySum= IntStream.range(0,max).boxed().map(month->{
                     List<Payment> tmp=  all.stream().flatMap(row->row.get(month).stream()).collect(Collectors.toList());
                     return  ratioFc.apply(tmp.stream().map(Payment::getMoneyAsBigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString(),baseInfo.getTotalAmount().toString());
@@ -687,12 +687,13 @@ public class ExecutorMeter extends FormulaExecutor {
                     elementWriter.write(t, monthlySum.stream().map(e->{double r=BaseUtils.obj2DoubleZero(e)- cp.get();
                         cp.set(BaseUtils.obj2DoubleZero(e));return r;}).collect(Collectors.toList()));
                 });
-                /*合同概要*/
+                *//*合同概要*//*
                 FormulaUtils.elementFindByCode(fdm,SubprojectInterimPaymentSummary.TBN+":key_24").ifPresent(t->{
                     elementWriter.write(t,"开工日期:"+baseInfo.getStartDatePlan()+" 始算工期日:"+baseInfo.getStartDate()+" 合同完成日期:"+baseInfo.getEndDatePlan()+" 合同期限$4天 时间延长$5天 修改后合同期限"+ CustomFunction.daysPassed(baseInfo.getStartDate(),baseInfo.getEndDate()) +"天(即至"+baseInfo.getEndDate()+")\n 合同总价"+baseInfo.getContractAmount().divide(new BigDecimal(10000),2,RoundingMode.HALF_UP)+"万元、暂定金$9万元、工程量清单金额$10万元、BG估计最终金额$11万元");
                 });
 
-            }else{
+            }else*/
+            {
                 LinkedHashMap<String,List<SubprojectInterimPaymentSummary>> chapterGroup= totalList.stream().collect(Collectors.groupingBy(e->getPrefix(e.getFormNumber()),LinkedHashMap::new,Collectors.toList()));
                 AtomicInteger loop = new AtomicInteger(chapterGroup.size());
                 chapterGroup.forEach((k,v)->{
@@ -750,7 +751,6 @@ public class ExecutorMeter extends FormulaExecutor {
         }
 
 
-
     }