|
@@ -7,8 +7,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<resultMap type="TStPlan" id="TStPlanResult">
|
|
<resultMap type="TStPlan" id="TStPlanResult">
|
|
<result property="id" column="id" />
|
|
<result property="id" column="id" />
|
|
<result property="staffId" column="staff_id" />
|
|
<result property="staffId" column="staff_id" />
|
|
- <!-- 王子文 2022年4月19日 10点28分 -->
|
|
|
|
- <!-- 添加 映射属性 staffName -->
|
|
|
|
<result property="staffName" column="nick_name" />
|
|
<result property="staffName" column="nick_name" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="delFlag" column="del_flag" />
|
|
<result property="createrCode" column="creater_code" />
|
|
<result property="createrCode" column="creater_code" />
|
|
@@ -25,37 +23,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="score" column="score" />
|
|
<result property="score" column="score" />
|
|
<result property="overallComment" column="overall_comment" />
|
|
<result property="overallComment" column="overall_comment" />
|
|
<result property="approveStatus" column="APPROVE_STATUS" />
|
|
<result property="approveStatus" column="APPROVE_STATUS" />
|
|
- <!-- 王子文 2022年4月22日 14点20分 -->
|
|
|
|
- <!-- 添加 映射属性 dateOfCompletion -->
|
|
|
|
<result property="dateOfCompletion" column="date_of_completion" />
|
|
<result property="dateOfCompletion" column="date_of_completion" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTStPlanVo">
|
|
<sql id="selectTStPlanVo">
|
|
- <!-- select d.id, d.staff_id, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d left join sys_dept s on s.dept_id = d.dept_id -->
|
|
|
|
- <!-- 王子文 2022年4月19日 10点28分 -->
|
|
|
|
- <!-- 添加 表连接 sys_user u -->
|
|
|
|
- <!-- 添加 结果字段 u.nick_name -->
|
|
|
|
select d.date_of_completion, suc.MENTOR_STAFF_ID, d.overall_comment, d.score, d.id, d.staff_id,d.APPROVE_STATUS, u.nick_name, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d
|
|
select d.date_of_completion, suc.MENTOR_STAFF_ID, d.overall_comment, d.score, d.id, d.staff_id,d.APPROVE_STATUS, u.nick_name, d.plant_name, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.start_date, d.end_date, d.class_hour, d.class_content, d.study_state ,s.dept_name from t_st_plan d
|
|
left join sys_dept s on s.dept_id = d.dept_id
|
|
left join sys_dept s on s.dept_id = d.dept_id
|
|
left join sys_user u on d.staff_id = u.staffid
|
|
left join sys_user u on d.staff_id = u.staffid
|
|
left join T_ST_SUCCESSOR suc on d.STAFF_ID = suc.STAFF_ID
|
|
left join T_ST_SUCCESSOR suc on d.STAFF_ID = suc.STAFF_ID
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
- <!--王子文 2022年4月20日 09点30分 添加-->
|
|
|
|
- <!--根据STAFF_ID查询培训计划列表-->
|
|
|
|
- <select id="selectTStPlanListByStaffId" parameterType="TStPlan" resultMap="TStPlanResult">
|
|
|
|
- <include refid="selectTStPlanVo"/>
|
|
|
|
- <where>
|
|
|
|
- <if test="staffId != null and staffId != ''"> and staff_id = #{staffId}</if>
|
|
|
|
- and d.del_flag = 0
|
|
|
|
- </where>
|
|
|
|
- <!-- 数据范围过滤 -->
|
|
|
|
- </select>
|
|
|
|
-
|
|
|
|
<select id="selectTStPlanList" parameterType="TStPlan" resultMap="TStPlanResult">
|
|
<select id="selectTStPlanList" parameterType="TStPlan" resultMap="TStPlanResult">
|
|
<include refid="selectTStPlanVo"/>
|
|
<include refid="selectTStPlanVo"/>
|
|
<where>
|
|
<where>
|
|
- <if test="staffId != null and staffId != ''"> and staff_id = #{staffId}</if>
|
|
|
|
|
|
+ <if test="staffId != null and staffId != ''"> and d.staff_id = #{staffId}</if>
|
|
<if test="plantName != null and plantName != ''"> and plant_name like concat(concat('%', #{plantName}), '%')</if>
|
|
<if test="plantName != null and plantName != ''"> and plant_name like concat(concat('%', #{plantName}), '%')</if>
|
|
<if test="startDate != null "> and start_date = #{startDate}</if>
|
|
<if test="startDate != null "> and start_date = #{startDate}</if>
|
|
<if test="endDate != null "> and end_date = #{endDate}</if>
|
|
<if test="endDate != null "> and end_date = #{endDate}</if>
|
|
@@ -65,7 +46,6 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
and d.del_flag = 0
|
|
and d.del_flag = 0
|
|
</where>
|
|
</where>
|
|
<!-- 数据范围过滤 -->
|
|
<!-- 数据范围过滤 -->
|
|
-
|
|
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectTStPlanById" parameterType="Long" resultMap="TStPlanResult">
|
|
<select id="selectTStPlanById" parameterType="Long" resultMap="TStPlanResult">
|