|
@ -374,7 +374,6 @@ public class PatientHealthIndexService {
|
|
|
com.alibaba.fastjson.JSONObject obj = new com.alibaba.fastjson.JSONObject();
|
|
|
obj.put("user", patient);
|
|
|
boolean hadData = false;
|
|
|
Date date = DateUtil.strToDateShort(dateString);
|
|
|
/***************** 按时间排序 ***************************/
|
|
|
|
|
|
String sql = "SELECT " +
|
|
@ -402,12 +401,11 @@ public class PatientHealthIndexService {
|
|
|
" order by record_date,id desc ";
|
|
|
List<Map<String, Object>> list = getPatientXT_JsonIot(sql,patient,dateString);
|
|
|
SimpleDateFormat dateFormat6 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
SimpleDateFormat dateFormat3 = new SimpleDateFormat("yyyy-MM-dd");
|
|
|
if (list != null && list.size() > 0) {
|
|
|
obj.put("type", 1);
|
|
|
obj.put("czrq", date);
|
|
|
obj.put("recordDate", date);
|
|
|
obj.put("sortDate", date);
|
|
|
obj.put("czrq", dateString);
|
|
|
obj.put("recordDate", dateString);
|
|
|
obj.put("sortDate", dateString);
|
|
|
for (Map<String, Object> item : list) {
|
|
|
String data = item.get("value1").toString();
|
|
|
String dataType = item.get("value2").toString();
|
|
@ -422,43 +420,43 @@ public class PatientHealthIndexService {
|
|
|
if (data != null && dataType != null) {
|
|
|
if (dataType.equals("1")) {
|
|
|
obj.put("value1", data);
|
|
|
obj.put("time1", recordDate);
|
|
|
obj.put("time1", recordTime);
|
|
|
obj.put("id1", id);
|
|
|
obj.put("deviceSn1", deviceSn);
|
|
|
hadData = true;
|
|
|
} else if (dataType.equals("2")) {
|
|
|
obj.put("value2", data);
|
|
|
obj.put("time2", recordDate);
|
|
|
obj.put("time2", recordTime);
|
|
|
obj.put("id2", id);
|
|
|
obj.put("deviceSn2", deviceSn);
|
|
|
hadData = true;
|
|
|
} else if (dataType.equals("3")) {
|
|
|
obj.put("value3", data);
|
|
|
obj.put("time3", recordDate);
|
|
|
obj.put("time3", recordTime);
|
|
|
obj.put("id3", id);
|
|
|
obj.put("deviceSn3", deviceSn);
|
|
|
hadData = true;
|
|
|
} else if (dataType.equals("4")) {
|
|
|
obj.put("value4", data);
|
|
|
obj.put("time4", recordDate);
|
|
|
obj.put("time4", recordTime);
|
|
|
obj.put("id4", id);
|
|
|
obj.put("deviceSn4", deviceSn);
|
|
|
hadData = true;
|
|
|
} else if (dataType.equals("5")) {
|
|
|
obj.put("value5", data);
|
|
|
obj.put("time5", recordDate);
|
|
|
obj.put("time5", recordTime);
|
|
|
obj.put("id5", id);
|
|
|
obj.put("deviceSn5", deviceSn);
|
|
|
hadData = true;
|
|
|
} else if (dataType.equals("6")) {
|
|
|
obj.put("value6", data);
|
|
|
obj.put("time6", recordDate);
|
|
|
obj.put("time6", recordTime);
|
|
|
obj.put("id6", id);
|
|
|
obj.put("deviceSn6", deviceSn);
|
|
|
hadData = true;
|
|
|
} else if (dataType.equals("7")) {
|
|
|
obj.put("value7", data);
|
|
|
obj.put("time7", recordDate);
|
|
|
obj.put("time7", recordTime);
|
|
|
obj.put("id7", id);
|
|
|
obj.put("deviceSn7", deviceSn);
|
|
|
hadData = true;
|
|
@ -1404,9 +1402,7 @@ public class PatientHealthIndexService {
|
|
|
json.put("value7", map.get("value7"));
|
|
|
json.put("deviceSn", map.get("device_sn") == null ? "" : map.get("device_sn"));
|
|
|
json.put("type", map.get("type"));
|
|
|
System.out.println(map.get("record_date"));
|
|
|
SimpleDateFormat dateFormat6 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
SimpleDateFormat dateFormat3 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
|
|
|
Date date = dateFormat6.parse(map.get("record_date").toString()) ;
|
|
|
if (type == 2) {
|
|
|
json.put("date", DateUtil.dateToStr(date, DateUtil.YYYY_MM_DD_HH_MM_SS));
|