Browse Source

[fix]

销售管理 客户报价
修改客户报价设置流程发起人角色service方法,设置主管标识为1,总经理/总助为3;
修改客户报价更新service方法,去除编辑后重新提交申请语句;
dev
王晓迪 2 months ago
parent
commit
a4882ae7fe
  1. 2
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerQuoteService.java
  2. 28
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerQuoteServiceImpl.java

2
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);
/**
* 删除客户报价信息

28
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<String, Object> variables) {
Set<String> 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);
}
}

Loading…
Cancel
Save