update
This commit is contained in:
parent
8272cd7324
commit
0ca3a8266b
|
@ -284,9 +284,9 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
||||||
Config director = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_PERSONNEL_DIRECTOR));
|
Config director = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_PERSONNEL_DIRECTOR));
|
||||||
// 领导
|
// 领导
|
||||||
Config leadership = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_LEADERSHIP));
|
Config leadership = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_LEADERSHIP));
|
||||||
|
User byId = userMapper.selectById(one.getApprover());
|
||||||
// 同意
|
// 同意
|
||||||
if ("2".equals(auditRequest.getStatus())) {
|
if ("2".equals(auditRequest.getStatus())) {
|
||||||
User byId = userMapper.selectById(one.getApprover());
|
|
||||||
// 人事初审批同意
|
// 人事初审批同意
|
||||||
if (director.getParamValue().equals(byId.getLoginName())) {
|
if (director.getParamValue().equals(byId.getLoginName())) {
|
||||||
one.setAuditOrder(ArgsConst.FIRST);
|
one.setAuditOrder(ArgsConst.FIRST);
|
||||||
|
@ -331,7 +331,6 @@ public class AuditServiceImpl extends BaseService<AuditMapper, Audit> implements
|
||||||
}
|
}
|
||||||
} else {
|
} else {
|
||||||
// 人事初审批拒绝
|
// 人事初审批拒绝
|
||||||
User byId = userMapper.selectById(one.getApprover());
|
|
||||||
if (director.getParamValue().equals(byId.getLoginName())) {
|
if (director.getParamValue().equals(byId.getLoginName())) {
|
||||||
one.setAuditOrder(ArgsConst.FIRST);
|
one.setAuditOrder(ArgsConst.FIRST);
|
||||||
one.setAuditState(ArgsConst.REJECT);
|
one.setAuditState(ArgsConst.REJECT);
|
||||||
|
|
|
@ -22,7 +22,6 @@ import com.ydool.staff.mapper.AttachmentMapper;
|
||||||
import com.ydool.staff.mapper.AuditMapper;
|
import com.ydool.staff.mapper.AuditMapper;
|
||||||
import com.ydool.staff.mapper.CompanyNameMapper;
|
import com.ydool.staff.mapper.CompanyNameMapper;
|
||||||
import com.ydool.staff.mapper.DirectorsSupervisorsMapper;
|
import com.ydool.staff.mapper.DirectorsSupervisorsMapper;
|
||||||
import com.ydool.staff.service.IAuditService;
|
|
||||||
import com.ydool.staff.service.IDirectorsSupervisorsService;
|
import com.ydool.staff.service.IDirectorsSupervisorsService;
|
||||||
import com.ydool.system.entity.Config;
|
import com.ydool.system.entity.Config;
|
||||||
import com.ydool.system.entity.User;
|
import com.ydool.system.entity.User;
|
||||||
|
@ -34,7 +33,6 @@ import org.springframework.stereotype.Service;
|
||||||
import org.springframework.transaction.annotation.Transactional;
|
import org.springframework.transaction.annotation.Transactional;
|
||||||
import org.thymeleaf.util.StringUtils;
|
import org.thymeleaf.util.StringUtils;
|
||||||
|
|
||||||
import javax.validation.constraints.NotEmpty;
|
|
||||||
import java.util.ArrayList;
|
import java.util.ArrayList;
|
||||||
import java.util.Arrays;
|
import java.util.Arrays;
|
||||||
import java.util.Date;
|
import java.util.Date;
|
||||||
|
@ -60,8 +58,6 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
|
||||||
@Autowired
|
@Autowired
|
||||||
AuditMapper auditMapper;
|
AuditMapper auditMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
IAuditService auditService;
|
|
||||||
@Autowired
|
|
||||||
UserMapper userMapper;
|
UserMapper userMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
ConfigMapper configMapper;
|
ConfigMapper configMapper;
|
||||||
|
@ -78,7 +74,10 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
|
||||||
directorsSupervisorsLambdaQueryWrapper.orderByDesc(DirectorsSupervisors::getCreatedAt);
|
directorsSupervisorsLambdaQueryWrapper.orderByDesc(DirectorsSupervisors::getCreatedAt);
|
||||||
Page<DirectorsSupervisors> directorsSupervisors = directorsSupervisorsMapper.selectPage(page, directorsSupervisorsLambdaQueryWrapper);
|
Page<DirectorsSupervisors> directorsSupervisors = directorsSupervisorsMapper.selectPage(page, directorsSupervisorsLambdaQueryWrapper);
|
||||||
for (DirectorsSupervisors record : directorsSupervisors.getRecords()) {
|
for (DirectorsSupervisors record : directorsSupervisors.getRecords()) {
|
||||||
record.setOrganizationId(companyNameMapper.selectById(record.getOrganizationId()).getCompanyName());
|
CompanyName companyName = companyNameMapper.selectById(record.getOrganizationId());
|
||||||
|
if (ObjectUtil.isNotNull(companyName)) {
|
||||||
|
record.setOrganizationId(companyName.getCompanyName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.ok().data(directorsSupervisors);
|
return AjaxResult.ok().data(directorsSupervisors);
|
||||||
}
|
}
|
||||||
|
@ -137,8 +136,8 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
|
||||||
return AjaxResult.fail().msg("未找到相关信息!");
|
return AjaxResult.fail().msg("未找到相关信息!");
|
||||||
}
|
}
|
||||||
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, directorsSupervisors.getId()).eq(Attachment::getTargetType, ArgsConst.DIRECTORS));
|
List<Attachment> attachmentList = attachmentMapper.selectList(new LambdaQueryWrapper<Attachment>().eq(Attachment::getTargetId, directorsSupervisors.getId()).eq(Attachment::getTargetType, ArgsConst.DIRECTORS));
|
||||||
List<AttachmentDto> attachmentDtos = BeanUtil.copyToList(attachmentList, AttachmentDto.class);
|
List<AttachmentDto> attachmentDos = BeanUtil.copyToList(attachmentList, AttachmentDto.class);
|
||||||
directorsSupervisors.setAttachmentDtoList(attachmentDtos);
|
directorsSupervisors.setAttachmentDtoList(attachmentDos);
|
||||||
return AjaxResult.ok().data(directorsSupervisors);
|
return AjaxResult.ok().data(directorsSupervisors);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -180,7 +179,7 @@ public class DirectorsSupervisorsServiceImpl extends BaseService<DirectorsSuperv
|
||||||
audit.setApprover(user1.getId());
|
audit.setApprover(user1.getId());
|
||||||
audit.setApproverTime(new Date());
|
audit.setApproverTime(new Date());
|
||||||
directorsSupervisors.setFirstId(user1.getUserName());
|
directorsSupervisors.setFirstId(user1.getUserName());
|
||||||
} else if (i == 2) {
|
} else {
|
||||||
// 领导
|
// 领导
|
||||||
Config config = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_LEADERSHIP));
|
Config config = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_LEADERSHIP));
|
||||||
User user2 = userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getLoginName, config.getParamValue()));
|
User user2 = userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getLoginName, config.getParamValue()));
|
||||||
|
|
|
@ -2,6 +2,7 @@ package com.ydool.staff.service.impl;
|
||||||
|
|
||||||
import cn.dev33.satoken.stp.StpUtil;
|
import cn.dev33.satoken.stp.StpUtil;
|
||||||
import cn.hutool.core.collection.CollectionUtil;
|
import cn.hutool.core.collection.CollectionUtil;
|
||||||
|
import cn.hutool.core.util.ObjectUtil;
|
||||||
import cn.hutool.core.util.StrUtil;
|
import cn.hutool.core.util.StrUtil;
|
||||||
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
||||||
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
||||||
|
@ -52,8 +53,6 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
||||||
ConfigMapper configMapper;
|
ConfigMapper configMapper;
|
||||||
@Autowired
|
@Autowired
|
||||||
UserMapper userMapper;
|
UserMapper userMapper;
|
||||||
@Autowired
|
|
||||||
IAuditService auditService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public AjaxResult selectOrganizationList(Page<Organization> page, OrganizationSearch organizationSearch) {
|
public AjaxResult selectOrganizationList(Page<Organization> page, OrganizationSearch organizationSearch) {
|
||||||
|
@ -67,7 +66,10 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
||||||
organizationLambdaQueryWrapper.orderByDesc(Organization::getCreatedAt);
|
organizationLambdaQueryWrapper.orderByDesc(Organization::getCreatedAt);
|
||||||
Page<Organization> selectPage = organizationMapper.selectPage(page, organizationLambdaQueryWrapper);
|
Page<Organization> selectPage = organizationMapper.selectPage(page, organizationLambdaQueryWrapper);
|
||||||
for (Organization record : selectPage.getRecords()) {
|
for (Organization record : selectPage.getRecords()) {
|
||||||
record.setCompanyId(companyNameMapper.selectById(record.getCompanyId()).getCompanyName());
|
CompanyName companyName = companyNameMapper.selectById(record.getCompanyId());
|
||||||
|
if (ObjectUtil.isNotNull(companyName)) {
|
||||||
|
record.setCompanyId(companyName.getCompanyName());
|
||||||
|
}
|
||||||
}
|
}
|
||||||
return AjaxResult.ok().data(selectPage);
|
return AjaxResult.ok().data(selectPage);
|
||||||
}
|
}
|
||||||
|
@ -94,6 +96,7 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 人员招聘登记
|
* 人员招聘登记
|
||||||
|
*
|
||||||
* @param id
|
* @param id
|
||||||
* @param type
|
* @param type
|
||||||
* @return
|
* @return
|
||||||
|
@ -123,7 +126,7 @@ public class OrganizationServiceImpl extends BaseService<OrganizationMapper, Org
|
||||||
audit.setApprover(user1.getId());
|
audit.setApprover(user1.getId());
|
||||||
audit.setApproverTime(new Date());
|
audit.setApproverTime(new Date());
|
||||||
organization.setFirstId(user1.getUserName());
|
organization.setFirstId(user1.getUserName());
|
||||||
} else if (i == 2) {
|
} else {
|
||||||
// 领导
|
// 领导
|
||||||
Config config = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_LEADERSHIP));
|
Config config = configMapper.selectOne(new LambdaQueryWrapper<Config>().eq(Config::getParamKey, ConfigCache.SYS_USER_LEADERSHIP));
|
||||||
User user2 = userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getLoginName, config.getParamValue()));
|
User user2 = userMapper.selectOne(new LambdaQueryWrapper<User>().eq(User::getLoginName, config.getParamValue()));
|
||||||
|
|
Loading…
Reference in New Issue