|
@@ -41,7 +41,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/* private Function<Long, List<Material>> materialFormFc;*/
|
|
|
/* private Function<Long, List<Payment>> paymentListFc;*/
|
|
|
/* private Function<Long, List<MidPayItem>> midPayItemListFc;*/
|
|
|
- private Function<Long, List<InventoryForm>> inventoryFormFc;
|
|
|
+ /*private Function<Long, List<InventoryForm>> inventoryFormFc;*/
|
|
|
private Function<Long, List<MeterApply>> meterApplyFc;
|
|
|
private Function<Long, List<StartPayForm>> stayPayFormFc;
|
|
|
private ElementWriter elementWriter;
|
|
@@ -401,7 +401,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
/*支付数据*/
|
|
|
//List<Payment> paymentList=paymentListFc.apply(tec.getContractId());
|
|
|
/*合同计量清单*/
|
|
|
- List<InventoryForm> inventoryForms = inventoryFormFc.apply(tec.getContractId());
|
|
|
+ List<InventoryForm> inventoryForms = tec.meterInfo.getInventoryForms();
|
|
|
InventoryForm root = null;
|
|
|
for(InventoryForm itf:inventoryForms){
|
|
|
if(itf.getParentId()==0){
|
|
@@ -903,6 +903,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
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.sort(Comparator.comparing(e -> getPrefix(e.getFormNumber())));
|
|
|
totalList.forEach(sis->{
|
|
|
/* 单项占合同价的比例*/
|
|
|
sis.setItemPercent(ratioFc.apply(sis.getChangeMoney(),baseInfo.getTotalAmount().toString()));
|
|
@@ -993,8 +994,11 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
int extended=BaseUtils.obj2IntegerZero(contractDay)-BaseUtils.obj2IntegerZero(totalDay);
|
|
|
/*已过去*/
|
|
|
String passDay=CustomFunction.join(CustomFunction.daysPassed(baseInfo.getStartDate(), LocalDate.now()),"").toString();
|
|
|
- BigDecimal provisionalSum=tec.meterInfo.getMeterTreeList().stream().filter(e->e.getNodeCode().equals("D")).map(e->BaseUtils.str2BigDecimal(e.getAmount())).reduce(BigDecimal.ZERO,BigDecimal::add);
|
|
|
+
|
|
|
+ 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()
|
|
@@ -1002,7 +1006,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
+"天(即至"+baseInfo.getEndDate()+")"
|
|
|
+ "\n 合同总价"+baseInfo.getContractAmount().divide(new BigDecimal(10000),2,RoundingMode.HALF_UP)+"万元、暂定金"
|
|
|
+CustomFunction.xN(baseInfo.getProvisionalSum(),0.0001)+"万元、工程量清单金额"
|
|
|
- +CustomFunction.xN(baseInfo.getBOQAmount(),0.0001)+"万元、工程量变更("+CustomFunction.xN(changeTokenTotal,0.0001)+")万元、估计最终金额"+StringUtils.number2String(totalMoney,2)+"万元,时间已过"
|
|
|
+ +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);
|
|
|
});
|