java110
2021-02-27 ff7a5c59fcfa7706ca3a5b123d2ca835dd395131
java110-db/src/main/resources/mapper/user/OrgStaffRelServiceDaoImplMapper.xml
@@ -76,14 +76,19 @@
    <!-- 查询组织员工关系信息 add by wuxw 2018-07-03 -->
    <select id="getOrgStaffRelInfo" parameterType="Map" resultType="Map">
        select t.rel_id,t.rel_id relId,t.status_cd,t.status_cd statusCd,t.store_id,t.store_id storeId,t.b_id,t.b_id
        bId,t.org_id,t.org_id orgId,t.staff_id,t.staff_id staffId,t.rel_cd,t.rel_cd relCd
        from u_org_staff_rel t
        where 1 =1
        bId,t.org_id,t.org_id orgId,t.staff_id,t.staff_id staffId,t.rel_cd,t.rel_cd relCd,uo.parent_org_id parentOrgId,
        uu.name staffName,uo.org_name departmentName,uo.org_id departmentId
        from u_org_staff_rel t,u_org uo,u_user uu
        where t.org_id = uo.org_id
        and t.staff_id = uu.user_id
        <if test='statusCd ==null or statusCd != "1"'>
            and uu.status_cd = '0'
            and uo.status_cd = '0'
            and t.status_cd= '0'
        </if>
        <if test="relId !=null and relId != ''">
            and t.rel_id= #{relId}
        </if>
        <if test="statusCd !=null and statusCd != ''">
            and t.status_cd= #{statusCd}
        </if>
        <if test="storeId !=null and storeId != ''">
            and t.store_id= #{storeId}
@@ -138,8 +143,9 @@
    <!-- 查询组织员工关系数量 add by wuxw 2018-07-03 -->
    <select id="queryOrgStaffRelsCount" parameterType="Map" resultType="Map">
        select count(1) count
        from u_org_staff_rel t
        where 1 =1
        from u_org_staff_rel t,u_org uo
        where t.org_id = uo.org_id
        and uo.status_cd = '0'
        <if test="relId !=null and relId != ''">
            and t.rel_id= #{relId}
        </if>