|
|
@ -1,6 +1,7 @@
|
|
|
|
package com.ydool.staff.service.impl;
|
|
|
|
package com.ydool.staff.service.impl;
|
|
|
|
|
|
|
|
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
|
import cn.dev33.satoken.stp.StpUtil;
|
|
|
|
|
|
|
|
import cn.hutool.core.bean.BeanUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.date.DateUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import cn.hutool.core.util.ObjectUtil;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@ -97,7 +98,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
Audit one = getOne(new LambdaQueryWrapper<Audit>()
|
|
|
|
Audit one = getOne(new LambdaQueryWrapper<Audit>()
|
|
|
|
.eq(Audit::getPersonnelId, auditRequest.getPersonnelId())
|
|
|
|
.eq(Audit::getPersonnelId, auditRequest.getPersonnelId())
|
|
|
|
.eq(Audit::getPerType, auditRequest.getType())
|
|
|
|
.eq(Audit::getPerType, auditRequest.getType())
|
|
|
|
.eq(Audit::getAuditOrder, ArgsConst.WAITING)
|
|
|
|
.eq(Audit::getAuditState, ArgsConst.WAITING)
|
|
|
|
.eq(Audit::getApprover, loginId));
|
|
|
|
.eq(Audit::getApprover, loginId));
|
|
|
|
System.out.println("one = " + one);
|
|
|
|
System.out.println("one = " + one);
|
|
|
|
if (ObjectUtil.isEmpty(one)) {
|
|
|
|
if (ObjectUtil.isEmpty(one)) {
|
|
|
@ -120,11 +121,11 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
if (ArgsConst.PERSONNEL.equals(auditRequest.getType()) || ArgsConst.CHANGE.equals(auditRequest.getType())) {
|
|
|
|
if (ArgsConst.PERSONNEL.equals(auditRequest.getType()) || ArgsConst.CHANGE.equals(auditRequest.getType())) {
|
|
|
|
Personnel personnel = personnelMapper.selectById(auditRequest.getPersonnelId());
|
|
|
|
Personnel personnel = personnelMapper.selectById(auditRequest.getPersonnelId());
|
|
|
|
LambdaQueryWrapper<PersonnelMiddle> wrapper = new LambdaQueryWrapper<PersonnelMiddle>()
|
|
|
|
LambdaQueryWrapper<PersonnelMiddle> wrapper = new LambdaQueryWrapper<PersonnelMiddle>()
|
|
|
|
.eq(PersonnelMiddle::getBeforeId, personnel.getId()).eq(PersonnelMiddle::getType,auditRequest.getType())
|
|
|
|
.eq(PersonnelMiddle::getBeforeId, personnel.getId()).eq(PersonnelMiddle::getType, auditRequest.getType())
|
|
|
|
.eq(PersonnelMiddle::getState, "1");
|
|
|
|
.eq(PersonnelMiddle::getState, "1");
|
|
|
|
PersonnelMiddle middle = personnelMiddleMapper.selectOne(wrapper);
|
|
|
|
PersonnelMiddle middle = personnelMiddleMapper.selectOne(wrapper);
|
|
|
|
System.out.println("middle = " + middle);
|
|
|
|
System.out.println("middle = " + middle);
|
|
|
|
if (ObjectUtil.isNotEmpty(middle)){
|
|
|
|
if (ObjectUtil.isNotEmpty(middle)) {
|
|
|
|
Personnel personnelOne = personnelMapper.selectById(middle.getAfterId());
|
|
|
|
Personnel personnelOne = personnelMapper.selectById(middle.getAfterId());
|
|
|
|
personnelOne.setState("2");
|
|
|
|
personnelOne.setState("2");
|
|
|
|
System.out.println("personnelOne = " + personnelOne);
|
|
|
|
System.out.println("personnelOne = " + personnelOne);
|
|
|
@ -133,14 +134,14 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnelOne.setAlterationSign("2");
|
|
|
|
personnelOne.setAlterationSign("2");
|
|
|
|
personnelOne.setAuditState(3);
|
|
|
|
personnelOne.setAuditState(3);
|
|
|
|
workFlow(personnel.getCreatedId(),ArgsConst.PERSONNEL,auditRequest.getPersonnelId(),"企业人员申报",true);
|
|
|
|
workFlow(personnel.getCreatedId(), ArgsConst.PERSONNEL, auditRequest.getPersonnelId(), "企业人员申报", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ArgsConst.CHANGE.equals(auditRequest.getType())) {
|
|
|
|
if (ArgsConst.CHANGE.equals(auditRequest.getType())) {
|
|
|
|
System.out.println(" =11111111111111 ");
|
|
|
|
System.out.println(" =11111111111111 ");
|
|
|
|
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnelOne.setChangeAlterationSign("2");
|
|
|
|
personnelOne.setChangeAlterationSign("2");
|
|
|
|
personnelOne.setChangeAuditState(3);
|
|
|
|
personnelOne.setChangeAuditState(3);
|
|
|
|
workFlow(personnel.getCreatedId(),ArgsConst.CHANGE,auditRequest.getPersonnelId(),"人员变更申报",true);
|
|
|
|
workFlow(personnel.getCreatedId(), ArgsConst.CHANGE, auditRequest.getPersonnelId(), "人员变更申报", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String id = personnel.getId();
|
|
|
|
String id = personnel.getId();
|
|
|
|
String idOne = personnelOne.getId();
|
|
|
|
String idOne = personnelOne.getId();
|
|
|
@ -151,18 +152,18 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
personnelMapper.updateById(personnelOne);
|
|
|
|
personnelMapper.updateById(personnelOne);
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
|
personnelMiddleMapper.updateById(middle);
|
|
|
|
personnelMiddleMapper.updateById(middle);
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())) {
|
|
|
|
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())) {
|
|
|
|
personnel.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnel.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnel.setAlterationSign("2");
|
|
|
|
personnel.setAlterationSign("2");
|
|
|
|
personnel.setAuditState(3);
|
|
|
|
personnel.setAuditState(3);
|
|
|
|
workFlow(personnel.getCreatedId(),ArgsConst.PERSONNEL,auditRequest.getPersonnelId(),"企业人员申报",true);
|
|
|
|
workFlow(personnel.getCreatedId(), ArgsConst.PERSONNEL, auditRequest.getPersonnelId(), "企业人员申报", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
if (ArgsConst.CHANGE.equals(auditRequest.getType())) {
|
|
|
|
if (ArgsConst.CHANGE.equals(auditRequest.getType())) {
|
|
|
|
personnel.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnel.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
personnel.setChangeAlterationSign("2");
|
|
|
|
personnel.setChangeAlterationSign("2");
|
|
|
|
personnel.setChangeAuditState(3);
|
|
|
|
personnel.setChangeAuditState(3);
|
|
|
|
workFlow(personnel.getCreatedId(),ArgsConst.CHANGE,auditRequest.getPersonnelId(),"人员变更申报",true);
|
|
|
|
workFlow(personnel.getCreatedId(), ArgsConst.CHANGE, auditRequest.getPersonnelId(), "人员变更申报", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
personnel.setState("2");
|
|
|
|
personnel.setState("2");
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
@ -179,7 +180,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
personnel.setPosition(exchange.getWillPosition());
|
|
|
|
personnel.setPosition(exchange.getWillPosition());
|
|
|
|
exchangeMapper.updateById(exchange);
|
|
|
|
exchangeMapper.updateById(exchange);
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
|
workFlow(exchange.getCreatedId(),ArgsConst.EXCHANGE,auditRequest.getPersonnelId(),"人员选调申报",true);
|
|
|
|
workFlow(exchange.getCreatedId(), ArgsConst.EXCHANGE, auditRequest.getPersonnelId(), "人员选调申报", true);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
return update ? AjaxResult.ok().msg("审批成功!") : AjaxResult.fail().msg("审批成功!");
|
|
|
|
return update ? AjaxResult.ok().msg("审批成功!") : AjaxResult.fail().msg("审批成功!");
|
|
|
@ -210,7 +211,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
exchange.setState("0");
|
|
|
|
exchange.setState("0");
|
|
|
|
exchange.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
exchange.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
|
|
|
exchangeMapper.updateById(exchange);
|
|
|
|
exchangeMapper.updateById(exchange);
|
|
|
|
workFlow(exchange.getCreatedId(),ArgsConst.EXCHANGE,exchange.getId(),"人员选调申报",false);
|
|
|
|
workFlow(exchange.getCreatedId(), ArgsConst.EXCHANGE, exchange.getId(), "人员选调申报", false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
for (Audit auditOne : auditList) {
|
|
|
|
for (Audit auditOne : auditList) {
|
|
|
|
delete(auditOne.getId());
|
|
|
|
delete(auditOne.getId());
|
|
|
@ -221,20 +222,22 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
|
|
|
|
|
|
|
|
return null;
|
|
|
|
return null;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
public void workFlow(String createdId,String type,String personnelId,String args,Boolean flag ){
|
|
|
|
|
|
|
|
|
|
|
|
public void workFlow(String createdId, String type, String personnelId, String args, Boolean flag) {
|
|
|
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice();
|
|
|
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice();
|
|
|
|
workFlowNotice.setStatus(Boolean.FALSE);
|
|
|
|
workFlowNotice.setStatus(Boolean.FALSE);
|
|
|
|
workFlowNotice.setFlowType(type);
|
|
|
|
workFlowNotice.setFlowType(type);
|
|
|
|
workFlowNotice.setUserId(createdId);
|
|
|
|
workFlowNotice.setUserId(createdId);
|
|
|
|
if (flag){
|
|
|
|
if (flag) {
|
|
|
|
workFlowNotice.setTitle("您的"+args+"已通过");
|
|
|
|
workFlowNotice.setTitle("您的" + args + "已通过");
|
|
|
|
}else {
|
|
|
|
} else {
|
|
|
|
workFlowNotice.setTitle("您的"+args+"未通过");
|
|
|
|
workFlowNotice.setTitle("您的" + args + "未通过");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
workFlowNotice.setFlowId(personnelId);
|
|
|
|
workFlowNotice.setFlowId(personnelId);
|
|
|
|
workFlowNoticeService.save(workFlowNotice);
|
|
|
|
workFlowNoticeService.save(workFlowNotice);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
public Integer saveAuditLog(String personnelId, String approverId, String type, String auditSate, String opinion) {
|
|
|
|
public Integer saveAuditLog(String personnelId, String approverId, String type, String auditSate, String opinion) {
|
|
|
|
AuditLog auditLog = new AuditLog();
|
|
|
|
AuditLog auditLog = new AuditLog();
|
|
|
|
auditLog.setPersonnelId(personnelId);
|
|
|
|
auditLog.setPersonnelId(personnelId);
|
|
|
@ -258,11 +261,11 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
Places places = placesMapper.selectOne(new LambdaQueryWrapper<Places>().eq(Places::getOdd, personnel.getRecruitNumber()));
|
|
|
|
Places places = placesMapper.selectOne(new LambdaQueryWrapper<Places>().eq(Places::getOdd, personnel.getRecruitNumber()));
|
|
|
|
places.setStatus(false);
|
|
|
|
places.setStatus(false);
|
|
|
|
placesMapper.updateById(places);
|
|
|
|
placesMapper.updateById(places);
|
|
|
|
workFlow(personnel.getCreatedId(),ArgsConst.PERSONNEL,personnel.getId(),"企业人员申报",false);
|
|
|
|
workFlow(personnel.getCreatedId(), ArgsConst.PERSONNEL, personnel.getId(), "企业人员申报", false);
|
|
|
|
} else if (ArgsConst.CHANGE.equals(type)) {
|
|
|
|
} else if (ArgsConst.CHANGE.equals(type)) {
|
|
|
|
personnel.setChangeAuditState(4);
|
|
|
|
personnel.setChangeAuditState(4);
|
|
|
|
personnel.setChangeAlterationSign("2");
|
|
|
|
personnel.setChangeAlterationSign("2");
|
|
|
|
workFlow(personnel.getCreatedId(),ArgsConst.CHANGE,personnel.getId(),"人员变更申报",false);
|
|
|
|
workFlow(personnel.getCreatedId(), ArgsConst.CHANGE, personnel.getId(), "人员变更申报", false);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
|
personnelMapper.updateById(personnel);
|
|
|
@ -282,7 +285,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
return AjaxResult.fail().msg("已拒绝请勿重复审批!");
|
|
|
|
return AjaxResult.fail().msg("已拒绝请勿重复审批!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String loginId = StpUtil.getLoginIdAsString();
|
|
|
|
String loginId = StpUtil.getLoginIdAsString();
|
|
|
|
Audit one = getOne(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()).eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, loginId));
|
|
|
|
Audit one = getOne(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()).eq(Audit::getAuditState, ArgsConst.WAITING).eq(Audit::getApprover, loginId));
|
|
|
|
if (ObjectUtil.isNull(one)) {
|
|
|
|
if (ObjectUtil.isNull(one)) {
|
|
|
|
return AjaxResult.fail().msg("该用户不能审批!");
|
|
|
|
return AjaxResult.fail().msg("该用户不能审批!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -304,9 +307,9 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
if (update) {
|
|
|
|
if (update) {
|
|
|
|
QueryWrapper<Recruitment> queryWrapper = new QueryWrapper<Recruitment>().eq("company_id", organization.getId());
|
|
|
|
QueryWrapper<Recruitment> queryWrapper = new QueryWrapper<Recruitment>().eq("company_id", organization.getId());
|
|
|
|
Long places = recruitmentMapper.recruitmentPlaces(queryWrapper);
|
|
|
|
Long places = recruitmentMapper.recruitmentPlaces(queryWrapper);
|
|
|
|
// companyNameMapper.update(null, new LambdaUpdateWrapper<CompanyName>().set(CompanyName::getThisApprovalNumber, companyName.getThisApprovalNumber() - places).eq(CompanyName::getId, companyName.getId()));
|
|
|
|
Integer count = personnelMapper.selectCount(new LambdaQueryWrapper<Personnel>().eq(Personnel::getWorkState, "在职").eq(Personnel::getPersonnelType, "指标内").eq(Personnel::getCompanyName, companyName.getId()));
|
|
|
|
companyNameMapper.update(null, new LambdaUpdateWrapper<CompanyName>().set(CompanyName::getResidualNumber, companyName.getResidualNumber() - places)
|
|
|
|
companyNameMapper.update(null, new LambdaUpdateWrapper<CompanyName>().set(CompanyName::getResidualNumber, companyName.getResidualNumber() - places)
|
|
|
|
// .set(CompanyName::getResidualNumber, companyName.getResidualNumber() - addNumber)
|
|
|
|
.set(CompanyName::getActiveStaff, count)
|
|
|
|
// .set(CompanyName::getRecruit, companyName.getCheckNumber() - companyName.getThisApprovalNumber())
|
|
|
|
// .set(CompanyName::getRecruit, companyName.getCheckNumber() - companyName.getThisApprovalNumber())
|
|
|
|
.eq(CompanyName::getId, companyName.getId()));
|
|
|
|
.eq(CompanyName::getId, companyName.getId()));
|
|
|
|
organization.setAuditState(3);
|
|
|
|
organization.setAuditState(3);
|
|
|
@ -376,7 +379,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
return AjaxResult.fail().msg("已拒绝请勿重复审批!");
|
|
|
|
return AjaxResult.fail().msg("已拒绝请勿重复审批!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String loginId = StpUtil.getLoginIdAsString();
|
|
|
|
String loginId = StpUtil.getLoginIdAsString();
|
|
|
|
Audit one = getOne(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()).eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, loginId));
|
|
|
|
Audit one = getOne(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()).eq(Audit::getAuditState, ArgsConst.WAITING).eq(Audit::getApprover, loginId));
|
|
|
|
if (ObjectUtil.isNull(one)) {
|
|
|
|
if (ObjectUtil.isNull(one)) {
|
|
|
|
return AjaxResult.fail().msg("该用户不能审批!");
|
|
|
|
return AjaxResult.fail().msg("该用户不能审批!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -398,9 +401,10 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
one.setApproverTime(new Date());
|
|
|
|
one.setApproverTime(new Date());
|
|
|
|
boolean update = updateById(one);
|
|
|
|
boolean update = updateById(one);
|
|
|
|
if (update) {
|
|
|
|
if (update) {
|
|
|
|
|
|
|
|
Integer count = personnelMapper.selectCount(new LambdaQueryWrapper<Personnel>().eq(Personnel::getWorkState, "在职").eq(Personnel::getPersonnelType, "指标内").eq(Personnel::getCompanyName, companyName.getId()));
|
|
|
|
companyNameMapper.update(null, new LambdaUpdateWrapper<CompanyName>().set(CompanyName::getThisApprovalNumber, companyName.getThisApprovalNumber() - addNumber)
|
|
|
|
companyNameMapper.update(null, new LambdaUpdateWrapper<CompanyName>().set(CompanyName::getThisApprovalNumber, companyName.getThisApprovalNumber() - addNumber)
|
|
|
|
.set(CompanyName::getResidualNumber, companyName.getResidualNumber() + addNumber)
|
|
|
|
.set(CompanyName::getResidualNumber, companyName.getResidualNumber() + addNumber)
|
|
|
|
// .set(CompanyName::getResidualNumber, companyName.getResidualNumber() + addNumber)
|
|
|
|
.set(CompanyName::getActiveStaff, count)
|
|
|
|
.set(CompanyName::getRecruit, companyName.getRecruit() + addNumber)
|
|
|
|
.set(CompanyName::getRecruit, companyName.getRecruit() + addNumber)
|
|
|
|
.eq(CompanyName::getId, companyName.getId()));
|
|
|
|
.eq(CompanyName::getId, companyName.getId()));
|
|
|
|
organization.setAuditState(3);
|
|
|
|
organization.setAuditState(3);
|
|
|
@ -460,7 +464,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
return AjaxResult.fail().msg("审批已拒绝请勿重复操作!");
|
|
|
|
return AjaxResult.fail().msg("审批已拒绝请勿重复操作!");
|
|
|
|
}
|
|
|
|
}
|
|
|
|
String loginId = StpUtil.getLoginIdAsString();
|
|
|
|
String loginId = StpUtil.getLoginIdAsString();
|
|
|
|
Audit audit = getOne(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()).eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, loginId));
|
|
|
|
Audit audit = getOne(new LambdaQueryWrapper<Audit>().eq(Audit::getPersonnelId, auditRequest.getPersonnelId()).eq(Audit::getAuditState, ArgsConst.WAITING).eq(Audit::getApprover, loginId));
|
|
|
|
if (ObjectUtil.isNull(audit)) {
|
|
|
|
if (ObjectUtil.isNull(audit)) {
|
|
|
|
return AjaxResult.fail().msg("该用户不能审批!");
|
|
|
|
return AjaxResult.fail().msg("该用户不能审批!");
|
|
|
|
}
|
|
|
|
}
|
|
|
@ -485,7 +489,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice();
|
|
|
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice();
|
|
|
|
workFlowNotice.setStatus(Boolean.FALSE);
|
|
|
|
workFlowNotice.setStatus(Boolean.FALSE);
|
|
|
|
workFlowNotice.setFlowType(ArgsConst.DIRECTORS);
|
|
|
|
workFlowNotice.setFlowType(ArgsConst.DIRECTORS);
|
|
|
|
workFlowNotice.setUserId(byId.getCreatedId());
|
|
|
|
workFlowNotice.setUserId(recruitment.getCreatedId());
|
|
|
|
workFlowNotice.setTitle("您的董监申报已通过");
|
|
|
|
workFlowNotice.setTitle("您的董监申报已通过");
|
|
|
|
workFlowNotice.setFlowId(auditRequest.getPersonnelId());
|
|
|
|
workFlowNotice.setFlowId(auditRequest.getPersonnelId());
|
|
|
|
workFlowNoticeService.save(workFlowNotice);
|
|
|
|
workFlowNoticeService.save(workFlowNotice);
|
|
|
@ -508,7 +512,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice();
|
|
|
|
WorkFlowNotice workFlowNotice = new WorkFlowNotice();
|
|
|
|
workFlowNotice.setStatus(Boolean.FALSE);
|
|
|
|
workFlowNotice.setStatus(Boolean.FALSE);
|
|
|
|
workFlowNotice.setFlowType(ArgsConst.DIRECTORS);
|
|
|
|
workFlowNotice.setFlowType(ArgsConst.DIRECTORS);
|
|
|
|
workFlowNotice.setUserId(byId.getCreatedId());
|
|
|
|
workFlowNotice.setUserId(recruitment.getCreatedId());
|
|
|
|
workFlowNotice.setTitle("您的董监申报已驳回");
|
|
|
|
workFlowNotice.setTitle("您的董监申报已驳回");
|
|
|
|
workFlowNotice.setFlowId(auditRequest.getPersonnelId());
|
|
|
|
workFlowNotice.setFlowId(auditRequest.getPersonnelId());
|
|
|
|
workFlowNoticeService.save(workFlowNotice);
|
|
|
|
workFlowNoticeService.save(workFlowNotice);
|
|
|
@ -543,7 +547,36 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public AjaxResult waitingAudit(Page page) {
|
|
|
|
public AjaxResult waitingAudit(Page page) {
|
|
|
|
Page selectPage = auditMapper.selectPage(page, Wrappers.lambdaQuery(Audit.class)
|
|
|
|
Page selectPage = auditMapper.selectPage(page, Wrappers.lambdaQuery(Audit.class)
|
|
|
|
.eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
|
|
|
.eq(Audit::getAuditState, ArgsConst.WAITING)
|
|
|
|
|
|
|
|
.eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
|
|
|
|
|
|
|
List<Audit> records = selectPage.getRecords();
|
|
|
|
|
|
|
|
records.forEach(e -> {
|
|
|
|
|
|
|
|
User user = userMapper.selectById(e.getCreatedId());
|
|
|
|
|
|
|
|
if (ObjectUtil.isNotNull(user)) {
|
|
|
|
|
|
|
|
e.setUserName(user.getUserName());
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ArgsConst.DIRECTORS.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setTypeName("董监申报");
|
|
|
|
|
|
|
|
} else if (ArgsConst.RECRUITMENT.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setTypeName("招聘登记");
|
|
|
|
|
|
|
|
} else if (ArgsConst.PERSONNEL_INDICATORS.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setTypeName("指标申报");
|
|
|
|
|
|
|
|
} else if (ArgsConst.PERSONNEL.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setTypeName("人员申报");
|
|
|
|
|
|
|
|
} else if (ArgsConst.CHANGE.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setTypeName("人员变更");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
if (ArgsConst.WAITING.equals(e.getAuditState())) {
|
|
|
|
|
|
|
|
e.setStatusName("待处理");
|
|
|
|
|
|
|
|
} else if (ArgsConst.SUBMIT.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setStatusName("提交");
|
|
|
|
|
|
|
|
} else if (ArgsConst.PASS.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setStatusName("通过");
|
|
|
|
|
|
|
|
} else if (ArgsConst.REJECT.equals(e.getPerType())) {
|
|
|
|
|
|
|
|
e.setStatusName("拒绝");
|
|
|
|
|
|
|
|
}
|
|
|
|
|
|
|
|
});
|
|
|
|
|
|
|
|
selectPage.setRecords(records);
|
|
|
|
return AjaxResult.ok().data(selectPage);
|
|
|
|
return AjaxResult.ok().data(selectPage);
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
@ -551,7 +584,7 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
|
|
|
@Override
|
|
|
|
@Override
|
|
|
|
public Integer counts() {
|
|
|
|
public Integer counts() {
|
|
|
|
return auditMapper.selectCount(Wrappers.lambdaQuery(Audit.class)
|
|
|
|
return auditMapper.selectCount(Wrappers.lambdaQuery(Audit.class)
|
|
|
|
.eq(Audit::getAuditOrder, ArgsConst.WAITING).eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
|
|
|
.eq(Audit::getAuditState, ArgsConst.WAITING).eq(Audit::getApprover, StpUtil.getLoginIdAsString()));
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|