|
|
@ -93,11 +93,15 @@ public class AuthRuleServiceImpl extends ServiceImpl<AuthRuleMapper, AuthRuleDat |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
@Override |
|
|
@Override |
|
|
|
|
|
@Transactional(rollbackFor = Exception.class) |
|
|
public void getFormAuthRule(String recordType,String site,String buNo,String orderRef1) throws MessagingException, UnsupportedEncodingException { |
|
|
public void getFormAuthRule(String recordType,String site,String buNo,String orderRef1) throws MessagingException, UnsupportedEncodingException { |
|
|
List<AuthHistData> authMailSends = new ArrayList<>(); |
|
|
List<AuthHistData> authMailSends = new ArrayList<>(); |
|
|
|
|
|
|
|
|
AuthRuleDataVo authRuleData = authRuleMapper.getFormAuthRule(recordType,site,buNo); |
|
|
AuthRuleDataVo authRuleData = authRuleMapper.getFormAuthRule(recordType,site,buNo); |
|
|
List<AuthStepDataVo> authStepsByRuleId = authStepMapper.getAuthStepsByRuleId(authRuleData.getAuthRuleId()); |
|
|
List<AuthStepDataVo> authStepsByRuleId = authStepMapper.getAuthStepsByRuleId(authRuleData.getAuthRuleId()); |
|
|
|
|
|
if (authStepsByRuleId.isEmpty()){ |
|
|
|
|
|
throw new RuntimeException("该申请单的审批规则下不存在审批步骤,无法下达!"); |
|
|
|
|
|
} |
|
|
for (AuthStepDataVo authStepDataVo : authStepsByRuleId) { |
|
|
for (AuthStepDataVo authStepDataVo : authStepsByRuleId) { |
|
|
AuthHistData authHistData = new AuthHistData(); |
|
|
AuthHistData authHistData = new AuthHistData(); |
|
|
authHistData.setRecordTypeDb(recordType); |
|
|
authHistData.setRecordTypeDb(recordType); |
|
|
|