diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java index be8016783d..2a71c3e8d3 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/indexcal/impl/GridCorreLationServiceImpl.java @@ -327,6 +327,10 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { result.setAvgValue(new BigDecimal(0)); result.setSampleCount(0); } + + if (result.getAvgValue() == null) { + result.setAvgValue(new BigDecimal(NumConstant.ZERO)); + } //FOR TEST /*BigDecimal result=null; if(IndexCalConstant.S1_C1_G1.equals(gridId)){ @@ -354,6 +358,9 @@ public class GridCorreLationServiceImpl implements GridCorreLationService { result.setSampleCount(0); result.setAvgValue(new BigDecimal(0)); } + if (result.getAvgValue() == null) { + result.setAvgValue(new BigDecimal(NumConstant.ZERO)); + } //FOR TEST /*BigDecimal result=null; if(IndexCalConstant.S1_C1_G1.equals(gridId)){ diff --git a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java index 175fe56674..b9cbcdc232 100644 --- a/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java +++ b/epmet-module/gov-org/gov-org-client/src/main/java/com/epmet/dto/result/AgencysResultDTO.java @@ -96,4 +96,9 @@ public class AgencysResultDTO implements Serializable { * 组织区划的名称 */ private String areaName; + + /** + * 当前组织对应客户根组织级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) + */ + private String rootlevel; } \ No newline at end of file diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java index b0ec95dfd2..263fe905e7 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/controller/AgencyController.java @@ -151,8 +151,9 @@ public class AgencyController { * @Description 组织首页-获取组织机构信息 */ @PostMapping("agencydetail") - @RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_TRACE) - public Result agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) { + //@RequirePermission(requirePermission = RequirePermissionEnum.ORG_AGENCY_TRACE) + //public Result agencyDetail(@LoginUser TokenDto tokenDTO, @RequestBody AgencydetailFormDTO formDTO) { + public Result agencyDetail(@RequestBody AgencydetailFormDTO formDTO) { ValidatorUtils.validateEntity(formDTO, AgencydetailFormDTO.AddUserInternalGroup.class); return agencyService.agencyDetail(formDTO); } diff --git a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java index e83b78ba77..2324c7d1d2 100644 --- a/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java +++ b/epmet-module/gov-org/gov-org-server/src/main/java/com/epmet/service/impl/AgencyServiceImpl.java @@ -237,6 +237,19 @@ public class AgencyServiceImpl implements AgencyService { agencysResultDTO = ConvertUtils.sourceToTarget(entity, AgencysResultDTO.class); agencysResultDTO.setAgencyId(entity.getId()); agencysResultDTO.setAgencyName(entity.getOrganizationName()); + //2021.5.26 sun 添加当前组织对应客户的根组织级别返参 start + if (null != entity) { + if (null == entity.getPids() || "".equals(entity.getPids())) { + agencysResultDTO.setRootlevel(entity.getLevel()); + } else { + String id = Arrays.asList(entity.getPids().split(":")).get(0); + CustomerAgencyEntity rootEntity = customerAgencyDao.selectById(id); + if (null != rootEntity) { + agencysResultDTO.setRootlevel(rootEntity.getLevel()); + } + } + } + //2021.5.26 sun 添加当前组织对应客户的根组织级别返参 end //2:查询本机关的所有上级机关,按自上而下层级顺序 if (null == entity.getPids()) { agencysResultDTO.setParentList(parentList);