ycl-pojo/src/main/java/com/ycl/platform/domain/result/UY/MonitorQualifyResult.java
@@ -108,31 +108,31 @@ public static MonitorQualifyResultVO getVO(MonitorQualifyResult result) { MonitorQualifyResultVO vo = new MonitorQualifyResultVO(); vo.setCivilCode(result.getCivilCode().getShowValue()); vo.setCivilCodeError(result.getCivilCode().getError()); vo.setIp(result.getIp().getShowValue()); vo.setIpError(result.getIp().getError()); vo.setIntegratedDevice(result.getIntegrated_device().getShowValue()); vo.setIntegratedDeviceError(result.getIntegrated_device().getError()); vo.setJkdwlx(result.getJkdwlx().getShowValue()); vo.setJkdwlxError(result.getJkdwlx().getError()); vo.setLatitude(result.getLatitude().getShowValue()); vo.setLatitudeError(result.getLatitude().getError()); vo.setLongitude(result.getLongitude().getShowValue()); vo.setLongitudeError(result.getLongitude().getError()); vo.setMacdz(result.getMacdz().getShowValue()); vo.setMacdzError(result.getMacdz().getError()); vo.setName(result.getName().getShowValue()); vo.setNameError(result.getName().getError()); vo.setSbzt(result.getSbzt().getShowValue()); vo.setSbztError(result.getSbzt().getError()); vo.setSerialNumber(result.getSerialNumber().getShowValue()); vo.setSerialNumberError(result.getSerialNumber().getError()); vo.setSxjcjqy(result.getSxjcjqy().getShowValue()); vo.setSxjcjqyError(result.getSxjcjqy().getError()); vo.setSxjgnlx(result.getSxjgnlx().getShowValue()); vo.setSxjgnlxError(result.getSxjgnlx().getError()); if (result.getNewDevice()) { vo.setCivilCode(result.getCivilCode()!=null?result.getCivilCode().getShowValue():""); vo.setCivilCodeError(result.getCivilCode()!=null?result.getCivilCode().getError():Boolean.FALSE); vo.setIp(result.getIp()!=null?result.getIp().getShowValue():""); vo.setIpError(result.getIp()!=null?result.getIp().getError():Boolean.FALSE); vo.setIntegratedDevice(result.getIntegrated_device()!=null?result.getIntegrated_device().getShowValue():""); vo.setIntegratedDeviceError(result.getIntegrated_device()!=null?result.getIntegrated_device().getError():Boolean.FALSE); vo.setJkdwlx(result.getJkdwlx()!=null?result.getJkdwlx().getShowValue():""); vo.setJkdwlxError(result.getJkdwlx()!=null?result.getJkdwlx().getError():Boolean.FALSE); vo.setLatitude(result.getLatitude()!=null?result.getLatitude().getShowValue():""); vo.setLatitudeError(result.getLatitude()!=null?result.getLatitude().getError():Boolean.FALSE); vo.setLongitude(result.getLongitude()!=null?result.getLongitude().getShowValue():""); vo.setLongitudeError(result.getLongitude()!=null?result.getLongitude().getError():Boolean.FALSE); vo.setMacdz(result.getMacdz()!=null?result.getMacdz().getShowValue():""); vo.setMacdzError(result.getMacdz()!=null?result.getMacdz().getError():Boolean.FALSE); vo.setName(result.getName()!=null?result.getName().getShowValue():""); vo.setNameError(result.getName()!=null?result.getName().getError():Boolean.FALSE); vo.setSbzt(result.getSbzt()!=null?result.getSbzt().getShowValue():""); vo.setSbztError(result.getSbzt()!=null?result.getSbzt().getError():Boolean.FALSE); vo.setSerialNumber(result.getSerialNumber()!=null?result.getSerialNumber().getShowValue():""); vo.setSerialNumberError(result.getSerialNumber()!=null?result.getSerialNumber().getError():Boolean.FALSE); vo.setSxjcjqy(result.getSxjcjqy()!=null?result.getSxjcjqy().getShowValue():""); vo.setSxjcjqyError(result.getSxjcjqy()!=null?result.getSxjcjqy().getError():Boolean.FALSE); vo.setSxjgnlx(result.getSxjgnlx()!=null?result.getSxjgnlx().getShowValue():""); vo.setSxjgnlxError(result.getSxjgnlx()!=null?result.getSxjgnlx().getError():Boolean.FALSE); if (result.getNewDevice()!=null && result.getNewDevice()) { vo.setNewDevice("是"); } else { vo.setNewDevice("否"); ycl-server/src/main/java/com/ycl/calculate/CarDataIntegrityCalculation.java
@@ -81,7 +81,7 @@ //重点点位为六项属性完整 if (result.getImportantTag() != null && result.getImportantTag()) { stats.importantTotalSites++; if (result.getNoIntegrityPercent() <= 0.1) { if (result.getNoIntegrityPercent()!=null && result.getNoIntegrityPercent() <= 0.1) { stats.importantIntegritySites++; } } ycl-server/src/main/java/com/ycl/platform/service/impl/CheckScoreServiceImpl.java
@@ -553,7 +553,7 @@ } //填充各个区县数据 for (CheckScore checkScore : dashboard) { Map<String, Object> map = new HashMap<>(); Map<String, Object> map = resultMap.get(checkScore.getDeptName()); if (CheckConstants.Rule_Category_Video.equals(checkScore.getExamineCategory())) { map.put("video", checkScore.getScore().setScale(1, RoundingMode.HALF_UP)); } else if (CheckConstants.Rule_Category_Car.equals(checkScore.getExamineCategory())) { ycl-server/src/main/java/com/ycl/platform/service/impl/TMonitorServiceImpl.java
@@ -780,7 +780,7 @@ MongoDatabase database = mongoTemplate.getDb(); MongoCollection<Document> collection = database.getCollection("uy_record_meta_d_sum"); Integer examineTag = monitorQuery.getExamineTag(); Document matchConditions = new Document("mongoCreateTime", new Document("$gte", startDate).append("$lte", endDate)); Document matchConditions = new Document("statTime", new Document("$gte", startDate).append("$lte", endDate)); // 根据examineTag的值动态添加额外的条件 if (examineTag != null && examineTag.equals(1)) { matchConditions.append("provinceTag", true); @@ -790,7 +790,7 @@ // 构建聚合管道 List<Document> pipeline = Arrays.asList( new Document("$match", matchConditions), new Document("$group", new Document("_id", "$mongoCreateTime") new Document("$group", new Document("_id", "$statTime") .append("normalCount", new Document("$sum", new Document("$cond", Arrays.asList( new Document("$eq", Arrays.asList("$recordStatus", 1)), @@ -976,7 +976,6 @@ results.add(homecarVO); } //TODO:在线修改,需要把检测海康优云检测的结果存入mongo,mongo查点位在线 MongoCollection<Document> onlineCollection = database.getCollection("t_monitor_online"); // 构建基本的$match条件 List<Document> onlineMatch = new ArrayList<>(); ycl-server/src/main/java/com/ycl/platform/service/impl/UYErrorTypeCheckServiceImpl.java
@@ -183,7 +183,7 @@ // } long checkTime = item.getCheckTime().getTime(); long osdTime = item.getSetTime().getTime(); Long timeDiff = (checkTime - osdTime) / 1000; Long timeDiff = Math.abs((checkTime - osdTime) / 1000); ywThresholdService.check(YwThreadConstants.Video_DiffTime, timeDiff, item.getDeviceNo(), ywThresholdMap, workOrder, CompareType.MORE_THAN_EQ, ErrorType.CLOCK_SKEW.getValue()); return workOrder; }).collect(Collectors.toList()); ycl-server/src/main/java/com/ycl/task/OsdTask.java
@@ -160,7 +160,7 @@ if (osdResult.getCheckTime() != null && osdResult.getOsdTime() != null) { long checkTime = osdResult.getCheckTime().getTime(); long osdTime = osdResult.getOsdTime().getTime(); long timeDiff = (checkTime - osdTime) / 1000; long timeDiff = Math.abs((checkTime - osdTime) / 1000); if (timeDiff <= 60) { osdCheckResult.setOsdTimeCorrect(ApiConstants.OSD_Correct); } else { ycl-server/src/main/java/com/ycl/task/VideoTask.java
@@ -168,7 +168,7 @@ imageResourceSecurities.add(imageResourceSecurity); //获取最近一次数据手动打分 ImageResourceSecurity latest = imageResourceSecurityMapper.getLatest(checkIndexVideo.getDeptId(),new Date()); imageResourceSecurity.setBoundaryIntegrity(latest.getBoundaryIntegrity()); imageResourceSecurity.setBoundaryIntegrity(latest ==null?BigDecimal.ONE:latest.getBoundaryIntegrity()); // 更新指标数据 checkIndexVideo.setImageResourceSecurity( imageResourceSecurity.getPlatformOnline() ycl-server/src/main/java/com/ycl/task/WorkOrderImgTask.java
@@ -48,13 +48,13 @@ private final DeviceInfoMapper deviceInfoMapper; private final WorkOrderCheckImgMapper workOrderCheckImgMapper; // private static final ExecutorService executorService = new ThreadPoolExecutor(8, // 10, // 5000, // TimeUnit.SECONDS, // new ArrayBlockingQueue<>(1024), // new ThreadPoolExecutor.CallerRunsPolicy() // ); private static final ExecutorService executorService = new ThreadPoolExecutor(16, 128, 5000, TimeUnit.SECONDS, new ArrayBlockingQueue<>(1000), new ThreadPoolExecutor.CallerRunsPolicy() ); public void run() throws FFmpegFrameGrabber.Exception { // 查出最近一周的故障的设备 @@ -76,22 +76,24 @@ return; } for (DeviceInfoVO deviceInfo : deviceList) { // 国标设备的编码就是取视频流的设备编码,国标设备就一个。国标设备的每一个通道代表一个摄像头,也就是设备id是取流的通道id String frameImg = null; try { frameImg = workOrderService.getFrameImgByDevice(gbDevices.get(0).getDeviceId(), deviceInfo.getDeviceId(), deviceInfo.getWorkOrderNo()); } catch (Exception e) { e.printStackTrace(); continue; } if (StringUtils.hasText(frameImg)) { WorkOrderCheckImg img = new WorkOrderCheckImg(); img.setWorkOrderNo(deviceInfo.getWorkOrderNo()); img.setImgUrl(frameImg); img.setCreateTime(new Date()); workOrderCheckImgMapper.insert(img); } executorService.submit(() -> { // 国标设备的编码就是取视频流的设备编码,国标设备就一个。国标设备的每一个通道代表一个摄像头,也就是设备id是取流的通道id String frameImg = null; try { frameImg = workOrderService.getFrameImgByDevice(gbDevices.get(0).getDeviceId(), deviceInfo.getDeviceId(), deviceInfo.getWorkOrderNo()); } catch (Exception e) { e.printStackTrace(); } if (StringUtils.hasText(frameImg)) { WorkOrderCheckImg img = new WorkOrderCheckImg(); img.setWorkOrderNo(deviceInfo.getWorkOrderNo()); img.setImgUrl(frameImg); img.setCreateTime(new Date()); workOrderCheckImgMapper.insert(img); } }); } log.info("工单检测图片结束"); } } ycl-server/src/main/resources/mapper/zgyw/TMonitorMapper.xml
@@ -111,7 +111,7 @@ left join ( WITH cte AS ( SELECT *,row_number() OVER(PARTITION BY serial_number ORDER BY create_time DESC) rn FROM t_work_order WHERE deleted = 0 AND status = 'AUDITING_SUCCESS' WHERE deleted = 0 AND status != 'AUDITING_SUCCESS' ) SELECT * FROM cte WHERE rn=1 ) w on m.serial_number = w.serial_number and w.deleted = 0 left join t_yw_unit u on p.unit_id = u.id and u.deleted = 0 @@ -141,9 +141,9 @@ #{cameraCaptureArea} </if> <if test="time !=null and time !=''">and TIMESTAMPDIFF(DAY, p.recovery_time, NOW()) <![CDATA[<=]]> #{time}</if> <if test="onState != null and onState = 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="onState != null and onState = -1">and (p.online = #{onState} or p.ping_online = #{onState})</if> <if test="onState != null and onState = 0">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="onState != null and onState == 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="onState != null and onState == -1">and (p.online = #{onState} or p.ping_online = #{onState})</if> <if test="onState != null and onState == 0">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="civilCode != null and civilCode != ''">and civil_code = #{civilCode}</if> <if test="integratedDevice != null ">and integrated_device = #{integratedDevice}</if> <if test="cameraBrand != null ">and camera_brand = #{cameraBrand}</if> @@ -197,9 +197,9 @@ <if test="cameraFunType != null and cameraFunType != ''">and camera_fun_type like concat('%', #{cameraFunType}, '%') </if> <if test="onState != null and onState = 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="onState != null and onState = -1">and (p.online = #{onState} or p.ping_online = #{onState})</if> <if test="onState != null and onState = 0">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="onState != null and onState == 1">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="onState != null and onState == -1">and (p.online = #{onState} or p.ping_online = #{onState})</if> <if test="onState != null and onState == 0">and (p.online = #{onState} and p.ping_online = #{onState})</if> <if test="civilCode != null and civilCode != ''">and civil_code = #{civilCode}</if> </where> </select> ycl-server/src/main/resources/mapper/zgyw/WorkOrderMapper.xml
@@ -211,10 +211,10 @@ </select> <select id="getOfflineWorkOrder" resultType="java.lang.String"> select tm.ip FROM t_work_order wo INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number where (EXISTS ( FROM t_work_order wo INNER JOIN t_monitor tm ON wo.serial_number = tm.serial_number where wo.status != 'AUDITING_SUCCESS' and wo.deleted = 0 AND (EXISTS( SELECT 1 FROM t_work_order_error_type twoet WHERE twoet.work_order_no = wo.work_order_no @@ -331,7 +331,7 @@ FROM t_work_order wo WHERE wo.status = 'YW_HANDLE' (wo.status = 'YW_HANDLE' or wo.status ='DISTRIBUTED' ) AND wo.deleted = 0 </select>