智慧保安后台管理-外网
Administrator
2021-09-24 97c025a9fa803d2b46066f0576728bfc3678fa36
工作汇报bug修改,文件上传修改
5 files modified
85 ■■■■■ changed files
src/main/java/org/springblade/common/constant/FtpConstant.java 28 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java 4 ●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/workreport/controller/WorkReportController.java 34 ●●●●● patch | view | raw | blame | history
src/main/resources/application-dev.yml 14 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/FtpConstant.java
@@ -18,12 +18,12 @@
    /**
     * ftp服务器IP地址
     */
    String ftpHost_dev = "192.168.0.112";
//    String ftpHost_dev = "192.168.0.112";
    /**
     * ftp服务器IP地址
     */
    //String ftpHost_dev = "172.19.1.30";
    String ftpHost_dev = "172.19.1.30";
    /**
     * ftp服务器端口
@@ -33,33 +33,33 @@
    /**
     * ftp服务器用户名
     */
    //String ftpUserName = "yly";
    String ftpUserName = "anonymous";
    String ftpUserName = "yly";
//    String ftpUserName = "anonymous";
    /**
     * ftp服务器密码
     */
    //String ftpPassword = "Yly@123";
    String ftpPassword = "";
    String ftpPassword = "Yly@123";
//    String ftpPassword = "";
    /**
     * ftp服务器路径
     */
    //String ftpPath = "yly/anbao/";
    String ftpPath = "anbao/";
    String ftpPath = "yly/anbao/";
//    String ftpPath = "anbao/";
    /**
     * 本地路径
     */
    //String localPath = "/home/zhongsong/anbao/";
    String localPath = "D:\\anbao\\";
    String localPath = "/home/zhongsong/anbao/";
//    String localPath = "D:\\anbao\\";
    //minio内网ip
    //String ip = "http://47.49.21.216:9000";
    String ip = "http://223.82.109.183:2081";
    String ip = "http://47.49.21.216:9000";
//    String ip = "http://223.82.109.183:2081";
    //String jsonUrl = "/home/zhongsong/anbao/";
    String jsonUrl = "D:\\anbao\\";
    String jsonUrl = "/home/zhongsong/anbao/";
//    String jsonUrl = "D:\\anbao\\";
}
src/main/java/org/springblade/modules/resource/endpoint/OssEndpoint.java
@@ -346,7 +346,7 @@
                String urls = "http://223.82.109.183:2081/zhba/" + newName;
                //内网
                String inUrl = ip + newName;
                String inUrl = ip + "/zhba/" + newName;
                //取出身份证号,查询用户信息,更新用户信息
                String pictrueName = multipartFile.getName().substring(0, multipartFile.getName().lastIndexOf("."));
//                String regex ="([1-9]\\d{5}(18|19|20)\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3}[0-9Xx])|([1-9]\\d{5}\\d{2}((0[1-9])|(10|11|12))(([0-2][1-9])|10|20|30|31)\\d{3})";
@@ -538,6 +538,8 @@
                in, in.available(), -1)
                .headers(headers)
                .build());
        //文件推送
        InputStream inputStream = file.getInputStream();
        FtpUtil.uploadFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, "/", split[2], inputStream);
        in.close();
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -262,8 +262,13 @@
        blade_dept bd
        on
        bu.dept_id = bd.id
        left join
        blade_role br
        on
        br.id = bu.role_id
        where
        bu.is_deleted = 0
        and br.role_alias = "保安"
        and
        (hold = 2 or hold = 3)
        <if test="user.deptId!=null and user.deptId != ''">
src/main/java/org/springblade/modules/workreport/controller/WorkReportController.java
@@ -181,15 +181,19 @@
     * @return
     */
    private String getReplyDeptName(WorkReportVo detail) {
        List<String> replyDeptIds = Arrays.asList(detail.getReplyDeptIds().split(","));
        StringBuilder replyDeptNameInfo = new StringBuilder();
        for (String deptId : replyDeptIds) {
            //查询接收人单位信息
            Dept deptDetail = deptService.getById(Long.parseLong(deptId));
            replyDeptNameInfo = replyDeptNameInfo.append(deptDetail.getDeptName()).append(",");
        if (null!=detail.getReplyDeptIds() && detail.getReplyDeptIds()!="" && !detail.getReplyDeptIds().isEmpty()) {
            List<String> replyDeptIds = Arrays.asList(detail.getReplyDeptIds().split(","));
            StringBuilder replyDeptNameInfo = new StringBuilder();
            for (String deptId : replyDeptIds) {
                //查询接收人单位信息
                Dept deptDetail = deptService.getById(Long.parseLong(deptId));
                replyDeptNameInfo = replyDeptNameInfo.append(deptDetail.getDeptName()).append(",");
            }
            //截取
            return replyDeptNameInfo.substring(0, replyDeptNameInfo.length() - 1);
        }
        //截取
        return replyDeptNameInfo.substring(0, replyDeptNameInfo.length() - 1);
        return null;
    }
    /**
@@ -203,7 +207,9 @@
        for (String userId : userIds) {
            //查询接收人单位信息
            User userDetail = userService.getById(userId);
            list.add(userDetail.getDeptId());
            if (null!=userDetail){
                list.add(userDetail.getDeptId());
            }
        }
        //去重
        List<String> collect = list.stream().distinct().collect(Collectors.toList());
@@ -226,10 +232,16 @@
//            user.setCardid(idCardNo);
//            User userDetail = userService.getOne(Condition.getQueryWrapper(user));
            User userDetail = userService.getById(userId);
            replyRealNameInfo = replyRealNameInfo.append(userDetail.getRealName()).append(",");
            if(null!=userDetail) {
                replyRealNameInfo = replyRealNameInfo.append(userDetail.getRealName()).append(",");
            }
        }
        //截取
        return replyRealNameInfo.substring(0, replyRealNameInfo.length() - 1);
        if (replyRealNameInfo.toString().length()>0) {
            return replyRealNameInfo.substring(0, replyRealNameInfo.length() - 1);
        }
        return null;
    }
}
src/main/resources/application-dev.yml
@@ -13,13 +13,13 @@
    #  commandTimeout: 5000
  datasource:
    # MySql
#    url: jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#    username: root
#    password: zhba0728
    url: jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    url: jdbc:mysql://localhost:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
    username: root
    password: zhba0728
#    url: jdbc:mysql://223.82.109.183:2083/zhbaw?useSSL=false&useUnicode=true&characterEncoding=utf-8&zeroDateTimeBehavior=convertToNull&transformedBitIsBoolean=true&serverTimezone=GMT%2B8&nullCatalogMeansCurrent=true&allowPublicKeyRetrieval=true
#    username: root
#    password: zhba0728
    # PostgreSQL
    #url: jdbc:postgresql://127.0.0.1:5432/bladex_boot
@@ -37,8 +37,8 @@
#图片批量上传zip
upload:
#  localtion: ${UPLOAD_DIR:/home/zhongsong/anbao}
  localtion: ${UPLOAD_DIR:D:/test}
  localtion: ${UPLOAD_DIR:/home/zhongsong/anbao}
#  localtion: ${UPLOAD_DIR:D:/test}
  maxFileSize: 10240KB
  maxRequestSize: 102400KB