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); } }