吉安感知网项目-后端
rain
2026-01-23 f3a098ceaaf90e316d4183ac5532e07fbacff9e0
APP端驳回和已确认状态
7 files modified
46 ■■■■■ changed files
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java 10 ●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java 4 ●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java 4 ●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventRejectParam.java 7 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java 2 ●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java 15 ●●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java 4 ●●●● patch | view | raw | blame | history
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/controller/GdClueEventController.java
@@ -144,13 +144,13 @@
    }
    /**
     * 事件驳回
     * 事件处理
     */
    @PostMapping("/reject")
    @PostMapping("/handle")
    @ApiOperationSupport(order = 8)
    @ApiOperation(value = "驳回", notes = "传入事件ID")
    public R reject(@Valid @RequestBody GdClueEventRejectParam rejectParam) {
        return R.status(gdClueEventService.rejectClueEvent(rejectParam));
    @ApiOperation(value = "处理", notes = "传入事件ID与事件状态")
    public R handle(@Valid @RequestBody GdClueEventRejectParam rejectParam) {
        return R.status(gdClueEventService.handleClueEvent(rejectParam));
    }
//    /**
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdClueEventEntity.java
@@ -66,9 +66,9 @@
    @ApiModelProperty(value = "纬度")
    private Double latitude;
    /**
     * 状态:0未分发、1已分发、2已驳回
     * 状态:0未分发、1已分发、2已驳回、3已确认
     */
    @ApiModelProperty(value = "状态:0未分发、1已分发、2已驳回")
    @ApiModelProperty(value = "状态:0未分发、1已分发、2已驳回、3已确认")
    private Integer eventStatus;
    /**
     * 区域编码
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/entity/GdTaskResultEntity.java
@@ -73,9 +73,9 @@
    @ApiModelProperty(value = "纬度")
    private Double latitude;
    /**
     * 分发事件状态:0未分发、1已分发、2已驳回
     * 分发事件状态:0未分发、1已分发、2已驳回、3已确认
     */
    @ApiModelProperty(value = "分发事件状态:0未分发、1已分发、2已驳回")
    @ApiModelProperty(value = "分发事件状态:0未分发、1已分发、2已驳回、3已确认")
    private Integer distributeStatus;
    /**
     * 区域编码
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/param/GdClueEventRejectParam.java
@@ -14,4 +14,11 @@
    @ApiModelProperty(value = "事件ID", required = true)
    @NotNull(message = "事件ID不能为空")
    private Long eventId;
    /**
     * 事件状态
     */
    @ApiModelProperty(value = "事件状态:0驳回 1确认", required = true)
    @NotNull(message = "事件状态不能为空")
    private Integer eventStatus;
}
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/IGdClueEventService.java
@@ -90,7 +90,7 @@
     * @param rejectParam
     * @return
     */
    boolean rejectClueEvent(GdClueEventRejectParam rejectParam);
    boolean handleClueEvent(GdClueEventRejectParam rejectParam);
    /**
     * 导出数据
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/service/impl/GdClueEventServiceImpl.java
@@ -141,25 +141,30 @@
    @Override
    @Transactional(rollbackFor = Exception.class)
    public boolean rejectClueEvent(GdClueEventRejectParam rejectParam) {
    public boolean handleClueEvent(GdClueEventRejectParam rejectParam) {
        GdClueEventEntity clueEvent = getById(rejectParam.getEventId());
        if (clueEvent == null || (clueEvent.getIsDeleted() != null && clueEvent.getIsDeleted() != 0)) {
            throw new RuntimeException("事件不存在");
        }
        if (clueEvent.getEventStatus() == null || clueEvent.getEventStatus() != 1) {
            throw new RuntimeException("事件当前状态无法驳回");
            throw new RuntimeException("事件当前状态无法处理");
        }
        clueEvent.setEventStatus(2);
        Integer operateStatus = rejectParam.getEventStatus();
        if (operateStatus == null || (operateStatus != 0 && operateStatus != 1)) {
            throw new RuntimeException("事件状态不正确");
        }
        int targetStatus = operateStatus == 0 ? 2 : 3;
        clueEvent.setEventStatus(targetStatus);
        clueEvent.setUpdateUser(AuthUtil.getUserId());
        clueEvent.setUpdateTime(new Date());
        if (!updateById(clueEvent)) {
            throw new RuntimeException("事件驳回失败");
            throw new RuntimeException("事件处理失败");
        }
        GdTaskResultEntity taskResult = gdTaskResultService.getById(clueEvent.getResultId());
        if (taskResult == null || (taskResult.getIsDeleted() != null && taskResult.getIsDeleted() != 0)) {
            throw new RuntimeException("成果不存在");
        }
        taskResult.setDistributeStatus(2);
        taskResult.setDistributeStatus(targetStatus);
        taskResult.setUpdateUser(AuthUtil.getUserId());
        taskResult.setUpdateTime(new Date());
        if (!gdTaskResultService.updateById(taskResult)) {
drone-service/drone-gd/src/main/java/org/sxkj/gd/workorder/vo/GdClueEventVO.java
@@ -68,9 +68,9 @@
    @ApiModelProperty(value = "纬度")
    private Double latitude;
    /**
     * 状态:0未分发、1已分发、2已驳回
     * 状态:0未分发、1已分发、2已驳回、3已确认
     */
    @ApiModelProperty(value = "状态:0未分发、1已分发、2已驳回")
    @ApiModelProperty(value = "状态:0未分发、1已分发、2已驳回、3已确认")
    private Integer eventStatus;
    /**
     * 区域编码