Browse Source

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

liubing 3 years ago
parent
commit
7ef05807de

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

@ -413,18 +413,23 @@ public class YsDeviceService {
                return result;
            }
            tmp.sort(Comparator.comparing(obj -> Long.parseLong(((LinkedHashMap) obj).get("startTime").toString())));
            LinkedHashMap mergeTmpirst = null;
            LinkedHashMap tmpFirst = tmp.getObject(0,LinkedHashMap.class);
            Long startTimeStr1 =  Long.parseLong(tmpFirst.get("startTime").toString()) ;
            long current = System.currentTimeMillis();
            long toDayZero = current/(1000*3600*24)*(1000*3600*24) - TimeZone.getDefault().getRawOffset();
            if (toDayZero-startTimeStr1>0){//去除开始时间不为当天是时间段
                tmp.remove(0);
            }
            if (null==tmp||0==tmp.size()){
                result.put(ResponseContant.resultFlag,ResponseContant.fail);
                result.put(ResponseContant.resultMsg,"未获取到当天录像信息");
                return result;
            }
            LinkedHashMap mergeTmp = null;
            Iterator<Object> arrIterator = tmp.iterator();
            while (arrIterator.hasNext()) {
                LinkedHashMap mapTmp = (LinkedHashMap) arrIterator.next();
                Long startTimeStr =  Long.parseLong(mapTmp.get("startTime").toString()) ;
                long current = System.currentTimeMillis();
                long toDayZero = current/(1000*3600*24)*(1000*3600*24) - TimeZone.getDefault().getRawOffset();
                if (toDayZero-startTimeStr>0){//去除开始时间不为当天是时间段
                    arrIterator.remove();
                    continue;
                }
                Long endTimeStr = Long.parseLong(mapTmp.get("endTime").toString()) ;
                String startTimeDate = DateUtil.dateToStrLong(new Date(startTimeStr));
                String endTimeDate = DateUtil.dateToStrLong(new Date(endTimeStr));

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

@ -314,7 +314,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
            try {
                JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(orderDO.getPatient(),devicePatientDeviceDos.get(0).getDeviceSn(),1,null);
                Map<String,Object> map = new HashMap<>();
                map.put("monitorInfoStatus",result.getIntValue(ResponseContant.resultFlag));
                map.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){
                    map.put("monitorInfo",monitorUrl.getString(ResponseContant.resultMsg));
                }
@ -1161,7 +1161,7 @@ public class SecurityMonitoringOrderService extends BaseJpaService<SecurityMonit
        else{
            try {
                JSONObject monitorUrl = ysDeviceServicel.getDeviceLiveAddress(patient,devicePatientDeviceDos.get(0).getDeviceSn(),1,null);
                result.put("monitorInfoStatus",result.getIntValue(ResponseContant.resultFlag));
                result.put("monitorInfoStatus",monitorUrl.getIntValue(ResponseContant.resultFlag));
                if (monitorUrl.getIntValue(ResponseContant.resultFlag) == ResponseContant.fail){
                    result.put("monitorInfo",monitorUrl.getString(ResponseContant.resultMsg));
                }