Sfoglia il codice sorgente

增加岗位管理范围

river 4 anni fa
parent
commit
1230ff93df

+ 8 - 3
mec-biz/src/main/resources/config/mybatis/EmployeeMapper.xml

@@ -25,6 +25,7 @@
         <result column="postal_code_" property="postalCode"/>
         <result column="postal_code_" property="postalCode"/>
         <result column="dept_ids_" property="deptIds"/>
         <result column="dept_ids_" property="deptIds"/>
         <result column="post_ids_" property="postIds"/>
         <result column="post_ids_" property="postIds"/>
+        <result column="post_dept_ids_" property="postDeptIds"/>
         <result column="bank_card_" property="bankCard"/>
         <result column="bank_card_" property="bankCard"/>
         <result column="open_bank_address_" property="openBankAddress"/>
         <result column="open_bank_address_" property="openBankAddress"/>
     </resultMap>
     </resultMap>
@@ -74,9 +75,9 @@
         -->
         -->
         INSERT INTO employee
         INSERT INTO employee
         (user_id_,organ_id_list_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,
         (user_id_,organ_id_list_,job_nature_,is_probation_period_,education_background_,graduate_school_,technical_titles_,
-        entry_date_,certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,dept_ids_,post_ids_)
+        entry_date_,certificate_type_,certificate_num_,update_time_,create_time_,introduction_,demission_date_,contact_address_,postal_code_,dept_ids_,post_ids_,post_dept_ids_)
         VALUES(#{userId},#{organIdList},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool},
         VALUES(#{userId},#{organIdList},#{jobNature},#{isProbationPeriod},#{educationBackground},#{graduateSchool},
-        #{technicalTitles},#{entryDate},#{certificateType},#{certificateNum},now(),now(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{deptIds},#{postIds})
+        #{technicalTitles},#{entryDate},#{certificateType},#{certificateNum},now(),now(),#{introduction},#{demissionDate},#{contactAddress},#{postalCode},#{deptIds},#{postIds},#{postDeptIds})
     </insert>
     </insert>
     <insert id="batchAddEmployeeRole">
     <insert id="batchAddEmployeeRole">
         INSERT INTO sys_user_role(user_id_,role_id_) values
         INSERT INTO sys_user_role(user_id_,role_id_) values
@@ -141,6 +142,9 @@
             <if test="postIds != null">
             <if test="postIds != null">
                 post_ids_ = #{postIds},
                 post_ids_ = #{postIds},
             </if>
             </if>
+            <if test="postDeptIds != null">
+                post_dept_ids_ = #{postDeptIds},
+            </if>
         </set>
         </set>
         WHERE user_id_ = #{userId}
         WHERE user_id_ = #{userId}
     </update>
     </update>
@@ -199,6 +203,7 @@
         <result property="organIdStr" column="organ_id_str_"/>
         <result property="organIdStr" column="organ_id_str_"/>
         <result property="deptIds" column="dept_ids_"/>
         <result property="deptIds" column="dept_ids_"/>
         <result property="postIds" column="post_ids_"/>
         <result property="postIds" column="post_ids_"/>
+        <result property="postDeptIds" column="post_dept_ids_"/>
         <collection property="roleNames" ofType="string" javaType="list">
         <collection property="roleNames" ofType="string" javaType="list">
             <result column="role_name_"/>
             <result column="role_name_"/>
         </collection>
         </collection>
@@ -209,7 +214,7 @@
     <select id="queryEmployByOrganId" resultMap="EmployeeDto">
     <select id="queryEmployByOrganId" resultMap="EmployeeDto">
         SELECT ue.*,ue.organ_id_ organ_id_str_,sr.role_name_,sr.id_ role_id_
         SELECT ue.*,ue.organ_id_ organ_id_str_,sr.role_name_,sr.id_ role_id_
         FROM (SELECT e.user_id_,su.real_name_,su.gender_,su.phone_,su.user_type_,e.job_nature_,su.lock_flag_,
         FROM (SELECT e.user_id_,su.real_name_,su.gender_,su.phone_,su.user_type_,e.job_nature_,su.lock_flag_,
-        e.entry_date_,e.demission_date_,e.organ_id_list_ organ_id_,e.create_time_,e.contact_address_,e.postal_code_,e.dept_ids_,e.post_ids_
+        e.entry_date_,e.demission_date_,e.organ_id_list_ organ_id_,e.create_time_,e.contact_address_,e.postal_code_,e.dept_ids_,e.post_ids_,e.post_dept_ids_
         FROM employee e
         FROM employee e
         LEFT JOIN sys_user su ON e.user_id_ = su.id_
         LEFT JOIN sys_user su ON e.user_id_ = su.id_
         <if test="roleId != null">
         <if test="roleId != null">