tangzy
2021-08-31 9b583c3ae9f78328368b2eda8899f80204ed796f
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -447,4 +447,40 @@
            and dept_category=2
        </if>
    </select>
    <!--获取工作汇报 向民警-->
    <select id="getWorkReportInfos" resultType="java.util.HashMap">
        select bu.* from blade_user bu
        left join
        blade_dept bd
        on
        bd.id = bu.dept_id
        where
        1=1
        and bu.status = 1
        and bu.is_deleted = 0
        <if test="deptid!=null and deptid!=''">
            and bu.dept_id = #{deptid}
        </if>
        <if test="jurisdiction!=null and jurisdiction!=''">
            and bu.jurisdiction = #{jurisdiction}
            and dept_category=2
        </if>
    </select>
    <!--查询用的派遣信息-->
    <select id="getDispatcherInfoByUserId" resultType="org.springblade.modules.dispatcher.vo.DispatcherVO">
        select
            sd.id,sdu.jurisdiction
        from
            sys_dispatcher sd
        left join
            sys_dispatcher_unit sdu
        on
            sdu.id = sd.dispatcher_unit_id
        where sd.user_ids = #{userId}
        and sd.status = 0
    </select>
</mapper>