From 39095d5090136278173bb1d8da4d6a4ea63ff4aa Mon Sep 17 00:00:00 2001 From: tyty Date: Tue, 22 Aug 2023 16:50:24 +0800 Subject: [PATCH] =?UTF-8?q?=E5=B7=A1=E6=A3=80=E6=92=A4=E9=94=80=E6=8C=89?= =?UTF-8?q?=E9=92=AE?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../hnac/hzinfo/inspect/plan/controller/PlanController.java | 11 +++++------ .../hzinfo/inspect/plan/service/impl/PlanServiceImpl.java | 2 +- 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java index bc04f66..00ca26a 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/controller/PlanController.java @@ -7,7 +7,6 @@ import com.hnac.hzims.common.logs.annotation.OperationAnnotation; import com.hnac.hzims.common.logs.enums.BusinessType; import com.hnac.hzims.common.logs.enums.OperatorType; import com.hnac.hzinfo.inspect.obj.utils.CodeUtils; -import com.hnac.hzinfo.inspect.plan.PlanContants; import com.hnac.hzinfo.inspect.plan.entity.PlanEntity; import com.hnac.hzinfo.inspect.plan.service.IPlanObjectTemplateService; import com.hnac.hzinfo.inspect.plan.service.IPlanService; @@ -74,9 +73,9 @@ public class PlanController extends BladeController { if(plan.getEndTime()!=null){ queryWrapper.le(PlanEntity::getEndTime,plan.getEndTime()); } - if(plan.getStatus()==null){ - queryWrapper.ne(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_AUTH.getStatus()); - } +// if(plan.getStatus()==null){ +// queryWrapper.ne(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_AUTH.getStatus()); +// } if(plan.getCreateDept()!=null){ queryWrapper.eq(PlanEntity::getCreateDept,plan.getCreateDept()); } @@ -107,10 +106,10 @@ public class PlanController extends BladeController { /** * 撤销 */ - @PostMapping("/revoke") + @GetMapping("/revoke") @ApiOperationSupport(order = 6) @ApiOperation(value = "撤销", notes = "传入plan") - public R revoke(@Valid @RequestBody Long planId) { + public R revoke(@RequestParam Long planId) { return R.data(planService.revoke(planId)); } diff --git a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/service/impl/PlanServiceImpl.java b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/service/impl/PlanServiceImpl.java index 81ae5a8..b060ace 100644 --- a/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/service/impl/PlanServiceImpl.java +++ b/hzims-service/inspect/src/main/java/com/hnac/hzinfo/inspect/plan/service/impl/PlanServiceImpl.java @@ -117,7 +117,7 @@ public class PlanServiceImpl extends BaseServiceImpl imp public Boolean revoke(Long planId) { boolean re; LambdaUpdateWrapper uw = new UpdateWrapper().lambda(); - uw.set(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_SUBMIT); + uw.set(PlanEntity::getStatus, PlanContants.PlanStatusEnum.PLAN_SUBMIT.getStatus()); uw.eq(PlanEntity::getId, planId); re = update(uw); return re;