|
@ -369,7 +369,7 @@ public class PatientHealthIndexService {
|
|
|
*
|
|
|
* @return
|
|
|
*/
|
|
|
private com.alibaba.fastjson.JSONObject getPatientXT_Json(String patient, String dateString) {
|
|
|
private com.alibaba.fastjson.JSONObject getPatientXT_Json(String patient, String dateString) throws ParseException {
|
|
|
com.alibaba.fastjson.JSONObject obj = new com.alibaba.fastjson.JSONObject();
|
|
|
obj.put("user", patient);
|
|
|
boolean hadData = false;
|
|
@ -388,8 +388,8 @@ public class PatientHealthIndexService {
|
|
|
",value7" +
|
|
|
",device_sn" +
|
|
|
",type" +
|
|
|
",record_date" +
|
|
|
",sort_date" +
|
|
|
",DATE_FORMAT(record_date, '%Y-%m-%d %H:%i:%s')'record_date' " +
|
|
|
",DATE_FORMAT(sort_date, '%Y-%m-%d %H:%i:%s') 'sort_date'" +
|
|
|
",czrq as createDate" +
|
|
|
",min(czrq) czrq " +
|
|
|
" from wlyy_patient_health_index " +
|
|
@ -400,6 +400,8 @@ public class PatientHealthIndexService {
|
|
|
" GROUP BY user,value1,value2,value3,value4,value5,value6,value7,type,record_date,sort_date " +
|
|
|
" 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);
|
|
@ -409,7 +411,8 @@ public class PatientHealthIndexService {
|
|
|
String data = item.get("value1").toString();
|
|
|
String dataType = item.get("value2").toString();
|
|
|
String deviceSn = item.get("device_sn") == null ? "" : item.get("device_sn").toString();
|
|
|
Date recordDate = (Date)item.get("record_date");
|
|
|
System.out.println(item.get("record_date").toString());
|
|
|
Date recordDate = dateFormat6.parse(item.get("record_date").toString());
|
|
|
Long id = Long.parseLong(item.get("id") + "");
|
|
|
Date createDate = (Date)item.get("createDate");
|
|
|
|
|
@ -1551,7 +1554,7 @@ public class PatientHealthIndexService {
|
|
|
* @param pageSize
|
|
|
* @return
|
|
|
*/
|
|
|
public List<Object> findIndexByPatient2(String patient, int type, String start, String end, int page, int pageSize) {
|
|
|
public List<Object> findIndexByPatient2(String patient, int type, String start, String end, int page, int pageSize) throws ParseException {
|
|
|
List<Object> re = new ArrayList<>();
|
|
|
if (page > 0) {
|
|
|
page = page - 1;
|