Commit 136e1e04 by 谢海旭

v5.6.0版本 策略中心

1 parent 0da4c245
...@@ -535,6 +535,8 @@ public class StrategyInfoService { ...@@ -535,6 +535,8 @@ public class StrategyInfoService {
for (Map.Entry<String, List<DataBusinessDTO>> entry : staffGroupByMonth.entrySet()) { for (Map.Entry<String, List<DataBusinessDTO>> entry : staffGroupByMonth.entrySet()) {
StaffHistoryRecordDTO dto = new StaffHistoryRecordDTO(); StaffHistoryRecordDTO dto = new StaffHistoryRecordDTO();
String yearMonth = entry.getKey(); String yearMonth = entry.getKey();
// yearMonth 目前是yyyy-MM-dd格式,需要转换成yyyy-MM格式
yearMonth = yearMonth.substring(0, 7);
dto.setYearMonth(yearMonth); dto.setYearMonth(yearMonth);
List<StaffInfoDTO> staffList = new ArrayList<>(); List<StaffInfoDTO> staffList = new ArrayList<>();
...@@ -559,6 +561,13 @@ public class StrategyInfoService { ...@@ -559,6 +561,13 @@ public class StrategyInfoService {
// staffHistoryRecordDTOS 按月份倒序展示,最新的在前; // staffHistoryRecordDTOS 按月份倒序展示,最新的在前;
staffHistoryRecordDTOS.sort(Comparator.comparing(StaffHistoryRecordDTO::getYearMonth).reversed()); staffHistoryRecordDTOS.sort(Comparator.comparing(StaffHistoryRecordDTO::getYearMonth).reversed());
// yearMonth 目前是yyyy-MM格式,需要转换成 yyyy年MM月 格式
staffHistoryRecordDTOS.forEach(dto -> {
String yearMonth = dto.getYearMonth();
yearMonth = yearMonth.substring(0, 4) + "年" + yearMonth.substring(5, 7) + "月";
dto.setYearMonth(yearMonth);
});
return staffHistoryRecordDTOS; return staffHistoryRecordDTOS;
} }
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!