|
@@ -1770,10 +1770,14 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
elementWriter.write(t, value);
|
|
|
});
|
|
|
/*计划累计*/
|
|
|
- planMonthMap.entrySet().stream().skip(3).filter(kv->kv.getKey()<=max).forEach(kv->{
|
|
|
+ /* planMonthMap.entrySet().stream().skip(3).filter(kv->kv.getKey()<=max).forEach(kv->{
|
|
|
plannedMap.put(kv.getKey(), Double.parseDouble(ratioFc.apply(kv.getValue().toPlainString(),totalAmount)));
|
|
|
- });
|
|
|
+ });*/
|
|
|
planMonthSum = planMonthMap.keySet().stream().skip(3).map(yearMonth->{
|
|
|
+ if(BigDecimal.ZERO.compareTo(planMonthMap.getOrDefault(yearMonth,BigDecimal.ZERO))==0){
|
|
|
+ /*0是为了不显示*/
|
|
|
+ return "0";
|
|
|
+ }
|
|
|
String tmp= planMonthMap.entrySet().stream().filter(kv ->kv.getKey()<=yearMonth).map(Map.Entry::getValue).reduce(BigDecimal.ZERO, BigDecimal::add).toPlainString();
|
|
|
String percent= ratioFc.apply(tmp, totalAmount);
|
|
|
plannedMap.put(yearMonth,Double.parseDouble(percent));
|