Selaa lähdekoodia

解绑设备标识

Shi Kejing 4 vuotta sitten
vanhempi
commit
24382f66d6

+ 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("设备未被绑定!");