update 人事审批相关2

This commit is contained in:
mash 2023-06-25 09:57:18 +08:00
parent c520762827
commit eb0e421014
1 changed files with 8 additions and 1 deletions

View File

@ -131,6 +131,13 @@ public class ExchangeServiceImpl extends BaseService<ExchangeMapper, Exchange> i
@Override @Override
@Transactional(rollbackFor = Exception.class) @Transactional(rollbackFor = Exception.class)
public AjaxResult saveExchange(ExchangeRequest exchangeRequest) { public AjaxResult saveExchange(ExchangeRequest exchangeRequest) {
Personnel personnel = personnelMapper.selectById(exchangeRequest.getPersonnelId());
if (personnel.getChangeAuditState()==2){
return AjaxResult.fail("该人员有带领导审批数据,不能进行选调!");
}
if ("1".equals(personnel.getChangeAlterationSign())){
return AjaxResult.fail("该人员有变更中数据,不能进行选调!");
}
List<AttachmentDto> attachmentList = exchangeRequest.getAttachmentList(); List<AttachmentDto> attachmentList = exchangeRequest.getAttachmentList();
ArrayList<String> s = new ArrayList<>(); ArrayList<String> s = new ArrayList<>();
Exchange exchange = BeanUtil.copyProperties(exchangeRequest, Exchange.class); Exchange exchange = BeanUtil.copyProperties(exchangeRequest, Exchange.class);
@ -219,7 +226,7 @@ public class ExchangeServiceImpl extends BaseService<ExchangeMapper, Exchange> i
.eq(Audit::getPersonnelId, id) .eq(Audit::getPersonnelId, id)
.eq(Audit::getPerType,ArgsConst.EXCHANGE) .eq(Audit::getPerType,ArgsConst.EXCHANGE)
.eq(Audit::getApprover, StpUtil.getLoginIdAsString()) .eq(Audit::getApprover, StpUtil.getLoginIdAsString())
.eq(Audit::getAuditOrder, ArgsConst.WAITING); .eq(Audit::getAuditState, ArgsConst.WAITING);
Audit audit = auditMapper.selectOne(wrapper); Audit audit = auditMapper.selectOne(wrapper);
if (ObjectUtil.isNotEmpty(audit)){ if (ObjectUtil.isNotEmpty(audit)){
exchangeOneDto.setAuditBtn(true); exchangeOneDto.setAuditBtn(true);