Kaynağa Gözat

Merge branch 'dev' of liubing/wlyy2.0 into dev

liubing 3 yıl önce
ebeveyn
işleme
ebceb90b21

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

@ -1049,6 +1049,17 @@ public class PatientDeviceService extends BaseJpaService<DevicePatientDevice, Pa
                    devInfoObj.put("routes", locations);
                    break;
                case "7"://报警器 紧急工单
                    com.alibaba.fastjson.JSONObject response = getAqgDeviceInfo2(deviceSn);
                    //电量
                    if (response.containsKey("remaining_power") && response.get("remaining_power") != null) {
                        devInfoObj.put("remaining_power", response.get("remaining_power"));
                    }
                    //在线状态实时获取
                    if (!response.getBoolean("online")) {//设备在线状态
                        devInfoObj.put("contactStatus",0);
                    } else {
                        devInfoObj.put("contactStatus",1);
                    }
                    break;
                case "12"://监控 视频地址
                    com.alibaba.fastjson.JSONObject tmp = ysDeviceService.getDeviceLiveAddress(patient, deviceSn, 1, null);

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

@ -1924,8 +1924,10 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                        Double lat = locationTmp.getJSONArray("coordinates").getDouble(1);
                        if (!response.getBoolean("online")) {//设备离线 取居民表定位
                            result.put("X1online", false);
                            result.put("contactStatus", 0);
                        } else {
                            result.put("X1online", true);
                            result.put("contactStatus", 1);
                        }
                        JSONObject tmp = gpsUtil.gcj02_To_Bd09(lat, lon);
                        tmp.put("city", response.getString("last_city"));
@ -2113,6 +2115,14 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                        sleepInfo.put("sleepPlan", false);
                    }
                    sleepInfo.put("online", tmp.getBooleanValue("online"));
                    if(tmp.getBooleanValue("online")){
                        sleepInfo.put("contactStatus", 1);
                    }
                    else {
                        sleepInfo.put("contactStatus", 0);
                    }
                    if (tmp.getBooleanValue("onbed")) {
                        sleepInfo.put("bedStatus", 1);
                        sleepInfo.put("heartRate", tmp.getString("heartrate"));