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