linwei
2024-02-05 f9467955f3f509b0e34634aeee7a3e53508fbbfe
消防检查优化
5 files modified
327 ■■■■ changed files
src/main/java/org/springblade/modules/taskPlaceRecord/mapper/TaskPlaceRecordMapper.xml 2 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/taskPlaceSelfCheck/dto/TaskPlaceSelfCheckDTO.java 63 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml 197 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/taskPlaceSelfCheck/vo/TaskPlaceSelfCheckVO.java 62 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/taskPlaceRecord/mapper/TaskPlaceRecordMapper.xml
@@ -8,7 +8,7 @@
    <select id="selectTaskPlaceRecordPage" resultMap="taskPlaceRecordResultMap">
        select * from jczz_task_place_record where is_deleted = 0
        select * from jczz_task_place_record
    </select>
src/main/java/org/springblade/modules/taskPlaceSelfCheck/dto/TaskPlaceSelfCheckDTO.java
@@ -16,6 +16,9 @@
 */
package org.springblade.modules.taskPlaceSelfCheck.dto;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.patrol.vo.PatrolRecordVO;
import org.springblade.modules.place.vo.PlacePoiLabelVO;
import org.springblade.modules.taskPlaceRecord.entity.TaskPlaceRecordEntity;
import org.springblade.modules.taskPlaceRecord.vo.TaskPlaceRecordVO;
@@ -35,7 +38,67 @@
@EqualsAndHashCode(callSuper = true)
public class TaskPlaceSelfCheckDTO extends TaskPlaceSelfCheckEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "隐患项目", example = "")
    private List<TaskPlaceRecordVO> taskPlaceRecordVOList;
    @ApiModelProperty(value = "场所标签", example = "")
    private List<PlacePoiLabelVO> placePoiLabelVOList ;
    @ApiModelProperty(value = "场所名称", example = "")
    private String placeName;
    @ApiModelProperty(value = "场所地址", example = "")
    private String location;
    @ApiModelProperty(value = "负责人", example = "")
    private String principal;
    @ApiModelProperty(value = "网格名称", example = "")
    private String gridName;
    @ApiModelProperty(value = "负责人电话", example = "")
    private String principalPhone;
    @ApiModelProperty(value = "街道名称", example = "")
    private String streetName;
    @ApiModelProperty(value = "社区名称", example = "")
    private String communityName;
    @ApiModelProperty(value = "法人", example = "")
    private String legalPerson;
    @ApiModelProperty(value = "法人电话", example = "")
    private String legalTel;
    @ApiModelProperty(value = "检查人名称", example = "")
    private String name;
    @ApiModelProperty(value = "隐患数量", example = "")
    private Integer number;
    @ApiModelProperty(value = "机构名称", example = "")
    private String deptName;
    @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
    private String nineType;
    @ApiModelProperty(value = "隐患问题", example = "")
    private String hiddenDanger;
    @ApiModelProperty(value = "不通过原因", example = "")
    private String reasonFailure;
    @ApiModelProperty(value = "地址编码", example = "")
    private String addressName;
    @ApiModelProperty(value = "开始时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String startTime;
    /** 创建时间 */
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String endTime;
}
src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.java
@@ -16,6 +16,7 @@
 */
