101captain
2022-05-19 19f39f95190ae02a90b07c97bc9e5cb54de383a4
花城E+bug更新
2个文件已修改
11 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngVillageServeExcelListen.java 6 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java 5 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/listen/ComMngVillageServeExcelListen.java
@@ -34,6 +34,12 @@
    @Override
    public void invoke(ComMngVillageServeExcelVO comMngVillageServeExcelVO, AnalysisContext analysisContext) {
        try {
            Integer.parseInt(comMngVillageServeExcelVO.getHouseNum());
        }
        catch (Exception e){
            throw new ServiceException("门牌号只能为纯数字");
        }
        list.add(comMngVillageServeExcelVO);
        // 达到BATCH_COUNT了,需要去存储一次数据库,防止数据几万条数据在内存,容易OOM
        if (list.size() >= BATCH_COUNT) {
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngVillageServiceImpl.java
@@ -202,8 +202,11 @@
            boolean result = comMngVillageDOs.stream().anyMatch(
                village -> village.getAlley().equals(vo.getAlley()) && village.getHouseNum().equals(vo.getHouseNum()));
            if (result) {
                return R.fail("导入街路巷已存在(" + vo.getAlley() + ")");
                return R.fail("导入街路巷重复(" + vo.getAlley() + ")");
            }
            ComMngVillageDO comMngVillageDO=new ComMngVillageDO();
            BeanUtils.copyProperties(vo,comMngVillageDO);
            comMngVillageDOs.add(comMngVillageDO);
            index++;
        }
        ComActDO comActDO = comActDAO.selectById(communityId);