wsl 2 yıl önce
ebeveyn
işleme
7768fa2ff9

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

@ -1625,7 +1625,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        result.put("deviceSn", deviceSn);
        result.put("emeAssistance", false);
        result.put("monitorInfo", null);
        String sql = " select dict.code,count(ord.id) total from base_system_dict_entry dict LEFT JOIN base_security_monitoring_order ord " +
        String sql = " select dict.code,ord.device_sn,count(ord.id) total from base_system_dict_entry dict LEFT JOIN base_security_monitoring_order ord " +
                " on dict.code = ord.topic_item COLLATE utf8_unicode_ci and ord.status=" + SecurityMonitoringOrderDO.Status.apply.getType() + " and ord.patient='" + patient + "' where dict.dict_code='service_item' " +
                "and dict.remark='security' GROUP BY dict.code ";
        List<Map<String, Object>> sqlResult = jdbcTemplate.queryForList(sql);
@ -1660,6 +1660,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                        result.put("fall", null);
                    }else {
                        Integer count = Integer.parseInt(tmp.get("total").toString());
                        result.put("ordDeviceSN",tmp.get("device_sn").toString());
                        if (count > 0) {
                            result.put("fall", true);
                        } else {
@ -2352,7 +2353,26 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        }
        try {
            DevicePatientDevice deviceDo = devicePatientDeviceDos.get(0);
            JSONArray jsonArray = new JSONArray();
            for (DevicePatientDevice deviceDo : devicePatientDeviceDos) {
                JSONObject jsonObject = new JSONObject();
                JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient, deviceDo.getDeviceSn(), 1, null);
                jsonObject.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                jsonObject.put("patientAddress",deviceDo.getSosAddress());
                if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                    jsonObject.put("monitorInfo", monitorUrl.getString(ResponseContant.resultMsg));
                } else {
                    jsonObject.put("monitorInfo", monitorUrl.getJSONObject(ResponseContant.resultMsg));
                }
                if (deviceDo.getDeviceSn().equals(result.get("ordDeviceSN"))) {
                    jsonObject.put("fall",result.get("fall"));
                }else {
                    jsonObject.put("fall",false);
                }
                jsonArray.add(jsonObject);
            }
            result.put("videoMointirInfo",jsonArray);
            /*DevicePatientDevice deviceDo = devicePatientDeviceDos.get(0);
            JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient, deviceDo.getDeviceSn(), 1, null);
            result.put("monitorInfoStatus", monitorUrl.getIntValue(ResponseContant.resultFlag));
            result.put("patientAddress", deviceDo.getSosAddress());
@ -2360,7 +2380,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
                result.put("monitorInfo", monitorUrl.getString(ResponseContant.resultMsg));
            } else {
                result.put("monitorInfo", monitorUrl.getJSONObject(ResponseContant.resultMsg));
            }
            }*/
        } catch (Exception e) {
            e.printStackTrace();
        }