From e4c31f6e3065e032dfccf0067b7c698b919918be Mon Sep 17 00:00:00 2001 From: pengjie <17373303529@163.com> Date: Fri, 3 Nov 2023 10:21:25 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BC=98=E5=8C=96?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../project/InspectQuestionExamineController.java | 2 +- .../service/impl/InspectQuestionExamineServiceImpl.java | 9 ++++++--- 2 files changed, 7 insertions(+), 4 deletions(-) diff --git a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InspectQuestionExamineController.java b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InspectQuestionExamineController.java index db82895..64dfa80 100644 --- a/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InspectQuestionExamineController.java +++ b/src/main/java/com/zhgd/xmgl/modules/basicdata/controller/project/InspectQuestionExamineController.java @@ -68,7 +68,7 @@ public class InspectQuestionExamineController { inspectQuestionExamine.setCreateTime(new Date()); boolean ok = inspectQuestionExamineService.saveInfo(inspectQuestionExamine); if (ok) { - result.success("审批成功!"); + result.success("操作成功!"); } else { result.success("操作失败!"); } diff --git a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InspectQuestionExamineServiceImpl.java b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InspectQuestionExamineServiceImpl.java index fb08405..66e203f 100644 --- a/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InspectQuestionExamineServiceImpl.java +++ b/src/main/java/com/zhgd/xmgl/modules/safety/service/impl/InspectQuestionExamineServiceImpl.java @@ -49,9 +49,12 @@ public class InspectQuestionExamineServiceImpl extends ServiceImpl wrapperQuestion = Wrappers.lambdaUpdate(); wrapperQuestion.set(InspectQuestion::getState, 2); wrapperQuestion.eq(InspectQuestion::getId, inspectQuestionExamine.getInspectQuestionId()); - inspectQuestionService.update(wrapperQuestion); - updateState(inspectQuestionExamine); - return this.save(inspectQuestionExamine); + boolean update = inspectQuestionService.update(wrapperQuestion); + if (update) { + updateState(inspectQuestionExamine); + return this.save(inspectQuestionExamine); + } + return false; } private void updateState(InspectQuestionExamine inspectQuestionExamine) {