|
@ -129,7 +129,7 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
|
|
Integer page, Integer pageSize) throws Exception{
|
|
Integer page, Integer pageSize) throws Exception{
|
|
|
|
|
|
List<WlyyPatientDeviceVO> list = new ArrayList<>();
|
|
List<WlyyPatientDeviceVO> list = new ArrayList<>();
|
|
String sql = "SELECT s.patient," +
|
|
|
|
|
|
/*String sql = "SELECT s.patient," +
|
|
"d.id as id," +
|
|
"d.id as id," +
|
|
"d.device_id as deviceId," +
|
|
"d.device_id as deviceId," +
|
|
"d.user as user," +
|
|
"d.user as user," +
|
|
@ -152,7 +152,12 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
|
|
"wlyy_sign_family s," +
|
|
"wlyy_sign_family s," +
|
|
"wlyy_patient_device d," +
|
|
"wlyy_patient_device d," +
|
|
"wlyy_patient p " +
|
|
"wlyy_patient p " +
|
|
"WHERE s.patient=d.`user` ";
|
|
|
|
|
|
"WHERE s.patient=d.`user` ";*/
|
|
|
|
String sql = "SELECT d.id as id,d.device_id as deviceId,d.user as user,p.name as userName,d.category_code as categoryCode,d.device_name as deviceName," +
|
|
|
|
"d.device_sn as deviceSn,d.sim as sim,d.user_type as userType,p.mobile," +
|
|
|
|
"CONCAT(LEFT (p.idcard,6),'**********',RIGHT (p.idcard,2)) userIdcard,d.czrq as czrq " +
|
|
|
|
"FROM wlyy_patient_device d,wlyy_patient p " +
|
|
|
|
"WHERE d.`user`=p.CODE ";
|
|
if(StringUtils.isNotBlank(hospitalName)){
|
|
if(StringUtils.isNotBlank(hospitalName)){
|
|
sql = sql + "AND s.hospital_name like '%"+hospitalName+"%' ";
|
|
sql = sql + "AND s.hospital_name like '%"+hospitalName+"%' ";
|
|
}
|
|
}
|
|
@ -181,10 +186,10 @@ public class WlyyPatientDeviceService extends BaseJpaService<WlyyPatientDevice,W
|
|
sql = sql + "AND d.device_name like '%"+deviceName+"%' ";
|
|
sql = sql + "AND d.device_name like '%"+deviceName+"%' ";
|
|
}
|
|
}
|
|
|
|
|
|
sql = sql +"AND s.`status`> 0 AND s.patient=p.CODE " +
|
|
|
|
"ORDER BY czrq DESC ";
|
|
|
|
|
|
/* sql = sql +"AND s.`status`> 0 AND s.patient=p.CODE " +
|
|
|
|
"ORDER BY czrq DESC ";*/
|
|
|
|
|
|
sql = sql+" limit " + (page-1)*pageSize+", "+pageSize;
|
|
|
|
|
|
sql = sql+"ORDER BY czrq DESC limit " + (page-1)*pageSize+", "+pageSize;
|
|
System.out.println("list:"+sql);
|
|
System.out.println("list:"+sql);
|
|
list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(WlyyPatientDeviceVO.class));
|
|
list = jdbcTemplate.query(sql,new BeanPropertyRowMapper(WlyyPatientDeviceVO.class));
|
|
return list ;
|
|
return list ;
|