From 158ea33a9e2b812ad5a305911c70809fd67db9c2 Mon Sep 17 00:00:00 2001 From: 13693261870 <252740454@qq.com> Date: 星期日, 25 十二月 2022 16:04:54 +0800 Subject: [PATCH] 12.25.3 --- src/main/java/com/lf/server/controller/show/ApplyController.java | 33 +++++++++++++++++++++++++++++++++ 1 files changed, 33 insertions(+), 0 deletions(-) diff --git a/src/main/java/com/lf/server/controller/show/ApplyController.java b/src/main/java/com/lf/server/controller/show/ApplyController.java index 304c07e..808f711 100644 --- a/src/main/java/com/lf/server/controller/show/ApplyController.java +++ b/src/main/java/com/lf/server/controller/show/ApplyController.java @@ -149,6 +149,14 @@ @GetMapping(value = "/updateForDiscard") public ResponseMsg<Object> updateForDiscard(Integer applyid) { try { + ApplyEntity applyEntity = applyService.selectById(applyid); + if (null == applyEntity) { + return fail("鎵句笉鍒版暟鎹敵璇�"); + } + if (!(applyEntity.getStatus() >= -1 && applyEntity.getStatus() <= StaticData.NINE)) { + return fail("璇ユ暟鎹敵璇锋棤娉曞簾寮�"); + } + int rows = applyService.updateForDiscard(applyid); return success(rows); @@ -165,6 +173,14 @@ @GetMapping(value = "/updateForResubmit") public ResponseMsg<Object> updateForResubmit(Integer applyid) { try { + ApplyEntity applyEntity = applyService.selectById(applyid); + if (null == applyEntity) { + return fail("鎵句笉鍒版暟鎹敵璇�"); + } + if (-1 != applyEntity.getStatus()) { + return fail("璇ユ暟鎹敵璇锋棤闇�閲嶆柊鎻愪氦"); + } + int rows = applyService.updateForResubmit(applyid); return success(rows); @@ -181,6 +197,23 @@ @GetMapping(value = "/updateForSubmit") public ResponseMsg<Object> updateForSubmit(Integer flowId) { try { + FlowEntity flowEntity = flowService.selectById(flowId); + if (null == flowEntity) { + return fail("鎵句笉鍒扮敵璇锋祦绋�"); + } + if (flowEntity.getStatus() != 0) { + return fail("璇ョ敵璇锋祦绋嬫棤闇�瑕佹墦鍥�"); + } + + ApplyEntity applyEntity = applyService.selectById(flowEntity.getApplyid()); + if (null == applyEntity) { + return fail("鎵句笉鍒版暟鎹敵璇�"); + } + if (!(applyEntity.getStatus() >= 0 && applyEntity.getStatus() <= StaticData.NINE)) { + return fail("璇ユ暟鎹敵璇锋棤闇�瑕佹墦鍥�"); + } + + // return success(null); } catch (Exception ex) { -- Gitblit v1.9.3