zhongrj
2024-03-19 70800046e908c23393eefa1f7644b512a60f223e
警情查询修改(新增搜索条件)
2 files modified
41 ■■■■■ changed files
src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml 21 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/police/mapper/PoliceAlarmRecordsMapper.xml
@@ -8,10 +8,14 @@
    <select id="selectPoliceAlarmRecordsPage" resultMap="policeAlarmRecordsResultMap">
        select jpar.* from jczz_police_alarm_records jpar
        select
        jpar.*,
        bdb.dict_value as alarmTypeName
        from jczz_police_alarm_records jpar
        LEFT JOIN jczz_grid jg on jg.grid_code = jpar.grid_code and jg.is_deleted = 0
        LEFT JOIN jczz_police_affairs_grid jpag on jpar.jw_grid_code= jpag.jw_grid_code and jpag.is_deleted = 0
        LEFT JOIN blade_region br on br.code = jpag.community_code
        LEFT JOIN blade_dict_biz bdb ON bdb.dict_key = jpar.alarm_type and bdb.is_deleted = 0 and bdb.code = 'applyAlarmType'
        <where>
            <if test="vo.status != null">
                and jpar.status = #{vo.status}
@@ -22,6 +26,21 @@
            <if test="vo.policeName != null and vo.policeName != ''">
                and jpar.police_name like concat('%',#{vo.policeName},'%')
            </if>
            <if test="vo.startTime != null and vo.startTime != ''">
                and date_format(jpar.create_time,'%Y-%m-%d') &gt;= #{vo.startTime}
            </if>
            <if test="vo.endTime != null and vo.endTime != ''">
                and date_format(jpar.create_time,'%Y-%m-%d') &lt;= #{vo.endTime}
            </if>
            <if test="vo.searchKey!=null and vo.searchKey!=''">
                and CONCAT(
                ifnull(jpar.name,''),
                ifnull(jpar.phone,''),
                ifnull(jpar.address,''),
                ifnull(jpar.alarm_describe,''),
                ifnull(jpar.police_name,'')
                ) like CONCAT ('%', #{vo.searchKey},'%')
            </if>
            <if test="isAdministrator==2">
                <choose>
                    <when test="vo.roleName != null and vo.roleName != ''">
src/main/java/org/springblade/modules/police/vo/PoliceAlarmRecordsVO.java
@@ -41,4 +41,24 @@
     */
    private String roleName;
    /**
     * 搜索关键字
     */
    private String searchKey;
    /**
     * 报警类型名称
     */
    private String alarmTypeName;
    /**
     * 开始时间
     */
    private String startTime;
    /**
     * 结束时间
     */
    private String endTime;
}