From 5e39d144e9b0d920c9bca09ab925fa993b0dee01 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Mon, 5 Jul 2021 10:32:37 +0800 Subject: [PATCH] agencydetail-multic --- .../com/epmet/dto/result/AgencyDetailMulticResultDTO.java | 8 +++++--- .../evaluationindex/screen/impl/AgencyServiceImpl.java | 8 ++++---- .../main/java/com/epmet/dto/result/AgencysResultDTO.java | 5 +++++ 3 files changed, 14 insertions(+), 7 deletions(-) diff --git a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java index b964e69c08..7b34abcec9 100644 --- a/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java +++ b/epmet-module/data-report/data-report-client/src/main/java/com/epmet/dto/result/AgencyDetailMulticResultDTO.java @@ -1,6 +1,5 @@ package com.epmet.dto.result; -import com.fasterxml.jackson.annotation.JsonIgnore; import lombok.Data; import java.io.Serializable; @@ -97,6 +96,9 @@ public class AgencyDetailMulticResultDTO implements Serializable { */ private List subCustomerIds; - @JsonIgnore - private String agencyCustomerId; + // @JsonIgnore + /** + * 当前agencyId所属的客户id + */ + private String customerId; } diff --git a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java index b9962c38ab..3658df240c 100644 --- a/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java +++ b/epmet-module/data-report/data-report-server/src/main/java/com/epmet/datareport/service/evaluationindex/screen/impl/AgencyServiceImpl.java @@ -392,7 +392,7 @@ public class AgencyServiceImpl implements AgencyService { } agencysResultDTO = ConvertUtils.sourceToTarget(customerAgencyDTO, AgencyDetailMulticResultDTO.class); //当前组织的客户id。 - agencysResultDTO.setAgencyCustomerId(customerAgencyDTO.getCustomerId()); + agencysResultDTO.setCustomerId(customerAgencyDTO.getCustomerId()); //2、当前登录用户所属客户,的跟级组织 ScreenCustomerAgencyDTO rootAgency=screenCustomerAgencyDao.selectCustomerRootAgency(formDTO.getCustomerId()); @@ -423,9 +423,9 @@ public class AgencyServiceImpl implements AgencyService { agencysResultDTO.setSubCustomerIds(crmRes.getData()); } - log.info("当前组织的客户id="+agencysResultDTO.getAgencyCustomerId()+";当前登录用户所属的客户id="+formDTO.getCustomerId()); + log.info("当前组织的客户id="+agencysResultDTO.getCustomerId()+";当前登录用户所属的客户id="+formDTO.getCustomerId()); if(agencysResultDTO.getHaveSubCustomer()){ - if (formDTO.getCustomerId().equals(agencysResultDTO.getAgencyCustomerId()) + if (formDTO.getCustomerId().equals(agencysResultDTO.getCustomerId()) && (StringUtils.isBlank(customerAgencyDTO.getPids()) ||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid()))) { log.info(String.format("1)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId())); @@ -443,7 +443,7 @@ public class AgencyServiceImpl implements AgencyService { }else{ //单客户 //6:查询当前组织的所有上级组织,按自上而下层级顺序 - if (formDTO.getCustomerId().equals(agencysResultDTO.getAgencyCustomerId()) + if (formDTO.getCustomerId().equals(agencysResultDTO.getCustomerId()) && (StringUtils.isBlank(customerAgencyDTO.getPids()) ||NumConstant.ZERO_STR.equals(customerAgencyDTO.getPid()))) { log.info(String.format("2)当前组织agencyId=%s,为根基组织,不需要查询parentList",formDTO.getAgencyId())); 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 b9cbcdc232..933bdbb492 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 @@ -101,4 +101,9 @@ public class AgencysResultDTO implements Serializable { * 当前组织对应客户根组织级别(社区级:community,乡(镇、街道)级:street,区县级: district,市级: city省级:province) */ private String rootlevel; + + /** + * 当前agencyId所属的客户id + */ + private String customerId; } \ No newline at end of file