2025-06-11 09:42:13 +08:00
|
|
|
<?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.newyetai.recruit.position.dao.PositionRegistrationMapper">
|
|
|
|
|
<update id="updateStatus">
|
|
|
|
|
update hr_position_registration
|
|
|
|
|
set status = #{param.status},update_time = now(),update_by = #{param.updateBy}
|
|
|
|
|
<if test="param.interviewTime != null">
|
|
|
|
|
,interview_time = #{param.interviewTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.interviewLocation != null and param.interviewLocation != '' ">
|
|
|
|
|
,interview_location = #{param.interviewLocation}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.inductionTime != null">
|
|
|
|
|
,induction_time = #{param.inductionTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.quitTime != null">
|
|
|
|
|
,quit_time = #{param.quitTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.terminationTime != null">
|
|
|
|
|
,termination_time = #{param.terminationTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.salary != null">
|
|
|
|
|
,salary = #{param.salary}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.remark != null and param.remark != '' ">
|
|
|
|
|
,remark = #{param.remark}
|
|
|
|
|
</if>
|
2025-06-11 13:44:08 +08:00
|
|
|
<if test="param.tag != null and param.tag != '' ">
|
|
|
|
|
,tag = #{param.tag}
|
|
|
|
|
</if>
|
2025-06-11 09:42:13 +08:00
|
|
|
where
|
|
|
|
|
id = #{param.id}
|
|
|
|
|
<if test="oldStatus != null and oldStatus != '' ">
|
|
|
|
|
and status = #{oldStatus}
|
|
|
|
|
</if>
|
|
|
|
|
|
|
|
|
|
</update>
|
|
|
|
|
|
|
|
|
|
<select id="page" resultType="com.newyetai.recruit.position.dto.PositionRegistrationDTO">
|
|
|
|
|
SELECT t.*,
|
|
|
|
|
p.position_name,
|
|
|
|
|
p.company_id,
|
|
|
|
|
c.company_name,
|
|
|
|
|
u.real_name,
|
|
|
|
|
u.card_no,
|
|
|
|
|
u.phone,
|
|
|
|
|
uu.real_name as recruitUserName,
|
|
|
|
|
xo.org_name as publishOrgName,
|
|
|
|
|
xo1.org_name as streetName
|
|
|
|
|
FROM
|
|
|
|
|
hr_position_registration t
|
|
|
|
|
LEFT JOIN hr_position p ON t.position_id = p.id AND p.deleted = 0
|
|
|
|
|
LEFT JOIN uc_user u ON t.user_id = u.id AND u.deleted = 0
|
|
|
|
|
LEFT JOIN uc_user uu ON p.recruit_user_id = uu.id AND uu.deleted = 0
|
|
|
|
|
LEFT JOIN hr_company c ON p.company_id = c.id AND c.deleted = 0
|
|
|
|
|
LEFT JOIN xs_org xo ON c.org_id = xo.id AND xo.deleted = 0
|
|
|
|
|
LEFT JOIN xs_org xo1 ON xo1.id = xo.parent_id AND xo1.deleted = 0
|
|
|
|
|
WHERE t.deleted = 0 and t.status <![CDATA[ <> ]]> 8
|
|
|
|
|
<if test='param.id != null'>
|
|
|
|
|
AND t.id = #{param.id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.orgId != null'>
|
|
|
|
|
AND p.org_id = #{param.orgId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.orgIds != null and param.orgIds.size() != 0">
|
|
|
|
|
AND p.org_id in
|
|
|
|
|
<foreach collection="param.orgIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.queryStreetChildrenAllOrgIds != null and param.queryStreetChildrenAllOrgIds.size() != 0">
|
|
|
|
|
AND xo1.id in
|
|
|
|
|
<foreach collection="param.queryStreetChildrenAllOrgIds" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.publishOrgId != null'>
|
|
|
|
|
AND xo.id = #{param.publishOrgId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.companyId != null'>
|
|
|
|
|
AND p.company_id = #{param.companyId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.positionId != null'>
|
|
|
|
|
AND t.position_id = #{param.positionId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.realNameLike != null and param.realNameLike.trim() != ""'>
|
|
|
|
|
<bind name="realNameLike" value="'%' + param.realNameLike + '%'"/>
|
|
|
|
|
AND u.real_name like #{realNameLike}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.realNames != null and param.realNames.size() != 0">
|
|
|
|
|
AND u.real_name in
|
|
|
|
|
<foreach collection="param.realNames" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.phoneLike != null and param.phoneLike.trim() != ""'>
|
|
|
|
|
<bind name="phoneLike" value="'%' + param.phoneLike + '%'"/>
|
|
|
|
|
AND u.phone like #{phoneLike}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.phones != null and param.phones.size() != 0">
|
|
|
|
|
AND u.phone in
|
|
|
|
|
<foreach collection="param.phones" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.cardNoLike != null and param.cardNoLike.trim() != ""'>
|
|
|
|
|
<bind name="cardNoLike" value="'%' + param.cardNoLike + '%'"/>
|
|
|
|
|
AND u.card_no like #{cardNoLike}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.cardNos != null and param.cardNos.size() != 0">
|
|
|
|
|
AND u.card_no in
|
|
|
|
|
<foreach collection="param.cardNos" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.status != null and param.status.trim() != ""'>
|
|
|
|
|
AND t.status = #{param.status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test="param.statusList != null and param.statusList.size() != 0">
|
|
|
|
|
AND t.status in
|
|
|
|
|
<foreach collection="param.statusList" item="item" open="(" separator="," close=")">
|
|
|
|
|
#{item}
|
|
|
|
|
</foreach>
|
|
|
|
|
</if>
|
2025-06-11 13:44:08 +08:00
|
|
|
<if test='param.tagLike != null and param.tagLike.trim() != ""'>
|
|
|
|
|
<bind name="tagLike" value="'%' + param.tagLike + '%'"/>
|
|
|
|
|
AND t.tag like #{tagLike}
|
|
|
|
|
</if>
|
|
|
|
|
|
2025-06-11 09:42:13 +08:00
|
|
|
<choose>
|
|
|
|
|
<when test="param.statusList != null and param.statusList.size() != 0">
|
|
|
|
|
<choose>
|
|
|
|
|
<when test='param.statusList.contains("1")'>
|
|
|
|
|
ORDER BY t.create_time DESC,t.id DESC
|
|
|
|
|
</when>
|
|
|
|
|
<when test='param.statusList.contains("2") or param.statusList.contains("3") or param.statusList.contains("4")'>
|
|
|
|
|
ORDER BY t.update_time DESC,t.id DESC
|
|
|
|
|
</when>
|
|
|
|
|
<when test='param.statusList.contains("5")'>
|
|
|
|
|
ORDER BY t.induction_time DESC,t.id DESC
|
|
|
|
|
</when>
|
|
|
|
|
</choose>
|
|
|
|
|
</when>
|
|
|
|
|
<otherwise>
|
|
|
|
|
ORDER BY t.update_time DESC,t.id DESC
|
|
|
|
|
</otherwise>
|
|
|
|
|
</choose>
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<select id="userPage"
|
|
|
|
|
resultType="com.newyetai.recruit.position.dto.UserPositionRegistrationResDTO">
|
|
|
|
|
SELECT t.id,
|
|
|
|
|
p.id positionId,
|
|
|
|
|
p.position_name,
|
|
|
|
|
p.recruit_title,
|
|
|
|
|
p.position_tag,
|
|
|
|
|
p.salary_up,
|
|
|
|
|
p.salary_low,
|
|
|
|
|
p.salary_type,
|
|
|
|
|
p.position_address,
|
|
|
|
|
p.recruit_position_type,
|
|
|
|
|
c.company_name,
|
|
|
|
|
c.company_logo,
|
|
|
|
|
uu.real_name as recruitUserName,
|
|
|
|
|
pf.file_code positionFileCode,
|
|
|
|
|
t.status,
|
|
|
|
|
t.create_time,
|
|
|
|
|
t.interview_time,
|
|
|
|
|
t.interview_location,
|
|
|
|
|
t.remark,
|
|
|
|
|
t.induction_time,
|
|
|
|
|
t.salary,
|
2025-08-06 11:15:25 +08:00
|
|
|
t.can_show,
|
2025-06-11 09:42:13 +08:00
|
|
|
pa.detail_address
|
|
|
|
|
FROM
|
|
|
|
|
hr_position_registration t
|
|
|
|
|
LEFT JOIN hr_position p ON t.position_id = p.id AND p.deleted = 0
|
|
|
|
|
LEFT JOIN uc_user uu ON p.recruit_user_id = uu.id AND uu.deleted = 0
|
|
|
|
|
LEFT JOIN hr_company c ON p.company_id = c.id AND c.deleted = 0
|
|
|
|
|
LEFT JOIN hr_position_file pf ON t.position_id = pf.position_id AND pf.default_show = 1 AND pf.deleted = 0
|
|
|
|
|
LEFT JOIN hr_position_address pa ON p.address_id = pa.id AND pa.deleted = 0
|
|
|
|
|
WHERE t.deleted = 0
|
|
|
|
|
<if test='param.id != null'>
|
|
|
|
|
AND t.id = #{param.id}
|
|
|
|
|
</if>
|
|
|
|
|
AND t.user_id = #{param.userId}
|
|
|
|
|
<if test='param.status != null and param.status.trim() != ""'>
|
|
|
|
|
AND t.status = #{param.status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.positionId != null'>
|
|
|
|
|
AND t.position_id = #{param.positionId}
|
|
|
|
|
</if>
|
|
|
|
|
ORDER BY t.id DESC
|
|
|
|
|
</select>
|
|
|
|
|
|
|
|
|
|
<sql id="queryFromSql">
|
|
|
|
|
FROM
|
|
|
|
|
hr_position_registration t
|
|
|
|
|
WHERE t.deleted = 0
|
|
|
|
|
<if test='param.id != null'>
|
|
|
|
|
AND t.id = #{param.id}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.positionId != null'>
|
|
|
|
|
AND t.position_id = #{param.positionId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.userId != null'>
|
|
|
|
|
AND t.user_id = #{param.userId}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.status != null and param.status.trim() != ""'>
|
|
|
|
|
AND t.status = #{param.status}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.interviewTime != null'>
|
|
|
|
|
AND t.interview_time = #{param.interviewTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.inductionTime != null'>
|
|
|
|
|
AND t.induction_time = #{param.inductionTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.quitTime != null'>
|
|
|
|
|
AND t.quit_time = #{param.quitTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.terminationTime != null'>
|
|
|
|
|
AND t.termination_time = #{param.terminationTime}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.salary != null'>
|
|
|
|
|
AND t.salary = #{param.salary}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.remark != null and param.remark.trim() != ""'>
|
|
|
|
|
AND t.remark = #{param.remark}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.createTimeStart != null'>
|
|
|
|
|
AND t.create_time >= #{param.createTimeStart}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.createTimeEnd != null'>
|
|
|
|
|
AND t.create_time <= #{param.createTimeEnd}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.updateTimeStart != null'>
|
|
|
|
|
AND t.update_time >= #{param.updateTimeStart}
|
|
|
|
|
</if>
|
|
|
|
|
<if test='param.updateTimeEnd != null'>
|
|
|
|
|
AND t.update_time <= #{param.updateTimeEnd}
|
|
|
|
|
</if>
|
|
|
|
|
ORDER BY t.id DESC
|
|
|
|
|
</sql>
|
2025-06-26 17:36:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
<select id="noticeInvite" resultType="map">
|
|
|
|
|
select p.position_name positionName,
|
|
|
|
|
pr.create_time createTime,
|
|
|
|
|
pr.interview_time interviewTime,
|
2025-08-25 14:04:47 +08:00
|
|
|
ifnull(pr.interview_location,'无') interviewLocation,
|
2025-06-26 17:36:59 +08:00
|
|
|
ou.phone interviewPhone,
|
|
|
|
|
o.org_name orgName,
|
|
|
|
|
u.real_name realName
|
|
|
|
|
from hr_position_registration pr
|
|
|
|
|
inner join hr_position p on pr.position_id = p.id and p.deleted = 0
|
|
|
|
|
inner join xs_org o on p.org_id = o.id and o.deleted = 0
|
|
|
|
|
inner join uc_user u on pr.user_id = u.id and u.deleted = 0
|
|
|
|
|
inner join uc_user ou on ou.id = #{orgUserId}
|
|
|
|
|
where pr.id = #{positionRegistrationId}
|
|
|
|
|
and pr.deleted = 0
|
|
|
|
|
|
|
|
|
|
</select>
|
|
|
|
|
<select id="noticeInterview" resultType="map">
|
|
|
|
|
select p.position_name positionName,
|
|
|
|
|
pr.create_time createTime,
|
|
|
|
|
pr.interview_time interviewTime,
|
2025-08-25 14:04:47 +08:00
|
|
|
ifnull(pr.interview_location,'无') interviewLocation,
|
2025-06-26 17:36:59 +08:00
|
|
|
pr.induction_time inductionTime,
|
2025-08-25 14:04:47 +08:00
|
|
|
ifnull(pr.remark, '无') remark,
|
2025-06-26 17:36:59 +08:00
|
|
|
ou.phone interviewPhone,
|
2025-08-25 14:04:47 +08:00
|
|
|
ifnull(pa.detail_address,'无') positionAddress,
|
2025-06-26 17:36:59 +08:00
|
|
|
o.org_name orgName,
|
|
|
|
|
u.real_name realName
|
|
|
|
|
from hr_position_registration pr
|
|
|
|
|
inner join hr_position p on pr.position_id = p.id and p.deleted = 0
|
|
|
|
|
inner join xs_org o on p.org_id = o.id and o.deleted = 0
|
|
|
|
|
inner join uc_user u on pr.user_id = u.id and u.deleted = 0
|
|
|
|
|
inner join uc_user ou on ou.id = #{orgUserId}
|
|
|
|
|
left join hr_position_address pa on p.address_id = pa.id and pa.deleted = 0
|
|
|
|
|
where pr.id = #{positionRegistrationId}
|
|
|
|
|
and pr.deleted = 0
|
|
|
|
|
|
|
|
|
|
</select>
|
2025-07-21 15:02:37 +08:00
|
|
|
<select id="positionRegistrationList" resultType="com.newyetai.recruit.position.dto.PositionRegistrationDTO">
|
|
|
|
|
select
|
|
|
|
|
pr.*
|
|
|
|
|
from hr_position_registration pr
|
|
|
|
|
inner join hr_position p on pr.position_id = p.id and p.deleted = 0
|
|
|
|
|
where pr.deleted = 0 and p.org_id = #{orgId} and pr.status in (1,2,4,5,6)
|
|
|
|
|
</select>
|
2025-06-26 17:36:59 +08:00
|
|
|
|
|
|
|
|
|
2025-06-11 09:42:13 +08:00
|
|
|
</mapper>
|