From d77b6f010fc36196ec3e42c8e39bb4c33cae8964 Mon Sep 17 00:00:00 2001 From: zxc <1272811460@qq.com> Date: Tue, 29 Sep 2020 14:07:52 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8A=BD=E5=8F=96=E6=95=B0=E6=8D=AE=E5=88=B0?= =?UTF-8?q?=E5=A4=A7=E5=B1=8F?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../impl/OrgRankExtractServiceImpl.java | 2 +- .../impl/ScreenExtractServiceImpl.java | 91 ++++++++++++++++--- 2 files changed, 77 insertions(+), 16 deletions(-) diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java index cc61d54242..35f6de43e5 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/OrgRankExtractServiceImpl.java @@ -301,7 +301,7 @@ public class OrgRankExtractServiceImpl implements OrgRankExtractService { //项目数 List projectList = factOriginProjectMainDailyService.getOrgProjectCount(customerId, monthId, OrgTypeConstant.DISTRICT); if (!CollectionUtils.isEmpty(projectList)) { - list.forEach(entity -> projectList.stream().filter(item -> item.getOrgId().equals(entity.getOrgId())).forEach(dto -> + list.forEach(entity -> projectList.stream().filter(item -> item.getAgencyId().equals(entity.getOrgId())).forEach(dto -> entity.setProjectTotal(dto.getCount()) )); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java index 5474560335..e06ba65809 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenExtractServiceImpl.java @@ -125,13 +125,34 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { */ public void extractDaily(String customerId, String dateId) { //党员基本情况screen_cpc_base_data - partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId,dateId); + try { + partyBaseInfoService.statsPartyMemberBaseInfoToScreen(customerId,dateId); + }catch (Exception e){ + log.error("党员基本情况抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); + } //先锋模范screen_pioneer_data - pioneerDataExtractService.extractGridPioneerData(customerId, dateId); - pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); - pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); + try { + pioneerDataExtractService.extractGridPioneerData(customerId, dateId); + }catch (Exception e){ + log.error("先锋模范【网格】抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); + } + try { + pioneerDataExtractService.extractCommunityPioneerData(customerId, dateId); + }catch (Exception e){ + log.error("先锋模范【社区】抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); + } + try { + pioneerDataExtractService.extractExceptCommunityPioneerData(customerId, dateId); + }catch (Exception e){ + log.error("先锋模范【extractExceptCommunityPioneerData】抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); + } //公众参与排行(注册人数、参与人数、话题数、议题数、项目数)screen_public_parti_total_data - publicPartiTotalDataExtractService.extractPublicPartiTotalData(customerId,dateId); + try { + publicPartiTotalDataExtractService.extractPublicPartiTotalData(customerId,dateId); + }catch (Exception e){ + log.error("公众参与排行抽取到大屏失败,customerId为:"+customerId+"dateId为:"+dateId, e); + } + ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO(); param.setCustomerId(customerId);param.setDateId(dateId); //中央区 screen_user_total_data @@ -151,19 +172,59 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { formDTO.setMonthId(monthId); //基层治理-公众参与screen_user_join - publicPartExtractService.extractTotalDataMonthly(formDTO); + try { + publicPartExtractService.extractTotalDataMonthly(formDTO); + }catch (Exception e){ + log.error("基层治理-公众参与抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } //治理能力排行screen_govern_rank_data - governRankDataExtractService.extractGridData(customerId, monthId); - governRankDataExtractService.extractCommunityData(customerId, monthId); - governRankDataExtractService.extractStreetData(customerId, monthId); - governRankDataExtractService.extractDistrictData(customerId, monthId); + try { + governRankDataExtractService.extractGridData(customerId, monthId); + }catch (Exception e){ + log.error("治理能力排行【网格】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } + try { + governRankDataExtractService.extractCommunityData(customerId, monthId); + }catch (Exception e){ + log.error("治理能力排行【社区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } + try { + governRankDataExtractService.extractStreetData(customerId, monthId); + }catch (Exception e){ + log.error("治理能力排行【街道】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } + try { + governRankDataExtractService.extractDistrictData(customerId, monthId); + }catch (Exception e){ + log.error("治理能力排行【全区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } //先进排行 screen_org_rank_data - orgRankExtractService.extractGridData(customerId, monthId); - orgRankExtractService.extractCommunityData(customerId, monthId); - orgRankExtractService.extractStreetData(customerId, monthId); - orgRankExtractService.extractDistrictData(customerId, monthId); + try { + orgRankExtractService.extractGridData(customerId, monthId); + }catch (Exception e){ + log.error("先进排行【网格】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } + try { + orgRankExtractService.extractCommunityData(customerId, monthId); + }catch (Exception e){ + log.error("先进排行【社区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } + try { + orgRankExtractService.extractStreetData(customerId, monthId); + }catch (Exception e){ + log.error("先进排行【街道】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } + try { + orgRankExtractService.extractDistrictData(customerId, monthId); + }catch (Exception e){ + log.error("先进排行【全区】抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } // 党建引领 screen_party_branch_data,screen_party_link_masses_data - partyGuideService.partyGuideExtract(formDTO); + try { + partyGuideService.partyGuideExtract(formDTO); + }catch (Exception e){ + log.error("党建引领抽取到大屏失败,参数为:"+ JSON.toJSONString(formDTO), e); + } //计算分数 todo 优化 手动创建线程池 控制任务数量 ExecutorService pool = Executors.newSingleThreadExecutor();