瀏覽代碼

解绑设备标识

Shi Kejing 4 年之前
父節點
當前提交
24382f66d6
共有 1 個文件被更改,包括 2 次插入2 次删除
  1. 2 2
      svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java

+ 2 - 2
svr/svr-iot/src/main/java/com/yihu/iot/service/device/IotPatientDeviceService.java

@ -777,13 +777,13 @@ public class IotPatientDeviceService extends BaseJpaService<IotPatientDeviceDO,
    }
    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));
        return patientDevices;
    }
    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));
        if (patientDevices == null || patientDevices.size() == 0) {
            throw new RuntimeException("设备未被绑定!");