修改获取患者历史数据图表

master
chenfei 2 years ago
parent b04b2f7826
commit 63fe4e8b80

@ -146,7 +146,7 @@ public class TRecordController extends BaseController
{
RecordHistoryDataResp recordHistoryDataResp = new RecordHistoryDataResp();
List<String> dateList = records.stream().map(tRecord -> DateUtils.parseDateToStr("dd/MM/yyyy",tRecord.getCreateTime())).collect(Collectors.toList());
List<Date> dateList = records.stream().map(TRecord::getCreateTime).collect(Collectors.toList());
recordHistoryDataResp.setDateList(dateList);
List<JSONObject> result = records.stream().map(tRecord -> {
JSONObject jsonObject;
@ -157,7 +157,6 @@ public class TRecordController extends BaseController
}
return jsonObject;
}).collect(Collectors.toList());
Map<String,List<Integer>> dataMap = new HashMap<>();
if (!CollectionUtils.isEmpty(result)){
List<Integer> shezhiList = new LinkedList<>();
List<Integer> 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;
}
}

@ -6,29 +6,51 @@ import java.util.Map;
public class RecordHistoryDataResp
{
private Map<String,List<Integer>> dataMap;
private List<String> dateList;
private List<Integer> shezhiList;
private List<Integer> shetaiList;
private List<Integer> shexiaList;
private List<Date> dateList;
public RecordHistoryDataResp()
{
}
public Map<String, List<Integer>> getDataMap()
public List<Integer> getShezhiList()
{
return dataMap;
return shezhiList;
}
public void setDataMap(Map<String, List<Integer>> dataMap)
public void setShezhiList(List<Integer> shezhiList)
{
this.dataMap = dataMap;
this.shezhiList = shezhiList;
}
public List<String> getDateList()
public List<Integer> getShetaiList()
{
return shetaiList;
}
public void setShetaiList(List<Integer> shetaiList)
{
this.shetaiList = shetaiList;
}
public List<Integer> getShexiaList()
{
return shexiaList;
}
public void setShexiaList(List<Integer> shexiaList)
{
this.shexiaList = shexiaList;
}
public List<Date> getDateList()
{
return dateList;
}
public void setDateList(List<String> dateList)
public void setDateList(List<Date> dateList)
{
this.dateList = dateList;
}

Loading…
Cancel
Save