Merge remote-tracking branch 'origin/master'

This commit is contained in:
zhuyy 2023-02-13 13:25:53 +08:00
commit b36e958ace
2 changed files with 16 additions and 2 deletions

View File

@ -141,15 +141,29 @@ public class ExchangeServiceImpl extends BaseService<ExchangeMapper, Exchange> i
public AjaxResult selectById(String id) {
Exchange exchange = getById(id);
Personnel personnel = personnelMapper.selectById(exchange.getPersonnelId());
if (ObjectUtil.isEmpty(personnel)){
return AjaxResult.fail().msg("该用户不存在!");
}
CompanyName nowCompany = companyNameMapper.selectById(personnel.getCompanyName());
if (ObjectUtil.isEmpty(nowCompany)){
return AjaxResult.fail().msg("该用户不存在!");
}
Dept nowDept = deptMapper.selectById(personnel.getPresentDept());
if (ObjectUtil.isEmpty(nowDept)){
return AjaxResult.fail().msg("该用户不存在!");
}
CompanyName willCompany = companyNameMapper.selectById(exchange.getWillCompanyId());
if (ObjectUtil.isEmpty(willCompany)){
return AjaxResult.fail().msg("该用户不存在!");
}
Dept dept = deptMapper.selectById(exchange.getWillDept());
if (ObjectUtil.isEmpty(dept)){
return AjaxResult.fail().msg("该用户不存在!");
}
List<Attachment> attachments = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, exchange.getId()));
List<AttachmentDto> attachmentDtos = BeanUtil.copyToList(attachments, AttachmentDto.class);
System.out.println("byId = " + exchange);
ExchangeOneDto exchangeOneDto = BeanUtil.copyProperties(exchange, ExchangeOneDto.class);
exchangeOneDto.setWillCompanyName(willCompany.getCompanyName());
exchangeOneDto.setWillCOde(willCompany.getCreditCode());

View File

@ -324,7 +324,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
.eq(ObjectUtil.isNotNull(request.getHireDate()),Personnel::getHireDate,request.getHireDate())
.eq(ObjectUtil.isNotNull(request.getResignationTime()),Personnel::getResignationTime,request.getResignationTime())
.eq(StrUtil.isNotBlank(request.getWorkState()),Personnel::getWorkState,request.getWorkState())
.eq(StrUtil.isNotBlank(request.getReceipts()),Personnel::getRecruitNumber,request.getReceipts())
.eq(StrUtil.isNotBlank(request.getReceipts()),Personnel::getReceipts,request.getReceipts())
.eq(StrUtil.isNotBlank(request.getAlterationSign()),Personnel::getAlterationSign,request.getAlterationSign());
wrapper.lambda().like(Personnel::getUserName,request.getUserName())
.like(Personnel::getNumberId,request.getNumberId())