From 80fd38fa0d4d02ac9a0c2154342fcfa0d680fca0 Mon Sep 17 00:00:00 2001 From: yinzuomei <576302893@qq.com> Date: Fri, 24 Jun 2022 14:44:29 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9A=82=E5=AD=98=E5=88=AB=E4=B8=8A=E7=94=9F?= =?UTF-8?q?=E4=BA=A7=E3=80=822?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/IcUserDemandRecServiceImpl.java | 27 +++++++++++++++---- .../resources/mapper/IcUserDemandRecDao.xml | 2 +- 2 files changed, 23 insertions(+), 6 deletions(-) diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java index 69013fe98a..b95e38725c 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/java/com/epmet/service/impl/IcUserDemandRecServiceImpl.java @@ -31,7 +31,9 @@ import com.epmet.commons.tools.exception.EpmetException; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.feign.ResultDataResolver; import com.epmet.commons.tools.page.PageData; +import com.epmet.commons.tools.redis.common.CustomerOrgRedis; import com.epmet.commons.tools.redis.common.CustomerStaffRedis; +import com.epmet.commons.tools.redis.common.bean.AgencyInfoCache; import com.epmet.commons.tools.scan.param.TextScanParamDTO; import com.epmet.commons.tools.scan.param.TextTaskDTO; import com.epmet.commons.tools.scan.result.SyncScanResult; @@ -961,15 +963,16 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl customerAgencyDTOResult=govOrgOpenFeignClient.getAgencyById(formDTO.getOrgId()); + /*Result customerAgencyDTOResult=govOrgOpenFeignClient.getAgencyById(formDTO.getOrgId()); if(!customerAgencyDTOResult.success()||null==customerAgencyDTOResult.getData()){ throw new EpmetException(EpmetErrorCode.SERVER_ERROR.getCode(), "获取组织信息异常govOrgOpenFeignClient.getAgencyById"); - } - if(NumConstant.ZERO_STR.equals(customerAgencyDTOResult.getData().getPid())){ + }*/ + AgencyInfoCache agencyInfoCache=CustomerOrgRedis.getAgencyInfo(formDTO.getOrgId()); + if(NumConstant.ZERO_STR.equals(agencyInfoCache.getPid())||StringUtils.isBlank(agencyInfoCache.getPid())){ //当前传入的组织id=客户的根组织 formDTO.setGridPids(formDTO.getOrgId()); }else{ - formDTO.setGridPids(customerAgencyDTOResult.getData().getPids().concat(StrConstant.COLON).concat(formDTO.getOrgId())); + formDTO.setGridPids(agencyInfoCache.getPids().concat(StrConstant.COLON).concat(formDTO.getOrgId())); } } @@ -1010,11 +1013,25 @@ public class IcUserDemandRecServiceImpl extends BaseServiceImpl iter = detailMap.keySet().iterator(); + String key = ""; + while (iter.hasNext()) { + key = iter.next(); + if(key.contains(resultDetail.getLegendCode())){ + resultDetail.setTotalService(detailMap.get(resultDetail.getLegendCode()).getTotalService()); + resultDetail.setServiceDemandTotal(detailMap.get(resultDetail.getLegendCode()).getServiceDemandTotal()); + } + } + + } + } + /*for(CategoryAnalysisDetail resultDetail:result.getDetail()){ if(detailMap.containsKey(resultDetail.getLegendCode())&&null!=detailMap.get(resultDetail.getLegendCode())){ resultDetail.setTotalService(detailMap.get(resultDetail.getLegendCode()).getTotalService()); resultDetail.setServiceDemandTotal(detailMap.get(resultDetail.getLegendCode()).getServiceDemandTotal()); } - } + }*/ } diff --git a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml index 158dcb1b7d..0a0bdd34ae 100644 --- a/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml +++ b/epmet-module/epmet-heart/epmet-heart-server/src/main/resources/mapper/IcUserDemandRecDao.xml @@ -120,7 +120,7 @@ and r.STATUS=#{status} - and s.SERVICE_TYPE=#{serviceType} + and s.SERVICE_TYPE like concat('%',#{serviceType},'%') and s.SERVER_ID=#{serverId}