|
@ -499,7 +499,7 @@ public class DeviceHealthIndexService extends BaseDeviceJpaService<DeviceHealthI
|
|
|
"p.address FROM wlyy_sign_family s,wlyy_patient p,wlyy_patient_device pd LEFT JOIN(" +
|
|
|
"SELECT i.`user`,i.device_sn, i.type, max(i.record_date) record_date, count(i.id) amount, w.device_name " +
|
|
|
"FROM device.wlyy_patient_health_index i,wlyy_patient_device w "+
|
|
|
"WHERE i.device_sn = w.device_sn AND i.del=1 AND i.`type` IN (1, 2) GROUP BY i.`user`,i.device_sn,i.type) d on pd.user = d.`user`"+
|
|
|
"WHERE i.device_sn = w.device_sn AND i.del=1 AND i.`type` IN (1, 2) GROUP BY i.`user`,i.device_sn,i.type) d on pd.user = d.`user` and pd.device_sn=d.device_sn "+
|
|
|
"WHERE s.patient = pd.`user` AND s.hospital='"+hospital+"' AND s.`status`> 0 AND s.patient=p.code ORDER BY d.record_date desc ";
|
|
|
|
|
|
list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(DeviceHealthIndexExportVO.class));
|