| | |
| | | public final static String Area = "区县(不可修改)"; |
| | | public final static String Unit = "运维单位(不可修改)"; |
| | | public final static String IP = "点位IP(可修改)"; |
| | | public final static String Province_Tag = "是否省厅标签(可修改)"; |
| | | public final static String Province_Tag_Video = "是否省厅视频标签(可修改)"; |
| | | public final static String Province_Tag_Car = "是否省厅车辆标签(可修改)"; |
| | | public final static String Province_Tag_Face = "是否省厅人脸标签(可修改)"; |
| | | public final static String Impotrant_Command_Image = "是否重点指挥图像(可修改)"; |
| | | public final static String Dept_Tag = "是否部级标签(可修改)"; |
| | | |
| | | // 可以将这些已知的键放入一个集合中,方便检查 |
| | | public static final Set<String> KNOWN_KEYS = new HashSet<>(Arrays.asList( |
| | | ID,Point_Name, IP, Serial_Number,Area, Unit,Province_Tag, Impotrant_Command_Image, Dept_Tag |
| | | ID,Point_Name, IP, Serial_Number,Area, Unit,Province_Tag_Video,Province_Tag_Car,Province_Tag_Face, Impotrant_Command_Image, Dept_Tag |
| | | )); |
| | | } |
| | |
| | | @TableField("important_tag") |
| | | private Boolean importantTag; |
| | | |
| | | @ApiModelProperty("省厅点位标签") |
| | | @TableField("province_tag") |
| | | private Boolean provinceTag; |
| | | @ApiModelProperty("省厅视频点位标签") |
| | | @TableField("province_tag_video") |
| | | private Boolean provinceTagVideo; |
| | | |
| | | @ApiModelProperty("省厅车辆点位标签") |
| | | @TableField("province_tag_car") |
| | | private Boolean provinceTagCar; |
| | | |
| | | @ApiModelProperty("省厅人脸点位标签") |
| | | @TableField("province_tag_face") |
| | | private Boolean provinceTagFace; |
| | | |
| | | @ApiModelProperty("重点指挥图像标签") |
| | | @TableField("important_command_image_tag") |
| | |
| | | private Date endTime; |
| | | |
| | | @ExcelIgnore |
| | | private Boolean provinceTag; |
| | | private Boolean provinceTagVideo; |
| | | |
| | | @ExcelIgnore |
| | | private Boolean provinceTagCar; |
| | | |
| | | @ExcelIgnore |
| | | private Boolean provinceTagFace; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("是否省厅标签(可修改)") |
| | | private String provinceTagString; |
| | | @ExcelProperty("是否省厅视频标签(可修改)") |
| | | private String provinceTagVideoString; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("是否省厅车辆标签(可修改)") |
| | | private String provinceTagCarString; |
| | | |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("是否省厅人脸标签(可修改)") |
| | | private String provinceTagFaceString; |
| | | @ColumnWidth(20) |
| | | @ExcelProperty("是否重点指挥图像(可修改)") |
| | | private String importantCommandImageTagString; |
| | | |
| | |
| | | @ApiModelProperty("监管部门") |
| | | private Long deptId; |
| | | |
| | | @ApiModelProperty("省厅点位标签") |
| | | private Boolean provinceTag; |
| | | @ApiModelProperty("省厅视频点位标签") |
| | | private Boolean provinceTagVideo; |
| | | @ApiModelProperty("省厅车辆点位标签") |
| | | private Boolean provinceTagCar; |
| | | @ApiModelProperty("省厅人脸点位标签") |
| | | private Boolean provinceTagFace; |
| | | |
| | | @ApiModelProperty("重点点位标签") |
| | | private Boolean importantTag; |
| | |
| | | /** |
| | | * 省厅 |
| | | */ |
| | | private Boolean provinceTag; |
| | | private Boolean provinceTagVideo; |
| | | private Boolean provinceTagCar; |
| | | private Boolean provinceTagFace; |
| | | |
| | | /** |
| | | * 部级 |
| | |
| | | |
| | | private Long deptId; |
| | | private String deptName; |
| | | //请求参数 |
| | | private Boolean provinceTag; |
| | | private Boolean provinceTagVideo; |
| | | private Boolean provinceTagCar; |
| | | private Boolean provinceTagFace; |
| | | private Boolean deptTag; |
| | | private String area; |
| | | private String error; |
| | |
| | | private Boolean importantTag; |
| | | |
| | | /** 省厅点位标签 */ |
| | | private Boolean provinceTag; |
| | | private Boolean provinceTagVideo; |
| | | private Boolean provinceTagCar; |
| | | private Boolean provinceTagFace; |
| | | |
| | | /** 重点指挥图像标签 */ |
| | | private Boolean importantCommandImageTag; |
| | |
| | | * @param dataList 数据 |
| | | * @return |
| | | */ |
| | | <T extends BaseResult> void setDeviceTagByGB(List<T> dataList); |
| | | <T extends BaseResult> void setDeviceTagByGB(List<T> dataList,Short category); |
| | | |
| | | /** |
| | | * 根据国标设置是否新点位 |
| | |
| | | List<String> willAddSerialNumber = waitAddList.stream().map(WorkOrder::getSerialNumber).collect(Collectors.toList()); |
| | | //只生成考核设备、且有运维单位的工单 |
| | | List<YwPoint> pointList = new LambdaQueryChainWrapper<>(ywPointService.getBaseMapper()) |
| | | .select(YwPoint::getUnitId, YwPoint::getSerialNumber, YwPoint::getImportantTag, YwPoint::getImportantTag, YwPoint::getProvinceTag, YwPoint::getImportantCommandImageTag) |
| | | .select(YwPoint::getUnitId, YwPoint::getSerialNumber, YwPoint::getImportantTag, YwPoint::getImportantTag, YwPoint::getImportantCommandImageTag) |
| | | .in(YwPoint::getSerialNumber, willAddSerialNumber) |
| | | .eq(YwPoint::getExamineStatus, Boolean.TRUE) |
| | | .isNotNull(YwPoint::getUnitId) |
| | |
| | | import com.ycl.utils.SecurityUtils; |
| | | import com.ycl.utils.poi.EasyExcelImportUtils; |
| | | import com.ycl.utils.uuid.IdUtils; |
| | | import constant.CheckConstants; |
| | | import constant.PointHeaderConstant; |
| | | import jakarta.servlet.http.HttpServletResponse; |
| | | import lombok.RequiredArgsConstructor; |
| | |
| | | headers.add(PointHeaderConstant.IP); |
| | | headers.add(PointHeaderConstant.Area); |
| | | headers.add(PointHeaderConstant.Unit); |
| | | headers.add(PointHeaderConstant.Province_Tag); |
| | | headers.add(PointHeaderConstant.Province_Tag_Video); |
| | | headers.add(PointHeaderConstant.Province_Tag_Car); |
| | | headers.add(PointHeaderConstant.Province_Tag_Face); |
| | | headers.add(PointHeaderConstant.Impotrant_Command_Image); |
| | | headers.add(PointHeaderConstant.Dept_Tag); |
| | | List<String> headersList = new LinkedList<>(); |
| | |
| | | list.add(export.getPointIP()); |
| | | list.add(export.getArea()); |
| | | list.add(export.getUnitName()); |
| | | list.add(export.getProvinceTagString()); |
| | | list.add(export.getProvinceTagVideoString()); |
| | | list.add(export.getProvinceTagCarString()); |
| | | list.add(export.getProvinceTagFaceString()); |
| | | list.add(export.getImportantCommandImageTagString()); |
| | | list.add(export.getDeptTagString()); |
| | | for (String header : headersList) { |
| | |
| | | pointExport.setPointName(map.get(PointHeaderConstant.Point_Name)); |
| | | pointExport.setPointIP(map.get(PointHeaderConstant.IP)); |
| | | pointExport.setSerialNumber(map.get(PointHeaderConstant.Serial_Number)); |
| | | pointExport.setProvinceTag("是".equals(map.get(PointHeaderConstant.Province_Tag))); |
| | | pointExport.setProvinceTagVideo("是".equals(map.get(PointHeaderConstant.Province_Tag_Video))); |
| | | pointExport.setProvinceTagCar("是".equals(map.get(PointHeaderConstant.Province_Tag_Car))); |
| | | pointExport.setProvinceTagFace("是".equals(map.get(PointHeaderConstant.Province_Tag_Face))); |
| | | pointExport.setImportantCommandImageTag("是".equals(map.get(PointHeaderConstant.Impotrant_Command_Image))); |
| | | pointExport.setDeptTag("是".equals(map.get(PointHeaderConstant.Dept_Tag))); |
| | | List<DynamicColumnVO> dynamics = new ArrayList<>(); |
| | |
| | | List<YwPoint> pointList = dataList.stream().map(item -> { |
| | | YwPoint point = new YwPoint(); |
| | | point.setImportantCommandImageTag(item.getImportantCommandImageTag()); |
| | | point.setProvinceTag(item.getProvinceTag()); |
| | | point.setProvinceTagVideo(item.getProvinceTagVideo()); |
| | | point.setProvinceTagCar(item.getProvinceTagCar()); |
| | | point.setProvinceTagFace(item.getProvinceTagFace()); |
| | | point.setDeptTag(item.getDeptTag()); |
| | | if (needUpdateUnit) { |
| | | if (Objects.nonNull(unitId)) { |
| | |
| | | } |
| | | |
| | | @Override |
| | | public <T extends BaseResult> void setDeviceTagByGB(List<T> dataList) { |
| | | public <T extends BaseResult> void setDeviceTagByGB(List<T> dataList,Short category) { |
| | | List<String> gbList = dataList.stream().map(BaseResult::getNo).collect(Collectors.toList()); |
| | | List<CheckTagVO> pointList = baseMapper.getTagsByGB(gbList); |
| | | Map<String, CheckTagVO> pointMap = pointList.stream().collect(Collectors.toMap(CheckTagVO::getNo, item -> item)); |
| | |
| | | CheckTagVO tag = pointMap.get(data.getNo()); |
| | | if (Objects.nonNull(tag)) { |
| | | BeanUtils.copyProperties(tag, data); |
| | | //通过设备类型打省厅标签 |
| | | if(CheckConstants.Rule_Category_Video.equals(category)){ |
| | | data.setProvinceTag(tag.getProvinceTagVideo()); |
| | | }else if(CheckConstants.Rule_Category_Car.equals(category)){ |
| | | data.setProvinceTag(tag.getProvinceTagCar()); |
| | | }else if(CheckConstants.Rule_Category_Face.equals(category)){ |
| | | data.setProvinceTag(tag.getProvinceTagFace()); |
| | | } |
| | | } |
| | | } |
| | | } |
| | |
| | | import com.ycl.platform.service.*; |
| | | import com.ycl.utils.DateUtils; |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import lombok.extern.slf4j.Slf4j; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.beans.factory.annotation.Value; |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(list); |
| | | pointService.setDeviceTagByGB(list, CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(list); |
| | | //同步的数据进行工单阈值处理 |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(list); |
| | | pointService.setDeviceTagByGB(list,CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(list); |
| | | //同步的数据进行工单阈值处理 |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | carList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_CAR)); |
| | | mongoTemplate.insertAll(carList); |
| | | //TODO:更新point表在线状态(有抓拍量视作在线) |
| | | //TODO:更新point表在线状态(有抓拍量视作在线) |
| | | //工单 |
| | | } |
| | | |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(faceList,CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | faceList.forEach(item -> item.setDataType(ApiConstants.HK_DataType_FACE)); |
| | | mongoTemplate.insertAll(faceList); |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(faceList,CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | |
| | | param.setPageNo(ApiConstants.PageNo); |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | List<CrossDetailResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/device/crossExpDetailInfo/query", param, CrossDetailResult.class); |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | List<CrossDetailResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/device/crossExpDetailInfo/query", param, CrossDetailResult.class); |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, CrossDetailResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | log.info("结束卡口属性监测结果数据同步"); |
| | | } |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<DataIntegrityMonitoringResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/attributeIntegrity/query", param, DataIntegrityMonitoringResult.class); |
| | | List<DataIntegrityMonitoringResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/attributeIntegrity/query", param, DataIntegrityMonitoringResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, DataIntegrityMonitoringResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | log.info("结束数据完整性监测结果数据同步"); |
| | | } |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<AttrRecognitionMonitorResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/attributeRecognition/query", param, AttrRecognitionMonitorResult.class); |
| | | List<AttrRecognitionMonitorResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/attributeRecognition/query", param, AttrRecognitionMonitorResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, AttrRecognitionMonitorResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | log.info("结束属性识别准确监测结果数据同步"); |
| | | |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(carList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(faceList,CheckConstants.Rule_Category_Face); |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | | log.info("结束抓拍数据时延监测结果数据同步"); |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<PicAccessResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/picAccessDetail/query", param, PicAccessResult.class); |
| | | List<PicAccessResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v1/data/picAccessDetail/query", param, PicAccessResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, PicAccessResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | log.info("结束图片访问监测结果数据同步"); |
| | | } |
| | |
| | | param.setPageSize(ApiConstants.HKPageSize); |
| | | param.setDate(DateUtils.getDate()); |
| | | param.setDataType(ApiConstants.HK_DataType_CAR); |
| | | List<VehicleDeviceSamplingResult> faceList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v2/data/vehSampleAmount/query", param, VehicleDeviceSamplingResult.class); |
| | | List<VehicleDeviceSamplingResult> carList = HkApiUtil.sendAPI(host,appKey,appSecret,"/api/dqd/service/rs/v2/data/vehSampleAmount/query", param, VehicleDeviceSamplingResult.class); |
| | | |
| | | if (!CollectionUtils.isEmpty(faceList)) { |
| | | if (!CollectionUtils.isEmpty(carList)) { |
| | | //如果今天存在之前的数据先删除 |
| | | Query query = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(query, VehicleDeviceSamplingResult.class); |
| | | faceList.stream().forEach(item -> { |
| | | carList.stream().forEach(item -> { |
| | | if (Objects.nonNull(item.getExternalIndexCode())) { |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(carList,CheckConstants.Rule_Category_Car); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | mongoTemplate.insertAll(carList); |
| | | } |
| | | log.info("结束车辆设备抽检指标监测结果数据同步"); |
| | | } |
| | |
| | | item.setNo(item.getExternalIndexCode()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(faceList); |
| | | pointService.setDeviceTagByGB(faceList,CheckConstants.Rule_Category_Face); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(faceList); |
| | | } |
| | |
| | | ywPoint.setStatus(PointStatus.WAIT.getDesc()); |
| | | ywPoint.setSerialNumber(result.getSerialNumber().getValue()); |
| | | ywPoint.setImportantTag(Boolean.FALSE); |
| | | ywPoint.setProvinceTag(Boolean.FALSE); |
| | | ywPoint.setProvinceTagVideo(Boolean.FALSE); |
| | | ywPoint.setProvinceTagCar(Boolean.FALSE); |
| | | ywPoint.setProvinceTagFace(Boolean.FALSE); |
| | | ywPoint.setImportantCommandImageTag(Boolean.FALSE); |
| | | ywPoint.setCreateTime(new Date()); |
| | | ywPoint.setUpdateTime(new Date()); |
| | |
| | | import com.ycl.utils.DateUtils; |
| | | import com.ycl.utils.StringUtils; |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import enumeration.DeviceType; |
| | | import enumeration.general.AreaDeptEnum; |
| | | import lombok.extern.slf4j.Slf4j; |
| | |
| | | Query pyQuery = new Query(Criteria |
| | | .where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | | DeleteResult result = mongoTemplate.remove(pyQuery, OsdCheckResult.class); |
| | | pointService.setDeviceTagByGB(checkResults); |
| | | pointService.setDeviceTagByGB(checkResults,CheckConstants.Rule_Category_Video); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(checkResults); |
| | | // 工单生成 |
| | |
| | | import com.ycl.utils.CheckPointUtil; |
| | | import com.ycl.utils.DateUtils; |
| | | import constant.ApiConstants; |
| | | import constant.CheckConstants; |
| | | import constant.RedisConstant; |
| | | import enumeration.ErrorType; |
| | | import enumeration.general.WorkOrderStatusEnum; |
| | |
| | | item.setNo(item.getDeviceId()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(records); |
| | | pointService.setDeviceTagByGB(records, CheckConstants.Rule_Category_Video); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(records); |
| | | // 工单生成 |
| | |
| | | item.setNo(item.getSerialNumber().getShowValue()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(records); |
| | | //TODO:优云的一机一档包含了视频、车辆、人脸 是有一种是省厅就算省厅吗 |
| | | pointService.setDeviceTagByGB(records,CheckConstants.Rule_Category_Video); |
| | | pointService.setNew(records); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(records); |
| | |
| | | log.error("请配置离线次数,此次设置为默认值2"); |
| | | } |
| | | // 先查出设备IP集合,剔除掉在线情况是未知的,并且只检测正在考核的设备避免多余工单 |
| | | //TODO:需要把海康和优云的任务的时间调到ping之前 |
| | | //TODO:这里需要存三个标签吗 |
| | | List<TMonitorResult> monitorList = monitorMapper.getDistinctIP(); |
| | | //补充错误时间点 |
| | | Query onlineQuery = new Query(Criteria.where("mongoCreateTime").gte(DateUtils.getDayStart(new Date())).lt(DateUtils.getDayEnd(new Date()))); |
| | |
| | | item.setNo(item.getDeviceId()); |
| | | } |
| | | }); |
| | | pointService.setDeviceTagByGB(records); |
| | | pointService.setDeviceTagByGB(records,CheckConstants.Rule_Category_Video); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(records); |
| | | //更新point表在线状态 |
| | |
| | | } |
| | | }); |
| | | //打标签 |
| | | pointService.setDeviceTagByGB(records); |
| | | pointService.setDeviceTagByGB(records,CheckConstants.Rule_Category_Video); |
| | | //存放在mongo中 |
| | | mongoTemplate.insertAll(records); |
| | | // // 工单生成 |
| | |
| | | for (YwPoint ywPoint : list) { |
| | | boolean update = new LambdaUpdateChainWrapper<>(ywPointMapper) |
| | | .eq(YwPoint::getSerialNumber, ywPoint.getSerialNumber()) |
| | | .set(YwPoint::getProvinceTag, ywPoint.getProvinceTag()) |
| | | .set(YwPoint::getProvinceTagVideo, ywPoint.getProvinceTagVideo()) |
| | | .set(YwPoint::getProvinceTagCar, ywPoint.getProvinceTagCar()) |
| | | .set(YwPoint::getProvinceTagFace, ywPoint.getProvinceTagFace()) |
| | | .set(YwPoint::getImportantCommandImageTag, ywPoint.getImportantCommandImageTag()) |
| | | .set(YwPoint::getUnitId, ywPoint.getUnitId()) |
| | | .set(YwPoint::getStartTime, ywPoint.getStartTime()) |
| | |
| | | <result property="lxbm" column="lxbm"/> |
| | | <result property="deviceType" column="device_type"/> |
| | | </resultMap> |
| | | |
| | | <!-- TODO --> |
| | | <resultMap id="monitorMap" type="com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | <result column="m.id" property="id"/> |
| | | <result column="no" property="no"/> |
| | |
| | | #{number} |
| | | </foreach> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectTMonitorList" resultType="com.ycl.platform.domain.vo.TMonitorVO"> |
| | | select m.id, m.serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, |
| | | camera_capture_area, p.online as onState, civil_code, d.dept_id, d.dept_name, d.area, p.province_tag,p.dept_tag, |
| | | camera_capture_area, p.online as onState, civil_code, d.dept_id, d.dept_name, d.area, p.province_tag_video,p.province_tag_car,p.province_tag_face,p.dept_tag, |
| | | IF(COUNT(w.id) OVER() > 0, '是', '否') AS error, u.unit_name,p.recovery_time,p.reason,p.start_time,p.end_time, w.work_order_no |
| | | from t_monitor m |
| | | left join t_yw_point p on m.serial_number = p.serial_number and p.deleted = 0 |
| | |
| | | or m.serial_number like concat('%', #{name}, '%') |
| | | or u.unit_name like concat('%', #{name}, '%')) |
| | | </if> |
| | | <if test="provinceTag != null ">and p.province_tag = #{provinceTag}</if> |
| | | <if test="provinceTag != null and cameraFunType == 1">and p.province_tag_video = #{provinceTag}</if> |
| | | <if test="provinceTag != null and cameraFunType == 2">and p.province_tag_car = #{provinceTag}</if> |
| | | <if test="provinceTag != null and cameraFunType == 3">and p.province_tag_face = #{provinceTag}</if> |
| | | <if test="provinceTag != null and recovery == 1">and (p.province_tag_face = #{provinceTag} or p.province_tag_video = #{provinceTag} or p.province_tag_car = #{provinceTag})</if> |
| | | <if test="deptTag != null ">and p.dept_tag = #{deptTag}</if> |
| | | <if test="siteType != null ">and site_type = #{siteType}</if> |
| | | <if test="macAddr != null and macAddr != ''">and mac_addr = #{macAddr}</if> |
| | |
| | | ${params.dataScope} |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="exportTMonitorList" resultType="com.ycl.platform.domain.excel.TMonitorExp"> |
| | | select m.id, m.serial_number, name, ip, camera_fun_type,p.online as onState, |
| | | d.dept_name, p.id as pointId,p.province_tag,p.dept_tag,p.important_tag,p.important_command_image_tag,u.unit_name as managementUnit |
| | |
| | | <if test="civilCode != null and civilCode != ''">and civil_code = #{civilCode}</if> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectMonitorVOList" resultType="com.ycl.platform.domain.vo.TMonitorVO"> |
| | | select m.id, m.serial_number, name, site_type, mac_addr, ip, camera_fun_type, longitude, latitude, |
| | | camera_capture_area, on_state, civil_code, integrated_device, camera_brand, address, net_working, |
| | |
| | | left join t_yw_point p on m.serial_number = p.serial_number |
| | | left join sys_dept d on p.dept_id = d.dept_id |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectMonitorResult" resultType = "com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | select m.id, m.serial_number as no,m.name,m.camera_fun_type as monitorType, |
| | | d.dept_id,p.province_tag,p.important_tag,p.important_command_image_tag,p.dept_tag,p.online,p.id as pointId |
| | |
| | | #{id} |
| | | </foreach> |
| | | </delete> |
| | | |
| | | <select id="getVideoCount" resultType="java.util.Map"> |
| | | SELECT count(*) AS totalPosts, |
| | | IFNULL(SUM(IF(p.online = 1, 1, 0)), 0) AS totalMembers, |
| | |
| | | left join sys_dept d on p.dept_id = d.dept_id and d.del_flag = 0 |
| | | <where> |
| | | camera_fun_type like concat('%', #{cameraFunType}, '%') and p.examine_status = 1 |
| | | <if test="provinceTag!=null"> |
| | | and p.province_tag = #{provinceTag} |
| | | <if test="provinceTag!=null and cameraFunType==1"> |
| | | and p.province_tag_video = #{provinceTag} |
| | | </if> |
| | | <if test="provinceTag!=null and cameraFunType==2"> |
| | | and p.province_tag_car = #{provinceTag} |
| | | </if> |
| | | <if test="provinceTag!=null and cameraFunType==3"> |
| | | and p.province_tag_face = #{provinceTag} |
| | | </if> |
| | | <if test="deptTag!=null"> |
| | | and p.dept_tag = #{deptTag} |
| | |
| | | p.examine_status = 1 |
| | | <!-- (p.recovery = 1 OR TIMESTAMPDIFF(DAY, p.recovery_time, NOW()) <![CDATA[<=]]> #{time}) --> |
| | | <if test="provinceTag!=null"> |
| | | and p.province_tag = #{provinceTag} |
| | | and (p.province_tag_video = #{provinceTag} or p.province_tag_car = #{provinceTag} or p.province_tag_face = #{provinceTag}) |
| | | </if> |
| | | <if test="deptTag!=null"> |
| | | and p.dept_tag = #{deptTag} |
| | |
| | | COUNT(p2.id) AS errorNum, |
| | | COUNT(p3.id) AS normalNum |
| | | FROM t_monitor |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1<if test="dataScope == 1"> AND p1.province_tag = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND p2.online = -1 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND p3.online = 1 AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1<if test="dataScope == 1"> AND p1.province_tag_video = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND p2.online = -1 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND p3.online = 1 AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag_video = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | WHERE INSTR(camera_fun_type, 1) |
| | | UNION ALL |
| | | SELECT |
| | |
| | | COUNT(p2.id) AS errorNum, |
| | | COUNT(p3.id) AS normalNum |
| | | FROM t_monitor |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 <if test="dataScope == 1"> AND p1.province_tag = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND p2.online = -1 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND p3.online = 1 AND p1.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 <if test="dataScope == 1"> AND p1.province_tag_car = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND p2.online = -1 AND p1.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_car = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND p3.online = 1 AND p1.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_car = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | WHERE INSTR(camera_fun_type, 2) |
| | | UNION ALL |
| | | SELECT |
| | |
| | | COUNT(p2.id) AS errorNum, |
| | | COUNT(p3.id) AS normalNum |
| | | FROM t_monitor |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 <if test="dataScope == 1"> AND p1.province_tag = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND p2.online = -1 AND p1.id = p2.id<if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND p3.online = 1 AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p1 ON t_monitor.serial_number = p1.serial_number AND p1.examine_status = 1 <if test="dataScope == 1"> AND p1.province_tag_face = 1 </if><if test="dataScope == 3"> AND p1.dept_tag = 1 </if><if test="deptId != null"> AND p1.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p2 ON t_monitor.serial_number = p2.serial_number AND p2.examine_status = 1 AND p2.online = -1 AND p1.id = p2.id<if test="dataScope == 1"> AND p2.province_tag_face = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if><if test="deptId != null"> AND p2.dept_id = #{deptId} </if> |
| | | LEFT JOIN t_yw_point p3 ON t_monitor.serial_number = p3.serial_number AND p3.examine_status = 1 AND p3.online = 1 AND p1.id = p3.id<if test="dataScope == 1"> AND p3.province_tag_face = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if><if test="deptId != null"> AND p3.dept_id = #{deptId} </if> |
| | | WHERE INSTR(camera_fun_type, 3) |
| | | </select> |
| | | <!-- TODO --> |
| | | <select id="monitorRate" resultType="com.ycl.platform.domain.vo.screen.MonitorRateVO"> |
| | | SELECT |
| | | * |
| | |
| | | COUNT(m2.id) AS faceErrorNum |
| | | FROM |
| | | sys_dept d |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.online = -1 AND p2.examine_status = 1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.online = 1 AND p3.examine_status = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag_face = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.online = -1 AND p2.examine_status = 1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_face = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.online = 1 AND p3.examine_status = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_face = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_monitor m ON m.serial_number = p.serial_number AND INSTR(m.camera_fun_type, 3) |
| | | LEFT JOIN t_monitor m2 ON m2.serial_number = p2.serial_number AND INSTR(m2.camera_fun_type, 3) |
| | | LEFT JOIN t_monitor m3 ON m3.serial_number = p3.serial_number AND INSTR(m3.camera_fun_type, 3) |
| | |
| | | COUNT(m2.id) AS carErrorNum |
| | | FROM |
| | | sys_dept d |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag_car = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_car = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_car = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_monitor m ON m.serial_number = p.serial_number AND INSTR(m.camera_fun_type, 2) |
| | | LEFT JOIN t_monitor m2 ON m2.serial_number = p2.serial_number AND INSTR(m2.camera_fun_type, 2) |
| | | LEFT JOIN t_monitor m3 ON m3.serial_number = p3.serial_number AND INSTR(m3.camera_fun_type, 2) |
| | |
| | | COUNT(m2.id) AS videoErrorNum |
| | | FROM |
| | | sys_dept d |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 AND p.examine_status = 1 <if test="dataScope == 1"> AND p.province_tag_video = 1 </if><if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p2 ON p2.dept_id = d.dept_id AND p2.deleted = 0 AND p2.examine_status = 1 AND p2.online = -1 AND p.id = p2.id <if test="dataScope == 1"> AND p2.province_tag_video = 1 </if><if test="dataScope == 3"> AND p2.dept_tag = 1 </if> |
| | | LEFT JOIN t_yw_point p3 ON p3.dept_id = d.dept_id AND p3.deleted = 0 AND p3.examine_status = 1 AND p3.online = 1 AND p.id = p3.id <if test="dataScope == 1"> AND p3.province_tag_video = 1 </if><if test="dataScope == 3"> AND p3.dept_tag = 1 </if> |
| | | LEFT JOIN t_monitor m ON m.serial_number = p.serial_number AND INSTR(m.camera_fun_type, 1) |
| | | LEFT JOIN t_monitor m2 ON m2.serial_number = p2.serial_number AND INSTR(m2.camera_fun_type, 1) |
| | | LEFT JOIN t_monitor m3 ON m3.serial_number = p3.serial_number AND INSTR(m3.camera_fun_type, 1) |
| | |
| | | WHERE |
| | | serial_number in <foreach collection="gbList" open="(" separator="," close=")" item="no">#{no}</foreach> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="getDistinctIP" resultType="com.ycl.platform.domain.result.SYS.TMonitorResult"> |
| | | select DISTINCT m.id, m.ip,m.serial_number as no,m.name,m.camera_fun_type as monitorType,d.dept_id,p.province_tag,p.important_tag,p.important_command_image_tag,p.dept_tag,p.online |
| | | select DISTINCT m.id, m.ip,m.serial_number as no,m.name,m.camera_fun_type as monitorType,d.dept_id, |
| | | p.province_tag, |
| | | p.important_tag,p.important_command_image_tag,p.dept_tag,p.online |
| | | from t_monitor m |
| | | left join t_yw_point p on m.serial_number = p.serial_number |
| | | left join sys_dept d on p.dept_id = d.dept_id |
| | |
| | | p.yw_person_name |
| | | ORDER BY wo.work_order_no DESC |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="distributePage" resultType="com.ycl.platform.domain.vo.WorkOrderVO"> |
| | | SELECT |
| | | wo.id,wo.status, wo.work_order_no,wo.create_time, wo.unit_id, wo.yw_people_id, wo.yw_handle_time, wo.yw_result, |
| | |
| | | ORDER BY wo.create_time DESC |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="handlingWorkOrderList" resultType="com.ycl.platform.domain.vo.YwPointJobVO"> |
| | | SELECT |
| | | wo.id, |
| | |
| | | FROM t_work_order w |
| | | LEFT JOIN t_yw_point p ON w.serial_number = p.serial_number AND p.deleted = 0 |
| | | WHERE w.deleted = 0 |
| | | <if test="dataScope == 1"> AND p.province_tag = 1 </if> |
| | | <if test="dataScope == 1"> AND (p.province_tag_video = 1 or p.province_tag_car = 1 or p.province_tag_face = 1)</if> |
| | | <if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | <if test="deptId != null"> AND p.dept_id = #{deptId} </if> |
| | | </select> |
| | |
| | | LEFT JOIN t_yw_point p ON p.dept_id = d.dept_id AND p.deleted = 0 |
| | | LEFT JOIN t_work_order w ON w.serial_number = p.serial_number AND w.deleted = 0 |
| | | WHERE d.del_flag = 0 AND d.area IS NOT NULL |
| | | <if test="dataScope == 1"> AND p.province_tag = 1 </if> |
| | | <if test="dataScope == 1"> AND (p.province_tag_video = 1 or p.province_tag_car = 1 or p.province_tag_face = 1)</if> |
| | | <if test="dataScope == 3"> AND p.dept_tag = 1 </if> |
| | | <!-- <if test="deptId != null"> AND p.dept_id = #{deptId} </if> --> |
| | | GROUP BY d.area, d.dept_id |
| | |
| | | <?xml version="1.0" encoding="UTF-8"?> |
| | | <!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="com.ycl.platform.mapper.YwPointMapper"> |
| | | |
| | | <!-- TODO --> |
| | | <!-- 通用查询映射结果 --> |
| | | <resultMap id="BaseResultMap" type="com.ycl.platform.domain.vo.YwPointVO"> |
| | | <result column="id" property="id"/> |
| | |
| | | <result column="remark" property="remark"/> |
| | | <result column="create_time" property="createTime"/> |
| | | <result column="update_time" property="updateTime"/> |
| | | <result column="province_tag" property="provinceTag"/> |
| | | <result column="province_tag_video" property="provinceTagVideo"/> |
| | | <result column="province_tag_car" property="provinceTagCar"/> |
| | | <result column="province_tag_face" property="provinceTagFace"/> |
| | | <result column="important_tag" property="importantTag"/> |
| | | <result column="important_command_image_tag" property="importantCommandImageTag"/> |
| | | <result column="dept_tag" property="deptTag"/> |
| | |
| | | <result column="label_value" property="labelValue"/> |
| | | <result column="column_value" property="columnValue"/> |
| | | </resultMap> |
| | | |
| | | <!-- TODO --> |
| | | <select id="page" resultMap="pageMap"> |
| | | SELECT |
| | | typ.id, |
| | |
| | | typ.create_time, |
| | | typ.update_time, |
| | | typ.important_tag, |
| | | typ.province_tag, |
| | | typ.province_tag_video, |
| | | typ.province_tag_car, |
| | | typ.province_tag_face, |
| | | typ.important_command_image_tag, |
| | | typ.dept_tag, |
| | | 't_yw_point' as tableName, |
| | |
| | | <!-- and dcv.column_value like concat('%', #{pointName}, '%')--> |
| | | <!-- </if>--> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="dataCenterPage" resultType="com.ycl.platform.domain.vo.PointDetailVO"> |
| | | SELECT |
| | | m.* |
| | |
| | | </choose> |
| | | </where> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="distinctCount" resultType="integer"> |
| | | SELECT |
| | | count(DISTINCT m.serial_number) |
| | |
| | | ORDER BY end_time limit 50 |
| | | ]]> |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectByTag" resultType="com.ycl.platform.domain.entity.YwPoint"> |
| | | select * from t_yw_point |
| | | <where> |
| | |
| | | yp.start_time, |
| | | yp.end_time, |
| | | d.area, |
| | | CASE WHEN yp.province_tag = 0 THEN '否' ELSE '是' END AS provinceTagString, |
| | | CASE WHEN yp.province_tag_video = 0 THEN '否' ELSE '是' END AS provinceTagVideoString, |
| | | CASE WHEN yp.province_tag_car = 0 THEN '否' ELSE '是' END AS provinceTagCarString, |
| | | CASE WHEN yp.province_tag_face = 0 THEN '否' ELSE '是' END AS provinceTagFaceString, |
| | | CASE WHEN yp.important_tag = 0 THEN '否' ELSE '是' END AS importantTagString, |
| | | CASE WHEN yp.important_command_image_tag = 0 THEN '否' ELSE '是' END AS importantCommandImageTagString, |
| | | CASE WHEN yp.dept_tag = 0 THEN '否' ELSE '是' END AS deptTagString |
| | |
| | | start_time = #{point.startTime}, |
| | | end_time = #{point.endTime}, |
| | | </if> |
| | | province_tag = #{point.provinceTag}, |
| | | province_tag_video = #{point.provinceTagVideo}, |
| | | province_tag_car = #{point.provinceTagCar}, |
| | | province_tag_face = #{point.provinceTagFace}, |
| | | important_command_image_tag = #{point.importantCommandImageTag}, |
| | | dept_tag = #{point.deptTag} |
| | | WHERE serial_number = #{point.serialNumber} |
| | |
| | | AND ar.result = 1 |
| | | ORDER BY ar.create_time DESC limit 1 |
| | | </select> |
| | | |
| | | <select id="getTagsByGB" resultType="com.ycl.platform.domain.vo.CheckTagVO"> |
| | | SELECT |
| | | serial_number as no, province_tag, important_tag, important_command_image_tag, dept_tag |
| | | serial_number as no, province_tag_face,province_tag_car,province_tag_video, important_tag, important_command_image_tag, dept_tag |
| | | FROM |
| | | t_yw_point |
| | | WHERE |
| | | deleted = 0 AND serial_number in |
| | | <foreach collection="gbList" open="(" separator="," close=")" item="no">#{no}</foreach> |
| | | GROUP BY |
| | | serial_number, province_tag, important_tag, important_command_image_tag, dept_tag |
| | | serial_number, province_tag_face,province_tag_car,province_tag_videogetTagsByGB, important_tag, important_command_image_tag, dept_tag |
| | | </select> |
| | | |
| | | <!-- TODO --> |
| | | <select id="selectToCount" resultType="com.ycl.platform.domain.vo.YwPointVO"> |
| | | select p.* from t_yw_point p |
| | | left join t_monitor m on p.serial_number = m.serial_number |
| | |
| | | <if test="deptId !=null"> |
| | | dept_id = #{deptId}, |
| | | </if> |
| | | <if test="provinceTag !=null"> |
| | | province_tag = #{provinceTag}, |
| | | <if test="provinceTagVideo !=null"> |
| | | province_tag_video = #{provinceTagVideo}, |
| | | </if> |
| | | <if test="provinceTagCar !=null"> |
| | | province_tag_car = #{provinceTagCar}, |
| | | </if> |
| | | <if test="provinceTagFace !=null"> |
| | | province_tag_face = #{provinceTagFace}, |
| | | </if> |
| | | <if test="importantTag !=null"> |
| | | important_tag = #{importantTag}, |