新增 参考检查
This commit is contained in:
@@ -0,0 +1,103 @@
|
||||
package com.vetti.web.controller.hotake;
|
||||
|
||||
import com.vetti.common.annotation.Log;
|
||||
import com.vetti.common.core.controller.BaseController;
|
||||
import com.vetti.common.core.domain.R;
|
||||
import com.vetti.common.core.page.TableWebDataInfo;
|
||||
import com.vetti.common.enums.BusinessType;
|
||||
import com.vetti.hotake.domain.HotakeReferenceCheck;
|
||||
import com.vetti.hotake.domain.dto.VcDto.VcExperienceDto;
|
||||
import com.vetti.hotake.service.IHotakeReferenceCheckService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import io.swagger.annotations.ApiParam;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参考检查Controller
|
||||
*
|
||||
* @author vetti
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Api(tags = "参考检查")
|
||||
@RestController
|
||||
@RequestMapping("/hotake/referenceCheck")
|
||||
public class HotakeReferenceCheckController extends BaseController {
|
||||
@Autowired
|
||||
private IHotakeReferenceCheckService hotakeReferenceCheckService;
|
||||
|
||||
/**
|
||||
* 查询参考检查列表
|
||||
*/
|
||||
@ApiOperation("查询参考检查列表(分页)")
|
||||
@GetMapping("/getPagelist")
|
||||
public TableWebDataInfo<HotakeReferenceCheck> list(HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
startPage();
|
||||
hotakeReferenceCheck.setCreateBy(getUsername());
|
||||
List<HotakeReferenceCheck> list = hotakeReferenceCheckService.selectHotakeReferenceCheckList(hotakeReferenceCheck);
|
||||
return getWebDataTable(list);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参考检查列表
|
||||
*/
|
||||
@ApiOperation("查询参考检查列表(无分页)")
|
||||
@GetMapping("/getList")
|
||||
public R<List<HotakeReferenceCheck>> getList(HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
hotakeReferenceCheck.setCreateBy(getUsername());
|
||||
List<HotakeReferenceCheck> list = hotakeReferenceCheckService.selectHotakeReferenceCheckList(hotakeReferenceCheck);
|
||||
return R.ok(list, "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取参考检查详细信息
|
||||
*/
|
||||
@ApiOperation("获取参考检查详细信息")
|
||||
@GetMapping(value = "/{id}")
|
||||
public R<HotakeReferenceCheck> getInfo(@ApiParam("参考检查ID") @PathVariable("id") Integer id) {
|
||||
return R.ok(hotakeReferenceCheckService.selectHotakeReferenceCheckById(id), "");
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参考检查
|
||||
*/
|
||||
@ApiOperation("新增参考检查")
|
||||
@Log(title = "参考检查", businessType = BusinessType.INSERT)
|
||||
@PostMapping
|
||||
public R<HotakeReferenceCheck> add(@RequestBody HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
return R.ok(hotakeReferenceCheckService.insertHotakeReferenceCheck(hotakeReferenceCheck));
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参考检查
|
||||
*/
|
||||
@ApiOperation("修改参考检查")
|
||||
@Log(title = "参考检查", businessType = BusinessType.UPDATE)
|
||||
@PutMapping
|
||||
public R<HotakeReferenceCheck> edit(@RequestBody HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
return R.ok(hotakeReferenceCheckService.updateHotakeReferenceCheck(hotakeReferenceCheck));
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参考检查
|
||||
*/
|
||||
@ApiOperation("删除参考检查")
|
||||
@Log(title = "参考检查", businessType = BusinessType.DELETE)
|
||||
@DeleteMapping("/{id}")
|
||||
public R remove(@PathVariable Integer id) {
|
||||
return R.ok(hotakeReferenceCheckService.deleteHotakeReferenceCheckById(id));
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录人的工作经验列表
|
||||
*/
|
||||
@ApiOperation("获取当前登录人的工作经验列表")
|
||||
@GetMapping("/getExperienceList")
|
||||
public R<List<VcExperienceDto>> getExperienceList() {
|
||||
return R.ok(hotakeReferenceCheckService.getCurrentUserExperienceList(), "");
|
||||
}
|
||||
|
||||
}
|
||||
@@ -0,0 +1,55 @@
|
||||
package com.vetti.hotake.domain;
|
||||
|
||||
import com.vetti.common.annotation.Excel;
|
||||
import com.vetti.common.core.domain.BaseEntity;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
/**
|
||||
* 参考检查对象 hotake_reference_check
|
||||
*
|
||||
* @author vetti
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Data
|
||||
@Accessors(chain = true)
|
||||
public class HotakeReferenceCheck extends BaseEntity
|
||||
{
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
/** 主键ID */
|
||||
@ApiModelProperty("主键ID")
|
||||
private Integer id;
|
||||
|
||||
/** 公司名称 */
|
||||
@ApiModelProperty("公司名称")
|
||||
@Excel(name = "公司名称")
|
||||
private String company;
|
||||
|
||||
/** 推荐人全名 */
|
||||
@ApiModelProperty("推荐人全名")
|
||||
@Excel(name = "推荐人全名")
|
||||
private String fullName;
|
||||
|
||||
/** 推荐人职位 */
|
||||
@ApiModelProperty("推荐人职位")
|
||||
@Excel(name = "推荐人职位")
|
||||
private String position;
|
||||
|
||||
/** 与候选人的关系 */
|
||||
@ApiModelProperty("与候选人的关系")
|
||||
@Excel(name = "与候选人的关系")
|
||||
private String relationship;
|
||||
|
||||
/** 推荐人邮箱 */
|
||||
@ApiModelProperty("推荐人邮箱")
|
||||
@Excel(name = "推荐人邮箱")
|
||||
private String email;
|
||||
|
||||
/** 是否为该工作经历保存此推荐人 */
|
||||
@ApiModelProperty("是否为该工作经历保存此推荐人")
|
||||
@Excel(name = "是否为该工作经历保存此推荐人")
|
||||
private Boolean saveJobExperience;
|
||||
|
||||
}
|
||||
@@ -0,0 +1,68 @@
|
||||
package com.vetti.hotake.service;
|
||||
|
||||
import java.util.List;
|
||||
import com.vetti.hotake.domain.HotakeReferenceCheck;
|
||||
|
||||
/**
|
||||
* 参考检查Service接口
|
||||
*
|
||||
* @author vetti
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
public interface IHotakeReferenceCheckService
|
||||
{
|
||||
/**
|
||||
* 查询参考检查
|
||||
*
|
||||
* @param id 参考检查主键
|
||||
* @return 参考检查
|
||||
*/
|
||||
public HotakeReferenceCheck selectHotakeReferenceCheckById(Integer id);
|
||||
|
||||
/**
|
||||
* 查询参考检查列表
|
||||
*
|
||||
* @param hotakeReferenceCheck 参考检查
|
||||
* @return 参考检查集合
|
||||
*/
|
||||
public List<HotakeReferenceCheck> selectHotakeReferenceCheckList(HotakeReferenceCheck hotakeReferenceCheck);
|
||||
|
||||
/**
|
||||
* 新增参考检查
|
||||
*
|
||||
* @param hotakeReferenceCheck 参考检查
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeReferenceCheck insertHotakeReferenceCheck(HotakeReferenceCheck hotakeReferenceCheck);
|
||||
|
||||
/**
|
||||
* 修改参考检查
|
||||
*
|
||||
* @param hotakeReferenceCheck 参考检查
|
||||
* @return 结果
|
||||
*/
|
||||
public HotakeReferenceCheck updateHotakeReferenceCheck(HotakeReferenceCheck hotakeReferenceCheck);
|
||||
|
||||
/**
|
||||
* 批量删除参考检查
|
||||
*
|
||||
* @param ids 需要删除的参考检查主键集合
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeReferenceCheckByIds(Integer[] ids);
|
||||
|
||||
/**
|
||||
* 删除参考检查信息
|
||||
*
|
||||
* @param id 参考检查主键
|
||||
* @return 结果
|
||||
*/
|
||||
public int deleteHotakeReferenceCheckById(Integer id);
|
||||
|
||||
/**
|
||||
* 获取当前登录人的工作经验列表
|
||||
*
|
||||
* @return 工作经验列表
|
||||
*/
|
||||
public List<com.vetti.hotake.domain.dto.VcDto.VcExperienceDto> getCurrentUserExperienceList();
|
||||
}
|
||||
@@ -0,0 +1,142 @@
|
||||
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.common.utils.SecurityUtils;
|
||||
import com.vetti.hotake.domain.HotakeCvInfo;
|
||||
import com.vetti.hotake.domain.HotakeReferenceCheck;
|
||||
import com.vetti.hotake.domain.dto.HotakeCvInfoDto;
|
||||
import com.vetti.hotake.domain.dto.VcDto.VcExperienceDto;
|
||||
import com.vetti.hotake.mapper.HotakeCvInfoMapper;
|
||||
import com.vetti.hotake.mapper.HotakeReferenceCheckMapper;
|
||||
import com.vetti.hotake.service.IHotakeReferenceCheckService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
import org.springframework.transaction.annotation.Transactional;
|
||||
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 参考检查Service业务层处理
|
||||
*
|
||||
* @author vetti
|
||||
* @date 2026-01-29
|
||||
*/
|
||||
@Service
|
||||
public class HotakeReferenceCheckServiceImpl extends BaseServiceImpl implements IHotakeReferenceCheckService {
|
||||
|
||||
@Autowired
|
||||
private HotakeReferenceCheckMapper hotakeReferenceCheckMapper;
|
||||
|
||||
@Autowired
|
||||
private HotakeCvInfoMapper hotakeCvInfoMapper;
|
||||
|
||||
/**
|
||||
* 查询参考检查
|
||||
*
|
||||
* @param id 参考检查主键
|
||||
* @return 参考检查
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public HotakeReferenceCheck selectHotakeReferenceCheckById(Integer id) {
|
||||
return hotakeReferenceCheckMapper.selectHotakeReferenceCheckById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询参考检查列表
|
||||
*
|
||||
* @param hotakeReferenceCheck 参考检查
|
||||
* @return 参考检查
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<HotakeReferenceCheck> selectHotakeReferenceCheckList(HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
return hotakeReferenceCheckMapper.selectHotakeReferenceCheckList(hotakeReferenceCheck);
|
||||
}
|
||||
|
||||
/**
|
||||
* 新增参考检查
|
||||
*
|
||||
* @param hotakeReferenceCheck 参考检查
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public HotakeReferenceCheck insertHotakeReferenceCheck(HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
fill(FillTypeEnum.INSERT.getCode(), hotakeReferenceCheck);
|
||||
hotakeReferenceCheckMapper.insertHotakeReferenceCheck(hotakeReferenceCheck);
|
||||
return hotakeReferenceCheck;
|
||||
}
|
||||
|
||||
/**
|
||||
* 修改参考检查
|
||||
*
|
||||
* @param hotakeReferenceCheck 参考检查
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public HotakeReferenceCheck updateHotakeReferenceCheck(HotakeReferenceCheck hotakeReferenceCheck) {
|
||||
fill(FillTypeEnum.UPDATE.getCode(), hotakeReferenceCheck);
|
||||
hotakeReferenceCheckMapper.updateHotakeReferenceCheck(hotakeReferenceCheck);
|
||||
return hotakeReferenceCheck;
|
||||
}
|
||||
|
||||
/**
|
||||
* 批量删除参考检查
|
||||
*
|
||||
* @param ids 需要删除的参考检查主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeReferenceCheckByIds(Integer[] ids) {
|
||||
return hotakeReferenceCheckMapper.deleteHotakeReferenceCheckByIds(ids);
|
||||
}
|
||||
|
||||
/**
|
||||
* 删除参考检查信息
|
||||
*
|
||||
* @param id 参考检查主键
|
||||
* @return 结果
|
||||
*/
|
||||
@Transactional(rollbackFor = Exception.class)
|
||||
@Override
|
||||
public int deleteHotakeReferenceCheckById(Integer id) {
|
||||
return hotakeReferenceCheckMapper.deleteHotakeReferenceCheckById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取当前登录人的工作经验列表
|
||||
*
|
||||
* @return 工作经验列表
|
||||
*/
|
||||
@Transactional(readOnly = true)
|
||||
@Override
|
||||
public List<VcExperienceDto> getCurrentUserExperienceList() {
|
||||
List<VcExperienceDto> experienceList = new ArrayList<>();
|
||||
|
||||
// 查询当前用户的简历信息
|
||||
HotakeCvInfo queryCv = new HotakeCvInfo();
|
||||
queryCv.setUserId(SecurityUtils.getUserId());
|
||||
queryCv.setCvFileType("cv");
|
||||
List<HotakeCvInfo> cvInfoList = hotakeCvInfoMapper.selectHotakeCvInfoList(queryCv);
|
||||
|
||||
if (CollectionUtil.isNotEmpty(cvInfoList)) {
|
||||
HotakeCvInfo cvInfo = cvInfoList.get(0);
|
||||
if (StrUtil.isNotEmpty(cvInfo.getAnalyzedCvJson())) {
|
||||
HotakeCvInfoDto cvInfoDto = JSONUtil.toBean(cvInfo.getAnalyzedCvJson(), HotakeCvInfoDto.class);
|
||||
if (cvInfoDto != null && CollectionUtil.isNotEmpty(cvInfoDto.getExperience())) {
|
||||
experienceList = cvInfoDto.getExperience();
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
return experienceList;
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,109 @@
|
||||
<?xml version="1.0" encoding="UTF-8" ?>
|
||||
<!DOCTYPE mapper
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.vetti.hotake.mapper.HotakeReferenceCheckMapper">
|
||||
|
||||
<resultMap type="HotakeReferenceCheck" id="HotakeReferenceCheckResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="company" column="company" />
|
||||
<result property="fullName" column="full_name" />
|
||||
<result property="position" column="position" />
|
||||
<result property="relationship" column="relationship" />
|
||||
<result property="email" column="email" />
|
||||
<result property="saveJobExperience" column="save_job_experience" />
|
||||
<result property="delFlag" column="del_flag" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="remark" column="remark" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectHotakeReferenceCheckVo">
|
||||
select id, company, full_name, position, relationship, email, save_job_experience,
|
||||
del_flag, create_by, create_time, update_by, update_time, remark
|
||||
from hotake_reference_check
|
||||
</sql>
|
||||
|
||||
<select id="selectHotakeReferenceCheckList" parameterType="HotakeReferenceCheck" resultMap="HotakeReferenceCheckResult">
|
||||
<include refid="selectHotakeReferenceCheckVo"/>
|
||||
<where>
|
||||
<if test="company != null and company != ''"> and company like concat('%', #{company}, '%')</if>
|
||||
<if test="fullName != null and fullName != ''"> and full_name like concat('%', #{fullName}, '%')</if>
|
||||
<if test="position != null and position != ''"> and position like concat('%', #{position}, '%')</if>
|
||||
<if test="relationship != null and relationship != ''"> and relationship = #{relationship}</if>
|
||||
<if test="email != null and email != ''"> and email like concat('%', #{email}, '%')</if>
|
||||
<if test="saveJobExperience != null"> and save_job_experience = #{saveJobExperience}</if>
|
||||
<if test="delFlag != null and delFlag != ''"> and del_flag = #{delFlag}</if>
|
||||
<if test="createBy != null and createBy != ''"> and create_by = #{createBy}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
<select id="selectHotakeReferenceCheckById" parameterType="Integer" resultMap="HotakeReferenceCheckResult">
|
||||
<include refid="selectHotakeReferenceCheckVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
<insert id="insertHotakeReferenceCheck" parameterType="HotakeReferenceCheck" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into hotake_reference_check
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
<if test="company != null and company != ''">company,</if>
|
||||
<if test="fullName != null and fullName != ''">full_name,</if>
|
||||
<if test="position != null">position,</if>
|
||||
<if test="relationship != null and relationship != ''">relationship,</if>
|
||||
<if test="email != null and email != ''">email,</if>
|
||||
<if test="saveJobExperience != null">save_job_experience,</if>
|
||||
<if test="delFlag != null">del_flag,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="remark != null">remark,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="company != null and company != ''">#{company},</if>
|
||||
<if test="fullName != null and fullName != ''">#{fullName},</if>
|
||||
<if test="position != null">#{position},</if>
|
||||
<if test="relationship != null and relationship != ''">#{relationship},</if>
|
||||
<if test="email != null and email != ''">#{email},</if>
|
||||
<if test="saveJobExperience != null">#{saveJobExperience},</if>
|
||||
<if test="delFlag != null">#{delFlag},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="remark != null">#{remark},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
<update id="updateHotakeReferenceCheck" parameterType="HotakeReferenceCheck">
|
||||
update hotake_reference_check
|
||||
<trim prefix="SET" suffixOverrides=",">
|
||||
<if test="company != null and company != ''">company = #{company},</if>
|
||||
<if test="fullName != null and fullName != ''">full_name = #{fullName},</if>
|
||||
<if test="position != null">position = #{position},</if>
|
||||
<if test="relationship != null and relationship != ''">relationship = #{relationship},</if>
|
||||
<if test="email != null and email != ''">email = #{email},</if>
|
||||
<if test="saveJobExperience != null">save_job_experience = #{saveJobExperience},</if>
|
||||
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="createTime != null">create_time = #{createTime},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="remark != null">remark = #{remark},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deleteHotakeReferenceCheckById" parameterType="Integer">
|
||||
delete from hotake_reference_check where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteHotakeReferenceCheckByIds" parameterType="String">
|
||||
delete from hotake_reference_check where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user