|
@@ -1,5 +1,6 @@
|
|
|
package org.springblade.manager.formula.impl;
|
|
|
|
|
|
+import com.mixsmart.utils.CustomFunction;
|
|
|
import com.mixsmart.utils.FormulaUtils;
|
|
|
import com.mixsmart.utils.StringUtils;
|
|
|
import lombok.Data;
|
|
@@ -61,7 +62,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
if(BigDecimal.ZERO.compareTo(bBd)==0){
|
|
|
return "0.0";
|
|
|
}
|
|
|
- return aBd.multiply(new BigDecimal(100)).divide(bBd, 2, RoundingMode.HALF_UP).toString();
|
|
|
+ return aBd.multiply(new BigDecimal(100)).divide(bBd, 6, RoundingMode.HALF_UP).toString();
|
|
|
};
|
|
|
|
|
|
|
|
@@ -468,6 +469,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
@EqualsAndHashCode(callSuper = true)
|
|
|
public class SubIPaySum extends BaseSpecial<SubprojectInterimPaymentSummary> implements Special{
|
|
|
|
|
|
+
|
|
|
@Override
|
|
|
public boolean ready() {
|
|
|
return current.size()>0;
|
|
@@ -551,13 +553,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
));
|
|
|
}
|
|
|
|
|
|
- public SubprojectInterimPaymentSummary createSis(Summary sum){
|
|
|
- SubprojectInterimPaymentSummary sis = new SubprojectInterimPaymentSummary();
|
|
|
- sis.setFormNumber(sum.getFormNumber());
|
|
|
- sis.setItemName(sum.getItemName());
|
|
|
- sis.setUnit(sum.getUnit());
|
|
|
- return sis;
|
|
|
- }
|
|
|
+
|
|
|
|
|
|
@Override
|
|
|
public void parse() {
|
|
@@ -665,8 +661,10 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
});
|
|
|
|
|
|
List<List<List<Payment>>> all =totalList.stream().map(SubprojectInterimPaymentSummary::getMonthlyCompletion).collect(Collectors.toList());
|
|
|
- FormulaUtils.beRelyFrom(fdm,SubprojectInterimPaymentSummary.TBN+":key_22").forEach(e->e.setRepeat(true));
|
|
|
+
|
|
|
FormulaUtils.beRelyFrom(fdm,SubprojectInterimPaymentSummary.TBN+":key_23").forEach(e->e.setRepeat(true));
|
|
|
+ FormulaUtils.beRelyFrom(fdm,SubprojectInterimPaymentSummary.TBN+":key_24").forEach(e->e.setRepeat(true));*/
|
|
|
+ FormulaUtils.beRelyFrom(fdm,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());
|
|
@@ -681,6 +679,10 @@ 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{
|
|
|
LinkedHashMap<String,List<SubprojectInterimPaymentSummary>> chapterGroup= totalList.stream().collect(Collectors.groupingBy(e->getPrefix(e.getFormNumber()),LinkedHashMap::new,Collectors.toList()));
|