|
@@ -108,6 +108,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
typeDateMap.put(IndexDataType.FINANCE_PAY,indexBaseMonthDataDao.getFinancePayDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds)));
|
|
|
typeDateMap.put(IndexDataType.FINANCE_BALANCE_AMOUNT,indexBaseMonthDataDao.getFinanceBalanceDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds)));
|
|
|
typeDateMap.put(IndexDataType.FINANCE_AMOUNT,indexBaseMonthDataDao.getFinanceActualDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds)));
|
|
|
+ typeDateMap.put(IndexDataType.TOTAL_AMOUNT,indexBaseMonthDataDao.getTotalAmountDataWithTimely(startDate.toString(), endDate.toString(), new ArrayList<>(organIds)));
|
|
|
|
|
|
|
|
|
for (IndexDataType dataType : IndexDataType.values()) {
|
|
@@ -129,6 +130,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
typeDateMap.put(dataType, new ArrayList<>(Arrays.asList(indexBaseMonthData)));
|
|
|
}
|
|
|
|
|
|
+ BigDecimal totalAmount = BigDecimal.ZERO;
|
|
|
for (Map.Entry<IndexDataType, List<IndexBaseMonthData>> typeDateMapEntry : typeDateMap.entrySet()) {
|
|
|
Set<String> hasMonths = typeDateMapEntry.getValue().stream().map(d -> DateUtil.dateToString(d.getMonth(), "yyyy-MM-dd")).collect(Collectors.toSet());
|
|
|
LocalDate currentMonthDate = startDate;
|
|
@@ -166,7 +168,8 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
IndexBaseDto indexBaseData = new IndexBaseDto(typeDateMapEntry.getKey(),typeDateMapEntry.getKey().getMsg());
|
|
|
indexBaseData.setIndexMonthData(typeDateMapEntry.getValue(), currentMonth);
|
|
|
if(IndexDataType.FINANCE_PAY.equals(typeDateMapEntry.getKey()) || IndexDataType.FINANCE_AMOUNT.equals(typeDateMapEntry.getKey()) ||
|
|
|
- IndexDataType.FINANCE_BALANCE_AMOUNT.equals(typeDateMapEntry.getKey())){
|
|
|
+ IndexDataType.FINANCE_BALANCE_AMOUNT.equals(typeDateMapEntry.getKey()) ||
|
|
|
+ IndexDataType.TOTAL_AMOUNT.equals(typeDateMapEntry.getKey())){
|
|
|
indexBaseData.setPercent(typeDateMapEntry.getValue().stream().map(IndexBaseMonthData::getPercent).reduce(BigDecimal.ZERO, BigDecimal::add));
|
|
|
}
|
|
|
result.add(indexBaseData);
|
|
@@ -223,6 +226,7 @@ public class IndexBaseMonthDataServiceImpl extends BaseServiceImpl<Long, IndexBa
|
|
|
saveData(indexBaseMonthDataDao.getFinancePayData(dayStr),dayStr,IndexDataType.FINANCE_PAY);
|
|
|
saveData(indexBaseMonthDataDao.getFinanceBalanceData(dayStr),dayStr,IndexDataType.FINANCE_BALANCE_AMOUNT);
|
|
|
saveData(indexBaseMonthDataDao.getFinanceActualData(dayStr),dayStr,IndexDataType.FINANCE_AMOUNT);
|
|
|
+ saveData(indexBaseMonthDataDao.getTotalAmountData(dayStr),dayStr,IndexDataType.TOTAL_AMOUNT);
|
|
|
|
|
|
//业务数据
|
|
|
saveData(indexBaseMonthDataDao.getHomeworkData(dayStr, null), monday.toString(), IndexDataType.HOMEWORK_CREATE_RATE);
|