update 人事审批相关2.1
This commit is contained in:
parent
eb0e421014
commit
128374bc10
|
@ -93,14 +93,12 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult audit(AuditRequest auditRequest) {
|
public AjaxResult audit(AuditRequest auditRequest) {
|
||||||
String loginId = (String) StpUtil.getLoginId();
|
String loginId = (String) StpUtil.getLoginId();
|
||||||
System.out.println("loginId = " + loginId);
|
|
||||||
User loginUser = userMapper.selectById(loginId);
|
User loginUser = userMapper.selectById(loginId);
|
||||||
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::getAuditState, ArgsConst.WAITING)
|
.eq(Audit::getAuditState, ArgsConst.WAITING)
|
||||||
.eq(Audit::getApprover, loginId));
|
.eq(Audit::getApprover, loginId));
|
||||||
System.out.println("one = " + one);
|
|
||||||
if (ObjectUtil.isEmpty(one)) {
|
if (ObjectUtil.isEmpty(one)) {
|
||||||
return AjaxResult.fail().msg("该用户不能审批!");
|
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::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);
|
|
||||||
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);
|
|
||||||
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())) {
|
if (ArgsConst.PERSONNEL.equals(auditRequest.getType())) {
|
||||||
|
|
||||||
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
||||||
|
@ -137,7 +133,6 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
||||||
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 ");
|
|
||||||
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
personnelOne.setFinalTrialRemark(auditRequest.getAuditOpinion());
|
||||||
personnelOne.setChangeAlterationSign("2");
|
personnelOne.setChangeAlterationSign("2");
|
||||||
personnelOne.setChangeAuditState(3);
|
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()));
|
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"));
|
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();
|
Personnel afterPersonnel = new Personnel();
|
||||||
if (ObjectUtil.isNotEmpty(middle)) {
|
if (ObjectUtil.isNotEmpty(middle)) {
|
||||||
afterPersonnel = personnelMapper.selectById(middle.getAfterId());
|
afterPersonnel = personnelMapper.selectById(middle.getAfterId());
|
||||||
|
|
|
@ -93,7 +93,6 @@ public class ExchangeServiceImpl extends BaseService<ExchangeMapper, Exchange> i
|
||||||
Page exchangePage = page(page,wrapper);
|
Page exchangePage = page(page,wrapper);
|
||||||
List<Exchange> list = exchangePage.getRecords();
|
List<Exchange> list = exchangePage.getRecords();
|
||||||
exchangePage.setRecords(list.stream().map(e->{
|
exchangePage.setRecords(list.stream().map(e->{
|
||||||
System.out.println("e = " + e);
|
|
||||||
ExchangePageDto dto = BeanUtil.copyProperties(e, ExchangePageDto.class);
|
ExchangePageDto dto = BeanUtil.copyProperties(e, ExchangePageDto.class);
|
||||||
Personnel personnel = new Personnel();
|
Personnel personnel = new Personnel();
|
||||||
if (StrUtil.isNotBlank(e.getPersonnelId())){
|
if (StrUtil.isNotBlank(e.getPersonnelId())){
|
||||||
|
|
|
@ -332,7 +332,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
@Override
|
@Override
|
||||||
@Transactional(rollbackFor = Exception.class)
|
@Transactional(rollbackFor = Exception.class)
|
||||||
public AjaxResult updateChange(PersonnelUpdateRequest request) {
|
public AjaxResult updateChange(PersonnelUpdateRequest request) {
|
||||||
System.out.println("request = " + request.getId());
|
|
||||||
List<AttachmentRequest> cardFiles = request.getCardFileList();
|
List<AttachmentRequest> cardFiles = request.getCardFileList();
|
||||||
List<AttachmentRequest> jobTitleFiles = request.getJobTitleFileList();
|
List<AttachmentRequest> jobTitleFiles = request.getJobTitleFileList();
|
||||||
List<AttachmentRequest> engageFiles = request.getEngageFileList();
|
List<AttachmentRequest> engageFiles = request.getEngageFileList();
|
||||||
|
@ -342,10 +341,8 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
String type = ArgsConst.CHANGE;
|
String type = ArgsConst.CHANGE;
|
||||||
PersonnelMiddle personnelMiddle = personnelMiddleMapper.selectOne(new LambdaQueryWrapper<PersonnelMiddle>().eq(PersonnelMiddle::getAfterId, request.getId()).eq(PersonnelMiddle::getState,"1"));
|
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;
|
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)){
|
if (ObjectUtil.isNotNull(personnelMiddle)){
|
||||||
id = personnelMiddle.getBeforeId();
|
id = personnelMiddle.getBeforeId();
|
||||||
System.out.println("id" + id);
|
|
||||||
card = StringUtils.join(saveFilePath(cardFiles, ArgsConst.CARD_FILE, type, id), ',');
|
card = StringUtils.join(saveFilePath(cardFiles, ArgsConst.CARD_FILE, type, id), ',');
|
||||||
jobTitle = StringUtils.join(saveFilePath(jobTitleFiles, ArgsConst.JOBTITLE_FILE, type, id), ',');
|
jobTitle = StringUtils.join(saveFilePath(jobTitleFiles, ArgsConst.JOBTITLE_FILE, type, id), ',');
|
||||||
engage = StringUtils.join(saveFilePath(engageFiles, ArgsConst.ENGAGE_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)){
|
if (StrUtil.isNotBlank(audit)){
|
||||||
per.setAuditFile(saveAlteration("审批资料附件更改",per.getAuditFile(),audit,type,id,ColumnUtil.getFieldName(Personnel::getAuditFile)).toString());
|
per.setAuditFile(saveAlteration("审批资料附件更改",per.getAuditFile(),audit,type,id,ColumnUtil.getFieldName(Personnel::getAuditFile)).toString());
|
||||||
}
|
}
|
||||||
|
|
||||||
System.out.println("personnelMiddle = " + personnelMiddle);
|
|
||||||
if (ObjectUtil.isEmpty(personnelMiddle)){
|
if (ObjectUtil.isEmpty(personnelMiddle)){
|
||||||
per.setId("");
|
per.setId("");
|
||||||
per.setState("1");
|
per.setState("1");
|
||||||
|
@ -486,7 +481,6 @@ public class PersonnelServiceImpl extends BaseService<PersonnelMapper, Personnel
|
||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
public ArrayList<String> saveFilePath(List<AttachmentRequest> file, String type, String args, String id) {
|
public ArrayList<String> saveFilePath(List<AttachmentRequest> file, String type, String args, String id) {
|
||||||
System.out.println("file = " + id);
|
|
||||||
if (CollectionUtil.isNotEmpty(file)) {
|
if (CollectionUtil.isNotEmpty(file)) {
|
||||||
ArrayList<String> path = new ArrayList<>();
|
ArrayList<String> path = new ArrayList<>();
|
||||||
for (AttachmentRequest request : file) {
|
for (AttachmentRequest request : file) {
|
||||||
|
|
Loading…
Reference in New Issue