update 人事审批相关2.1

This commit is contained in:
mash 2023-06-25 10:01:33 +08:00
parent eb0e421014
commit 128374bc10
3 changed files with 0 additions and 13 deletions

View File

@ -93,14 +93,12 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
@Transactional(rollbackFor = Exception.class)
public AjaxResult audit(AuditRequest auditRequest) {
String loginId = (String) StpUtil.getLoginId();
System.out.println("loginId = " + loginId);
User loginUser = userMapper.selectById(loginId);
Audit one = getOne(new LambdaQueryWrapper<Audit>()
.eq(Audit::getPersonnelId, auditRequest.getPersonnelId())
.eq(Audit::getPerType, auditRequest.getType())
.eq(Audit::getAuditState, ArgsConst.WAITING)
.eq(Audit::getApprover, loginId));
System.out.println("one = " + one);
if (ObjectUtil.isEmpty(one)) {
return AjaxResult.fail().msg("该用户不能审批!");
}
@ -124,11 +122,9 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
.eq(PersonnelMiddle::getBeforeId, personnel.getId()).eq(PersonnelMiddle::getType, auditRequest.getType())
.eq(PersonnelMiddle::getState, "1");
PersonnelMiddle middle = personnelMiddleMapper.selectOne(wrapper);
System.out.println("middle = " + middle);
if (ObjectUtil.isNotEmpty(middle)) {
Personnel personnelOne = personnelMapper.selectById(middle.getAfterId());
personnelOne.setState("2");
System.out.println("personnelOne = " + personnelOne);
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())) {
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
@ -137,7 +133,6 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
workFlow(personnel.getCreatedId(), ArgsConst.PERSONNEL, auditRequest.getPersonnelId(), "企业人员申报", true);
}
if (ArgsConst.CHANGE.equals(auditRequest.getType())) {
System.out.println(" =11111111111111 ");
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
personnelOne.setChangeAlterationSign("2");
personnelOne.setChangeAuditState(3);
@ -190,7 +185,6 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
List<Audit> auditList = list(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()));
PersonnelMiddle middle = personnelMiddleMapper.selectOne(new LambdaQueryWrapper<PersonnelMiddle>().eq(PersonnelMiddle::getBeforeId, auditRequest.getPersonnelId()).eq(PersonnelMiddle::getState, "1"));
System.out.println("middle = " + middle);
Personnel afterPersonnel = new Personnel();
if (ObjectUtil.isNotEmpty(middle)) {
afterPersonnel = personnelMapper.selectById(middle.getAfterId());

View File

@ -93,7 +93,6 @@ public class ExchangeServiceImpl extends BaseService<ExchangeMapper, Exchange> i
Page exchangePage = page(page,wrapper);
List<Exchange> list = exchangePage.getRecords();
exchangePage.setRecords(list.stream().map(e->{
System.out.println("e = " + e);
ExchangePageDto dto = BeanUtil.copyProperties(e, ExchangePageDto.class);
Personnel personnel = new Personnel();
if (StrUtil.isNotBlank(e.getPersonnelId())){

View File

@ -332,7 +332,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
@Override
@Transactional(rollbackFor = Exception.class)
public AjaxResult updateChange(PersonnelUpdateRequest request) {
System.out.println("request = " + request.getId());
List<AttachmentRequest> cardFiles = request.getCardFileList();
List<AttachmentRequest> jobTitleFiles = request.getJobTitleFileList();
List<AttachmentRequest> engageFiles = request.getEngageFileList();
@ -342,10 +341,8 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
String type = ArgsConst.CHANGE;
PersonnelMiddle personnelMiddle = personnelMiddleMapper.selectOne(new LambdaQueryWrapper<PersonnelMiddle>().eq(PersonnelMiddle::getAfterId, request.getId()).eq(PersonnelMiddle::getState,"1"));
String id = null;String card = null;String jobTitle = null;String engage = null;String education =null;String audit = null;
System.out.println("personnelMiddle = " + personnelMiddle);
if (ObjectUtil.isNotNull(personnelMiddle)){
id = personnelMiddle.getBeforeId();
System.out.println("id" + id);
card = StringUtils.join(saveFilePath(cardFiles, ArgsConst.CARD_FILE, type, id), ',');
jobTitle = StringUtils.join(saveFilePath(jobTitleFiles, ArgsConst.JOBTITLE_FILE, type, id), ',');
engage = StringUtils.join(saveFilePath(engageFiles, ArgsConst.ENGAGE_FILE, type,id), ',');
@ -426,8 +423,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
if (StrUtil.isNotBlank(audit)){
per.setAuditFile(saveAlteration("审批资料附件更改",per.getAuditFile(),audit,type,id,ColumnUtil.getFieldName(Personnel::getAuditFile)).toString());
}
System.out.println("personnelMiddle = " + personnelMiddle);
if (ObjectUtil.isEmpty(personnelMiddle)){
per.setId("");
per.setState("1");
@ -486,7 +481,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
* @return
*/
public ArrayList<String> saveFilePath(List<AttachmentRequest> file, String type, String args, String id) {
System.out.println("file = " + id);
if (CollectionUtil.isNotEmpty(file)) {
ArrayList<String> path = new ArrayList<>();
for (AttachmentRequest request : file) {