yaozc2021
2025-01-15 42e2d6305a7fcefedeb80c5412ccfdaf27b314b3
Merge branch 'wcd-2411-update' of http://192.168.1.110:5678/r/pms-upgrade into wcd
2 files modified
10 ■■■■■ changed files
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/ChinaArea.java 3 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/contract/service/impl/ContractServiceImpl.java 7 ●●●●● patch | view | raw | blame | history
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/constant/ChinaArea.java
@@ -23,7 +23,8 @@
        CharArrayWriter charArrayWriter = null;
        try {
            // 读取JSON文件
            File file = ResourceUtils.getFile("classpath:json/chinaArea.json");
//            File file = ResourceUtils.getFile("classpath:json/chinaArea.json");
            File file = new File(System.getProperty("java.io.tmpdir") + File.separator + "json/chinaArea.json");
            FileReader fileReader = new FileReader(file);
            char[] buffer = new char[(int) file.length()];
            fileReader.read(buffer);
eladmin-master/eladmin-system/src/main/java/me/zhengjie/modules/contract/service/impl/ContractServiceImpl.java
@@ -1266,7 +1266,8 @@
            throw new BadRequestException("上传失败");
        }
        ExcelReader reader = ExcelUtil.getReader(FileUtil.toFile(file));
        File uploadFile = FileUtil.toFile(file);
        ExcelReader reader = ExcelUtil.getReader(uploadFile);
        List<Map<String,Object>> readAll = reader.readAll();
        if (ObjectUtil.isNull(readAll)) {
            throw new BadRequestException("Excel解析失败");
@@ -1609,6 +1610,10 @@
        } catch (Exception e){
            e.printStackTrace();
            throw new BadRequestException("数据保存失败");
        } finally {
            if (uploadFile.exists()) {
                uploadFile.deleteOnExit();
            }
        }
        return finalMap;