|
@ -777,13 +777,13 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
|
|
}
|
|
}
|
|
|
|
|
|
public List<PatientDevice> findByDeviceSnAndCategory(String deviceSn, String categoryCode){
|
|
public List<PatientDevice> findByDeviceSnAndCategory(String deviceSn, String categoryCode){
|
|
String sqlFind = "select * from wlyy.wlyy_patient_device where device_sn="+deviceSn +" and category_code="+categoryCode;
|
|
|
|
|
|
String sqlFind = "select * from wlyy.wlyy_patient_device where device_sn='"+deviceSn +"' and category_code="+categoryCode;
|
|
List<PatientDevice> patientDevices = jdbcTempalte.query(sqlFind , new BeanPropertyRowMapper<>(PatientDevice.class));
|
|
List<PatientDevice> patientDevices = jdbcTempalte.query(sqlFind , new BeanPropertyRowMapper<>(PatientDevice.class));
|
|
return patientDevices;
|
|
return patientDevices;
|
|
}
|
|
}
|
|
|
|
|
|
public void deleteDevices(String deviceSn, String type) {
|
|
public void deleteDevices(String deviceSn, String type) {
|
|
String sqlFind = "select * from wlyy.wlyy_patient_device where device_sn="+deviceSn +" and category_code="+type;
|
|
|
|
|
|
String sqlFind = "select * from wlyy.wlyy_patient_device where device_sn='"+deviceSn +"' and category_code="+type;
|
|
List<PatientDevice> patientDevices = jdbcTempalte.query(sqlFind , new BeanPropertyRowMapper<>(PatientDevice.class));
|
|
List<PatientDevice> patientDevices = jdbcTempalte.query(sqlFind , new BeanPropertyRowMapper<>(PatientDevice.class));
|
|
if (patientDevices == null || patientDevices.size() == 0) {
|
|
if (patientDevices == null || patientDevices.size() == 0) {
|
|
throw new RuntimeException("设备未被绑定!");
|
|
throw new RuntimeException("设备未被绑定!");
|