Browse Source

Merge branch 'dev_ic_v2' into develop

master
sunyuchao 4 years ago
parent
commit
899ead2f35
  1. 2
      epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/PlaceOrgDetailResultDTO.java
  2. 17
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlaceOrgServiceImpl.java
  3. 8
      epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/IcPlacePatrolTeamServiceImpl.java

2
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; private String ninePlaceName;
//场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】 //场所规模【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】
private String scale; private String scale;
//场所规模名称【 0:10人以下 1:10-20人 2:21-40人 3:41-100人 4:100人以上】
private String scaleName;
//负责人 //负责人
private String personInCharge; private String personInCharge;
//联系电话 //联系电话

17
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.constant.NumConstant;
import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult; import com.epmet.commons.tools.dto.result.CustomerStaffInfoCacheResult;
import com.epmet.commons.tools.dto.result.OptionResultDTO; 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.exception.RenException;
import com.epmet.commons.tools.redis.common.CustomerStaffRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis;
import com.epmet.commons.tools.utils.ConvertUtils; import com.epmet.commons.tools.utils.ConvertUtils;
@ -44,6 +45,7 @@ import org.springframework.transaction.annotation.Transactional;
import org.springframework.util.CollectionUtils; import org.springframework.util.CollectionUtils;
import java.util.List; import java.util.List;
import java.util.Map;
/** /**
* 九小场所下组织管理 * 九小场所下组织管理
@ -114,6 +116,7 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl<IcPlaceOrgDao, IcPlac
return resultDTO; return resultDTO;
} }
resultDTO = result.get(0); resultDTO = result.get(0);
//2.查询九小场所信息 //2.查询九小场所信息
Result<List<OptionResultDTO>> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); Result<List<OptionResultDTO>> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption();
if (!result1.success()) { if (!result1.success()) {
@ -124,6 +127,11 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl<IcPlaceOrgDao, IcPlac
resultDTO.setNinePlaceName(d.getLabel()); resultDTO.setNinePlaceName(d.getLabel());
} }
} }
//3.查询人员规模字典表信息
Result<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
resultDTO.setScaleName(unitTypeMap.getData().get(resultDTO.getScale()));
return resultDTO; return resultDTO;
} }
@ -143,14 +151,21 @@ public class IcPlaceOrgServiceImpl extends BaseServiceImpl<IcPlaceOrgDao, IcPlac
return resultDTO; return resultDTO;
} }
resultDTO.setTotal((int) result.getTotal()); resultDTO.setTotal((int) result.getTotal());
//2.查询九小场所信息 //2.查询九小场所信息
Result<List<OptionResultDTO>> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption(); Result<List<OptionResultDTO>> result1 = epmetAdminOpenFeignClient.getNineSmallPlacesOption();
if (!result1.success()) { if (!result1.success()) {
throw new RenException("获取九小场所基本信息失败......"); throw new RenException("获取九小场所基本信息失败......");
} }
result.getList().forEach(r -> result1.getData().stream().filter(u -> r.getNinePlaceVal().equals(u.getValue())).forEach(u -> r.setNinePlaceName(u.getLabel()))); 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<Map<String, String>> unitTypeMap = epmetAdminOpenFeignClient.dictMap(DictTypeEnum.SCALE.getCode());
result.getList().forEach(item -> {
item.setScaleName(unitTypeMap.getData().get(item.getScale()));
});
resultDTO.setList(result.getList());
return resultDTO; return resultDTO;
} }
} }

8
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<IcPlacePatrolT
for (String str : resultDTO.getGridIds().split(",")) { for (String str : resultDTO.getGridIds().split(",")) {
gridList.forEach(r -> { gridList.forEach(r -> {
if (str.equals(r.getId())) { 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<IcPlacePatrolT
for (String str : resultDTO.getNinePlaceVals().split(",")) { for (String str : resultDTO.getNinePlaceVals().split(",")) {
nineList.getData().forEach(r -> { nineList.getData().forEach(r -> {
if (str.equals(r.getValue())) { 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<IcPlacePatrolT
for (String str : dto.getGridIds().split(",")) { for (String str : dto.getGridIds().split(",")) {
gridList.forEach(r -> { gridList.forEach(r -> {
if (str.equals(r.getId())) { 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<IcPlacePatrolT
for (String str : dto.getNinePlaceVals().split(",")) { for (String str : dto.getNinePlaceVals().split(",")) {
nineList.getData().forEach(r -> { nineList.getData().forEach(r -> {
if (str.equals(r.getValue())) { if (str.equals(r.getValue())) {
ninePlaceNames.append("".equals(ninePlaceNames) ? r.getLabel() : "," + r.getLabel()); ninePlaceNames.append("".equals(ninePlaceNames.toString().trim()) ? r.getLabel() : "," + r.getLabel());
} }
}); });
} }

Loading…
Cancel
Save