岗位业务逻辑完善
This commit is contained in:
@@ -0,0 +1,70 @@
|
||||
package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo;
|
||||
|
||||
/**
|
||||
* 初步筛选问题回答记录信息Service接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
public interface IHotakeInitScreQuestionsReplyRecordInfoService
|
||||
{
|
||||
/**
|
||||
* 查询初步筛选问题回答记录信息
|
||||
*
|
||||
* @param id 初步筛选问题回答记录信息主键
|
||||
* @return 初步筛选问题回答记录信息
|
||||
*/
|
||||
public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题回答记录信息列表
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
|
||||
* @return 初步筛选问题回答记录信息集合
|
||||
*/
|
||||
public List<HotakeInitScreQuestionsReplyRecordInfo> selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo);
|
||||
|
||||
/**
|
||||
* 新增初步筛选问题回答记录信息
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo);
|
||||
|
||||
/**
|
||||
* 修改初步筛选问题回答记录信息
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo);
|
||||
|
||||
/**
|
||||
* 批量删除初步筛选问题回答记录信息
|
||||
*
|
||||
* @param ids 需要删除的初步筛选问题回答记录信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除初步筛选问题回答记录信息信息
|
||||
*
|
||||
* @param id 初步筛选问题回答记录信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增初步筛选问题回答记录信息
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList);
|
||||
|
||||
}
|
||||
@@ -0,0 +1,70 @@
|
||||
package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
|
||||
|
||||
/**
|
||||
* 初步筛选问题信息Service接口
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
public interface IHotakeInitialScreeningQuestionsInfoService
|
||||
{
|
||||
/**
|
||||
* 查询初步筛选问题信息
|
||||
*
|
||||
* @param id 初步筛选问题信息主键
|
||||
* @return 初步筛选问题信息
|
||||
*/
|
||||
public HotakeInitialScreeningQuestionsInfo selectHotakeInitialScreeningQuestionsInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题信息列表
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息
|
||||
* @return 初步筛选问题信息集合
|
||||
*/
|
||||
public List<HotakeInitialScreeningQuestionsInfo> selectHotakeInitialScreeningQuestionsInfoList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo);
|
||||
|
||||
/**
|
||||
* 新增初步筛选问题信息
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo);
|
||||
|
||||
/**
|
||||
* 修改初步筛选问题信息
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息
|
||||
* @return 结果
|
||||
*/
|
||||
public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo);
|
||||
|
||||
/**
|
||||
* 批量删除初步筛选问题信息
|
||||
*
|
||||
* @param ids 需要删除的初步筛选问题信息主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeInitialScreeningQuestionsInfoByIds(Long[] ids);
|
||||
|
||||
/**
|
||||
* 删除初步筛选问题信息信息
|
||||
*
|
||||
* @param id 初步筛选问题信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeInitialScreeningQuestionsInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 批量新增初步筛选问题信息
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfoList 初步筛选问题信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
public int batchInsertHotakeInitialScreeningQuestionsInfo(List<HotakeInitialScreeningQuestionsInfo> hotakeInitialScreeningQuestionsInfoList);
|
||||
|
||||
}
|
||||
@@ -2,6 +2,7 @@ package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeRolesInfo;
|
||||
import com.vetti.hotake.domain.dto.HotakeRolesInfoDto;
|
||||
|
||||
/**
|
||||
* 岗位信息Service接口
|
||||
@@ -19,6 +20,15 @@ public interface IHotakeRolesInfoService
|
||||
*/
|
||||
public HotakeRolesInfo selectHotakeRolesInfoById(Long id);
|
||||
|
||||
/**
|
||||
* 查询岗位信息
|
||||
*
|
||||
* @param id 岗位信息主键
|
||||
* @return 岗位信息
|
||||
*/
|
||||
public HotakeRolesInfoDto selectHotakeRolesInfoDtoById(Long id);
|
||||
|
||||
|
||||
/**
|
||||
* 查询岗位信息列表
|
||||
*
|
||||
@@ -67,4 +77,13 @@ public interface IHotakeRolesInfoService
|
||||
*/
|
||||
public int batchInsertHotakeRolesInfo(List<HotakeRolesInfo> hotakeRolesInfoList);
|
||||
|
||||
|
||||
/**
|
||||
* 保存岗位信息
|
||||
*
|
||||
* @param hotakeRolesInfo 岗位信息
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeRolesInfoDto saveHotakeRolesInfo(HotakeRolesInfoDto hotakeRolesInfo);
|
||||
|
||||
}
|
||||
|
||||
@@ -0,0 +1,118 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.vetti.hotake.mapper.HotakeInitScreQuestionsReplyRecordInfoMapper;
|
||||
import com.vetti.hotake.domain.HotakeInitScreQuestionsReplyRecordInfo;
|
||||
import com.vetti.hotake.service.IHotakeInitScreQuestionsReplyRecordInfoService;
|
||||
|
||||
/**
|
||||
* 初步筛选问题回答记录信息Service业务层处理
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeInitScreQuestionsReplyRecordInfoServiceImpl extends BaseServiceImpl implements IHotakeInitScreQuestionsReplyRecordInfoService
|
||||
{
|
||||
@Autowired
|
||||
private HotakeInitScreQuestionsReplyRecordInfoMapper hotakeInitScreQuestionsReplyRecordInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题回答记录信息
|
||||
*
|
||||
* @param id 初步筛选问题回答记录信息主键
|
||||
* @return 初步筛选问题回答记录信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeInitScreQuestionsReplyRecordInfo selectHotakeInitScreQuestionsReplyRecordInfoById(Long id)
|
||||
{
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题回答记录信息列表
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
|
||||
* @return 初步筛选问题回答记录信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeInitScreQuestionsReplyRecordInfo> selectHotakeInitScreQuestionsReplyRecordInfoList(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
|
||||
{
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.selectHotakeInitScreQuestionsReplyRecordInfoList(hotakeInitScreQuestionsReplyRecordInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增初步筛选问题回答记录信息
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int insertHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
|
||||
{
|
||||
hotakeInitScreQuestionsReplyRecordInfo.setCreateTime(DateUtils.getNowDate());
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.insertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改初步筛选问题回答记录信息
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfo 初步筛选问题回答记录信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int updateHotakeInitScreQuestionsReplyRecordInfo(HotakeInitScreQuestionsReplyRecordInfo hotakeInitScreQuestionsReplyRecordInfo)
|
||||
{
|
||||
hotakeInitScreQuestionsReplyRecordInfo.setUpdateTime(DateUtils.getNowDate());
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.updateHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除初步筛选问题回答记录信息
|
||||
*
|
||||
* @param ids 需要删除的初步筛选问题回答记录信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeInitScreQuestionsReplyRecordInfoByIds(Long[] ids)
|
||||
{
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除初步筛选问题回答记录信息信息
|
||||
*
|
||||
* @param id 初步筛选问题回答记录信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeInitScreQuestionsReplyRecordInfoById(Long id)
|
||||
{
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.deleteHotakeInitScreQuestionsReplyRecordInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增初步筛选问题回答记录信息
|
||||
*
|
||||
* @param hotakeInitScreQuestionsReplyRecordInfoList 初步筛选问题回答记录信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int batchInsertHotakeInitScreQuestionsReplyRecordInfo(List<HotakeInitScreQuestionsReplyRecordInfo> hotakeInitScreQuestionsReplyRecordInfoList){
|
||||
return hotakeInitScreQuestionsReplyRecordInfoMapper.batchInsertHotakeInitScreQuestionsReplyRecordInfo(hotakeInitScreQuestionsReplyRecordInfoList);
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,137 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
|
||||
import com.vetti.hotake.domain.dto.AnswerOptionsDto;
|
||||
import com.vetti.hotake.mapper.HotakeInitialScreeningQuestionsInfoMapper;
|
||||
import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 初步筛选问题信息Service业务层处理
|
||||
*
|
||||
* @author wangxiangshun
|
||||
* @date 2025-12-14
|
||||
*/
|
||||
@SuppressWarnings("all")
|
||||
@Service
|
||||
public class HotakeInitialScreeningQuestionsInfoServiceImpl extends BaseServiceImpl implements IHotakeInitialScreeningQuestionsInfoService
|
||||
{
|
||||
@Autowired
|
||||
private HotakeInitialScreeningQuestionsInfoMapper hotakeInitialScreeningQuestionsInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题信息
|
||||
*
|
||||
* @param id 初步筛选问题信息主键
|
||||
* @return 初步筛选问题信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeInitialScreeningQuestionsInfo selectHotakeInitialScreeningQuestionsInfoById(Long id)
|
||||
{
|
||||
HotakeInitialScreeningQuestionsInfo questionsInfo = hotakeInitialScreeningQuestionsInfoMapper.selectHotakeInitialScreeningQuestionsInfoById(id);
|
||||
if(questionsInfo != null && StrUtil.isNotEmpty(questionsInfo.getAnswerOptions())){
|
||||
List<AnswerOptionsDto> answerOptionsDtos = JSONUtil.toList(questionsInfo.getAnswerOptions(), AnswerOptionsDto.class);
|
||||
questionsInfo.setAnswerOptionsList(answerOptionsDtos);
|
||||
}
|
||||
return questionsInfo;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询初步筛选问题信息列表
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息
|
||||
* @return 初步筛选问题信息
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeInitialScreeningQuestionsInfo> selectHotakeInitialScreeningQuestionsInfoList(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
return hotakeInitialScreeningQuestionsInfoMapper.selectHotakeInitialScreeningQuestionsInfoList(hotakeInitialScreeningQuestionsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增初步筛选问题信息
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int insertHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeInitialScreeningQuestionsInfo);
|
||||
if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList()));
|
||||
}else {
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions("");
|
||||
}
|
||||
return hotakeInitialScreeningQuestionsInfoMapper.insertHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改初步筛选问题信息
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfo 初步筛选问题信息
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int updateHotakeInitialScreeningQuestionsInfo(HotakeInitialScreeningQuestionsInfo hotakeInitialScreeningQuestionsInfo)
|
||||
{
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeInitialScreeningQuestionsInfo);
|
||||
if(CollectionUtil.isNotEmpty(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList())){
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions(JSONUtil.toJsonStr(hotakeInitialScreeningQuestionsInfo.getAnswerOptionsList()));
|
||||
}else {
|
||||
hotakeInitialScreeningQuestionsInfo.setAnswerOptions("");
|
||||
}
|
||||
return hotakeInitialScreeningQuestionsInfoMapper.updateHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfo);
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除初步筛选问题信息
|
||||
*
|
||||
* @param ids 需要删除的初步筛选问题信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeInitialScreeningQuestionsInfoByIds(Long[] ids)
|
||||
{
|
||||
return hotakeInitialScreeningQuestionsInfoMapper.deleteHotakeInitialScreeningQuestionsInfoByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除初步筛选问题信息信息
|
||||
*
|
||||
* @param id 初步筛选问题信息主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeInitialScreeningQuestionsInfoById(Long id)
|
||||
{
|
||||
return hotakeInitialScreeningQuestionsInfoMapper.deleteHotakeInitialScreeningQuestionsInfoById(id);
|
||||
}
|
||||
/**
|
||||
* 批量新增初步筛选问题信息
|
||||
*
|
||||
* @param hotakeInitialScreeningQuestionsInfoList 初步筛选问题信息列表
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor=Exception.class)
|
||||
@Override
|
||||
public int batchInsertHotakeInitialScreeningQuestionsInfo(List<HotakeInitialScreeningQuestionsInfo> hotakeInitialScreeningQuestionsInfoList){
|
||||
return hotakeInitialScreeningQuestionsInfoMapper.batchInsertHotakeInitialScreeningQuestionsInfo(hotakeInitialScreeningQuestionsInfoList);
|
||||
}
|
||||
}
|
||||
@@ -1,16 +1,30 @@
|
||||
package com.vetti.hotake.service.impl;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
import cn.hutool.core.bean.BeanUtil;
|
||||
import cn.hutool.core.collection.CollectionUtil;
|
||||
import cn.hutool.core.util.StrUtil;
|
||||
import cn.hutool.json.JSONUtil;
|
||||
import com.vetti.common.core.service.BaseServiceImpl;
|
||||
import com.vetti.common.enums.FillTypeEnum;
|
||||
import com.vetti.common.enums.RoleOperStepsEnum;
|
||||
import com.vetti.common.enums.RoleStatusEnum;
|
||||
import com.vetti.common.exception.ServiceException;
|
||||
import com.vetti.common.utils.DateUtils;
|
||||
import com.vetti.common.utils.MessageUtils;
|
||||
import com.vetti.common.utils.SecurityUtils;
|
||||
import com.vetti.common.utils.uuid.IdUtils;
|
||||
import com.vetti.hotake.domain.HotakeInitialScreeningQuestionsInfo;
|
||||
import com.vetti.hotake.domain.HotakeRolesInfo;
|
||||
import com.vetti.hotake.domain.dto.HotakeRolesInfoDto;
|
||||
import com.vetti.hotake.domain.dto.roleDto.*;
|
||||
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
|
||||
import com.vetti.hotake.service.IHotakeInitialScreeningQuestionsInfoService;
|
||||
import com.vetti.hotake.service.IHotakeRolesInfoService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import com.vetti.hotake.mapper.HotakeRolesInfoMapper;
|
||||
import com.vetti.hotake.domain.HotakeRolesInfo;
|
||||
import com.vetti.hotake.service.IHotakeRolesInfoService;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 岗位信息Service业务层处理
|
||||
@@ -25,6 +39,9 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
|
||||
@Autowired
|
||||
private HotakeRolesInfoMapper hotakeRolesInfoMapper;
|
||||
|
||||
@Autowired
|
||||
private IHotakeInitialScreeningQuestionsInfoService hotakeInitialScreeningQuestionsInfoService;
|
||||
|
||||
/**
|
||||
* 查询岗位信息
|
||||
*
|
||||
@@ -38,6 +55,62 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
|
||||
return hotakeRolesInfoMapper.selectHotakeRolesInfoById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询岗位详细信息
|
||||
* @param id 岗位信息主键
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public HotakeRolesInfoDto selectHotakeRolesInfoDtoById(Long id) {
|
||||
HotakeRolesInfoDto dto = new HotakeRolesInfoDto();
|
||||
HotakeRolesInfo hotakeRolesInfo = hotakeRolesInfoMapper.selectHotakeRolesInfoById(id);
|
||||
BeanUtil.copyProperties(hotakeRolesInfo, dto);
|
||||
|
||||
if(hotakeRolesInfo != null) {
|
||||
String requiredSkillsJson = hotakeRolesInfo.getRequiredSkillsJson();
|
||||
if(StrUtil.isNotEmpty(requiredSkillsJson)){
|
||||
List<RequiredSkillsDto> requiredSkillsList = JSONUtil.toList(requiredSkillsJson, RequiredSkillsDto.class);
|
||||
dto.setRequiredSkillsList(requiredSkillsList);
|
||||
}
|
||||
|
||||
String niceToHaveSkillsJson = hotakeRolesInfo.getNiceToHaveSkillsJson();
|
||||
if(StrUtil.isNotEmpty(niceToHaveSkillsJson)){
|
||||
List<NiceToHaveSkillsDto> niceToHaveSkillsList = JSONUtil.toList(niceToHaveSkillsJson, NiceToHaveSkillsDto.class);
|
||||
dto.setNiceToHaveSkillsList(niceToHaveSkillsList);
|
||||
}
|
||||
|
||||
String educationRequirementsJson = hotakeRolesInfo.getEducationRequirementsJson();
|
||||
if(StrUtil.isNotEmpty(educationRequirementsJson)){
|
||||
EducationRequirementsDto educationRequirements = JSONUtil.toBean(educationRequirementsJson, EducationRequirementsDto.class);
|
||||
dto.setEducationRequirements(educationRequirements);
|
||||
}
|
||||
|
||||
String certificationsLicensesJson = hotakeRolesInfo.getCertificationsLicensesJson();
|
||||
if(StrUtil.isNotEmpty(certificationsLicensesJson)){
|
||||
List<CertificationsLicensesDto> certificationsLicensesList = JSONUtil.toList(certificationsLicensesJson, CertificationsLicensesDto.class);
|
||||
dto.setCertificationsLicensesList(certificationsLicensesList);
|
||||
}
|
||||
|
||||
String roleBenefitsJson = hotakeRolesInfo.getRoleBenefitsJson();
|
||||
if(StrUtil.isNotEmpty(roleBenefitsJson)){
|
||||
List<RoleBenefitsDto> roleBenefitsList = JSONUtil.toList(roleBenefitsJson, RoleBenefitsDto.class);
|
||||
dto.setRoleBenefitsList(roleBenefitsList);
|
||||
}
|
||||
|
||||
String publishingChannelsJson = hotakeRolesInfo.getPublishingChannelsJson();
|
||||
if(StrUtil.isNotEmpty(publishingChannelsJson)){
|
||||
List<PublishingChannelsDto> publishingChannelsList = JSONUtil.toList(publishingChannelsJson, PublishingChannelsDto.class);
|
||||
dto.setPublishingChannelsList(publishingChannelsList);
|
||||
}
|
||||
HotakeInitialScreeningQuestionsInfo queryQuestion = new HotakeInitialScreeningQuestionsInfo();
|
||||
queryQuestion.setRoleId(id);
|
||||
List<HotakeInitialScreeningQuestionsInfo> questionsInfoList = hotakeInitialScreeningQuestionsInfoService.selectHotakeInitialScreeningQuestionsInfoList(queryQuestion);
|
||||
dto.setInitialScreeningQuestionsInfoList(questionsInfoList);
|
||||
}
|
||||
|
||||
return dto;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询岗位信息列表
|
||||
*
|
||||
@@ -48,7 +121,16 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
|
||||
@Override
|
||||
public List<HotakeRolesInfo> selectHotakeRolesInfoList(HotakeRolesInfo hotakeRolesInfo)
|
||||
{
|
||||
return hotakeRolesInfoMapper.selectHotakeRolesInfoList(hotakeRolesInfo);
|
||||
hotakeRolesInfo.setRecruiterId(SecurityUtils.getUserId());
|
||||
List<HotakeRolesInfo> rolesInfoList = hotakeRolesInfoMapper.selectHotakeRolesInfoList(hotakeRolesInfo);
|
||||
//计算一个发布日期
|
||||
if(CollectionUtil.isNotEmpty(rolesInfoList)){
|
||||
for (HotakeRolesInfo rolesInfo : rolesInfoList) {
|
||||
String posted = DateUtils.getTimeAgo(rolesInfo.getCreateTime());
|
||||
rolesInfo.setPosted(posted);
|
||||
}
|
||||
}
|
||||
return rolesInfoList;
|
||||
}
|
||||
|
||||
/**
|
||||
@@ -115,4 +197,113 @@ public class HotakeRolesInfoServiceImpl extends BaseServiceImpl implements IHota
|
||||
public int batchInsertHotakeRolesInfo(List<HotakeRolesInfo> hotakeRolesInfoList){
|
||||
return hotakeRolesInfoMapper.batchInsertHotakeRolesInfo(hotakeRolesInfoList);
|
||||
}
|
||||
|
||||
/**
|
||||
* 保存岗位信息
|
||||
* @param hotakeRolesInfo 岗位信息
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public HotakeRolesInfoDto saveHotakeRolesInfo(HotakeRolesInfoDto hotakeRolesInfo) {
|
||||
//先看岗位信息ID是否存在
|
||||
HotakeRolesInfo rolesInfo = null;
|
||||
Long rolesInfoId = 0L;
|
||||
if(hotakeRolesInfo.getId() == null){
|
||||
//先保存一个空数据
|
||||
HotakeRolesInfo info = new HotakeRolesInfo();
|
||||
fill(FillTypeEnum.INSERT.getCode(), info);
|
||||
info.setUuid(IdUtils.simpleUUID());
|
||||
insertHotakeRolesInfo(info);
|
||||
rolesInfoId = info.getId();
|
||||
}else{
|
||||
rolesInfoId = hotakeRolesInfo.getId();
|
||||
}
|
||||
rolesInfo = selectHotakeRolesInfoById(rolesInfoId);
|
||||
if(rolesInfo == null){
|
||||
throw new ServiceException(MessageUtils.messageCustomize("HotakeRolesInfoServiceImpl10001"));
|
||||
}
|
||||
//按照步骤来进行保存对应的数据
|
||||
if(RoleOperStepsEnum.STEPS_1.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||
rolesInfo.setRoleName(hotakeRolesInfo.getRoleName());
|
||||
rolesInfo.setCompanyName(hotakeRolesInfo.getCompanyName());
|
||||
rolesInfo.setRoleType(hotakeRolesInfo.getRoleType());
|
||||
rolesInfo.setJobLevel(hotakeRolesInfo.getJobLevel());
|
||||
rolesInfo.setJobExperience(hotakeRolesInfo.getJobExperience());
|
||||
rolesInfo.setLocationType(hotakeRolesInfo.getLocationType());
|
||||
rolesInfo.setJobType(hotakeRolesInfo.getJobType());
|
||||
rolesInfo.setSalaryStart(hotakeRolesInfo.getSalaryStart());
|
||||
rolesInfo.setSalaryEnd(hotakeRolesInfo.getSalaryEnd());
|
||||
}
|
||||
if(RoleOperStepsEnum.STEPS_2.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||
|
||||
if(CollectionUtil.isNotEmpty(hotakeRolesInfo.getRequiredSkillsList())){
|
||||
String requiredSkillsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getRequiredSkillsList());
|
||||
rolesInfo.setRequiredSkillsJson(requiredSkillsJson);
|
||||
}else{
|
||||
rolesInfo.setRequiredSkillsJson("");
|
||||
}
|
||||
|
||||
if(CollectionUtil.isNotEmpty(hotakeRolesInfo.getNiceToHaveSkillsList())){
|
||||
String niceToHaveSkillsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getNiceToHaveSkillsList());
|
||||
rolesInfo.setNiceToHaveSkillsJson(niceToHaveSkillsJson);
|
||||
}else{
|
||||
rolesInfo.setNiceToHaveSkillsJson("");
|
||||
}
|
||||
|
||||
if(hotakeRolesInfo.getEducationRequirements() != null){
|
||||
rolesInfo.setEducationRequirementsJson(JSONUtil.toJsonStr(hotakeRolesInfo.getEducationRequirements()));
|
||||
}else {
|
||||
rolesInfo.setEducationRequirementsJson("");
|
||||
}
|
||||
|
||||
if (CollectionUtil.isNotEmpty(hotakeRolesInfo.getCertificationsLicensesList())){
|
||||
String certificationsLicensesJson = JSONUtil.toJsonStr(hotakeRolesInfo.getCertificationsLicensesList());
|
||||
rolesInfo.setCertificationsLicensesJson(certificationsLicensesJson);
|
||||
}else{
|
||||
rolesInfo.setCertificationsLicensesJson("");
|
||||
}
|
||||
}
|
||||
if(RoleOperStepsEnum.STEPS_3.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||
rolesInfo.setDescriptionTone(hotakeRolesInfo.getDescriptionTone());
|
||||
rolesInfo.setAboutRole(hotakeRolesInfo.getAboutRole());
|
||||
rolesInfo.setResponsibilities(hotakeRolesInfo.getResponsibilities());
|
||||
if (CollectionUtil.isNotEmpty(hotakeRolesInfo.getRoleBenefitsList())){
|
||||
String roleBenefitsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getRoleBenefitsList());
|
||||
rolesInfo.setRoleBenefitsJson(roleBenefitsJson);
|
||||
}else{
|
||||
rolesInfo.setRoleBenefitsJson("");
|
||||
}
|
||||
}
|
||||
if(RoleOperStepsEnum.STEPS_4.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||
|
||||
}
|
||||
if(RoleOperStepsEnum.STEPS_5.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||
|
||||
}
|
||||
if(RoleOperStepsEnum.STEPS_6.getCode().equals(hotakeRolesInfo.getOperStep())){
|
||||
|
||||
if (CollectionUtil.isNotEmpty(hotakeRolesInfo.getPublishingChannelsList())){
|
||||
String publishingChannelsJson = JSONUtil.toJsonStr(hotakeRolesInfo.getPublishingChannelsList());
|
||||
rolesInfo.setPublishingChannelsJson(publishingChannelsJson);
|
||||
}else{
|
||||
rolesInfo.setPublishingChannelsJson("");
|
||||
}
|
||||
rolesInfo.setPublishingScheduleDate(hotakeRolesInfo.getPublishingScheduleDate());
|
||||
rolesInfo.setPublishingScheduleTime(hotakeRolesInfo.getPublishingScheduleTime());
|
||||
rolesInfo.setApplicationDeadline(hotakeRolesInfo.getApplicationDeadline());
|
||||
}
|
||||
//默认是编辑中状态
|
||||
if(StrUtil.isEmpty(hotakeRolesInfo.getStatus())){
|
||||
rolesInfo.setStatus(RoleStatusEnum.EDITING.getCode());
|
||||
}
|
||||
rolesInfo.setDataType(hotakeRolesInfo.getDataType());
|
||||
rolesInfo.setLanguages(hotakeRolesInfo.getLanguages());
|
||||
rolesInfo.setOperStep(hotakeRolesInfo.getOperStep());
|
||||
rolesInfo.setRecruiterId(SecurityUtils.getUserId());
|
||||
fill(FillTypeEnum.UPDATE.getCode(), rolesInfo);
|
||||
hotakeRolesInfoMapper.updateAllHotakeRolesInfo(rolesInfo);
|
||||
//查询返回所有的结果数据
|
||||
HotakeRolesInfoDto rolesInfoDto = selectHotakeRolesInfoDtoById(rolesInfo.getId());
|
||||
return rolesInfoDto;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user