package org.springblade.modules.taskPlaceSelfCheck.mapper;
import org.apache.ibatis.annotations.Param;
import org.springblade.modules.taskPlaceSelfCheck.dto.TaskPlaceSelfCheckDTO;
import org.springblade.modules.taskPlaceSelfCheck.entity.TaskPlaceSelfCheckEntity;
import org.springblade.modules.taskPlaceSelfCheck.vo.TaskPlaceSelfCheckVO;
@@ -38,7 +39,7 @@
     * @param taskPlaceSelfCheck
     * @return
     */
    List<TaskPlaceSelfCheckVO> selectTaskPlaceSelfCheckPage(IPage page, TaskPlaceSelfCheckVO taskPlaceSelfCheck);
    List<TaskPlaceSelfCheckVO> selectTaskPlaceSelfCheckPage(IPage page, @Param("palce") TaskPlaceSelfCheckVO taskPlaceSelfCheck);
    /**
     * 查询消防自查记任务表
src/main/java/org/springblade/modules/taskPlaceSelfCheck/mapper/TaskPlaceSelfCheckMapper.xml
@@ -3,33 +3,64 @@
<mapper namespace="org.springblade.modules.taskPlaceSelfCheck.mapper.TaskPlaceSelfCheckMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="taskPlaceSelfCheckResultMap" type="org.springblade.modules.taskPlaceSelfCheck.entity.TaskPlaceSelfCheckEntity">
    <resultMap id="taskPlaceSelfCheckResultMap"
               type="org.springblade.modules.taskPlaceSelfCheck.entity.TaskPlaceSelfCheckEntity">
    </resultMap>
    <select id="selectTaskPlaceSelfCheckPage" resultMap="taskPlaceSelfCheckResultMap">
        select * from jczz_task_place_self_check where is_deleted = 0
        select * from jczz_task_place_self_check
        <where>
            <if test="palce.id != null ">and id = #{palce.id}</if>
            <if test="palce.taskId != null ">and task_id = #{palce.taskId}</if>
            <if test="palce.taskName != null  and palce.taskName != ''">and task_name = #{palce.taskName}</if>
            <if test="palce.placeName != null  and palce.placeName != ''">and place_name = #{palce.placeName}</if>
            <if test="palce.remark != null  and palce.remark != ''">and remark = #{palce.remark}</if>
            <if test="palce.updateTime != null ">and update_time = #{palce.updateTime}</if>
            <if test="palce.createTime != null ">and create_time = #{palce.createTime}</if>
            <if test="palce.houseCode != null  and palce.houseCode != ''">and house_code = #{palce.houseCode}</if>
            <if test="palce.rectificationEndTime != null ">and rectification_end_time = #{palce.rectificationEndTime}
            </if>
            <if test="palce.rectificationCompleteTime != null ">and rectification_complete_time =
                #{palce.rectificationCompleteTime}
            </if>
            <if test="palce.rectificationFlag != null ">and rectification_flag = #{palce.rectificationFlag}</if>
            <if test="palce.policeStation != null  and palce.policeStation != ''">and police_station =
                #{palce.policeStation}
            </if>
            <if test="palce.rectificationNoticeImgUrl != null  and palce.rectificationNoticeImgUrl != ''">and
                rectification_notice_img_url = #{palce.rectificationNoticeImgUrl}
            </if>
            <if test="palce.signaturePath != null  and palce.signaturePath != ''">and signature_path =
                #{palce.signaturePath}
            </if>
            <if test="palce.createUser != null ">and create_user = #{palce.createUser}</if>
            <if test="palce.imageUrls != null  and palce.imageUrls != ''">and image_urls = #{palce.imageUrls}</if>
            <if test="palce.status != null ">and status = #{palce.status}</if>
            <if test="palce.deleteFlag != null ">and delete_flag = #{palce.deleteFlag}</if>
        </where>
    </select>
    <resultMap type="org.springblade.modules.taskPlaceSelfCheck.dto.TaskPlaceSelfCheckDTO" id="TaskPlaceSelfCheckDTOResult">
        <result property="id"    column="id"    />
        <result property="taskId"    column="task_id"    />
        <result property="taskName"    column="task_name"    />
        <result property="placeName"    column="place_name"    />
        <result property="remark"    column="remark"    />
        <result property="updateTime"    column="update_time"    />
        <result property="createTime"    column="create_time"    />
        <result property="houseCode"    column="house_code"    />
        <result property="rectificationEndTime"    column="rectification_end_time"    />
        <result property="rectificationCompleteTime"    column="rectification_complete_time"    />
        <result property="rectificationFlag"    column="rectification_flag"    />
        <result property="policeStation"    column="police_station"    />
        <result property="rectificationNoticeImgUrl"    column="rectification_notice_img_url"    />
        <result property="signaturePath"    column="signature_path"    />
        <result property="createUser"    column="create_user"    />
        <result property="imageUrls"    column="image_urls"    />
        <result property="status"    column="status"    />
        <result property="deleteFlag"    column="delete_flag"    />
    <resultMap type="org.springblade.modules.taskPlaceSelfCheck.dto.TaskPlaceSelfCheckDTO"
               id="TaskPlaceSelfCheckDTOResult">
        <result property="id" column="id"/>
        <result property="taskId" column="task_id"/>
        <result property="taskName" column="task_name"/>
        <result property="placeName" column="place_name"/>
        <result property="remark" column="remark"/>
        <result property="updateTime" column="update_time"/>
        <result property="createTime" column="create_time"/>
        <result property="houseCode" column="house_code"/>
        <result property="rectificationEndTime" column="rectification_end_time"/>
        <result property="rectificationCompleteTime" column="rectification_complete_time"/>
        <result property="rectificationFlag" column="rectification_flag"/>
        <result property="policeStation" column="police_station"/>
        <result property="rectificationNoticeImgUrl" column="rectification_notice_img_url"/>
        <result property="signaturePath" column="signature_path"/>
        <result property="createUser" column="create_user"/>
        <result property="imageUrls" column="image_urls"/>
        <result property="status" column="status"/>
        <result property="deleteFlag" column="delete_flag"/>
        <collection property="placePoiLabelVOList" column="jpid" javaType="java.util.List"
                    select="selectPlacePoiLabelList"
@@ -37,7 +68,7 @@
                    autoMapping="true">
        </collection>
        <collection property="taskPlaceRecordVOList" column="place_check_id" select="selectPatrolRecordList"
        <collection property="taskPlaceRecordVOList" column="id" select="selectPatrolRecordList"
                    javaType="java.util.List" ofType="org.springblade.modules.taskPlaceRecord.vo.TaskPlaceRecordVO"
                    autoMapping="true">
        </collection>
@@ -66,23 +97,23 @@
    <select id="selectPatrolRecordList" parameterType="Long"
            resultType="org.springblade.modules.patrol.vo.PatrolRecordVO">
            select
            jpr.id,
            jpr.item_id,
            jpr.place_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_patrol_record jpr
            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
        from
            jczz_task_place_record  jpr
            LEFT JOIN jczz_patrol_group_item jpgi on jpr.item_id= jpgi.id
            where place_check_id = #{id}
             where task_place_self_check_id = #{id}
        </select>
    <sql id="selectTaskPlaceSelfCheck">
@@ -110,32 +141,78 @@
    </sql>
    <select id="selectTaskPlaceSelfCheckById" parameterType="long" resultMap="TaskPlaceSelfCheckDTOResult">
        <include refid="selectTaskPlaceSelfCheck"/>
        where
        id = #{id}
        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,
        jp.id jpid,
        jp.place_name,
        jp.location,
        jg.grid_name,
        jp.principal,
        jp.principal_phone,
        br.town_name,
        br.village_name,
        bu.`name`,
        jpe.legal_tel,
        jpe.legal_person,
        jt.remark reasonFailure,
        jda.address_name
    FROM
        jczz_task_place_self_check jtpr
        LEFT JOIN jczz_task jt ON jt.id = jtpr.task_id
        LEFT JOIN jczz_place jp ON jtpr.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 jczz_place_ext jpe ON jpe.place_id = jp.id
        LEFT JOIN blade_user bu ON bu.id = jtpr.create_user
        LEFT JOIN jczz_doorplate_address jda ON jda.address_code = jtpr.house_code
    WHERE
        jtpr.id = #{id}
    </select>
    <select id="selectTaskPlaceSelfCheckList" parameterType="org.springblade.modules.taskPlaceSelfCheck.dto.TaskPlaceSelfCheckDTO" resultMap="TaskPlaceSelfCheckDTOResult">
    <select id="selectTaskPlaceSelfCheckList"
            parameterType="org.springblade.modules.taskPlaceSelfCheck.dto.TaskPlaceSelfCheckDTO"
            resultMap="TaskPlaceSelfCheckDTOResult">
        <include refid="selectTaskPlaceSelfCheck"/>
        <where>
            <if test="id != null "> and id = #{id}</if>
            <if test="taskId != null "> and task_id = #{taskId}</if>
            <if test="taskName != null  and taskName != ''"> and task_name = #{taskName}</if>
            <if test="placeName != null  and placeName != ''"> and place_name = #{placeName}</if>
            <if test="remark != null  and remark != ''"> and remark = #{remark}</if>
            <if test="updateTime != null "> and update_time = #{updateTime}</if>
            <if test="createTime != null "> and create_time = #{createTime}</if>
            <if test="houseCode != null  and houseCode != ''"> and house_code = #{houseCode}</if>
            <if test="rectificationEndTime != null "> and rectification_end_time = #{rectificationEndTime}</if>
            <if test="rectificationCompleteTime != null "> and rectification_complete_time = #{rectificationCompleteTime}</if>
            <if test="rectificationFlag != null "> and rectification_flag = #{rectificationFlag}</if>
            <if test="policeStation != null  and policeStation != ''"> and police_station = #{policeStation}</if>
            <if test="rectificationNoticeImgUrl != null  and rectificationNoticeImgUrl != ''"> and rectification_notice_img_url = #{rectificationNoticeImgUrl}</if>
            <if test="signaturePath != null  and signaturePath != ''"> and signature_path = #{signaturePath}</if>
            <if test="createUser != null "> and create_user = #{createUser}</if>
            <if test="imageUrls != null  and imageUrls != ''"> and image_urls = #{imageUrls}</if>
            <if test="status != null "> and status = #{status}</if>
            <if test="deleteFlag != null "> and delete_flag = #{deleteFlag}</if>
            <if test="id != null ">and id = #{id}</if>
            <if test="taskId != null ">and task_id = #{taskId}</if>
            <if test="taskName != null  and taskName != ''">and task_name = #{taskName}</if>
            <if test="placeName != null  and placeName != ''">and place_name = #{placeName}</if>
            <if test="remark != null  and remark != ''">and remark = #{remark}</if>
            <if test="updateTime != null ">and update_time = #{updateTime}</if>
            <if test="createTime != null ">and create_time = #{createTime}</if>
            <if test="houseCode != null  and houseCode != ''">and house_code = #{houseCode}</if>
            <if test="rectificationEndTime != null ">and rectification_end_time = #{rectificationEndTime}</if>
            <if test="rectificationCompleteTime != null ">and rectification_complete_time =
                #{rectificationCompleteTime}
            </if>
            <if test="rectificationFlag != null ">and rectification_flag = #{rectificationFlag}</if>
            <if test="policeStation != null  and policeStation != ''">and police_station = #{policeStation}</if>
            <if test="rectificationNoticeImgUrl != null  and rectificationNoticeImgUrl != ''">and
                rectification_notice_img_url = #{rectificationNoticeImgUrl}
            </if>
            <if test="signaturePath != null  and signaturePath != ''">and signature_path = #{signaturePath}</if>
            <if test="createUser != null ">and create_user = #{createUser}</if>
            <if test="imageUrls != null  and imageUrls != ''">and image_urls = #{imageUrls}</if>
            <if test="status != null ">and status = #{status}</if>
            <if test="deleteFlag != null ">and delete_flag = #{deleteFlag}</if>
        </where>
    </select>
</mapper>
src/main/java/org/springblade/modules/taskPlaceSelfCheck/vo/TaskPlaceSelfCheckVO.java
@@ -16,6 +16,8 @@
 */
