linwe
2024-05-29 c10d6358b9f014375a13821465bc978d0c0da22e
src/main/java/org/springblade/modules/task/mapper/TaskPlaceSelfCheckMapper.xml
@@ -60,6 +60,7 @@
        LEFT JOIN blade_user bu ON bu.id = jpc.create_user and bu.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jp.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        <where>
            and jp.house_code is not null
            <if test="place.id != null ">and jpc.id = #{place.id}</if>
            <if test="place.taskId != null ">and jpc.task_id = #{place.taskId}</if>
            <if test="place.taskName != null  and place.taskName != ''">and jpc.task_name = #{place.taskName}</if>
@@ -79,7 +80,6 @@
            <if test="place.remark != null  and place.remark != ''">and jpc.remark = #{place.remark}</if>
            <if test="place.updateTime != null ">and jpc.update_time = #{place.updateTime}</if>
            <if test="place.createTime != null ">and jpc.create_time = #{place.createTime}</if>
            <if test="place.houseCode != null  and place.houseCode != ''">and jpc.house_code = #{place.houseCode}</if>
            <if test="place.type != null  and place.type != ''">and jpc.type = #{place.type}</if>
            <if test="place.rectificationEndTime != null ">and jpc.rectification_end_time =
                #{place.rectificationEndTime}
@@ -112,6 +112,13 @@
            <if test="place.imageUrls != null  and place.imageUrls != ''">and jpc.image_urls = #{place.imageUrls}</if>
            <if test="place.status != null ">and jpc.status = #{place.status}</if>
            <if test="place.deleteFlag != null ">and jpc.delete_flag = #{place.deleteFlag}</if>
            <if test="place.startTime != null and place.startTime != ''">
                and date_format(jpc.create_time,'%Y-%m-%d') &gt;= #{place.startTime}
            </if>
            <if test="place.endTime != null and place.endTime != ''">
                and date_format(jpc.create_time,'%Y-%m-%d') &lt;= #{place.endTime}
            </if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="place.roleName != null and place.roleName != ''">
@@ -166,6 +173,8 @@
                    </otherwise>
                </choose>
            </if>
            <if test="place.houseCode != null  and place.houseCode != ''"> and jpc.house_code = #{place.houseCode}</if>
        </where>
        order by jpc.create_time desc
    </select>
@@ -190,6 +199,7 @@
        <result property="imageUrls" column="image_urls"/>
        <result property="status" column="status"/>
        <result property="deleteFlag" column="delete_flag"/>
        <result property="type" column="type"/>
        <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
                    select="selectPlacePoiLabelList"
@@ -197,7 +207,7 @@
                    autoMapping="true">
        </collection>
        <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
        <collection property="taskPlaceRecordVOList" column="{id=id,type=type}" select="selectPatrolRecordList"
                    javaType="java.util.List" ofType="org.springblade.modules.task.vo.TaskPlaceRecordVO"
                    autoMapping="true">
        </collection>
@@ -223,25 +233,30 @@
        </select>
    <select id="selectPatrolRecordList" parameterType="Long"
    <select id="selectPatrolRecordList"  parameterType="java.util.Map"
            resultType="org.springblade.modules.task.vo.TaskPlaceRecordVO">
        select jpr.id,
               jpr.item_id,
               jpr.task_place_self_check_id,
               jpr.state,
               jpr.remark,
               jpr.image_urls,
               jpr.create_user,
               jpr.create_time,
               jpr.is_deleted,
               jpr.rectification_image_urls,
               jpr.rectification_remark,
               jpr.rectification_time,
               jpgi.items_name
        jpr.item_id,
        jpr.task_place_self_check_id,
        jpr.state,
        jpr.remark,
        jpr.image_urls,
        jpr.create_user,
        jpr.create_time,
        jpr.is_deleted,
        jpr.rectification_image_urls,
        jpr.rectification_remark,
        jpr.rectification_time,
        jpgi.items_name
        from jczz_task_place_record jpr
                 LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id = jpgi.id
        LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id = jpgi.id
        where task_place_self_check_id = #{id}
          and jpr.type = '1'
        <if test="type == 1">
            and jpr.type = 1
        </if>
        <if test="type == 2">
            and jpr.type = 3
        </if>
    </select>
    <sql id="selectTaskPlaceSelfCheck">
@@ -270,24 +285,7 @@
    <select id="selectTaskPlaceSelfCheckById" parameterType="long" resultMap="TaskPlaceSelfCheckDTOResult">
        SELECT
        jtpr.id,
        jtpr.task_id,
        jtpr.task_name,
        jtpr.place_name,
        jtpr.remark,
        jtpr.update_time,
        jtpr.create_time,
        jtpr.house_code,
        jtpr.rectification_end_time,
        jtpr.rectification_complete_time,
        jtpr.rectification_flag,
        jtpr.police_station,
        jtpr.rectification_notice_img_url,
        jtpr.signature_path,
        jtpr.create_user,
        jtpr.image_urls,
        jtpr.STATUS,
        jtpr.delete_flag,
        jtpr.*,
        jp.id jpid,
        jp.place_name,
        jp.location,