linwei
2024-02-03 7a867acb6c49c5d4774bdfa6be83043017176e39
src/main/java/org/springblade/modules/taskPlaceRectification/mapper/TaskPlaceRectificationMapper.xml
@@ -303,12 +303,13 @@
        bd.dict_value,
        (
        SELECT
        IFNULL(sum( jpc.hidden_danger_number ) ,0)
        count(jpr.id)
        FROM
        jczz_place_check jpc
        jczz_patrol_record jpr
        LEFT JOIN jczz_place_check jpc ON jpr.place_check_id = jpc.id
        LEFT JOIN jczz_place jp ON jpc.house_code = jp.house_code
        LEFT JOIN jczz_grid jg ON jg.grid_code = jp.grid_code
        left join blade_region br on br.code = jg.community_code
        LEFT JOIN blade_region br ON br.CODE = jg.community_code
        <where>
            <if test="isAdministrator==2">
                <choose>
@@ -320,11 +321,11 @@
                    </when>
                </choose>
            </if>
            and jpr.state = '0'
            and jp.nine_type = bd.dict_key
            and br.town_code =#{code}
            and jpc.create_time=(
            SELECT MAX(create_time) FROM jczz_place_check where jpc.house_code=house_code
            <if test="taskPlaceRectification.startTime!=null and taskPlaceRectification.startTime!=''">
                and create_time&gt;=#{taskPlaceRectification.startTime}
            </if>
@@ -343,8 +344,23 @@
        order by bd.sort asc
    </select>
    <resultMap type="org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel"
               id="TaskPlaceRectificationExcelResult">
        <result property="placeName" column="place_name"/>
        <result property="createTime" column="create_time"/>
        <result property="rectificationNoticeFlag" column="rectification_notice_flag"/>
        <result property="rectificationEndTime" column="rectification_end_time"/>
        <result property="rectificationFlag" column="rectification_flag"/>
        <collection property="patrolRecordVOList" column="place_check_id" select="selectPatrolRecordList"
                    javaType="java.util.List" ofType="org.springblade.modules.patrol.vo.PatrolRecordVO"
                    autoMapping="true">
        </collection>
    </resultMap>
    <select id="export"
            resultType="org.springblade.modules.taskPlaceRectification.excel.TaskPlaceRectificationExcel">
            resultMap="TaskPlaceRectificationExcelResult">
        SELECT
        jtpr.id,