package org.springblade.modules.taskPlaceSelfCheck.vo;
import com.fasterxml.jackson.annotation.JsonFormat;
import io.swagger.annotations.ApiModelProperty;
import org.springblade.modules.patrol.entity.PatrolRecord;
import org.springblade.modules.place.vo.PlacePoiLabelVO;
import org.springblade.modules.taskPlaceRecord.entity.TaskPlaceRecordEntity;
@@ -37,8 +39,66 @@
@EqualsAndHashCode(callSuper = true)
public class TaskPlaceSelfCheckVO extends TaskPlaceSelfCheckEntity {
    private static final long serialVersionUID = 1L;
    @ApiModelProperty(value = "隐患项目", example = "")
    private List<TaskPlaceRecordVO> taskPlaceRecordVOList;
    @ApiModelProperty(value = "场所标签", example = "")
    private List<PlacePoiLabelVO> placePoiLabelVOList ;
    @ApiModelProperty(value = "场所名称", example = "")
    private String placeName;
    @ApiModelProperty(value = "场所地址", example = "")
    private String location;
    @ApiModelProperty(value = "负责人", example = "")
    private String principal;
    @ApiModelProperty(value = "网格名称", example = "")
    private String gridName;
    @ApiModelProperty(value = "负责人电话", example = "")
    private String principalPhone;
    @ApiModelProperty(value = "街道名称", example = "")
    private String streetName;
    @ApiModelProperty(value = "社区名称", example = "")
    private String communityName;
    @ApiModelProperty(value = "法人", example = "")
    private String legalPerson;
    @ApiModelProperty(value = "法人电话", example = "")
    private String legalTel;
    @ApiModelProperty(value = "检查人名称", example = "")
    private String name;
    @ApiModelProperty(value = "隐患数量", example = "")
    private Integer number;
    @ApiModelProperty(value = "机构名称", example = "")
    private String deptName;
    @ApiModelProperty(value = "九小场所类型 业务字典:nineType", example = "")
    private String nineType;
    @ApiModelProperty(value = "隐患问题", example = "")
    private String hiddenDanger;
    @ApiModelProperty(value = "不通过原因", example = "")
    private String reasonFailure;
    @ApiModelProperty(value = "地址编码", example = "")
    private String addressName;
    @ApiModelProperty(value = "开始时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String startTime;
    /** 创建时间 */
    @ApiModelProperty(value = "结束时间", example = "")
    @JsonFormat(pattern = "yyyy-MM-dd", timezone = "GMT+8")
    private String endTime;
}