洪城义警-正式版后台
zengh
2022-05-26 689ec41f737aa299eac2d6b7b79606926f5b871c
1、资讯模糊匹配修改
5 files modified
74 ■■■■ changed files
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 32 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/zc/controller/ZcController.java 20 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml 3 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/zc/vo/ZcVO.java 1 ●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 18 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -81,7 +81,10 @@
            and account like concat('%',#{user.account},'%')
        </if>
        <if test="user.jurisdiction!=null and user.jurisdiction != ''">
            and jurisdiction like concat('%',#{user.jurisdiction},'%')
            and (jurisdiction = #{user.jurisdiction} or workjurisdiction = #{user.jurisdiction})
        </if>
        <if test="user.workjurisdiction!=null and user.workjurisdiction != ''">
            and workjurisdiction = #{user.workjurisdiction}
        </if>
        <if test="user.realName!=null and user.realName != ''">
            and real_name like concat('%',#{user.realName},'%')
@@ -89,19 +92,22 @@
        <if test="user.userType!=null and user.userType != ''">
            and user_type = #{user.userType}
        </if>
        <if test="deptIdList!=null and deptIdList.size>0">
            and id in (
            SELECT
            user_id
            FROM
            blade_user_dept
            WHERE
            dept_id IN
            <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">
                #{item}
            </foreach>
            )
        <if test="user.deptId!=null and user.deptId != ''">
            and (jurisdiction = #{user.deptId} or workjurisdiction = #{user.deptId})
        </if>
<!--        <if test="deptIdList!=null and deptIdList.size>0">-->
<!--            and id in (-->
<!--            SELECT-->
<!--            user_id-->
<!--            FROM-->
<!--            blade_user_dept-->
<!--            WHERE-->
<!--            dept_id IN-->
<!--            <foreach collection="deptIdList" index="index" item="item" open="(" separator="," close=")">-->
<!--                #{item}-->
<!--            </foreach>-->
<!--            )-->
<!--        </if>-->
        ORDER BY id
    </select>
src/main/java/org/springblade/modules/zc/controller/ZcController.java
@@ -141,6 +141,26 @@
            }
        }
        for (int j = 0; j < page.getRecords().size(); j++) {
            if (page.getRecords().get(j).getJurisdiction() != null && !page.getRecords().get(j).getWorkjurisdiction().equals("")) {
                String[] split = page.getRecords().get(j).getJurisdiction().split(",");
                List<String> list = Arrays.asList(split);
                StringBuffer deptNameBuiffer = new StringBuffer();
                //数据匹配封装
                for (String deptId : list) {
                    for (DeptVo deptVo : xqVos) {
                        if (deptId.equals(deptVo.getId().toString())) {
                            deptNameBuiffer.append(deptVo.getDeptName()).append(",");
                        }
                    }
                }
                //封装部门名称数据
                if (deptNameBuiffer.length() > 0) {
                    page.getRecords().get(j).setWorkname(deptNameBuiffer.substring(0, deptNameBuiffer.length() - 1));
                }
            }
        }
        return R.data(page);
    }
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -44,6 +44,9 @@
        <if test="zc.examination_type != null and zc.examination_type != '' ">
            and examination_type = #{zc.examination_type}
        </if>
        <if test="zc.jurisdiction != null and zc.jurisdiction != '' ">
            and (jurisdiction = #{zc.jurisdiction} or workjurisdiction = #{zc.jurisdiction})
        </if>
        and type != 1 ORDER BY zctime DESC
    </select>
src/main/java/org/springblade/modules/zc/vo/ZcVO.java
@@ -34,4 +34,5 @@
    private static final long serialVersionUID = 1L;
    private String deptName;
    private String XQName;
    private String workname;
}
src/main/resources/application-dev.yml
@@ -2,11 +2,11 @@
spring:
  redis:
    ##redis 单机环境配置
#    host: 127.0.0.1
#    port: 6379
    host: 127.0.0.1
    port: 6379
    host: 192.168.90.24
    port: 6382
#    host: 192.168.90.24
#    port: 6382
    password:
    database: 0
    ssl: false
@@ -17,14 +17,14 @@
  datasource:
    # MySql
#
    url: jdbc:mysql://192.168.90.24:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
    username: root
    password: ZHba@0112
#    url: jdbc:mysql://61.131.136.25:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
#    url: jdbc:mysql://192.168.90.24:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
#    username: root
#    password: ZHba@0112
    url: jdbc:mysql://61.131.136.25:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
    username: root
    password: ZHba@0112
#
#      url: jdbc:mysql://localhost:2083/qfqkpublic?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true&allowMultiQueries=true
#      username: root
#      password: ZHba@0112