From 54d037528f429bd7501f68e6d87a7bfc4a8a5d20 Mon Sep 17 00:00:00 2001 From: Yen Date: Sat, 15 Jul 2023 14:29:41 +0800 Subject: [PATCH] =?UTF-8?q?=E6=94=BF=E7=AD=96=E8=A1=A5=E5=81=BF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../tzc/controller/TzcPolicyController.java | 3 +- .../impl/TzcPolicyOperationServiceImpl.java | 28 ++++++++++++------- 2 files changed, 19 insertions(+), 12 deletions(-) diff --git a/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java b/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java index ca769501..8dc8605b 100644 --- a/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java +++ b/src/main/java/com/qs/serve/modules/tzc/controller/TzcPolicyController.java @@ -423,8 +423,7 @@ public class TzcPolicyController { */ @PostMapping("/compensate/{id}") public R compensate(@PathVariable("id") String id){ - //return vtbVerificationOperationService.runCompensate(id); - return R.ok(); + return tzcPolicyOperationService.runCompensate(id); } } diff --git a/src/main/java/com/qs/serve/modules/tzc/service/impl/TzcPolicyOperationServiceImpl.java b/src/main/java/com/qs/serve/modules/tzc/service/impl/TzcPolicyOperationServiceImpl.java index bbb20aec..2ef61c78 100644 --- a/src/main/java/com/qs/serve/modules/tzc/service/impl/TzcPolicyOperationServiceImpl.java +++ b/src/main/java/com/qs/serve/modules/tzc/service/impl/TzcPolicyOperationServiceImpl.java @@ -140,34 +140,42 @@ public class TzcPolicyOperationServiceImpl implements SeeYonOperationService { } } - @Override - public Object doNext(TbsAffairCommitBo param) { - return null; - } - @Override public String getTemplateCode() { return TbsSeeYonConst.PolicyConf.Code(); } - @Override - public Object compensateNext(String targetId) { - return null; - } - @Override public Object compensateBacked(String targetId) { + TzcPolicy tzcPolicy = tzcPolicyService.getById(targetId); + if(tzcPolicy.getPolicyStatus().equals(TzcPolicyStatus.Status_1_Checking)){ + TbsAffairCommitBo param = new TbsAffairCommitBo(); + param.setPolicyId(tzcPolicy.getId()); + this.doBacked(param); + } return null; } @Override public Object compensateFinished(String targetId) { + TzcPolicy tzcPolicy = tzcPolicyService.getById(targetId); + if(tzcPolicy.getPolicyStatus().equals(TzcPolicyStatus.Status_1_Checking)){ + TbsAffairCommitBo param = new TbsAffairCommitBo(); + param.setPolicyId(tzcPolicy.getId()); + this.doFinished(param); + } return null; } @Override public Object compensateRefuse(String targetId) { + TzcPolicy tzcPolicy = tzcPolicyService.getById(targetId); + if(tzcPolicy.getPolicyStatus().equals(TzcPolicyStatus.Status_1_Checking)){ + TbsAffairCommitBo param = new TbsAffairCommitBo(); + param.setPolicyId(tzcPolicy.getId()); + this.doRefuse(param); + } return null; } }