From cc226dba14514b41bdcfa93067c1995b7bca2ce1 Mon Sep 17 00:00:00 2001 From: yinq <1345442242@qq.com> Date: Fri, 25 Nov 2022 10:11:17 +0800 Subject: [PATCH] =?UTF-8?q?bpm=E6=95=B0=E6=8D=AE=E4=B8=8D=E5=90=8C?= =?UTF-8?q?=E6=AD=A5=E9=94=99=E8=AF=AFv2?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/AbnormalBillController.java | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java index 7075737f..2974079b 100644 --- a/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java +++ b/anomaly/src/main/java/com/foreverwin/mesnac/anomaly/controller/AbnormalBillController.java @@ -504,15 +504,14 @@ public class AbnormalBillController { @PostMapping("/bpmDutyConfirm") public ResultVo bpmDutyConfirm(String secretKey,AbnormalBill abnormalBill, AbnormalBillDispose abnormalBillDispose,NcCodesVO ncCodesVO){ - com.foreverwin.modular.core.util.CommonMethods.setSite("1000"); - com.foreverwin.modular.core.util.CommonMethods.setUser("BPM_USER"); + com.foreverwin.modular.core.util.CommonMethods.setValue("SITE","1000"); + com.foreverwin.modular.core.util.CommonMethods.setUser(abnormalBillDispose.getDutyUser()); String site = com.foreverwin.modular.core.util.CommonMethods.getSite(); if (!yunBpmConfig.secretKey.equals(secretKey)){ return new ResultVo(ResultCode.FAILED,"秘钥错误"); } try{ abnormalBill.setHandle(HandleEnum.ABNORMAL_BILL.getHandle(site,abnormalBill.getAbnormalNo())); - abnormalBill.setBpmSubmit("true"); abnormalBillDispose.setDutyCauseType(String.join(",",ncCodesVO.getDutyCauseType())); abnormalBillService.dutyConfirm(abnormalBill,abnormalBillDispose,ncCodesVO.getDutyCauseType(),ncCodesVO.getDutyType()); return new ResultVo(ResultCode.SUCCESS,"BPM判责提交成功"); @@ -541,7 +540,7 @@ public class AbnormalBillController { List abnormalBills = abnormalBillService.selectList(bill); abnormalBills.get(0).setStatus(Constants.CANCEL); abnormalBills.get(0).setCancelReason(abnormalBill.getCancelReason()); - abnormalBills.get(0).setCancelSendUserGroup("BPM_UserGroup"); + abnormalBills.get(0).setCancelSendUserGroup("BPM_CancelUserGroup"); abnormalBills.get(0).setCancelUser(abnormalBill.getCancelUser()); abnormalBills.get(0).setCancelDateTime(now); abnormalBillService.saveOrUpdate(abnormalBills.get(0)); @@ -608,7 +607,8 @@ public class AbnormalBillController { */ @PostMapping("/bpmCorrectivePreventive") public ResultVo bpmCorrectivePreventive(String secretKey,String isClose,AbnormalBill abnormalBill,AbnormalBillDispose abnormalBillDispose){ - com.foreverwin.modular.core.util.CommonMethods.setSite("1000"); + com.foreverwin.modular.core.util.CommonMethods.setValue("SITE","1000"); + String site = com.foreverwin.modular.core.util.CommonMethods.getSite(); if (!yunBpmConfig.secretKey.equals(secretKey)){ return new ResultVo(ResultCode.FAILED,"秘钥错误"); }else if (StringUtils.isBlank(abnormalBill.getAbnormalNo())){ @@ -624,12 +624,12 @@ public class AbnormalBillController { if ("true".equals(isClose)){ try { com.foreverwin.modular.core.util.CommonMethods.setUser(abnormalBillDispose.getClosedUser()); - List abnormalBills = abnormalBillService.selectList(aBill); - abnormalBills.get(0).setStatus(Constants.SHUT_DOWN); + AbnormalBill abnormalBillOld = abnormalBillService.getById(HandleEnum.ABNORMAL_BILL.getHandle(site,abnormalBill.getAbnormalNo())); + abnormalBillOld.setStatus(Constants.SHUT_DOWN); String local = LocaleContextHolder.getLocale().getLanguage(); AbnormalBillDisposeDto abnormalBillDisposeDto = abnormalBillDisposeMapper.findAllByAbnormalNo(abnormalBill, local); abnormalPlanService.saveAbnormalPlan(abnormalBillDisposeDto,now); - abnormalBillService.saveOrUpdate(abnormalBills.get(0)); + abnormalBillService.saveOrUpdate(abnormalBillOld); abnormalBillDisposes.get(0).setClosedUser(abnormalBillDispose.getClosedUser()); abnormalBillDisposes.get(0).setClosedDateTime(now); return new ResultVo(ResultCode.SUCCESS,"bpm闭环关闭成功");