智慧保安后台管理-外网项目备份
tangzy
2021-08-31 8a89c6434b2b3272b90ce250e05754826ef88fed
1.ftp
4 files modified
30 ■■■■■ changed files
src/main/java/org/springblade/common/constant/FtpConstant.java 5 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/FTP/monitor.java 3 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/controller/InformationController.java 16 ●●●●● patch | view | raw | blame | history
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml 6 ●●●● patch | view | raw | blame | history
src/main/java/org/springblade/common/constant/FtpConstant.java
@@ -8,7 +8,7 @@
    /**
     * sql connect
     */
    String sql_connect_dev = "jdbc:mysql://223.82.109.183:2083/zhbaw";
    String sql_connect_dev = "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";
    /**
     * sql connect
@@ -55,5 +55,6 @@
    //minio内网ip
    String ip = "http://47.49.21.216:9000";
    //String ip = "http://47.49.21.216:9000";
    String ip = "http://223.82.109.183:2081";
}
src/main/java/org/springblade/modules/FTP/monitor.java
@@ -63,6 +63,7 @@
            //ftp.changeWorkingDirectory(new String(dir.getBytes("GBK"), FTP.DEFAULT_CONTROL_ENCODING));
            // 检验文件是否存在
            ftp.changeWorkingDirectory(ftpPath);
            FTPFile[] files = ftp.listFiles();
            if (files.length==0){
                return false;
@@ -100,7 +101,7 @@
                        //删除本地文件
                        //MysqlCenlint.deletes(fileName);
                        MysqlCenlint.deletess(fileName);
                        FtpUtil.deleteFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, "anbao/", fileName);
                        FtpUtil.deleteFile(ftpHost_dev, ftpPort, ftpUserName, ftpPassword, ftpPath, fileName);
                        is.close();
                        ftp.completePendingCommand();
                    }
src/main/java/org/springblade/modules/information/controller/InformationController.java
@@ -23,6 +23,7 @@
import lombok.AllArgsConstructor;
import com.alibaba.fastjson.JSON;
import org.springblade.common.cache.DictCache;
import org.springblade.common.constant.FtpConstant;
import org.springblade.common.enums.DictEnum;
import org.springblade.core.boot.ctrl.BladeController;
import org.springblade.core.cache.utils.CacheUtil;
@@ -208,9 +209,14 @@
    @ApiOperation(value = "修改", notes = "传入information")
    public R update(@Valid @RequestBody Information information) throws Exception {
        informationService.updateById(information);
        String ip = "http://192.168.0.108";
        String businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length());
        String licence = information.getLicence().substring(26, information.getLicence().length());
        String businessLicense=null;
        String licence=null;
        if(information.getBusinessLicense()!=null && !"".equals(information.getBusinessLicense())){
             businessLicense = information.getBusinessLicense().substring(26, information.getBusinessLicense().length());
        }
        if(information.getLicence()!=null && !"".equals(information.getLicence())){
             licence = information.getLicence().substring(26, information.getLicence().length());
        }
        //内网同步
        String s1 = "update sys_information set creditcode = " + "'" + information.getCreditcode() + "'" +
            ",enterprisename = " + "'" + information.getEnterprisename() + "'" +
@@ -231,8 +237,8 @@
            ",representativecell = " + "'" + information.getRepresentativecell() + "'" +
            ",contacts = " + "'" + information.getContacts() + "'" +
            ",contactscell = " + "'" + information.getContactscell() + "'" +
            ",business_License = " + "'" + ip + businessLicense + "'" +
            ",licence = " + "'" + ip + licence + "'" +
            ",business_License = " + "'" + FtpConstant.ip + businessLicense + "'" +
            ",licence = " + "'" + FtpConstant.ip + licence + "'" +
            " " + "where id = " + "'" + information.getId() + "'";
        FtpUtil.sqlFileUpload(s1);
        return R.success("修改成功");
src/main/java/org/springblade/modules/information/mapper/InformationMapper.xml
@@ -27,7 +27,7 @@
        <result column="representativecell" property="representativecell"/>
        <result column="contacts" property="contacts"/>
        <result column="contactscell" property="contactscell"/>
        <result column="businessLicense" property="businessLicense"/>
        <result column="business_License" property="businessLicense"/>
        <result column="licence" property="licence"/>
        <result column="znum" property="znum"/>
        <result column="cnum" property="cnum"/>
@@ -150,9 +150,9 @@
        FROM
        (
        SELECT departmentid, jurisdiction FROM sys_information GROUP BY departmentid, jurisdiction ) H
        LEFT JOIN ( SELECT COUNT(*) AS num, u.dept_id FROM blade_user u WHERE u.examination_type = 0 GROUP BY u.dept_id
        LEFT JOIN ( SELECT COUNT(*) AS num, u.dept_id FROM blade_user u WHERE u.examination_type = 0 and role_id = '1412226235153731586'AND `status` = 1 AND is_deleted = 0 GROUP BY u.dept_id
        ) A ON H.departmentid = A.dept_id
        LEFT JOIN ( SELECT COUNT(*) AS num, u.dept_id FROM blade_user u WHERE u.examination_type = 1 GROUP BY u.dept_id
        LEFT JOIN ( SELECT COUNT(*) AS num, u.dept_id FROM blade_user u WHERE (u.examination_type = 1 or u.examination_type is null ) and role_id = '1412226235153731586'AND `status` = 1 AND is_deleted = 0 GROUP BY u.dept_id
        ) B ON H.departmentid = B.dept_id where 1=1
        <if test="jurisdiction!=null and jurisdiction!='' and jurisdiction!='1123598813738675201'">
            and H.jurisdiction = #{jurisdiction}