智慧保安后台管理项目备份
Administrator
2021-09-24 368297a15619077b0634fb5f05ee795e50a798ee
保安员查询接口修改
2 files modified
47 ■■■■ changed files
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml 26 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 21 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/DeptMapper.xml
@@ -395,7 +395,25 @@
        WHERE parent_id = #{id}
          and is_deleted = 0
    </select>
    <!--保安公司树-->
    <select id="securityLazyTree" resultMap="treeNodeResultMap">
        (
        SELECT
        id,
        parent_id,
        dept_name AS title,
        id AS "value",
        id AS "key",
        0 AS "has_children"
        FROM
        blade_dept
        where is_deleted = 0
        and
        (id = 1413470343230877697 or id = 1425366663452196865 or id = 1418458374477549569 or id = 1420222768149966850)
        )
        union
        (
        SELECT
        DISTINCT
        dept.id,
@@ -419,12 +437,16 @@
        si.departmentid = dept.id
        WHERE
        1=1
        and dept_category = 1
        and si.stats != 4
        AND dept.is_deleted = 0
        and dept.id !=1420222961377357825
        and dept.parent_id!=1420222961377357825
        <if test="param1!=null and param1!='' and param1!='1123598813738675201'">
        and dept.parent_id!=1425365577303621633
        and dept.id != 1425365577303621633
        and dept.id != 1432625856013971457
        <if test="param1!=null and param1!='' and param1!='1372091709474910209'">
            and si.jurisdiction = #{param1}
        </if>
        )
    </select>
</mapper>
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -200,12 +200,27 @@
        blade_dept bd
        on
        bu.dept_id = bd.id
        left join
        blade_role br
        on
        br.id = bu.role_id
        left join
        sys_information si
        on
        si.departmentid = bd.id
        left join
        sys_jurisdiction sj
        on
        sj.id = si.jurisdiction
        where
        bu.is_deleted = 0
        and
        bd.dept_category = 1
        br.role_alias = "安保人员"
        and
        bu.status = 1
        and bd.parent_id!=1425365577303621633
        and bd.id != 1425365577303621633
        and bd.id != 1432625856013971457
        <if test="user.cardid!=null and user.cardid != ''">
            and bu.cardid like concat(concat('%', #{user.cardid}),'%')
        </if>
@@ -227,8 +242,8 @@
        <if test="user.hold!=null and user.hold != ''">
            and bu.hold = #{user.hold}
        </if>
        <if test="user.jurisdiction!=null and user.jurisdiction != ''">
            and bu.jurisdiction = #{user.jurisdiction}
        <if test="user.jurisdiction!=null and user.jurisdiction != '' and user.jurisdiction != '1372091709474910209'">
            and (sj.id = #{user.jurisdiction} or sj.parent_id = #{user.jurisdiction})
        </if>
        <if test="user.securitynumber!=null and user.securitynumber != ''">
            and bu.securitynumber like concat('%', #{user.securitynumber},'%')