|
@@ -8,6 +8,8 @@ import com.mixsmart.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
|
import lombok.EqualsAndHashCode;
|
|
|
import org.springblade.common.utils.BaseUtils;
|
|
|
+import org.springblade.common.utils.SnowFlakeUtil;
|
|
|
+import org.springblade.core.oss.model.BladeFile;
|
|
|
import org.springblade.core.tool.utils.Func;
|
|
|
import org.springblade.core.tool.utils.StringPool;
|
|
|
import org.springblade.manager.dto.ElementData;
|
|
@@ -19,6 +21,7 @@ import org.springblade.meter.entity.InterimPayCertificateItem;
|
|
|
import org.springframework.beans.BeanUtils;
|
|
|
|
|
|
|
|
|
+import java.io.ByteArrayOutputStream;
|
|
|
import java.math.BigDecimal;
|
|
|
import java.math.RoundingMode;
|
|
|
import java.time.LocalDate;
|
|
@@ -39,6 +42,8 @@ import java.util.stream.IntStream;
|
|
|
public class ExecutorMeter extends FormulaExecutor {
|
|
|
private Function<Long, List<MeterApply>> meterApplyFc;
|
|
|
private Function<Long, List<StartPayForm>> stayPayFormFc;
|
|
|
+ private BiFunction<String,String, List<ChapterSchedule>> chapterScheduleFc;
|
|
|
+
|
|
|
private ElementWriter elementWriter;
|
|
|
/**执行链*/
|
|
|
private List<Special> specialList = new ArrayList<>();
|
|
@@ -82,12 +87,10 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*按照二级清单编号,合计合同清单{合同金额,变更金额}*/
|
|
|
private Function<List<InventoryForm>, Map<String, BigDecimal[]>> contractMoneySum = data -> data.stream()
|
|
|
.collect(Collectors.groupingBy(
|
|
|
- form -> getPrefix(form.getFormNumber()),
|
|
|
+ this::getPrefix,
|
|
|
Collectors.reducing(
|
|
|
new BigDecimal[]{BigDecimal.ZERO, BigDecimal.ZERO},
|
|
|
form -> new BigDecimal[]{
|
|
|
- /*form.getContractMoney() != null ? new BigDecimal(form.getContractMoney()) : BigDecimal.ZERO,
|
|
|
- form.getChangeMoney() != null ? new BigDecimal(form.getChangeMoney()) : BigDecimal.ZERO*/
|
|
|
BaseUtils.str2BigDecimal(form.getContractMoney()),
|
|
|
BaseUtils.str2BigDecimal(form.getChangeMoney())
|
|
|
},
|
|
@@ -102,6 +105,8 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
Collectors.reducing(BigDecimal.ZERO, Payment::getMoneyAsBigDecimal, BigDecimal::add)
|
|
|
));
|
|
|
|
|
|
+
|
|
|
+
|
|
|
Function<InventoryForm,String> level2Fn=inventoryForm -> {
|
|
|
String prefix = inventoryForm.getFormNumber();
|
|
|
if(inventoryForm.getFormName().contains(BTDL)){
|
|
@@ -132,12 +137,27 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
return fn;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+ public String getPrefix(InventoryForm inventoryForm){
|
|
|
+ String prefix=inventoryForm.getFormNumber();
|
|
|
+ if(prefix!=null) {
|
|
|
+ boolean hasWord = inventoryForm.getFormName().contains(BTDL)||inventoryForm.getFormNumber().contains(BTDL);
|
|
|
+ String fn= prefix.split("-")[0];
|
|
|
+ /*204-1-11(保通道路)*/
|
|
|
+ if (BaseUtils.isNumber(fn)) {
|
|
|
+ fn = String.valueOf(100 * (Integer.parseInt(fn) / 100));
|
|
|
+ }
|
|
|
+ if(hasWord){
|
|
|
+ fn=fn+":"+BTDL;
|
|
|
+ }
|
|
|
+ return fn;
|
|
|
+ }
|
|
|
+ return "NULL";
|
|
|
+ }
|
|
|
|
|
|
|
|
|
Function<InventoryForm,String> chapterPreFixFc=inventoryForm->{
|
|
|
if(inventoryForm.getFormName().contains(BTDL)){
|
|
|
- return inventoryForm.getFormNumber()+BTDL;
|
|
|
+ return inventoryForm.getFormNumber()+":"+BTDL;
|
|
|
}
|
|
|
return inventoryForm.getFormNumber();
|
|
|
} ;
|
|
@@ -174,7 +194,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*分项工程中期支付汇总*/
|
|
|
this.specialList.add(new SubIPaySum());
|
|
|
/*施工进度表*/
|
|
|
- this.specialList.add(new ConSch());
|
|
|
+ this.specialList.add(new ConSchChapter());
|
|
|
/*分项工程中期计量支付表*/
|
|
|
this.specialList.add(new SubIMeterPay());
|
|
|
this.specialList.add(new IMeterPaySummary());
|
|
@@ -292,7 +312,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
|
|
|
@Override
|
|
|
public boolean ready() {
|
|
|
- return fds.size()==14&&!MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ return fds.size()==14&&!MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getTemplate());
|
|
|
}
|
|
|
|
|
|
public void parse(){
|
|
@@ -367,7 +387,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*永久性工程材料差价金额一览表*/
|
|
|
@Override
|
|
|
public boolean ready() {
|
|
|
- return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getTemplate());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -541,7 +561,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
|
|
|
@Override
|
|
|
public boolean ready() {
|
|
|
- return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getTemplate());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -652,19 +672,6 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*数据获取start*/
|
|
|
/*合同计量清单*/
|
|
|
List<InventoryForm> inventoryForms = tec.meterInfo.getInventoryForms();
|
|
|
- /* InventoryForm root = null;
|
|
|
- for(InventoryForm itf:inventoryForms){
|
|
|
- if(itf.getParentId()==0){
|
|
|
- root = itf;
|
|
|
- break;
|
|
|
- }
|
|
|
- }
|
|
|
- for(InventoryForm itf:inventoryForms){
|
|
|
- assert root != null;
|
|
|
- if(itf.getParentId().equals(root.getId())){
|
|
|
- chapters.add(itf);
|
|
|
- }
|
|
|
- }*/
|
|
|
List<InventoryForm> chapters = tec.meterInfo.getChapter();
|
|
|
LinkedHashMap<Integer,List<ChangeToken>> changeTokenListMap= tec.meterInfo.getChangeTokenListMap();
|
|
|
/* 本期变更 */
|
|
@@ -735,7 +742,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*合计后回显*/
|
|
|
Map<InterimPaymentCertificate,InterimPayCertificateItem> peerMap = new HashMap<>();
|
|
|
List<InterimPaymentCertificate> payItemZj=new ArrayList<>();
|
|
|
- if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())){
|
|
|
+ if(MeterInfo.MB_ZJ.equals(tec.meterInfo.getTemplate())){
|
|
|
InterimPaymentCertificate xj=new InterimPaymentCertificate("小计",true);
|
|
|
addGetSetConfig(xj,summaryConfigMap,InterimPaymentCertificate::getContractAmount,xj::setContractAmount);
|
|
|
addGetSetConfig(xj,summaryConfigMap,InterimPaymentCertificate::getRevisedTotal,xj::setRevisedTotal);
|
|
@@ -800,7 +807,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
InterimPaymentCertificate ipc = paymentCertificateMap.get(e.getPayNumber());
|
|
|
if(ipc==null){
|
|
|
/*浙江的按照实际的计量单元去显示*/
|
|
|
- if(!MeterInfo.MB_ZJ.equals(tec.meterInfo.getConfig())) {
|
|
|
+ if(!MeterInfo.MB_ZJ.equals(tec.meterInfo.getTemplate())) {
|
|
|
ipc = new InterimPaymentCertificate(e.getPayName());
|
|
|
}
|
|
|
}
|
|
@@ -948,7 +955,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
summary.setPayRatioB(ratioFc.apply(summary.getCurrentPeriodEndPay(),summary.getRevisedAmount()));
|
|
|
dataList.add(summary);
|
|
|
|
|
|
- if(MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig())){
|
|
|
+ if(MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getTemplate())){
|
|
|
/*浙江*/
|
|
|
Function<Function<InterimPaymentSummary,String>,Function<List<InterimPaymentSummary>,List<Object>>> fc=(f)-> dl->dl.stream().map(f).flatMap(e->{
|
|
|
List<Object> l=IntStream.range(0,5).boxed().map(i->"").collect(Collectors.toList());
|
|
@@ -1175,13 +1182,165 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
|
|
|
}
|
|
|
|
|
|
+ @Data
|
|
|
+ @EqualsAndHashCode(callSuper = true)
|
|
|
+ public class ConSchChapter extends BaseSpecial<ConstructionSchedule> implements Special{
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public boolean ready() {
|
|
|
+ return MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getTemplate());
|
|
|
+ }
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public void parse() {
|
|
|
+ builderFormDatas(ConstructionSchedule.class);
|
|
|
+
|
|
|
+ List<ChapterSchedule> chapterSchedules=chapterScheduleFc.apply(tec.periodInfo.getYear(),tec.getContractId().toString());
|
|
|
+ /*支付信息根据章节、月份分组*/
|
|
|
+ List<InventoryForm> inventoryForms = tec.meterInfo.getInventoryForms();
|
|
|
+ List<InventoryForm> chapters = tec.meterInfo.getChapter();
|
|
|
+ /*合同金额*/
|
|
|
+ Map<String, BigDecimal[]> contractMoney = contractMoneySum.apply(inventoryForms);
|
|
|
+ LinkedHashMap<String, InventoryForm> dictMap = chapters.stream().collect(Collectors.toMap(e->chapterPreFixFc.apply(e),e -> e, (v1, v2) -> v1,LinkedHashMap::new));
|
|
|
+ LinkedHashMap<Integer,List<Payment>>paymentListMap = tec.meterInfo.getPaymentListMap();
|
|
|
+ /*之前的计量期数据*/
|
|
|
+ previous = paymentListMap.get(MeterInfo.PRE);
|
|
|
+ /*当前计量期数据*/
|
|
|
+ current =paymentListMap.get(MeterInfo.CUR);
|
|
|
+ /*累计到本期末*/
|
|
|
+ paymentsPeriodEnd=paymentListMap.get(MeterInfo.END);
|
|
|
+ /*往期每章节的实际花费*/
|
|
|
+ Map<String,BigDecimal> previousMoney= moneySum.apply(previous);
|
|
|
+ /*当前计量期每章节的实际花费*/
|
|
|
+ Map<String,BigDecimal> currentMoney= moneySum.apply(current);
|
|
|
+ /*本期末每章节的实际花费*/
|
|
|
+ Map<String,BigDecimal> endMoney= moneySum.apply(paymentsPeriodEnd);
|
|
|
+
|
|
|
+ LinkedHashMap<Integer,BigDecimal> monthMoney = paymentsPeriodEnd.stream().sorted(Comparator.comparing(Payment::getBusinessDate)).collect(Collectors.groupingBy(
|
|
|
+ payment -> payment.getBusinessDate().getMonthValue(),
|
|
|
+ LinkedHashMap::new,
|
|
|
+ Collectors.reducing(BigDecimal.ZERO, Payment::getMoneyAsBigDecimal, BigDecimal::add)
|
|
|
+ ));
|
|
|
+
|
|
|
+ BaseInfo baseInfo = tec.meterInfo.getBaseInfo();
|
|
|
+ dictMap.forEach((k,v)-> {
|
|
|
+ ConstructionSchedule cs = new ConstructionSchedule(v.getFormName());
|
|
|
+ BigDecimal[] sum = contractMoney.get(k);
|
|
|
+ cs.setChapterNumber(k);
|
|
|
+ cs.setContractMoney(sum[0].toPlainString());
|
|
|
+ cs.setChangeMoney(sum[1].toPlainString());
|
|
|
+ cs.setCurrentPeriodPay(StringUtils.handleNull(currentMoney.get(k)));
|
|
|
+ cs.setCurrentPeriodEndPay(StringUtils.handleNull(endMoney.get(k)));
|
|
|
+ cs.setItemPercent(ratioFc.apply(cs.getChangeMoney(), baseInfo.getContractAmount().toString()));
|
|
|
+ cs.setItemProgress(ratioFc.apply(cs.getCurrentPeriodEndPay(), cs.getChangeMoney()));
|
|
|
+ cs.setCurrentPayPercent(ratioFc.apply(cs.getCurrentPeriodPay(),cs.getChangeMoney()));
|
|
|
+ /* 本期末累计支付金额占合同比*/
|
|
|
+ cs.setPayPercent(ratioFc.apply(cs.getCurrentPeriodEndPay(),cs.getChangeMoney()));
|
|
|
+ /**上期末占合合同金额*/
|
|
|
+ cs.setPrePayPercent(ratioFc.apply(subtractFc.apply(cs.getCurrentPeriodEndPay(),cs.getCurrentPeriodPay()),cs.getContractMoney()));
|
|
|
+ /*变更金额*/
|
|
|
+ cs.setChangeMoneyAll(subtractFc.apply(cs.getChangeMoney(),cs.getContractMoney()));
|
|
|
+ dataList.add(cs);
|
|
|
+ });
|
|
|
+ /*每月合计进度*/
|
|
|
+ try {
|
|
|
+ int max = monthMoney.keySet().stream().max(Comparator.comparingInt(i->i)).orElse(12);
|
|
|
+ /*没月累计*/
|
|
|
+ List<String> monthlySum= IntStream.rangeClosed(1,max).boxed().map(month->{
|
|
|
+ BigDecimal tmp= monthMoney.entrySet().stream().filter(e->e.getKey()<=month).map(Map.Entry::getValue).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+ return multiFc.apply(ratioFc.apply(tmp.toPlainString(),baseInfo.getTotalAmount().toString()),"100");
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_22").ifPresent(t->{
|
|
|
+ elementWriter.write(t,monthlySum);
|
|
|
+ });
|
|
|
+ /*本月*/
|
|
|
+ List<String> monthlyCount= IntStream.rangeClosed(1,max).boxed().map(month->{
|
|
|
+ BigDecimal tmp= monthMoney.entrySet().stream().filter(e-> e.getKey().equals(month)).map(Map.Entry::getValue).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+ return ratioFc.apply(tmp.toPlainString(),baseInfo.getTotalAmount().toString());
|
|
|
+ }).collect(Collectors.toList());
|
|
|
+ FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_23").ifPresent(t->{
|
|
|
+ elementWriter.write(t,monthlyCount);
|
|
|
+ });
|
|
|
+ List<String> planMonthSum=new ArrayList<>();
|
|
|
+ if(chapterSchedules!=null&&chapterSchedules.size()>0) {
|
|
|
+ chapterSchedules.forEach(ChapterSchedule::updateArray);
|
|
|
+ List<BigDecimal> planMonth = IntStream.range(0,12).boxed().map(i->chapterSchedules.stream().map(e->e.getArr()[i]).reduce(BigDecimal.ZERO,BigDecimal::add)).collect(Collectors.toList());
|
|
|
+ /*计划本月*/
|
|
|
+ FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_28").ifPresent(t -> {
|
|
|
+ List<String> value=planMonth.stream().map(BigDecimal::toPlainString).map(s-> multiFc.apply(ratioFc.apply(s,baseInfo.getTotalAmount().toString()),"100")).collect(Collectors.toList());
|
|
|
+ elementWriter.write(t, value);
|
|
|
+ });
|
|
|
+ /*计划累计*/
|
|
|
+ planMonthSum = IntStream.range(0,12).boxed().map(i-> {
|
|
|
+ String tmp= planMonth.stream().filter(e -> planMonth.indexOf(e) <= i).reduce(BigDecimal.ZERO, BigDecimal::add).toPlainString();
|
|
|
+ return multiFc.apply(ratioFc.apply(tmp,baseInfo.getTotalAmount().toString()),"100");
|
|
|
+ }
|
|
|
+ ).collect(Collectors.toList());
|
|
|
+ List<String> finalPlanMonthSum = planMonthSum;
|
|
|
+ FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_27").ifPresent(t -> {
|
|
|
+ elementWriter.write(t, finalPlanMonthSum);
|
|
|
+ });
|
|
|
+ }
|
|
|
+ /*上传图标*/
|
|
|
+ if(planMonthSum.size()>0&&monthlySum.size()>0){
|
|
|
+ try {
|
|
|
+ double[] actual = monthlySum.stream().mapToDouble(BaseUtils::obj2DoubleZero).toArray();
|
|
|
+ double[] planned =planMonthSum.stream().limit(monthlySum.size()).mapToDouble(BaseUtils::obj2DoubleZero).toArray();;
|
|
|
+ /*byte[] chartBytes = FormulaUtils.chapterScheduleChart(actual,planned);
|
|
|
+ BladeFile chartFile= tec.getNewIOSSClient().updateFile(chartBytes, "chart"+SnowFlakeUtil.getId()+".png");*/
|
|
|
+ String path=FormulaUtils.chapterScheduleChartUrl(actual,planned);
|
|
|
+ BladeFile chartFile= tec.getNewIOSSClient().uploadFile( ConstructionSchedule.TBN+ SnowFlakeUtil.getId() + ".png",path);
|
|
|
+ /*施工进度图*/
|
|
|
+ FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_29").ifPresent(t -> {
|
|
|
+ elementWriter.write(t, chartFile.getLink());
|
|
|
+ });
|
|
|
+ }catch (Exception e){
|
|
|
+ e.printStackTrace();
|
|
|
+ }
|
|
|
+ }
|
|
|
+ }catch (Exception e){
|
|
|
+ StaticLog.error(e.getMessage());
|
|
|
+ }
|
|
|
+
|
|
|
+ /* 合同概要*/
|
|
|
+ FormulaUtils.elementFindByCode(fdm,ConstructionSchedule.TBN+":key_24").ifPresent(t->{
|
|
|
+ /*合同时长*/
|
|
|
+ String contractDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDatePlan(),baseInfo.getEndDatePlan()),"").toString();
|
|
|
+ /*总时长*/
|
|
|
+ String totalDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDate(),baseInfo.getEndDate()),"").toString();
|
|
|
+ /*延长时间*/
|
|
|
+ int extended=BaseUtils.obj2IntegerZero(contractDay)-BaseUtils.obj2IntegerZero(totalDay);
|
|
|
+ /*已过去*/
|
|
|
+ String passDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDate(), LocalDate.now()),"").toString();
|
|
|
+
|
|
|
+ BigDecimal provisionalSum=tec.meterInfo.getInventoryForms().stream().filter(e->"D".equals(e.getFormNumber())).map(e->BaseUtils.str2BigDecimal(e.getBidPrice())).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+ BigDecimal BOQAmount=tec.meterInfo.getInventoryForms().stream().filter(e->!"D".equals(e.getFormNumber())).map(e->BaseUtils.str2BigDecimal(e.getBidPrice())).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+ baseInfo.setProvisionalSum(StringUtils.number2String(provisionalSum,2));
|
|
|
+ baseInfo.setBOQAmount(StringUtils.number2String(BOQAmount,2));
|
|
|
+ BigDecimal changeTokenTotal=tec.meterInfo.getChangeTokenListMap().values().stream().flatMap(Collection::stream).map(ChangeToken::getTotalChangeMoney).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+ double totalMoney = BaseUtils.obj2DoubleZero(baseInfo.getContractAmount())+BaseUtils.obj2DoubleZero(baseInfo.getProvisionalSum())+BaseUtils.obj2DoubleZero(baseInfo.getBOQAmount())+BaseUtils.obj2DoubleZero(changeTokenTotal);
|
|
|
+ String brief="开工日期:"+baseInfo.getStartDatePlan()+" 始算工期日:"+baseInfo.getStartDate()
|
|
|
+ +" 合同完成日期:"+baseInfo.getEndDatePlan()+" 合同期限"+contractDay+"天 时间延长"+extended+"天 修改后合同期限"+ totalDay
|
|
|
+ +"天(即至"+baseInfo.getEndDate()+")"
|
|
|
+ + "\n 合同总价"+CustomFunction.xN(baseInfo.getContractAmount(),0.0001)+"万元、暂定金"
|
|
|
+ +CustomFunction.xN(baseInfo.getProvisionalSum(),0.0001)+"万元、工程量清单金额"
|
|
|
+ +CustomFunction.xN(baseInfo.getBOQAmount(),0.0001)+"万元、工程量变更("+CustomFunction.xN(changeTokenTotal,0.0001)+")万元、估计最终金额"+CustomFunction.xN(totalMoney,0.0001)+"万元,时间已过"
|
|
|
+ +passDay+"天,占合同工期"+StringUtils.number2String(ratioFc.apply(passDay,totalDay),2)+"%";
|
|
|
+ elementWriter.write(t,brief);
|
|
|
+ });
|
|
|
+
|
|
|
+ /*内容输出*/
|
|
|
+ putOut(ConstructionSchedule.class);
|
|
|
+
|
|
|
+ }
|
|
|
+ }
|
|
|
@Data
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
public class ConSch extends BaseSpecial<ConstructionSchedule> implements Special{
|
|
|
|
|
|
@Override
|
|
|
public boolean ready() {
|
|
|
- return subprojectInterimPaymentSummary.size()>0&&MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getConfig());
|
|
|
+ return subprojectInterimPaymentSummary.size()>0&&MeterInfo.MB_ZJ.equals(tec.getMeterInfo().getTemplate());
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -1201,7 +1360,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*获取最大月份,暂时不考虑跨年*/
|
|
|
int max=monthMeterMap.keySet().stream().max(Comparator.comparingInt(t->t)).orElse(12);
|
|
|
BaseInfo baseInfo =tec.meterInfo.getBaseInfo();
|
|
|
- totalList.sort(Comparator.comparing(e -> getPrefix(e.getFormNumber())));
|
|
|
+ totalList.sort(Comparator.comparing(e -> getPrefix(e.getChapterNumber())));
|
|
|
totalList.forEach(sis->{
|
|
|
/* 单项占合同价的比例*/
|
|
|
sis.setItemPercent(ratioFc.apply(sis.getChangeMoney(),baseInfo.getTotalAmount().toString()));
|
|
@@ -1217,7 +1376,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
sis.setChangeMoneyAll(subtractFc.apply(sis.getChangeMoney(),sis.getContractMoney()));
|
|
|
/*变更金额*/
|
|
|
/* 根据月份来获取payment*/
|
|
|
- Map<Long,List<Payment>> meterPaymentGroup = paymentGroup.get(sis.getFormNumber());
|
|
|
+ Map<Long,List<Payment>> meterPaymentGroup = paymentGroup.get(sis.getChapterNumber());
|
|
|
/* 当前月已经累计的*/
|
|
|
List<Payment> pl =new ArrayList<>();
|
|
|
for(int i=1;i<=max;i++){
|