Shi Kejing 3 лет назад
Родитель
Сommit
fa08549f4d

+ 12 - 0
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/device/PatientDeviceService.java

@ -291,6 +291,9 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                devicePatientDevice.setIotDeviceSn(iotDeviceSn);
            }
            if ("16".equals(type)) {   //判断设备是不是拐杖,如果是拐杖,需要保存围栏地址
                devicePatientDevice.setSafeAreaGz(safeAreaGz);
            }
@ -1261,6 +1264,15 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                                                                 String time_begin,String time_end,String safe_area ,String clear) throws Exception{
        List<DevicePatientDevice> devices = patientDeviceDao.findByDeviceSn(deviceSn);
        String url ="";
        if ("16".equals(devices.get(0).getCategoryCode())) {
            DevicePatientDevice patientDevice = devices.get(0);
            if (StringUtils.isNotBlank(safe_area)){
                patientDevice.setSafeAreaGz(safe_area);
                patientDeviceDao.save(patientDevice);
            }
        }
        if ("4".equals(devices.get(0).getCategoryCode())){//手表
            Device device = deviceDao.findOne(devices.get(0).getDeviceId());
            if (device!=null){