From 334814e658f50e5bea3bf5d5f7f9d21114089507 Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 16:16:58 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E5=A2=9E=E5=8A=A0=E5=AD=97=E5=85=B8?= =?UTF-8?q?=E8=A1=A8value=E5=AF=B9=E5=BA=94label=E8=BF=94=E5=8F=82?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../dto/result/PlaceOrgDetailResultDTO.java | 2 ++ .../service/impl/IcPlaceOrgServiceImpl.java | 17 ++++++++++++++++- 2 files changed, 18 insertions(+), 1 deletion(-) diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java index 211c74097f..866f1cc981 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java @@ -27,6 +27,8 @@ public class PlaceOrgDetailResultDTO implements Serializable { private String ninePlaceName; //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 private String scale; + //场所规模名称【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 + private String scaleName; //负责人 private String personInCharge; //联系电话 diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java index ffe5684be5..1a0e071404 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java @@ -21,6 +21,7 @@ import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.OptionResultDTO; +import com.epmet.commons.tools.enums.DictTypeEnum; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.utils.ConvertUtils; @@ -44,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional; import org.springframework.util.CollectionUtils; import java.util.List; +import java.util.Map; /** * 九小场所下组织管理 @@ -114,6 +116,7 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); if (!result1.success()) { @@ -124,6 +127,11 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode()); + resultDTO.setScaleName(unitTypeMap.getData().get(resultDTO.getScale())); + return resultDTO; } @@ -143,14 +151,21 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); if (!result1.success()) { throw new RenException("获取九小场所基本信息失败......"); } result.getList().forEach(r -> result1.getData().stream().filter(u -> r.getNinePlaceVal().equals(u.getValue())).forEach(u -> r.setNinePlaceName(u.getLabel()))); - resultDTO.setList(result.getList()); + //3.人员规模字典表赋值 + Result> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode()); + result.getList().forEach(item -> { + item.setScaleName(unitTypeMap.getData().get(item.getScale())); + }); + + resultDTO.setList(result.getList()); return resultDTO; } } \ No newline at end of file From af23c1a534549ecad4ff072df792d17504dd25cd Mon Sep 17 00:00:00 2001 From: sunyuchao Date: Wed, 24 Nov 2021 16:21:42 +0800 Subject: [PATCH 2/2] =?UTF-8?q?bug=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../epmet/service/impl/IcPlacePatrolTeamServiceImpl.java | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java index 5b59178fa9..c16b575230 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java @@ -194,7 +194,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + gridNames.append("".equals(gridNames.toString().trim()) ? r.getGridName() : "," + r.getGridName()); } }); } @@ -204,7 +204,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getValue())) { - ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + ninePlaceNames.append("".equals(ninePlaceNames.toString().trim()) ? r.getLabel() : "," + r.getLabel()); } }); } @@ -252,7 +252,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getId())) { - gridNames.append("".equals(gridNames) ? r.getGridName() : "," + r.getGridName()); + gridNames.append("".equals(gridNames.toString().trim()) ? r.getGridName() : "," + r.getGridName()); } }); } @@ -261,7 +261,7 @@ public class IcPlacePatrolTeamServiceImpl extends BaseServiceImpl { if (str.equals(r.getValue())) { - ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); + ninePlaceNames.append("".equals(ninePlaceNames.toString().trim()) ? r.getLabel() : "," + r.getLabel()); } }); }