Bladeren bron

王子文 专项培养 bug fixed: 解决了培养计划根据学员编号搜索年度计划报错的问题

wangggziwen 3 jaren geleden
bovenliggende
commit
1fa220c42c
1 gewijzigde bestanden met toevoegingen van 15 en 14 verwijderingen
  1. 15 14
      master/src/main/resources/mybatis/training/spec/TStYearplanMapper.xml

+ 15 - 14
master/src/main/resources/mybatis/training/spec/TStYearplanMapper.xml

@@ -22,25 +22,26 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
     </resultMap>
 
     <sql id="selectTStYearplanVo">
-        select d.id, d.staff_id,u.nick_name, d.name,d.plan_year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.approve_status ,s.dept_name from t_st_yearplan d
-      left join sys_dept s on s.dept_id = d.dept_id and s.del_flag = 0
-      left join sys_user u on d.staff_id = u.staffid and u.del_flag = 0
-      left join T_ST_SUCCESSOR suc on d.STAFF_ID = suc.STAFF_ID and suc.del_flag = 0
+        select d.id, d.staff_id,u.nick_name, d.name,d.plan_year, d.del_flag, d.creater_code, d.createdate, d.updater_code, d.updatedate, d.dept_id, d.approve_status ,s.dept_name
+        from t_st_yearplan d
+          left join sys_dept s on s.dept_id = d.dept_id and s.del_flag = 0
+          left join sys_user u on d.staff_id = u.staffid and u.del_flag = 0
+          left join T_ST_SUCCESSOR suc on d.STAFF_ID = suc.STAFF_ID and suc.del_flag = 0
     </sql>
 
     <select id="selectTStYearplanList" parameterType="TStYearplan" resultMap="TStYearplanResult">
         <include refid="selectTStYearplanVo"/>
         <where>
-            <if test="staffId != null  and staffId != ''"> and staff_id = #{staffId}</if>
-            <if test="name != null  and name != ''"> and name like concat(concat('%', #{name}), '%')</if>
-            <if test="createrCode != null  and createrCode != ''"> and creater_code = #{createrCode}</if>
-            <if test="createdate != null "> and createdate = #{createdate}</if>
-            <if test="updaterCode != null  and updaterCode != ''"> and updater_code = #{updaterCode}</if>
-            <if test="updatedate != null "> and updatedate = #{updatedate}</if>
-            <if test="deptId != null "> and dept_id = #{deptId}</if>
-            <if test="approveStatus != null "> and approve_status = #{approveStatus}</if>
-            <if test="planYear != null "> and plan_year = #{planYear}</if>
-            <if test="mentorStaffId != null  and mentorStaffId != ''"> and mentor_staff_id = #{mentorStaffId}</if>
+            <if test="staffId != null  and staffId != ''"> and d.staff_id = #{staffId}</if>
+            <if test="name != null  and name != ''"> and d.name like concat(concat('%', #{name}), '%')</if>
+            <if test="createrCode != null  and createrCode != ''"> and d.creater_code = #{createrCode}</if>
+            <if test="createdate != null "> and d.createdate = #{createdate}</if>
+            <if test="updaterCode != null  and updaterCode != ''"> and d.updater_code = #{updaterCode}</if>
+            <if test="updatedate != null "> and d.updatedate = #{updatedate}</if>
+            <if test="deptId != null "> and d.dept_id = #{deptId}</if>
+            <if test="approveStatus != null "> and d.approve_status = #{approveStatus}</if>
+            <if test="planYear != null "> and d.plan_year = #{planYear}</if>
+            <if test="mentorStaffId != null  and mentorStaffId != ''"> and suc.mentor_staff_id = #{mentorStaffId}</if>
             and d.del_flag = 0
         </where>
         <!-- 数据范围过滤 -->