Explorar o código

海沧bug修复及眼科bug修复

wangzhinan %!s(int64=2) %!d(string=hai) anos
pai
achega
55dd92ba4f

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

@ -56,6 +56,7 @@ import org.apache.commons.lang3.StringUtils;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.data.domain.Page;
import org.springframework.data.domain.PageRequest;
import org.springframework.jdbc.core.JdbcTemplate;
@ -154,6 +155,9 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
    private BaseServiceNewsService baseServiceNewsService;
    @Autowired
    private DeviceDataPushLogUtil deviceDataPushLogUtil;
    @Value("${wechat.id}")
    private String wxId;
    private Logger logger = LoggerFactory.getLogger(SecurityMonitoringOrderService.class);
@ -2573,13 +2577,24 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            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));
                JSONObject monitorUrl = new JSONObject();
                if (wxId.equalsIgnoreCase("hz_kx_wx")) {
                    monitorUrl = ysDeviceServicel.getKxDeviceLiveAddress(patient, deviceDo.getDeviceSn(), 1, null);
                    jsonObject.put("monitorInfoStatus", monitorUrl.getIntValue(ResponseContant.resultFlag));
                    if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail) {
                        jsonObject.put("monitorInfo", monitorUrl.getString(ResponseContant.resultMsg));
                    } else {
                        jsonObject.put("monitorInfo", monitorUrl.getJSONObject(ResponseContant.resultMsg));
                    }
                }else {
                    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"));