linwe
2023-12-25 ca93fe7eb03bec91d5cb9f45ebb3b6c98819b7ff
src/main/java/org/springblade/modules/task/mapper/TaskReportForRepairsMapper.xml
@@ -46,6 +46,9 @@
        <if test="vo.viewType != null">
            AND jtrfr.view_type = #{vo.viewType}
        </if>
        <if test="vo.startTime != null and vo.startTime != '' and vo.endTime != null and vo.endTime != '' ">
            AND jtrfr.create_time BETWEEN #{vo.startTime} and #{vo.endTime}
        </if>
        <if test="vo.roleName!=null and vo.roleName!=''">
            <if test="vo.roleName=='网格员'">
                <choose>
@@ -82,9 +85,9 @@
            and jtrfr.type = #{type}
        </if>
        <if test="userId != null">
            AND jda.address_code in (
            SELECT
        <if test="userId != null and roleType == '1'">
            AND jda.address_code IN (
            SELECT DISTINCT
            jgr.house_code
            FROM
            jczz_grid jg
@@ -95,6 +98,16 @@
            AND jg.is_deleted = 0
            )
        </if>
        <if test="userId != null and roleType == '3'">
            AND jda.address_code IN (SELECT
            jda.address_code
            FROM
            jczz_doorplate_address jda
            LEFT JOIN jczz_community jc ON jc.CODE = jda.nei_code
            WHERE
            jc.res_police_user_id = #{userId})
            )
        </if>
    </select>