bug修改2.0
This commit is contained in:
parent
765676b2fe
commit
81671e21cd
|
@ -63,4 +63,7 @@ public class Exchange extends BaseEntity{
|
|||
@ApiModelProperty(value = "终审意见")
|
||||
private String finalTrialRemark;
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -32,5 +32,8 @@ public class PersonnelMiddle extends BaseEntity{
|
|||
@ApiModelProperty(value = "数据状态:0:历史数据 ,1:待定数据")
|
||||
private String state;
|
||||
|
||||
@ApiModelProperty(value = "类型:personnel :人员 change:变更 exchange:选调")
|
||||
private String type;
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -135,7 +135,13 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|||
|
||||
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())||ArgsConst.CHANGE.equals(auditRequest.getType())){
|
||||
Personnel personnel = personnelMapper.selectById(auditRequest.getPersonnelId());
|
||||
PersonnelMiddle middle = personnelMiddleMapper.selectOne(new LambdaQueryWrapper<PersonnelMiddle>().eq(PersonnelMiddle::getBeforeId, personnel.getId()).eq(PersonnelMiddle::getState, "1"));
|
||||
LambdaQueryWrapper<PersonnelMiddle> wrapper = new LambdaQueryWrapper<PersonnelMiddle>().eq(PersonnelMiddle::getBeforeId, personnel.getId()).eq(PersonnelMiddle::getState, "1");
|
||||
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())){
|
||||
wrapper.eq(PersonnelMiddle::getType,ArgsConst.PERSONNEL);
|
||||
}else if (ArgsConst.CHANGE.equals(auditRequest.getType())){
|
||||
wrapper.eq(PersonnelMiddle::getType,ArgsConst.CHANGE);
|
||||
}
|
||||
PersonnelMiddle middle = personnelMiddleMapper.selectOne(wrapper);
|
||||
Personnel personnelOne = personnelMapper.selectById(middle.getAfterId());
|
||||
String id = personnelOne.getId();
|
||||
personnelOne.setState("2");
|
||||
|
|
|
@ -154,7 +154,6 @@ public class CompanyNameServiceImpl extends BaseService<CompanyNameMapper, Compa
|
|||
LambdaQueryWrapper<CompanyName> queryWrapper = new LambdaQueryWrapper<>();
|
||||
queryWrapper.eq(StrUtil.isNotBlank(id),CompanyName::getId,id);
|
||||
List<CompanyName> list = companyNameMapper.selectList(queryWrapper);
|
||||
list.forEach(System.out::println);
|
||||
for (CompanyName companyName : list) {
|
||||
Integer count = directorsSupervisorsMapper.selectCount(new LambdaQueryWrapper<DirectorsSupervisors>().eq(DirectorsSupervisors::getAuditState, 3).eq(DirectorsSupervisors::getOrganizationId, companyName.getId()));
|
||||
LambdaQueryWrapper<Personnel> wrapper = new LambdaQueryWrapper<Personnel>()
|
||||
|
@ -175,7 +174,6 @@ public class CompanyNameServiceImpl extends BaseService<CompanyNameMapper, Compa
|
|||
statementDto.setNum(Long.valueOf(listPersonnel.size()));
|
||||
statementDto.setThereIntoNum(0);
|
||||
statementDtos.add(statementDto);
|
||||
statementDtos.forEach(System.out::println);
|
||||
}
|
||||
return statementDtos;
|
||||
}
|
||||
|
|
|
@ -149,10 +149,12 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
}
|
||||
Personnel personnel = new Personnel();
|
||||
if (type.equals(ArgsConst.UPDATE)){
|
||||
BeanUtil.copyProperties(personnelMapper.selectById(id),personnel);
|
||||
PersonnelMiddle middle = personnelMiddleMapper.selectOne(new LambdaQueryWrapper<PersonnelMiddle>()
|
||||
.eq(PersonnelMiddle::getBeforeId, id).eq(PersonnelMiddle::getType,ArgsConst.PERSONNEL).eq(PersonnelMiddle::getState, "1"));
|
||||
BeanUtil.copyProperties(personnelMapper.selectById(middle.getAfterId()),personnel);
|
||||
}else {
|
||||
PersonnelMiddle middle = personnelMiddleMapper.selectOne(new LambdaQueryWrapper<PersonnelMiddle>()
|
||||
.eq(PersonnelMiddle::getBeforeId, id).eq(PersonnelMiddle::getState, "1"));
|
||||
.eq(PersonnelMiddle::getBeforeId, id).eq(PersonnelMiddle::getType,ArgsConst.CHANGE).eq(PersonnelMiddle::getState, "1"));
|
||||
BeanUtil.copyProperties(personnelMapper.selectById(middle.getAfterId()),personnel);
|
||||
}
|
||||
if (ObjectUtil.isEmpty(personnel))return AjaxResult.fail().msg("该人员不存在!");
|
||||
|
@ -269,6 +271,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
per.setAlterationSign("1");
|
||||
save(per);
|
||||
middle.setAfterId(per.getId());
|
||||
middle.setType(ArgsConst.PERSONNEL);
|
||||
personnelMiddleService.savePer(middle);
|
||||
saveAttachment(cardFile, ArgsConst.CARD_FILE, updateRequest.getId(), ArgsConst.UPDATE);
|
||||
saveAttachment(educationFile, ArgsConst.EDUCATION_FILE, updateRequest.getId(), ArgsConst.UPDATE);
|
||||
|
@ -329,6 +332,7 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
|||
per.setChangeAlterationSign("1");
|
||||
save(per);
|
||||
middle.setAfterId(per.getId());
|
||||
middle.setType(ArgsConst.CHANGE);
|
||||
personnelMiddleService.savePer(middle);
|
||||
saveAttachment(cardFiles, ArgsConst.CARD_FILE, request.getId(), ArgsConst.UPDATE);
|
||||
saveAttachment(jobTitleFiles, ArgsConst.JOBTITLE_FILE, request.getId(), ArgsConst.UPDATE);
|
||||
|
|
Loading…
Reference in New Issue