吉安感知网项目-后端
linwei
2026-01-27 8eefac7a9b2b6ac0e7b005e1ae4e3e0bdf8e3f7f
drone-service/drone-system/src/main/java/org/sxkj/system/mapper/DeptMapper.xml
@@ -276,6 +276,46 @@
        AND r.code = #{areaCode}
    </select>
    <select id="selectDeptPage" resultType="org.sxkj.system.vo.DeptVO">
        SELECT
            bd.*,
            br.name AS area_name
        FROM
            blade_dept bd LEFT JOIN blade_region br ON br.code = bd.area_code
        WHERE
            bd.is_deleted = 0
        <if test="param2.deptName!=null and param2.deptName!=''">
            and bd.dept_name like concat(concat('%', #{param2.deptName}),'%')
        </if>
        <if test="param2.fullName!=null and param2.fullName!=''">
            and bd.full_name like concat(concat('%', #{param2.fullName}),'%')
        </if>
        <if test="param2.areaCode!=null and param2.areaCode!=''">
            and bd.area_code = #{param2.areaCode}
        </if>
            ORDER BY bd.create_time DESC
    </select>
    <select id="exportDept" resultType="org.sxkj.system.excel.DeptExcel">
        SELECT
            bd.*,
            br.name AS area_name
        FROM
            blade_dept bd
        LEFT JOIN
            blade_region br ON br.code = bd.area_code
        WHERE
            bd.is_deleted = 0
        <if test="deptName!=null and deptName!=''">
            and bd.dept_name like concat(concat('%', #{deptName}),'%')
        </if>
        <if test="fullName!=null and fullName!=''">
            and bd.full_name like concat(concat('%', #{fullName}),'%')
        </if>
        <if test="areaCode!=null and areaCode!=''">
            and bd.area_code = #{areaCode}
        </if>
    </select>
</mapper>