Administrator
2021-08-31 08363052cecb30230a2c8b3eba791ca8d1be00a5
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -334,9 +334,9 @@
          </if>
    </select>
    <!--查询当前年份已有的保安证编号-->
    <!--查询当前年份已有的保安证编号,取倒数5位的最大值-->
    <select id="getSecurityPaperCount" resultType="java.lang.Integer">
        select count(*) from blade_user
        select ifnull(max(0+RIGHT(securitynumber,5)),0) from blade_user
        where securitynumber like concat('%', #{pre},'%')
    </select>
@@ -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>