Explorar o código

居民健康管理平台修改导出包含未使用设备体征数据sql语句

humingfen %!s(int64=7) %!d(string=hai) anos
pai
achega
bcffb65fa2

+ 1 - 1
patient-co-manage/wlyy-manage/src/main/java/com/yihu/wlyy/service/manager/device/DeviceHealthIndexService.java

@ -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));