diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java index b7214fc..1aa767c 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/pc/TRecordController.java @@ -146,7 +146,7 @@ public class TRecordController extends BaseController { RecordHistoryDataResp recordHistoryDataResp = new RecordHistoryDataResp(); - List dateList = records.stream().map(tRecord -> DateUtils.parseDateToStr("dd/MM/yyyy",tRecord.getCreateTime())).collect(Collectors.toList()); + List dateList = records.stream().map(TRecord::getCreateTime).collect(Collectors.toList()); recordHistoryDataResp.setDateList(dateList); List result = records.stream().map(tRecord -> { JSONObject jsonObject; @@ -157,7 +157,6 @@ public class TRecordController extends BaseController } return jsonObject; }).collect(Collectors.toList()); - Map> dataMap = new HashMap<>(); if (!CollectionUtils.isEmpty(result)){ List shezhiList = new LinkedList<>(); List shetaiList = new LinkedList<>(); @@ -170,11 +169,10 @@ public class TRecordController extends BaseController shetaiList.add(jsonObject.getJSONObject("data").getJSONObject("shetai").getInteger(key1)); shexiaList.add(jsonObject.getJSONObject("data").getJSONObject("shexia").getInteger(key2)); }); - dataMap.put("shezhi",shezhiList); - dataMap.put("shetai",shetaiList); - dataMap.put("shexia",shexiaList); + recordHistoryDataResp.setShezhiList(shezhiList); + recordHistoryDataResp.setShetaiList(shetaiList); + recordHistoryDataResp.setShexiaList(shexiaList); } - recordHistoryDataResp.setDataMap(dataMap); return recordHistoryDataResp; } } diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java index 0d71885..0241d7a 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/domain/resp/RecordHistoryDataResp.java @@ -6,29 +6,51 @@ import java.util.Map; public class RecordHistoryDataResp { - private Map> dataMap; - private List dateList; + private List shezhiList; + private List shetaiList; + private List shexiaList; + private List dateList; public RecordHistoryDataResp() { } - public Map> getDataMap() + public List getShezhiList() { - return dataMap; + return shezhiList; } - public void setDataMap(Map> dataMap) + public void setShezhiList(List shezhiList) { - this.dataMap = dataMap; + this.shezhiList = shezhiList; } - public List getDateList() + public List getShetaiList() + { + return shetaiList; + } + + public void setShetaiList(List shetaiList) + { + this.shetaiList = shetaiList; + } + + public List getShexiaList() + { + return shexiaList; + } + + public void setShexiaList(List shexiaList) + { + this.shexiaList = shexiaList; + } + + public List getDateList() { return dateList; } - public void setDateList(List dateList) + public void setDateList(List dateList) { this.dateList = dateList; }