sql/zgyw0418.sql | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-pojo/src/main/java/com/ycl/platform/domain/form/VideoThresholdForm.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-server/src/main/java/com/ycl/platform/service/IYwThresholdService.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 | |
ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java | ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史 |
sql/zgyw0418.sql
New file Diff too large ycl-pojo/src/main/java/com/ycl/platform/domain/entity/YwThreshold.java
@@ -10,6 +10,8 @@ import enumeration.general.BusinessTypeEnum; import lombok.Data; import java.math.BigDecimal; /** * 运维阈值对象 t_yw_threshold * @@ -35,19 +37,55 @@ @TableField("monitor_type") private BusinessTypeEnum monitorType; /*---------------------------- 视频字段 ----------------------------------------------*/ /** * 超时天数 * 视频质量工单阈值 */ @Excel(name = "超时天数") @TableField("timeout") private Integer timeout; @Excel(name = "视频质量工单阈值") @TableField("video_quality") private String videoQuality; /** * 指标json * 视频质量工单阈值 */ @Excel(name = "指标json") @TableField("indicator") private String indicator; @Excel(name = "视频质量下发阈值") @TableField("video_quality_auto") private String videoQualityAuto; /** * 图像质量工单阈值 */ @Excel(name = "图像质量工单阈值") @TableField("image_quality") private String imageQuality; /** * 图像质量下发阈值 */ @Excel(name = "图像质量下发阈值") @TableField("image_quality_auto") private String imageQualityAuto; /** * 标注准确率工单阈值 */ @Excel(name = "标注准确率工单阈值") @TableField("annotation_accuracy") private BigDecimal annotationAccuracy; /** * 标注准确率下发阈值 */ @Excel(name = "标注准确率下发阈值") @TableField("annotation_accuracy_auto") private BigDecimal annotationAccuracyAuto; /*---------------------------- 人脸字段 ----------------------------------------------*/ /*---------------------------- 车辆字段 ----------------------------------------------*/ /** * 逻辑删除:0未删除 1删除 ycl-pojo/src/main/java/com/ycl/platform/domain/form/VideoThresholdForm.java
@@ -9,6 +9,7 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; /** * 视频工单阈值 @@ -28,19 +29,22 @@ @NotBlank(message = "请选择设备类型") private BusinessTypeEnum monitorType; @NotNull(message = "请输入超时天数") private Integer timeout; /** 视频质量 */ @NotBlank(message = "请选择视频质量工单阈值") private String videoQuality; @NotBlank(message = "请选择视频质量下发阈值") private String videoQualityAuto; /** 采集设备总数 */ @NotBlank(message = "请填写采集设备总数") private String collectionEquipmentTotalNum; /** 图像质量 */ @NotBlank(message = "请选择图像质量工单阈值") private String imageQuality; @NotBlank(message = "请选择图像质量下发阈值") private String imageQualityAuto; /** 检测正常设备数 */ @NotBlank(message = "请填写检测正常设备数") private String monitoringNormalEquipmentNum; /** 经纬度异常设备数 */ @NotBlank(message = "请填写经纬度异常设备数") private String longitudeLatitudeExceptionNum; /** 标注准确率 */ @NotBlank(message = "请填写标注准确率工单阈值") private BigDecimal annotationAccuracy; @NotBlank(message = "请填写标注准确率下发阈值") private BigDecimal annotationAccuracyAuto; } ycl-server/src/main/java/com/ycl/platform/controller/YwThresholdController.java
@@ -26,7 +26,7 @@ * @date 2024-03-25 */ @RestController @RequestMapping("/ycl/threshold") @RequestMapping("/threshold") public class YwThresholdController extends BaseController { @Autowired private IYwThresholdService ywThresholdService; @@ -64,6 +64,33 @@ } /** * 获取人脸配置 */ // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") @GetMapping(value = "/face/{id}") public AjaxResult getFace(@PathVariable("id") Integer id) { return success(ywThresholdService.getFace(id)); } /** * 获取车辆配置 */ // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") @GetMapping(value = "/car/{id}") public AjaxResult getCar(@PathVariable("id") Integer id) { return success(ywThresholdService.getCar(id)); } /** * 获取视频配置 */ // @PreAuthorize("@ss.hasPermi('ycl:threshold:query')") @GetMapping(value = "/video/{id}") public AjaxResult getVideo(@PathVariable("id") Integer id) { return success(ywThresholdService.getVideo(id)); } /** * 修改人脸阈值 */ // @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") @@ -88,7 +115,7 @@ */ // @PreAuthorize("@ss.hasPermi('ycl:threshold:edit')") @Log(title = "修改视频阈值", businessType = BusinessType.UPDATE) @PutMapping("video") @PutMapping("/video") public AjaxResult editVideo(@RequestBody @Validated VideoThresholdForm form) { return toAjax(ywThresholdService.editVideo(form)); } ycl-server/src/main/java/com/ycl/platform/service/IYwThresholdService.java
@@ -115,4 +115,25 @@ * @return 是否生成工单 */ Boolean checkVideo(List<VideoDTO> videoList); /** * 获取人脸配置 * @param id * @return */ FaceThresholdForm getFace(Integer id); /** * 获取车辆配置 * @param id * @return */ CarThresholdForm getCar(Integer id); /** * 获取视频配置 * @param id * @return */ VideoThresholdForm getVideo(Integer id); } ycl-server/src/main/java/com/ycl/platform/service/impl/WorkOrderServiceImpl.java
@@ -328,7 +328,7 @@ @Override public Result selectedIdsDistribute(List<Integer> ids, Integer unitId) { if (!getDistributeLock()) { return Result.error("工单下发中,请稍后重试"); return Result.error("此刻有人正在下发工单,为避免冲突,请稍后重试"); } try { if (ids.isEmpty()) { ycl-server/src/main/java/com/ycl/platform/service/impl/YwThresholdServiceImpl.java
@@ -109,7 +109,7 @@ throw new RuntimeException("数据不存在"); } BeanUtils.copyProperties(form, ywThreshold); ywThreshold.setIndicator(JSON.toJSONString(form)); // ywThreshold.setIndicator(JSON.toJSONString(form)); return baseMapper.updateById(ywThreshold); } @@ -120,7 +120,7 @@ throw new RuntimeException("数据不存在"); } BeanUtils.copyProperties(form, ywThreshold); ywThreshold.setIndicator(JSON.toJSONString(form)); // ywThreshold.setIndicator(JSON.toJSONString(form)); return baseMapper.updateById(ywThreshold); } @@ -131,7 +131,7 @@ throw new RuntimeException("数据不存在"); } BeanUtils.copyProperties(form, ywThreshold); ywThreshold.setIndicator(JSON.toJSONString(form)); // ywThreshold.setIndicator(JSON.toJSONString(form)); return baseMapper.updateById(ywThreshold); } @@ -170,4 +170,33 @@ // todo 遍历条件,生成工单 return Boolean.FALSE; } @Override public FaceThresholdForm getFace(Integer id) { return null; } @Override public CarThresholdForm getCar(Integer id) { return null; } @Override public VideoThresholdForm getVideo(Integer id) { YwThreshold result = new LambdaQueryChainWrapper<>(baseMapper) .select(YwThreshold::getImageQuality, YwThreshold::getId, YwThreshold::getMonitorType, YwThreshold::getImageQualityAuto, YwThreshold::getVideoQuality, YwThreshold::getVideoQualityAuto, YwThreshold::getAnnotationAccuracy, YwThreshold::getAnnotationAccuracyAuto) .eq(YwThreshold::getId, id) .eq(YwThreshold::getMonitorType, BusinessTypeEnum.VIDEO) .one(); VideoThresholdForm form = new VideoThresholdForm(); BeanUtils.copyProperties(result, form); return form; } }