|
@@ -21,20 +21,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTStSuccessorVo">
|
|
|
- select d.id, d.staff_id,t.name as staffName,m.name as mentorStaffName, d.remarks, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.actualpost, d.mentor_staff_id, d.state ,s.dept_name
|
|
|
- from t_st_successor d
|
|
|
- left join sys_dept s on s.dept_id = d.dept_id
|
|
|
- left join t_staffmgr t on t.staffid = d.staff_id
|
|
|
- left join t_staffmgr m on m.staffid = d.mentor_staff_id
|
|
|
+ select d.id, d.staff_id,t.name as staffName,m.name as mentorStaffName, d.remarks, d.del_flag, d.creater_code,
|
|
|
+ d.createdate, d.updater_code, d.updatedate, d.dept_id, d.actualpost, d.mentor_staff_id, d.state ,s.dept_name
|
|
|
+ from t_st_successor d
|
|
|
+ left join sys_dept s on s.dept_id = d.dept_id
|
|
|
+ left join t_staffmgr t on t.staffid = d.staff_id
|
|
|
+ left join t_staffmgr m on m.staffid = d.mentor_staff_id
|
|
|
</sql>
|
|
|
|
|
|
- <!--王子文 2022年4月18日-->
|
|
|
+ <!-- 根据staffId修改“进行中”的继任者计划状态为“因离职中止” -->
|
|
|
+ <update id="updateStateByStaffId" parameterType="Long">
|
|
|
+ update t_st_successor set state = 2 where (staff_id = #{staffId} or mentor_staff_id = #{staffId}) and state = 0
|
|
|
+ </update>
|
|
|
+
|
|
|
<!--根据导师ID查询学员列表-->
|
|
|
<select id="selectSuccessorListByMentorId" parameterType="TStSuccessor" resultMap="TStSuccessorResult">
|
|
|
<include refid="selectTStSuccessorVo"/>
|
|
|
<where>
|
|
|
<if test="mentorStaffId != null and mentorStaffId != ''"> and mentor_staff_id = #{mentorStaffId}</if>
|
|
|
and d.del_flag = 0
|
|
|
+ and d.state != 2
|
|
|
</where>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
</select>
|
|
@@ -45,11 +51,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<where>
|
|
|
<if test="mentorStaffId != null and mentorStaffId != ''"> and staff_id = #{staffId}</if>
|
|
|
and d.del_flag = 0
|
|
|
+ and d.state != 2
|
|
|
</where>
|
|
|
<!-- 数据范围过滤 -->
|
|
|
</select>
|
|
|
|
|
|
-
|
|
|
<select id="selectTStSuccessorList" parameterType="TStSuccessor" resultMap="TStSuccessorResult">
|
|
|
<include refid="selectTStSuccessorVo"/>
|
|
|
<where>
|
|
@@ -131,9 +137,4 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</foreach>
|
|
|
</update>
|
|
|
|
|
|
- <!-- 根据staffId修改“进行中”的继任者计划状态为“因离职中止” -->
|
|
|
- <update id="updateStateByStaffId" parameterType="Long">
|
|
|
- update t_st_successor set state = 2 where (staff_id = #{staffId} or mentor_staff_id = #{staffId}) and state = 0
|
|
|
- </update>
|
|
|
-
|
|
|
</mapper>
|