|
@@ -1,5 +1,6 @@
|
|
|
package org.springblade.manager.formula.impl;
|
|
|
|
|
|
+import cn.hutool.log.StaticLog;
|
|
|
import com.mixsmart.utils.CustomFunction;
|
|
|
import com.mixsmart.utils.FormulaUtils;
|
|
|
import com.mixsmart.utils.StringUtils;
|
|
@@ -53,6 +54,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
private List<Payment> paymentsPeriodEnd =new ArrayList<>();
|
|
|
|
|
|
private List<InterimPaymentCertificate> interimPaymentCertificates =new ArrayList<>();
|
|
|
+ /*分项中期汇总*/
|
|
|
+ private List<SubprojectInterimPaymentSummary> subprojectInterimPaymentSummarys =new ArrayList<>();
|
|
|
/*求百分比*/
|
|
|
private BinaryOperator<String> ratioFc = (a,b)->{
|
|
|
/*合同金额*/
|
|
@@ -111,6 +114,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
this.specialList.add(new InterimPayCert());
|
|
|
this.specialList.add(new InterimSum());
|
|
|
this.specialList.add(new SubIPaySum());
|
|
|
+ this.specialList.add(new ConSch());
|
|
|
this.specialList.add(new SubIMeterPay());
|
|
|
this.specialList.add(new IMeterPaySummary());
|
|
|
/*中间计量表*/
|
|
@@ -607,129 +611,44 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
sis.setPayRatio(ratioFc.apply(sis.getCurrentPeriodEndPay(),sis.getChangeMoney()));
|
|
|
totalList.add(sis);
|
|
|
});
|
|
|
- /* 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*//*
|
|
|
- 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);
|
|
|
- if(period!=null) {
|
|
|
- List<Payment> pays = meterPaymentGroup.get(period.getId());
|
|
|
- if (Func.isNotEmpty(pays)) {
|
|
|
- pl.addAll(pays);
|
|
|
- }
|
|
|
- }
|
|
|
- if(pl.size()>0) {
|
|
|
- sis.getMonthlyCompletion().add(new ArrayList<>(pl));
|
|
|
- }
|
|
|
- }
|
|
|
- });
|
|
|
- *//*输出设置*//*
|
|
|
- *//*合同按月计划完成进度*//*
|
|
|
- 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->{
|
|
|
- if(month>=l.size()){
|
|
|
- return StringPool.EMPTY;
|
|
|
- }else{
|
|
|
- List<Payment> cur=l.get(month);
|
|
|
- String money=cur.stream().map(Payment::getMoneyAsBigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString();
|
|
|
- String change =cur.get(0).getChangeMoney();
|
|
|
- return ratioFc.apply(money,change);
|
|
|
- }
|
|
|
- });
|
|
|
- }).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());
|
|
|
- }).collect(Collectors.toList());
|
|
|
- FormulaUtils.elementFindByCode(fdm,SubprojectInterimPaymentSummary.TBN+":key_22").ifPresent(t->{
|
|
|
- elementWriter.write(t,monthlySum);
|
|
|
- });
|
|
|
-
|
|
|
- AtomicReference<Double> cp = new AtomicReference<>(0.0);
|
|
|
- FormulaUtils.elementFindByCode(fdm,SubprojectInterimPaymentSummary.TBN+":key_23").ifPresent(t->{
|
|
|
- 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*/
|
|
|
- {
|
|
|
- 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)->{
|
|
|
- int extra=loop.getAndDecrement()>0?1:2;
|
|
|
- /*每章小结或总结等价一行数据*/
|
|
|
- int dataLength=v.size()+extra;
|
|
|
- /*每页小结是固定内容,需要每页保留一行*/
|
|
|
- int dataAreaSize=capacity-1;
|
|
|
- int pageSize=(int)Math.ceil(dataLength/(double)dataAreaSize);
|
|
|
- List<List<SubprojectInterimPaymentSummary>> ds = BaseUtils.splitList(v,capacity-1);
|
|
|
- List<SubprojectInterimPaymentSummary> tmp = new ArrayList<>();
|
|
|
- for(int n=0;n<pageSize;n++){
|
|
|
- List<SubprojectInterimPaymentSummary> currentPageData =ds.get(n);
|
|
|
- tmp.addAll(currentPageData);
|
|
|
- int m=1;
|
|
|
- if(pageSize-n==1){
|
|
|
- m+=extra;
|
|
|
- }
|
|
|
- int placeholderSize = capacity-m-currentPageData.size();
|
|
|
- if(placeholderSize>0){
|
|
|
- tmp.addAll(Collections.nCopies(placeholderSize,new SubprojectInterimPaymentSummary()));
|
|
|
- }
|
|
|
- subtotal(new SubprojectInterimPaymentSummary("本页小计"),tmp,currentPageData,tec.getScale());
|
|
|
- if(m>1) {
|
|
|
- /*本章小结*/
|
|
|
- subtotal(new SubprojectInterimPaymentSummary("章合计"),tmp,v,tec.getScale());
|
|
|
- }
|
|
|
- if(m>2){
|
|
|
- /*所有章合计*/
|
|
|
- subtotal(new SubprojectInterimPaymentSummary("所有章合计"),tmp,totalList,tec.getScale());
|
|
|
- }
|
|
|
- dataList.addAll(tmp);
|
|
|
- tmp.clear();
|
|
|
+ totalList.forEach(e->{
|
|
|
+ subprojectInterimPaymentSummarys.add(e.copy());
|
|
|
+ });
|
|
|
+ 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)->{
|
|
|
+ int extra=loop.getAndDecrement()>0?1:2;
|
|
|
+ /*每章小结或总结等价一行数据*/
|
|
|
+ int dataLength=v.size()+extra;
|
|
|
+ /*每页小结是固定内容,需要每页保留一行*/
|
|
|
+ int dataAreaSize=capacity-1;
|
|
|
+ int pageSize=(int)Math.ceil(dataLength/(double)dataAreaSize);
|
|
|
+ List<List<SubprojectInterimPaymentSummary>> ds = BaseUtils.splitList(v,capacity-1);
|
|
|
+ List<SubprojectInterimPaymentSummary> tmp = new ArrayList<>();
|
|
|
+ for(int n=0;n<pageSize;n++){
|
|
|
+ List<SubprojectInterimPaymentSummary> currentPageData =ds.get(n);
|
|
|
+ tmp.addAll(currentPageData);
|
|
|
+ int m=1;
|
|
|
+ if(pageSize-n==1){
|
|
|
+ m+=extra;
|
|
|
}
|
|
|
- });
|
|
|
- }
|
|
|
+ int placeholderSize = capacity-m-currentPageData.size();
|
|
|
+ if(placeholderSize>0){
|
|
|
+ tmp.addAll(Collections.nCopies(placeholderSize,new SubprojectInterimPaymentSummary()));
|
|
|
+ }
|
|
|
+ subtotal(new SubprojectInterimPaymentSummary("本页小计"),tmp,currentPageData,tec.getScale());
|
|
|
+ if(m>1) {
|
|
|
+ /*本章小结*/
|
|
|
+ subtotal(new SubprojectInterimPaymentSummary("章合计"),tmp,v,tec.getScale());
|
|
|
+ }
|
|
|
+ if(m>2){
|
|
|
+ /*所有章合计*/
|
|
|
+ subtotal(new SubprojectInterimPaymentSummary("所有章合计"),tmp,totalList,tec.getScale());
|
|
|
+ }
|
|
|
+ dataList.addAll(tmp);
|
|
|
+ tmp.clear();
|
|
|
+ }
|
|
|
+ });
|
|
|
/*内容输出*/
|
|
|
putOut(SubprojectInterimPaymentSummary.class);
|
|
|
}
|
|
@@ -753,7 +672,117 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Data
|
|
|
+ @EqualsAndHashCode(callSuper = true)
|
|
|
+ public class ConSch extends BaseSpecial<ConstructionSchedule> implements Special{
|
|
|
|
|
|
+ @Override
|
|
|
+ public boolean ready() {
|
|
|
+ return subprojectInterimPaymentSummarys.size()>0&&MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void parse() {
|
|
|
+ builderFormDatas(ConstructionSchedule.class);
|
|
|
+ List<ConstructionSchedule> totalList = new ArrayList<>();
|
|
|
+ subprojectInterimPaymentSummarys.forEach(e->{
|
|
|
+ ConstructionSchedule cs = new ConstructionSchedule();
|
|
|
+ BeanUtils.copyProperties(e,cs);
|
|
|
+ totalList.add(cs);
|
|
|
+ });
|
|
|
+ /*把所有计量期根据打印日期按自然月分类,支付信息按计量期分类*/
|
|
|
+ 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*/
|
|
|
+ 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);
|
|
|
+ if(period!=null) {
|
|
|
+ List<Payment> pays = meterPaymentGroup.get(period.getId());
|
|
|
+ if (Func.isNotEmpty(pays)) {
|
|
|
+ pl.addAll(pays);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ if(pl.size()>0) {
|
|
|
+ sis.getMonthlyCompletion().add(new ArrayList<>(pl));
|
|
|
+ }
|
|
|
+ }
|
|
|
+ });
|
|
|
+ /* 输出设置
|
|
|
+ 合同按月计划完成进度*/
|
|
|
+ fieldDataFcMap.put(ConstructionSchedule.TBN+":key_21",dl->dl.stream().flatMap(e->{
|
|
|
+ List<List<Payment>> l= e.getMonthlyCompletion();
|
|
|
+ return IntStream.range(0,12).boxed().map(month->{
|
|
|
+ if(month>=l.size()){
|
|
|
+ return StringPool.EMPTY;
|
|
|
+ }else{
|
|
|
+ List<Payment> cur=l.get(month);
|
|
|
+ String money=cur.stream().map(Payment::getMoneyAsBigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString();
|
|
|
+ String change =cur.get(0).getChangeMoney();
|
|
|
+ return ratioFc.apply(money,change);
|
|
|
+ }
|
|
|
+ });
|
|
|
+ }).collect(Collectors.toList()));
|
|
|
+ /*分页*/
|
|
|
+ List<List<ConstructionSchedule>> pageList = BaseUtils.splitList(totalList,capacity);
|
|
|
+ BiFunction<List<ConstructionSchedule>,Function<ConstructionSchedule,String>,String> sumFc= (page,fc)->page.stream().map(fc).map(BaseUtils::str2BigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString();
|
|
|
+ pageList.forEach(page->{
|
|
|
+ dataList.addAll(page);
|
|
|
+ ConstructionSchedule sis = new ConstructionSchedule("合计 (万元)");
|
|
|
+ /*合同金额*/
|
|
|
+ sis.setContractMoney(sumFc.apply(page,ConstructionSchedule::getContractMoney));
|
|
|
+ /*变更后的金额*/
|
|
|
+ sis.setChangeMoney(sumFc.apply(page,ConstructionSchedule::getChangeMoney));
|
|
|
+ /*实际工程量金额*/
|
|
|
+ sis.setCurrentPeriodPay(page.stream().map(ConstructionSchedule::getCurrentPeriodPay).map(BaseUtils::str2BigDecimal).reduce(BigDecimal.ZERO,BigDecimal::add).toString());
|
|
|
+ dataList.add(sis);
|
|
|
+ });
|
|
|
+ /* 实际完成,累计完成、按月完成*/
|
|
|
+ List<List<List<Payment>>> all =totalList.stream().map(ConstructionSchedule::getMonthlyCompletion).collect(Collectors.toList());
|
|
|
+ FormulaUtils.beRelyFrom(tec.getFormDataMap(),ConstructionSchedule.TBN,"key_22,key_23,key_24").forEach(e->e.setRepeat(true));
|
|
|
+ /*每月合计进度*/
|
|
|
+ try {
|
|
|
+ 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());
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_22").ifPresent(t->{
|
|
|
+ elementWriter.write(t,monthlySum);
|
|
|
+ });
|
|
|
+ AtomicReference<Double> cp = new AtomicReference<>(0.0);
|
|
|
+ FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_23").ifPresent(t->{
|
|
|
+ elementWriter.write(t, monthlySum.stream().map(e->{double r=BaseUtils.obj2DoubleZero(e)- cp.get();
|
|
|
+ cp.set(BaseUtils.obj2DoubleZero(e));return r;}).collect(Collectors.toList()));
|
|
|
+ });
|
|
|
+ }catch (Exception e){
|
|
|
+ StaticLog.error(e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 合同概要*/
|
|
|
+ FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.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万元");
|
|
|
+ });
|
|
|
+
|
|
|
+ /*内容输出*/
|
|
|
+ putOut(ConstructionSchedule.class);
|
|
|
+ }
|
|
|
+
|
|
|
+ }
|
|
|
|
|
|
@Data
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
@@ -955,6 +984,10 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
double sum=dataList.stream().map(InterimMeterPaySummary::getMoney).filter(StringUtils::isNumber).mapToDouble(Double::parseDouble).sum();
|
|
|
summary.setMoney(StringUtils.number2StringZero(sum,tec.getScale()));
|
|
|
dataList.add(summary);
|
|
|
+ FormulaUtils.elementFindByCode(tec.getFormDataMap(),MeterPeriodInfo.TBN+":key_10").ifPresent(fd->{
|
|
|
+ elementWriter.write(fd,BaseUtils.sliceNumber(dataList.size(),capacity));
|
|
|
+ });
|
|
|
+
|
|
|
}
|
|
|
putOut(InterimMeterPaySummary.class);
|
|
|
}
|
|
@@ -997,6 +1030,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
iim.setItemNameList(itemNameList);
|
|
|
iim.setUnitList(unitList);
|
|
|
iim.setCompletedList(completedList);
|
|
|
+ iim.setFormNumber(iim.getFormNumberList().stream().filter(Func::isNotEmpty).distinct().collect(Collectors.joining("、")));
|
|
|
+ iim.setItemName(iim.getItemNameList().stream().filter(Func::isNotEmpty).distinct().collect(Collectors.joining("、")));
|
|
|
dataList.add(iim);
|
|
|
}
|
|
|
}
|
|
@@ -1008,6 +1043,9 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
fieldDataFcMap.put(InterimMeter.TBN+":key_13",interimMeters2oListFc.apply(InterimMeter::getCompletedList));
|
|
|
/*每条记录一页*/
|
|
|
capacity=1;
|
|
|
+ FormulaUtils.elementFindByCode(tec.getFormDataMap(),MeterPeriodInfo.TBN+":key_11").ifPresent(fd->{
|
|
|
+ elementWriter.write(fd,BaseUtils.sliceNumber(dataList.size(),capacity));
|
|
|
+ });
|
|
|
putOut(InterimMeter.class);
|
|
|
}
|
|
|
}
|
|
@@ -1062,6 +1100,12 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
pageNumber(clazz);
|
|
|
FormulaUtils.put2FormData(fdm, fieldDataFcMap,dataList);
|
|
|
};
|
|
|
+
|
|
|
+ public void write(Object data){
|
|
|
+ FormulaUtils.elementFindByKey(fdm,"key_24").ifPresent(t->{
|
|
|
+ elementWriter.write(t,data);
|
|
|
+ });
|
|
|
+ }
|
|
|
}
|
|
|
interface Special{
|
|
|
/**是否满足执行条件*/
|