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