|
|
@@ -96,6 +96,8 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
private UserSuperEvaluateMapper userSuperEvaluateMapper;
|
|
|
@Autowired
|
|
|
private OrderPublicReleaseLogMapper orderPublicReleaseLogMapper;
|
|
|
+ @Autowired
|
|
|
+ private PublicConfigMapper publicConfigMapper;
|
|
|
|
|
|
@Override
|
|
|
@Transactional
|
|
|
@@ -1196,7 +1198,7 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
public Object updateMaxDuration(String orderNo, Double maxDuration,String remarks) {
|
|
|
TOrderPublicReleaseCount in =new TOrderPublicReleaseCount();
|
|
|
TOrderPublicReleaseCount use = tOrderPublicReleaseCountMapper.selectByOrderNo(orderNo);
|
|
|
- if (use.getMaxProcess()==1||use.getMaxProcess()==2){
|
|
|
+ if (use.getMaxProcess()==1||use.getMaxProcess()==2||use.getMaxProcess()==3){
|
|
|
throw new BusinessException("该最大公出已经是待审核的状态。");
|
|
|
}
|
|
|
in.setOrderNo(orderNo);
|
|
|
@@ -1204,14 +1206,26 @@ public class PublicReleaseServiceImpl extends BaseMybatisDao<PublicReleaseMapper
|
|
|
in.setMaxProcess(1);
|
|
|
in.setMaxStatus(1);
|
|
|
addOrderPublicReleaseLog(orderNo,0,0,remarks,use.getMaxDuration(),maxDuration);
|
|
|
- List<Admin> admins = adminMapper.selectAdminByRoleType(AFTConstants.TECH_ADMIN);
|
|
|
+ PublicConfig publicConfig = publicConfigMapper.queryById(1);
|
|
|
TOrderNewBo order = tOrderNewMapper.getSaleIdByOno(orderNo);
|
|
|
StringBuilder str=new StringBuilder();
|
|
|
str.append("合同编号[").append(order.getContractNo()).append("]最大公出限制审核");
|
|
|
str.append("需要审核,请尽快审核。");
|
|
|
- admins.forEach(e->{
|
|
|
- addNoticeAndEmail(e.getId(),NoticeStatus.PUBLIC_MAX_DURATION.getCode(), str.toString());
|
|
|
- });
|
|
|
+ if (publicConfig.getTechAuditorStauts()==0){
|
|
|
+ if (publicConfig.getFinanceAuditorStauts()==0){
|
|
|
+ if (publicConfig.getOtherAuditorStauts()==0){
|
|
|
+ //当3个都未设置直接通过
|
|
|
+ in.setMaxProcess(5);
|
|
|
+ addOrderPublicReleaseLog(orderNo,1,5,"未设置审核人直接全部通过");
|
|
|
+ }else {
|
|
|
+ addNoticeAndEmail(publicConfig.getOtherAuditor(),NoticeStatus.PUBLIC_MAX_DURATION.getCode(), str.toString());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ addNoticeAndEmail(publicConfig.getFinanceAuditor(),NoticeStatus.PUBLIC_MAX_DURATION.getCode(), str.toString());
|
|
|
+ }
|
|
|
+ }else {
|
|
|
+ addNoticeAndEmail(publicConfig.getTechAuditor(),NoticeStatus.PUBLIC_MAX_DURATION.getCode(), str.toString());
|
|
|
+ }
|
|
|
tOrderPublicReleaseCountMapper.updateByOrderNo(in);
|
|
|
return 1;
|
|
|
}
|