From 444c837fdcea59c54e5207cac803c0fa1d41e878 Mon Sep 17 00:00:00 2001 From: jianjun Date: Sun, 13 Feb 2022 15:02:08 +0800 Subject: [PATCH] =?UTF-8?q?9999=E6=9B=BF=E6=8D=A2=E4=B8=BA=E7=BB=9F?= =?UTF-8?q?=E4=B8=80=E9=94=99=E8=AF=AF=E7=A0=81?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/IcSocietyOrgController.java | 7 +++---- .../impl/IcPartyActivityServiceImpl.java | 7 ++++--- .../service/impl/IcPartyUnitServiceImpl.java | 6 +++--- .../epmet/controller/BuildingController.java | 3 ++- .../com/epmet/controller/HouseController.java | 2 +- .../controller/NeighborHoodController.java | 3 ++- .../service/impl/BuildingServiceImpl.java | 2 +- .../impl/IcNeighborHoodServiceImpl.java | 18 +++++++++--------- .../impl/IcPartymemberStyleServiceImpl.java | 7 ++++--- 9 files changed, 29 insertions(+), 26 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java index 786fc77928..2b07959e33 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/controller/IcSocietyOrgController.java @@ -20,6 +20,7 @@ package com.epmet.controller; import cn.afterturn.easypoi.excel.entity.result.ExcelImportResult; import com.epmet.commons.tools.annotation.LoginUser; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.security.dto.TokenDto; import com.epmet.commons.tools.utils.ExcelPoiUtils; import com.epmet.commons.tools.utils.ExcelUtils; @@ -27,10 +28,8 @@ import com.epmet.commons.tools.utils.Result; import com.epmet.commons.tools.validator.ValidatorUtils; import com.epmet.dto.form.AddSocietyOrgFormDTO; import com.epmet.dto.form.EditSocietyOrgFormDTO; -import com.epmet.dto.form.GetListPlaceOrgFormDTO; import com.epmet.dto.form.GetListSocietyOrgFormDTO; import com.epmet.dto.form.demand.ServiceQueryFormDTO; -import com.epmet.dto.result.GetListPlaceOrgResultDTO; import com.epmet.dto.result.GetListSocietyOrgResultDTO; import com.epmet.dto.result.demand.OptionDTO; import com.epmet.excel.IcSocietyOrgExcel; @@ -164,9 +163,9 @@ public class IcSocietyOrgController { Collections.sort(resultList); String subList = resultList.stream().map(String::valueOf).collect(Collectors.joining("、")); log.warn(str + "第" + subList + "行未成功!"); - return new Result().error(9999, str + "第" + subList + "行未成功!"); + return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(), str + "第" + subList + "行未成功!"); } return new Result().ok(str); } -} \ No newline at end of file +} diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java index cdfa84d5e2..4cea3f9136 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcPartyActivityServiceImpl.java @@ -24,6 +24,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.FieldConstant; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; +import com.epmet.commons.tools.exception.EpmetErrorCode; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.security.dto.TokenDto; @@ -267,7 +268,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl list = result.stream().map(item -> { @@ -296,7 +297,7 @@ public class IcPartyActivityServiceImpl extends BaseServiceImpl list = result.stream().map(item -> { @@ -405,7 +405,7 @@ public class IcPartyUnitServiceImpl extends BaseServiceImpl result){ if (CollectionUtils.isEmpty(result)){ - return new Result().error(9999,"excel表格内没有数据"); + return new Result().error(EpmetErrorCode.EPMET_COMMON_OPERATION_FAIL.getCode(),"excel表格内没有数据"); } List nums = new ArrayList<>(); - List gridNames = result.stream().map(m -> m.getGridName()).distinct().collect(Collectors.toList()); + List gridNames = result.stream().map(IcNeighborHoodExcel::getGridName).distinct().collect(Collectors.toList()); // 1. 查询数据网格是否存在 List gridInfos = customerGridDao.selectGridInfoByNames(gridNames, formDTO.getCustomerId()); if (CollectionUtils.isEmpty(gridInfos)){ @@ -238,7 +238,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl { for (InfoByNamesResultDTO g : gridInfos) { @@ -253,7 +253,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl neighborHoods = groupStatus.get(true); // 2. 查询组织选中组织下存在的小区 - List existNames = baseDao.selectNeighborhoodNameByNames(neighborHoods.stream().map(m -> m.getNeighborHoodName()).distinct().collect(Collectors.toList()), formDTO.getCustomerId()); + List existNames = baseDao.selectNeighborhoodNameByNames(neighborHoods.stream().map(IcNeighborHoodExcel::getNeighborHoodName).distinct().collect(Collectors.toList()), formDTO.getCustomerId()); // 为了显示多少行插入成功,未成功 result.forEach(r -> { for (String s : existNames) { @@ -272,7 +272,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl collect = finalNeedInsert.stream().collect(Collectors.groupingBy(o -> o.getGridName() + "_" + o.getNeighborHoodName(), Collectors.counting())); collect.forEach((k,v) -> { @@ -368,7 +368,7 @@ public class IcNeighborHoodServiceImpl extends BaseServiceImpl imageList = new ArrayList<>(); List list = result.stream().map(item -> { @@ -299,9 +300,9 @@ public class IcPartymemberStyleServiceImpl extends BaseServiceImpl