This commit is contained in:
parent
7484078098
commit
d47ae79c48
|
@ -141,15 +141,29 @@ public class ExchangeServiceImpl extends BaseService<ExchangeMapper, Exchange> i
|
||||||
public AjaxResult selectById(String id) {
|
public AjaxResult selectById(String id) {
|
||||||
Exchange exchange = getById(id);
|
Exchange exchange = getById(id);
|
||||||
Personnel personnel = personnelMapper.selectById(exchange.getPersonnelId());
|
Personnel personnel = personnelMapper.selectById(exchange.getPersonnelId());
|
||||||
|
if (ObjectUtil.isEmpty(personnel)){
|
||||||
|
return AjaxResult.fail().msg("该用户不存在!");
|
||||||
|
}
|
||||||
CompanyName nowCompany = companyNameMapper.selectById(personnel.getCompanyName());
|
CompanyName nowCompany = companyNameMapper.selectById(personnel.getCompanyName());
|
||||||
|
if (ObjectUtil.isEmpty(nowCompany)){
|
||||||
|
return AjaxResult.fail().msg("该用户不存在!");
|
||||||
|
}
|
||||||
Dept nowDept = deptMapper.selectById(personnel.getPresentDept());
|
Dept nowDept = deptMapper.selectById(personnel.getPresentDept());
|
||||||
|
if (ObjectUtil.isEmpty(nowDept)){
|
||||||
|
return AjaxResult.fail().msg("该用户不存在!");
|
||||||
|
}
|
||||||
|
|
||||||
CompanyName willCompany = companyNameMapper.selectById(exchange.getWillCompanyId());
|
CompanyName willCompany = companyNameMapper.selectById(exchange.getWillCompanyId());
|
||||||
|
if (ObjectUtil.isEmpty(willCompany)){
|
||||||
|
return AjaxResult.fail().msg("该用户不存在!");
|
||||||
|
}
|
||||||
Dept dept = deptMapper.selectById(exchange.getWillDept());
|
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<Attachment> attachments = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, exchange.getId()));
|
||||||
List<AttachmentDto> attachmentDtos = BeanUtil.copyToList(attachments, AttachmentDto.class);
|
List<AttachmentDto> attachmentDtos = BeanUtil.copyToList(attachments, AttachmentDto.class);
|
||||||
System.out.println("byId = " + exchange);
|
|
||||||
ExchangeOneDto exchangeOneDto = BeanUtil.copyProperties(exchange, ExchangeOneDto.class);
|
ExchangeOneDto exchangeOneDto = BeanUtil.copyProperties(exchange, ExchangeOneDto.class);
|
||||||
exchangeOneDto.setWillCompanyName(willCompany.getCompanyName());
|
exchangeOneDto.setWillCompanyName(willCompany.getCompanyName());
|
||||||
exchangeOneDto.setWillCOde(willCompany.getCreditCode());
|
exchangeOneDto.setWillCOde(willCompany.getCreditCode());
|
||||||
|
|
|
@ -324,7 +324,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
.eq(ObjectUtil.isNotNull(request.getHireDate()),Personnel::getHireDate,request.getHireDate())
|
.eq(ObjectUtil.isNotNull(request.getHireDate()),Personnel::getHireDate,request.getHireDate())
|
||||||
.eq(ObjectUtil.isNotNull(request.getResignationTime()),Personnel::getResignationTime,request.getResignationTime())
|
.eq(ObjectUtil.isNotNull(request.getResignationTime()),Personnel::getResignationTime,request.getResignationTime())
|
||||||
.eq(StrUtil.isNotBlank(request.getWorkState()),Personnel::getWorkState,request.getWorkState())
|
.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());
|
.eq(StrUtil.isNotBlank(request.getAlterationSign()),Personnel::getAlterationSign,request.getAlterationSign());
|
||||||
wrapper.lambda().like(Personnel::getUserName,request.getUserName())
|
wrapper.lambda().like(Personnel::getUserName,request.getUserName())
|
||||||
.like(Personnel::getNumberId,request.getNumberId())
|
.like(Personnel::getNumberId,request.getNumberId())
|
||||||
|
|
Loading…
Reference in New Issue