From 90625c6c87f4be5f93cad0d5b1802b9df95add17 Mon Sep 17 00:00:00 2001 From: huanghongfa <huanghongfa123456> Date: 星期五, 23 四月 2021 18:01:08 +0800 Subject: [PATCH] 修改bug --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java | 4 ++-- 1 files changed, 2 insertions(+), 2 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java index 8e2bea8..6b5f083 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComMngPopulationServiceImpl.java @@ -204,7 +204,7 @@ //判断DB和exel数据重复判断 boolean result = comMngPopulationDOS.stream().anyMatch(population -> population.getCardNo().equals(vo.getCardNo())); if (result) { - return R.fail("导入实有人口已存在(" + vo.getCardNo() + ")"); + return R.fail(501,"导入实有人口已存在(" + vo.getCardNo() + ")"); } index++; } @@ -217,7 +217,7 @@ // ComMngVillageDO comMngVillageDO = villageDOList.stream().filter(village -> village.getAlley().equals(vo.getRoad()) && village.getHouseNum().equals(Integer.valueOf(vo.getDoorNo()))).findFirst().orElse(null); BeanUtils.copyProperties(vo, comMngPopulationDO); if (comMngVillageDO == null) { - throw new ServiceException("街道巷:" + vo.getRoad() + "不存在!"); + throw new ServiceException("查无:" + vo.getRoad() + "小区/房租地址,请先新建地址"); } List<String> userTag = vo.getUserTagStr().stream().map(userTagStr -> userTagStr.split("\\(")[0]).collect(Collectors.toList()); comMngPopulationDO.setVillageId(comMngVillageDO.getVillageId()); -- Gitblit v1.7.1