|
@@ -1588,7 +1588,7 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
int min= monthMoney.keySet().stream().min(Comparator.comparingInt(i->i)).orElse(BaseUtils.dateInt(planStartDate.getYear(),1));
|
|
|
List<Integer> tickUnit =BaseUtils.getTickUnit(min,max);
|
|
|
/*起始月相对于起始年一月份的偏移量*/
|
|
|
- int offset= (min/100-planStartDate.getYear())*12+min%100-1;
|
|
|
+ int offset= (min/100-planStartDate.getYear())*12+min%100-1-3;
|
|
|
/*每月累计*/
|
|
|
LinkedHashMap<Integer,Double> actualMap = new LinkedHashMap<>();
|
|
|
List<String> monthlySum= tickUnit.stream().map(month->{
|
|
@@ -1630,14 +1630,14 @@ public class ExecutorMeter extends FormulaExecutor {
|
|
|
});
|
|
|
/*计划本月*/
|
|
|
FormulaUtils.elementFindByCode(fdm, ConstructionSchedule.TBN + ":key_28").ifPresent(t -> {
|
|
|
- List<String> value=planMonthMap.values().stream().map(BigDecimal::toPlainString).map(s-> ratioFc.apply(s, totalAmount)).collect(Collectors.toList());
|
|
|
+ List<String> value=planMonthMap.values().stream().skip(3).map(BigDecimal::toPlainString).map(s-> ratioFc.apply(s, totalAmount)).collect(Collectors.toList());
|
|
|
elementWriter.write(t, value);
|
|
|
});
|
|
|
/*计划累计*/
|
|
|
- planMonthMap.entrySet().stream().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().map(yearMonth->{
|
|
|
+ planMonthSum = planMonthMap.keySet().stream().skip(3).map(yearMonth->{
|
|
|
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));
|