From 78f00d6728477e90ba8a1cac9327963b01cb40a9 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 22 Sep 2020 15:12:16 +0800 Subject: [PATCH] =?UTF-8?q?=E5=86=85=E6=B5=8B=20=E8=8E=B7=E5=8F=96?= =?UTF-8?q?=E6=89=80=E6=9C=89=E4=B8=8B=E7=BA=A7AgencyId?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/java/com/epmet/controller/DemoController.java | 10 ++++++++++ .../toscreen/impl/PartyBaseInfoServiceImpl.java | 10 +++++++++- .../screen/impl/ScreenCustomerAgencyServiceImpl.java | 2 ++ .../evaluationindex/screen/ScreenCustomerAgencyDao.xml | 2 +- 4 files changed, 22 insertions(+), 2 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java index 471c65ee0d..4c3b670b57 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/controller/DemoController.java @@ -34,6 +34,7 @@ import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollCommunityS import com.epmet.service.evaluationindex.extract.dataToIndex.IndexCollStreetService; import com.epmet.service.evaluationindex.extract.todata.FactOriginProjectLogDailyService; import com.epmet.service.evaluationindex.extract.todata.FactOriginTopicMainDailyService; +import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService; import com.epmet.service.evaluationindex.indexcal.*; import com.epmet.service.stats.DimAgencyService; import com.epmet.service.stats.DimCustomerPartymemberService; @@ -632,4 +633,13 @@ public class DemoController { return new Result(); } + @Autowired + private PartyBaseInfoService partyBaseInfoService; + + @PostMapping("zxczxczxc") + public Result getZxcZxcZxc(){ + partyBaseInfoService.statsPartyMemberBaseInfoToScreen("45687aa479955f9d06204d415238f7cc","20200922"); + return new Result(); + } + } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java index 5fd0dca453..39a7724f3a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/PartyBaseInfoServiceImpl.java @@ -1,9 +1,13 @@ package com.epmet.service.evaluationindex.extract.toscreen.impl; import com.epmet.service.evaluationindex.extract.toscreen.PartyBaseInfoService; +import com.epmet.service.evaluationindex.screen.ScreenCustomerAgencyService; import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; +import java.util.Map; + /** * @Desciption 党员基本情况 * @Author zxc @@ -13,7 +17,8 @@ import org.springframework.stereotype.Service; @Slf4j public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { - + @Autowired + private ScreenCustomerAgencyService agencyService; /** * @Description 统计基层党建-党员基本情况 @@ -24,6 +29,9 @@ public class PartyBaseInfoServiceImpl implements PartyBaseInfoService { */ @Override public Boolean statsPartyMemberBaseInfoToScreen(String customerId, String dateId) { + String agencyId = "cyagstrbee8711eaa1fac03fd56f7847"; + Map stringObjectMap = agencyService.selectAllSubAgencyId(agencyId, customerId); + System.out.println(stringObjectMap); return null; } } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java index 379f57306a..7a05c9909a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/screen/impl/ScreenCustomerAgencyServiceImpl.java @@ -32,6 +32,7 @@ import java.util.ArrayList; import java.util.HashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * 组织机构信息 @@ -79,6 +80,7 @@ public class ScreenCustomerAgencyServiceImpl implements ScreenCustomerAgencyServ List result = new ArrayList<>(); List subAgencyList = screenCustomerAgencyDao.selectSubAgencyList(subAgencyPids); if (!CollectionUtils.isEmpty(subAgencyList)) { + result.addAll(subAgencyList.stream().map(sub -> sub.getAgencyId()).collect(Collectors.toList())); subAgencyList.forEach(sub -> { List subAgency = getDepartmentList(sub.getPids() + "," + sub.getAgencyId()); result.addAll(subAgency); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml index 3fc77c4d7e..7f0ec67ca4 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/screen/ScreenCustomerAgencyDao.xml @@ -145,7 +145,7 @@ screen_customer_agency WHERE del_flag = 0 - AND agencyId = #{agencyId} + AND agency_id = #{agencyId} AND customer_id = #{customerId}