From a4882ae7fef4d24a28040c012c5cce25bff17baa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E7=8E=8B=E6=99=93=E8=BF=AA?= <2596750866@qq.com> Date: Thu, 10 Oct 2024 15:46:54 +0800 Subject: [PATCH] =?UTF-8?q?[fix]=20=E9=94=80=E5=94=AE=E7=AE=A1=E7=90=86=20?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=20=E4=BF=AE=E6=94=B9?= =?UTF-8?q?=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E8=AE=BE=E7=BD=AE=E6=B5=81?= =?UTF-8?q?=E7=A8=8B=E5=8F=91=E8=B5=B7=E4=BA=BA=E8=A7=92=E8=89=B2service?= =?UTF-8?q?=E6=96=B9=E6=B3=95=EF=BC=8C=E8=AE=BE=E7=BD=AE=E4=B8=BB=E7=AE=A1?= =?UTF-8?q?=E6=A0=87=E8=AF=86=E4=B8=BA1=EF=BC=8C=E6=80=BB=E7=BB=8F?= =?UTF-8?q?=E7=90=86/=E6=80=BB=E5=8A=A9=E4=B8=BA3=EF=BC=9B=20=E4=BF=AE?= =?UTF-8?q?=E6=94=B9=E5=AE=A2=E6=88=B7=E6=8A=A5=E4=BB=B7=E6=9B=B4=E6=96=B0?= =?UTF-8?q?service=E6=96=B9=E6=B3=95=EF=BC=8C=E5=8E=BB=E9=99=A4=E7=BC=96?= =?UTF-8?q?=E8=BE=91=E5=90=8E=E9=87=8D=E6=96=B0=E6=8F=90=E4=BA=A4=E7=94=B3?= =?UTF-8?q?=E8=AF=B7=E8=AF=AD=E5=8F=A5=EF=BC=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../service/ISysCustomerQuoteService.java | 2 +- .../impl/SysCustomerQuoteServiceImpl.java | 28 ++++--------------- 2 files changed, 6 insertions(+), 24 deletions(-) diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java index 1fd793f2..0f1c15cf 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java @@ -51,7 +51,7 @@ public interface ISysCustomerQuoteService * @param sysCustomerQuote 客户报价信息 * @return 结果 */ - ProcessInstance updateSysCustomerQuote(SysCustomerQuoteVo sysCustomerQuote); + int updateSysCustomerQuote(SysCustomerQuoteVo sysCustomerQuote); /** * 删除客户报价信息 diff --git a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java index 7a42a7cb..5344381d 100644 --- a/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java +++ b/ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java @@ -222,7 +222,7 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { } @Transactional(rollbackFor = Exception.class) @Override - public ProcessInstance updateSysCustomerQuote(SysCustomerQuoteVo sysCustomerQuote) { + public int updateSysCustomerQuote(SysCustomerQuoteVo sysCustomerQuote) { String loginName = ShiroUtils.getLoginName(); sysCustomerQuote.setUpdateBy(loginName); sysCustomerQuote.setUpdateTime(DateUtils.getNowDate()); @@ -244,24 +244,8 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { } } } - sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote); - // 启动流程 - String applyTitle = user.getUserName()+"发起了客户报价信息提交审批-"+DateUtils.dateTimeNow(); - String instanceType = "submit"; - ProcessInstance processInstance = startProcessInstance(applyTitle,instanceType,sysCustomerQuote, user); - String processInstanceId = processInstance.getProcessInstanceId(); - // 提交实例id - sysCustomerQuote.setSubmitInstanceId(processInstanceId); - // 存在提交完就流程结束的情况 - boolean processIsFinish = processService.judgeProcessIsFinish(processInstanceId); - if(processIsFinish){ - // 审核状态-审核通过 - sysCustomerQuote.setAuditStatus("1"); - // 使用状态-是 - sysCustomerQuote.setUseStatus("1"); - } - sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote); - return processInstance; + int updateResult = sysCustomerQuoteMapper.updateSysCustomerQuote(sysCustomerQuote); + return updateResult; } @Override @@ -443,13 +427,11 @@ public class SysCustomerQuoteServiceImpl implements ISysCustomerQuoteService { private void buildAuthority(SysUser user, Map variables) { Set roleKeys = roleService.selectRoleKeys(user.getUserId()); // 角色不同审核人不同 - if(roleKeys.contains("zozjRole") || roleKeys.contains("admin") || roleKeys.contains("zjlRole")){ - variables.put("authority",4); - }else if(roleKeys.contains("ywzgRole")){ + if(roleKeys.contains("zozjRole") || roleKeys.contains("zjlRole") || roleKeys.contains("admin")){ variables.put("authority",3); }else if(roleKeys.contains("ywjlRole")){ variables.put("authority",2); - }else if(roleKeys.contains("ywyRole")){ + }else if(roleKeys.contains("ywyRole")||roleKeys.contains("ywzgRole")){ variables.put("authority",1); } }