瀏覽代碼

代码修改

liubing 3 年之前
父節點
當前提交
9916801b63

+ 16 - 15
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/security/SecurityMonitoringOrderService.java

@ -413,24 +413,25 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            map.put("inFenceName","疑似超出安全区域");
            emergencyOrderVO.setInformation(map);
        }
        if(4==orderDO.getOrderSource()){//报警器
        if(4==orderDO.getOrderSource()){//监控器
            List<DevicePatientDevice> devicePatientDeviceDos = patientDeviceDao.findByUserAndCategoryCode(orderDO.getPatient(),"12");
            if (devicePatientDeviceDos.size()==0){
            }
            try {
                JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(orderDO.getPatient(),devicePatientDeviceDos.get(0).getDeviceSn(),1,null);
                Map<String,Object> map = new HashMap<>();
                map.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                map.put("patientAddress",devicePatientDeviceDos.get(0).getSosAddress());
                if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){
                    map.put("monitorInfo",monitorUrl.getString(ResponseContant.resultMsg));
                }
                else {
                    map.put("monitorInfo",monitorUrl.getJSONObject(ResponseContant.resultMsg));
            }else {
                try {
                    JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(orderDO.getPatient(),devicePatientDeviceDos.get(0).getDeviceSn(),1,null);
                    Map<String,Object> map = new HashMap<>();
                    map.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                    map.put("patientAddress",devicePatientDeviceDos.get(0).getSosAddress());
                    if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){
                        map.put("monitorInfo",monitorUrl.getString(ResponseContant.resultMsg));
                    }
                    else {
                        map.put("monitorInfo",monitorUrl.getJSONObject(ResponseContant.resultMsg));
                    }
                    emergencyOrderVO.setInformation(map);
                }catch (Exception e){
                    e.printStackTrace();
                }
                emergencyOrderVO.setInformation(map);
            }catch (Exception e){
                e.printStackTrace();
            }
        }
        if (5==orderDO.getOrderSource()){//睡眠带工单