From 2f7659837a9a61b97770dc16bb0956fd1d8e7b5f Mon Sep 17 00:00:00 2001 From: songyunpeng Date: Mon, 18 Jan 2021 08:57:05 +0800 Subject: [PATCH] =?UTF-8?q?=E5=A4=A7=E5=B1=8F=E6=95=B0=E6=8D=AE=E4=B8=8A?= =?UTF-8?q?=E6=8A=A5?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../screen/result/DeptGovrnAbilityDTO.java | 40 ++++++ .../screen/result/GridGovrnAbilityDTO.java | 30 +++++ .../screen/result/GridPartyAbilityDTO.java | 10 ++ .../screen/result/GridServiceAbilityDTO.java | 20 +++ .../dto/screen/result/OrgGovrnAbilityDTO.java | 50 ++++++++ .../result/ScreenCustomerAgencyDTO.java | 5 + .../screen/result/ScreenCustomerDeptDTO.java | 5 + .../screen/result/ScreenCustomerGridDTO.java | 5 + .../ScreenPublicDataController.java | 59 +++++++++ .../screen/dao/ScreenPublicDataDao.java | 45 +++++++ .../service/ScreenPublicDataService.java | 39 ++++++ .../impl/ScreenPublicDataServiceImpl.java | 58 +++++++++ .../mapper/screen/ScreenIndexDataDao.xml | 60 +++++++-- .../mapper/screen/ScreenPublicDataDao.xml | 67 ++++++++++ .../epdc/dto/ScreenJobBasicDataParamDTO.java | 116 ++++++++++++++++++ .../esua/epdc/feign/AnalysisFeignClient.java | 30 +++++ .../fallback/AnalysisFeignClientFallback.java | 15 +++ .../task/screen/ScreenPublicDataPushTask.java | 20 +++ .../screen/ScreenPublicDataPushTaskImpl.java | 113 +++++++++++++++++ 19 files changed, 779 insertions(+), 8 deletions(-) create mode 100644 esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenPublicDataController.java create mode 100644 esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java create mode 100644 esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenPublicDataService.java create mode 100644 esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java create mode 100644 esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml create mode 100644 esua-epdc/epdc-module/epdc-job/epdc-job-client/src/main/java/com/elink/esua/epdc/dto/ScreenJobBasicDataParamDTO.java create mode 100644 esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTask.java create mode 100644 esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/DeptGovrnAbilityDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/DeptGovrnAbilityDTO.java index 66fb22f5..a367d05b 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/DeptGovrnAbilityDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/DeptGovrnAbilityDTO.java @@ -69,4 +69,44 @@ public class DeptGovrnAbilityDTO implements Serializable { * 办结项目满意度 */ private BigDecimal satisfactionRatio; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer respProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer respProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer handleProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer handleProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer closedProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer closedProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer satisfactionRatioFm; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGovrnAbilityDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGovrnAbilityDTO.java index d11ba57b..cf6462d3 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGovrnAbilityDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridGovrnAbilityDTO.java @@ -79,4 +79,34 @@ public class GridGovrnAbilityDTO implements Serializable { * 网格自治项目数 统计期网格自身内办结的项目数目 */ private Integer selfSolveProjectCount; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer transferRightRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer transferRightRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer satisfactionRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer issueToProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer issueToProjectRatioFm; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridPartyAbilityDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridPartyAbilityDTO.java index 15bdc889..a032282c 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridPartyAbilityDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridPartyAbilityDTO.java @@ -104,4 +104,14 @@ public class GridPartyAbilityDTO implements Serializable { * 党员参加三会一课人次 */ private Integer joinThreeMeetsCount; + + /** + * V2升级字段:issueToProjectRatio的分子:评价周期内转为项目的数量 + */ + private Integer shiftedProjectTotal; + + /** + * V2升级字段:issueToProjectRatio的分母:评价周期内网格内居民提出的议题数目 + */ + private Integer issueTotal; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridServiceAbilityDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridServiceAbilityDTO.java index f89c15f7..00a81525 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridServiceAbilityDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/GridServiceAbilityDTO.java @@ -55,4 +55,24 @@ public class GridServiceAbilityDTO implements Serializable { */ private BigDecimal partyVolunteerRatio; + /** + * V2升级字段:partyVolunteerRatio的分子:网格党员志愿者数 + */ + private Integer partyVolunteerTotal; + + /** + * V2升级字段:partyVolunteerRatio的分母:志愿者总数 + */ + private Integer volunteerTotal; + + /** + * V2升级字段:volunteerRatio的分子:居民且注册志愿者的总人数 + */ + private Integer volunteerUserTotal; + + /** + * V2升级字段:volunteerRatio的分母:网格内注册居民数 + */ + private Integer regUserTotal; + } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgGovrnAbilityDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgGovrnAbilityDTO.java index c30746cb..26a457b7 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgGovrnAbilityDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/OrgGovrnAbilityDTO.java @@ -80,4 +80,54 @@ public class OrgGovrnAbilityDTO implements Serializable { * 街道办结项目的处理效率, data_type=street时有值 */ private BigDecimal handleProjectRatio; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer respProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer respProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer closedProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer closedProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer satisfactionRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer satisfactionRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer overdueProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer overdueProjectRatioFm; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer handleProjectRatioFz; + + /** + * V2升级新增字段, 详见说明文档 + */ + private Integer handleProjectRatioFm; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerAgencyDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerAgencyDTO.java index c16d56f4..96e37dbc 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerAgencyDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerAgencyDTO.java @@ -68,4 +68,9 @@ public class ScreenCustomerAgencyDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * 是否显示 1显示;0不显示 + */ + private String isDisplay; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerDeptDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerDeptDTO.java index 4148c4ff..2b08c871 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerDeptDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerDeptDTO.java @@ -48,4 +48,9 @@ public class ScreenCustomerDeptDTO implements Serializable { * 数据更新至: yyyy|yyyyMM|yyyyMMdd(08-21新增) */ private String dataEndTime; + + /** + * V2升级必传参数:当前部门所属行政区域编码,去除末尾0 + */ + private String areaCode; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerGridDTO.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerGridDTO.java index 0abe97a4..f9274b7d 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerGridDTO.java +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-client/src/main/java/com/elink/esua/epdc/dto/screen/result/ScreenCustomerGridDTO.java @@ -53,4 +53,9 @@ public class ScreenCustomerGridDTO implements Serializable { * 所有上级ID,用英文逗号分开(8.26新增) */ private String allParentIds; + + /** + * V2升级必传参数:当前网格所属行政地区编码,去除末尾0 + */ + private String areaCode; } diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenPublicDataController.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenPublicDataController.java new file mode 100644 index 00000000..7ecdd790 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/controller/ScreenPublicDataController.java @@ -0,0 +1,59 @@ +package com.elink.esua.epdc.modules.screen.controller; + +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.modules.screen.service.ScreenPublicDataService; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +/** + * 大屏公共数据上报 + * + * @Author:liuchuang + * @Date:2020/9/17 14:06 + */ +@RestController +@RequestMapping("data/stats/screencoll") +public class ScreenPublicDataController { + + @Autowired + private ScreenPublicDataService screenPublicDataService; + + /** + * 014、组织层级 + * + * @return com.elink.esua.epdc.commons.tools.utils.public Result + * @author Liuchuang + * @since 2020/9/9 15:49 + */ + @PostMapping("customeragency") + public Result customerAgency() { + return screenPublicDataService.customerAgency(); + } + + /** + * 015、网格信息上传 + * + * @return com.elink.esua.epdc.commons.tools.utils.public Result + * @author Liuchuang + * @since 2020/9/9 15:55 + */ + @PostMapping("customergrid") + public Result customerGrid() { + return screenPublicDataService.customerGrid(); + } + + /** + * 016、部门信息上传 + * + * @return com.elink.esua.epdc.commons.tools.utils.public Result + * @author Liuchuang + * @since 2020/9/9 15:55 + */ + @PostMapping("customerdept") + public Result customerDept() { + return screenPublicDataService.customerDept(); + } + +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java new file mode 100644 index 00000000..3b02211b --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/dao/ScreenPublicDataDao.java @@ -0,0 +1,45 @@ +package com.elink.esua.epdc.modules.screen.dao; + +import com.elink.esua.epdc.commons.mybatis.dao.BaseDao; +import com.elink.esua.epdc.dto.screen.result.ScreenCustomerAgencyDTO; +import com.elink.esua.epdc.dto.screen.result.ScreenCustomerDeptDTO; +import com.elink.esua.epdc.dto.screen.result.ScreenCustomerGridDTO; +import com.elink.esua.epdc.dto.screen.result.ScreenPublicDataResultDTO; +import org.apache.ibatis.annotations.Mapper; + +import java.util.List; + +/** + * @Author:liuchuang + * @Date:2020/9/17 14:13 + */ +@Mapper +public interface ScreenPublicDataDao extends BaseDao { + + /** + * 014、组织层级 + * + * @return java.util.List + * @author Liuchuang + * @since 2020/9/17 14:24 + */ + List customerAgency(); + + /** + * 015、网格信息上传 + * + * @return java.util.List + * @author Liuchuang + * @since 2020/9/17 14:24 + */ + List customerGrid(); + + /** + * 016、部门信息上传 + * + * @return java.util.List + * @author Liuchuang + * @since 2020/9/17 14:23 + */ + List customerDept(); +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenPublicDataService.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenPublicDataService.java new file mode 100644 index 00000000..a86af7ef --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/ScreenPublicDataService.java @@ -0,0 +1,39 @@ +package com.elink.esua.epdc.modules.screen.service; + +import com.elink.esua.epdc.commons.tools.utils.Result; + +/** + * 大屏公共信息统计 + * + * @Author:liuchuang + * @Date:2020/9/17 14:08 + */ +public interface ScreenPublicDataService { + + /** + * 014、组织层级 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/9/17 14:24 + */ + Result customerAgency(); + + /** + * 015、网格信息上传 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/9/17 14:24 + */ + Result customerGrid(); + + /** + * 016、部门信息上传 + * + * @return com.elink.esua.epdc.commons.tools.utils.Result + * @author Liuchuang + * @since 2020/9/17 14:24 + */ + Result customerDept(); +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java new file mode 100644 index 00000000..0ee86a27 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/java/com/elink/esua/epdc/modules/screen/service/impl/ScreenPublicDataServiceImpl.java @@ -0,0 +1,58 @@ +package com.elink.esua.epdc.modules.screen.service.impl; + +import com.alibaba.fastjson.JSONObject; +import com.elink.esua.epdc.commons.mybatis.service.impl.BaseServiceImpl; +import com.elink.esua.epdc.commons.tools.constant.EpmetConstant; +import com.elink.esua.epdc.commons.tools.utils.Result; +import com.elink.esua.epdc.dto.screen.result.ScreenCustomerAgencyDTO; +import com.elink.esua.epdc.dto.screen.result.ScreenCustomerDeptDTO; +import com.elink.esua.epdc.dto.screen.result.ScreenCustomerGridDTO; +import com.elink.esua.epdc.dto.screen.result.ScreenPublicDataResultDTO; +import com.elink.esua.epdc.modules.screen.dao.ScreenPublicDataDao; +import com.elink.esua.epdc.modules.screen.service.ScreenPublicDataService; +import com.elink.esua.epdc.utils.EpmetUtils; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.List; + +/** + * @Author:liuchuang + * @Date:2020/9/17 14:08 + */ +@Service +public class ScreenPublicDataServiceImpl extends BaseServiceImpl implements ScreenPublicDataService { + + @Autowired + private EpmetUtils epmetUtils; + + @Override + public Result customerAgency() { + List data = baseDao.customerAgency(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("isFirst", true); + jsonObject.put("dataList", data); + epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_CUSTOMER_AGENCY, JSONObject.toJSONString(jsonObject)); + return new Result(); + } + + @Override + public Result customerGrid() { + List data = baseDao.customerGrid(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("isFirst", true); + jsonObject.put("dataList", data); + epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_CUSTOMER_GRID, JSONObject.toJSONString(jsonObject)); + return new Result(); + } + + @Override + public Result customerDept() { + List data = baseDao.customerDept(); + JSONObject jsonObject = new JSONObject(); + jsonObject.put("isFirst", true); + jsonObject.put("dataList", data); + epmetUtils.httpPost(EpmetConstant.EPMET_SCREEN_COLL_CUSTOMER_DEPT, JSONObject.toJSONString(jsonObject)); + return new Result(); + } +} diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml index df4ed2dd..6bd0c12f 100644 --- a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenIndexDataDao.xml @@ -210,6 +210,8 @@ IFNULL(groupUser.createGroupPartyCount,0) createGroupPartyCount, IFNULL(new.newNum,0) publishArticleCount, ROUND(IFNULL((ite.partyToItemNum + ite.userToItemNum) / issue.issNum,0),4) * 100 issueToProjectRatio, + IFNULL(ite.partyToItemNum + ite.userToItemNum, 0) shiftedProjectTotal, + IFNULL(issue.issNum, 0) issueTotal, 0 createThreeMeetsCount, 0 joinThreeMeetsCount FROM esua_epdc_admin.sys_dept sd @@ -328,7 +330,11 @@ DATE_FORMAT(STR_TO_DATE(#{yearMonth, jdbcType=VARCHAR}, '%Y-%m'),'%Y%m') AS monthId, IFNULL(act.actNum ,0) activityCount, ROUND(IFNULL(IFNULL(actInfo.volunteerNum,0) / IFNULL(actInfo.userNum,0),0),4) * 100 volunteerRatio, - ROUND(IFNULL(IFNULL(actInfo.partyVolunteerNum,0) / IFNULL(actInfo.volunteerNum,0),0),4) * 100 partyVolunteerRatio + ROUND(IFNULL(IFNULL(actInfo.partyVolunteerNum,0) / IFNULL(actInfo.volunteerNum,0),0),4) * 100 partyVolunteerRatio, + IFNULL(actInfo.partyVolunteerNum,0) partyVolunteerTotal, + IFNULL(actInfo.volunteerNum,0) volunteerTotal, + IFNULL(actInfo.volunteerNum,0) volunteerUserTotal, + IFNULL(actInfo.userNum,0) regUserTotal from esua_epdc_admin.sys_dept sd left join ( select @@ -427,7 +433,13 @@ / IFNULL(itemCount.itemCloseAndScoreNum,0),4),0) * 100 satisfactionRatio, ROUND(IFNULL(IFNULL(itemCount.itemNum,0) / IFNULL(issueCount.issueNum,0),0),4) * 100 issueToProjectRatio, IFNULL(itemCount.selfSolveProjectNum,0) selfSolveProjectCount, - 0 transferRightRatio + 0 AS transferRightRatio, + 0 AS transferRightRatioFz, + 0 AS transferRightRatioFm, + IFNULL(itemCount.itemSatisfiedNum,0) * 0.6 + IFNULL(itemCount.itemVeryNum,0) satisfactionRatioFz, + IFNULL(itemCount.itemCloseAndScoreNum,0) satisfactionRatioFm, + IFNULL(itemCount.itemNum,0) issueToProjectRatioFz, + IFNULL(issueCount.issueNum,0) issueToProjectRatioFm from esua_epdc_admin.sys_dept sd left join ( select @@ -487,7 +499,17 @@ IFNULL(tr.closedProjectRatio,0.00) AS closedProjectRatio, IFNULL(tr.satisfactionRatio,0.00) AS satisfactionRatio, 0.00 AS overdueProjectRatio, - IF( d.TYPE_KEY = 'street_party', IFNULL(tr.handleProjectRatio,0.00),0.00) AS handleProjectRatio + IF( d.TYPE_KEY = 'street_party', IFNULL(tr.handleProjectRatio,0.00),0.00) AS handleProjectRatio, + IFNULL(tr.respProjectRatioFz,0) AS respProjectRatioFz, + IFNULL(tr.respProjectRatioFm,0) AS respProjectRatioFm, + IFNULL(tr.closedProjectRatioFz,0) AS closedProjectRatioFz, + IFNULL(tr.closedProjectRatioFm,0) AS closedProjectRatioFm, + IFNULL(tr.satisfactionRatioFz,0) AS satisfactionRatioFz, + IFNULL(tr.satisfactionRatioFm,0) AS satisfactionRatioFm, + 0 AS overdueProjectRatioFz, + 0 AS overdueProjectRatioFm, + IF( d.TYPE_KEY = 'street_party', tr.handleProjectRatioFz, 0) handleProjectRatioFz, + IF( d.TYPE_KEY = 'street_party', tr.handleProjectRatioFm, 0) handleProjectRatioFm FROM esua_epdc_admin.sys_dept d left join ( select @@ -495,12 +517,18 @@ sum(t.transferedCount) as transferedCount, count( me.ITEM_STATE = 10 or null) as closedProjectCount, round(sum(t.respProject) / sum(t.transferedCount),2) respProjectRatio, + IFNULL(sum(t.respProject), 0) respProjectRatioFz, + IFNULL(sum(t.transferedCount), 0) respProjectRatioFm, round(count(me.ITEM_STATE = 10 or null)/count( t.ITEM_ID),4)*100 as closedProjectRatio, - + IFNULL(count(me.ITEM_STATE = 10 or null), 0) closedProjectRatioFz, + IFNULL(count( t.ITEM_ID), 0) closedProjectRatioFm, IFNULL(ROUND((count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null)) / count(me.EVALUATION_SCORE is not null or null),4)*100, 0.00) as satisfactionRatio, - - round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio + IFNULL(count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null), 0) satisfactionRatioFz, + IFNULL(count(me.EVALUATION_SCORE is not null or null), 0) satisfactionRatioFm, + round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio, + IFNULL(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)), 0) handleProjectRatioFz, + IFNULL(sum(t.transferedCount), 0) handleProjectRatioFm from( select ei.DEPT_ID, @@ -544,17 +572,33 @@ IFNULL(tr.respProjectRatio,0.00) AS respProjectRatio, IFNULL(tr.closedProjectRatio,0.00) AS closedProjectRatio, IFNULL(tr.satisfactionRatio,0.00) AS satisfactionRatio, - IFNULL(tr.handleProjectRatio,0.00) AS handleProjectRatio + IFNULL(tr.handleProjectRatio,0.00) AS handleProjectRatio, + IFNULL(tr.respProjectRatioFz,0) AS respProjectRatioFz, + IFNULL(tr.respProjectRatioFm,0) AS respProjectRatioFm, + IFNULL(tr.handleProjectRatioFz,0) AS handleProjectRatioFz, + IFNULL(tr.handleProjectRatioFm,0) AS handleProjectRatioFm, + IFNULL(tr.closedProjectRatioFz,0) AS closedProjectRatioFz, + IFNULL(tr.closedProjectRatioFm,0) AS closedProjectRatioFm, + IFNULL(tr.satisfactionRatioFz,0) AS satisfactionRatioFz, + IFNULL(tr.satisfactionRatioFm,0) AS satisfactionRatioFm FROM esua_epdc_admin.sys_dept d left join (select t.DEPT_ID, sum(t.transferedCount) as transferedCount, count( me.ITEM_STATE = 10 or null) as closedProjectCount, round(sum(t.respProject) / sum(t.transferedCount),2) respProjectRatio, + IFNULL(sum(t.respProject), 0) respProjectRatioFz, + IFNULL(sum(t.transferedCount), 0) respProjectRatioFm, round(count(me.ITEM_STATE = 10 or null)/count( t.ITEM_ID),4)*100 as closedProjectRatio, + IFNULL(count(me.ITEM_STATE = 10 or null), 0) closedProjectRatioFz, + IFNULL(count( t.ITEM_ID), 0) closedProjectRatioFm, IFNULL(ROUND((count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null)) / count(me.EVALUATION_SCORE is not null or null),4)*100, 0.00) as satisfactionRatio, - round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio + IFNULL(count(me.EVALUATION_SCORE = 1 or null) * 0.6 + count(me.EVALUATION_SCORE = 2 or null), 0) satisfactionRatioFz, + IFNULL(count(me.EVALUATION_SCORE is not null or null), 0) satisfactionRatioFm, + round(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)) / sum(t.transferedCount),2) as handleProjectRatio, + IFNULL(sum(TIMESTAMPDIFF(HOUR,me.CREATED_TIME,eih.CREATED_TIME)), 0) handleProjectRatioFz, + IFNULL(sum(t.transferedCount), 0) handleProjectRatioFm from ( select ei.DEPT_ID, ei.ITEM_ID, diff --git a/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml new file mode 100644 index 00000000..f3b6ac2a --- /dev/null +++ b/esua-epdc/epdc-module/epdc-analysis/epdc-analysis-server/src/main/resources/mapper/screen/ScreenPublicDataDao.xml @@ -0,0 +1,67 @@ + + + + + + + + + + + + diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-client/src/main/java/com/elink/esua/epdc/dto/ScreenJobBasicDataParamDTO.java b/esua-epdc/epdc-module/epdc-job/epdc-job-client/src/main/java/com/elink/esua/epdc/dto/ScreenJobBasicDataParamDTO.java new file mode 100644 index 00000000..c9faba7c --- /dev/null +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-client/src/main/java/com/elink/esua/epdc/dto/ScreenJobBasicDataParamDTO.java @@ -0,0 +1,116 @@ +package com.elink.esua.epdc.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * 大屏基础数据上报定时任务入参 + * + * @Author:liuchuang + * @Date:2020/9/15 10:30 + */ +@Data +public class ScreenJobBasicDataParamDTO implements Serializable { + private static final long serialVersionUID = -8868143963953751575L; + + /** + * 1、首页-平台各类总数上报 - 定时任务入参 + */ + private String homePagePlatformSummary; + + /** + * 2、议题分析-各类总数 - 定时任务入参 + */ + private String issueSummary; + + /** + * 3、议题分析-参与趋势 - 定时任务入参 + */ + private String issueTrend; + + /** + * 4、用户分析-各类总数 - 定时任务入参 + */ + private String userSummary; + + /** + * 5、公益互助-志愿者公益时长排名 - 定时任务入参 + */ + private String volunteerHeartRank; + + /** + * 6、用户分析-用户趋势 - 定时任务入参 + */ + private String userUserHeartRank; + + /** + * 7、公益互助-活动各类总数 - 定时任务入参 + */ + private String actSummary; + + /** + * 8、公益互助-活动次数趋势 - 定时任务入参 + */ + private String actTrend; + + /** + * 9、公益互助-志愿者画像 - 定时任务入参 + */ + private String actVolunteerSummary; + + /** + * 10、项目分析-各类总数 - 定时任务入参 + */ + private String projectSummary; + + /** + * 11、项目分析-按分类统计 - 定时任务入参 + */ + private String projectCategorySummary; + + /** + * 12、项目分析-满意度分析 - 定时任务入参 + */ + private String projectStatisticAnalysis; + + /** + * 13、党建声音-新闻各类总数汇总 - 定时任务入参 + */ + private String newsSummary; + + /** + * 14、党建声音-新闻阅读参与趋势 - 定时任务入参 + */ + private String newsTrend; + + /** + * 15、党建声音-热度新闻排行 - 定时任务入参 + */ + private String newsHotRank; + + /** + * 16、党建声音-新闻按类别统计 - 定时任务入参 + */ + private String newsCategoryAnalysis; + + /** + * 17、邻里党群-各类总数汇总 - 定时任务入参 + */ + private String groupSummary; + + /** + * 18、邻里党群-小组详情 - 定时任务入参 + */ + private String groupDetail; + + /** + * 19、邻里党群-话题参与趋势 - 定时任务入参 + */ + private String groupTopicTrend; + + /** + * 09、党建引领|基层治理-居民(党员)积分排行榜 - 定时任务入参 + */ + private String partyUserRankData; +} diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java index 00bf4977..1f7947ec 100644 --- a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/AnalysisFeignClient.java @@ -104,4 +104,34 @@ public interface AnalysisFeignClient { @PostMapping("analysis/data/stats/indexcollect/deptgovrnability") Result deptGovernAbility(ScreenJobFormDTO formDto); + /** + * 014、组织层级 + * + * @return void + * @author Liuchuang + * @since 2020/9/17 14:01 + */ + @PostMapping("analysis/data/stats/screencoll/customeragency") + Result customerAgency(); + + /** + * 015、网格信息上传 + * + * @return void + * @author Liuchuang + * @since 2020/9/17 14:01 + */ + @PostMapping("analysis/data/stats/screencoll/customergrid") + Result customerGrid(); + + /** + * 016、部门信息上传 + * + * @return void + * @author Liuchuang + * @since 2020/9/17 14:02 + */ + @PostMapping("analysis/data/stats/screencoll/customerdept") + Result customerDept(); + } diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java index bf0b6895..83e40a95 100644 --- a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/feign/fallback/AnalysisFeignClientFallback.java @@ -54,4 +54,19 @@ public class AnalysisFeignClientFallback implements AnalysisFeignClient { return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "deptGovernAbility"); } + @Override + public Result customerAgency() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "customerAgency"); + } + + @Override + public Result customerGrid() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "customerGrid"); + } + + @Override + public Result customerDept() { + return ModuleUtils.feignConError(ServiceConstant.EPDC_ANALYSIS_SERVER, "customerDept"); + } + } diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTask.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTask.java new file mode 100644 index 00000000..f1f661e4 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTask.java @@ -0,0 +1,20 @@ +package com.elink.esua.epdc.task.screen; + +/** + * 大屏公共信息统计上报 + * + * @Author:liuchuang + * @Date:2020/9/17 13:56 + */ +public interface ScreenPublicDataPushTask { + + /** + * 大屏数据推送 + * + * @param param 入参 + * @return void + * @author Liuchuang + * @since 2020/9/9 15:21 + */ + void run(String param); +} diff --git a/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java new file mode 100644 index 00000000..8d8f5d43 --- /dev/null +++ b/esua-epdc/epdc-module/epdc-job/epdc-job-server/src/main/java/com/elink/esua/epdc/task/screen/ScreenPublicDataPushTaskImpl.java @@ -0,0 +1,113 @@ +package com.elink.esua.epdc.task.screen; + +import com.alibaba.fastjson.JSONObject; +import com.elink.esua.epdc.dto.ScreenJobBasicDataParamDTO; +import com.elink.esua.epdc.feign.AnalysisFeignClient; +import org.apache.commons.lang3.StringUtils; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Component; + +import java.util.concurrent.Callable; +import java.util.concurrent.ExecutorService; +import java.util.concurrent.Executors; +import java.util.concurrent.Future; + +/** + * 大屏公共信息统计上报 + * + * @Author:liuchuang + * @Date:2020/9/17 13:56 + */ +@Component("screenPublicDataPushTask") +public class ScreenPublicDataPushTaskImpl implements ScreenPublicDataPushTask { + + private final Logger logger = LoggerFactory.getLogger(getClass()); + + private static final ExecutorService service = Executors.newFixedThreadPool(100); + + @Autowired + private AnalysisFeignClient analysisFeignClient; + + @Override + public void run(String param) { + // 参数处理 + ScreenJobBasicDataParamDTO paramDto = new ScreenJobBasicDataParamDTO(); + if (StringUtils.isNotEmpty(param)) { + paramDto = JSONObject.parseObject(param, ScreenJobBasicDataParamDTO.class); + } + for(int i = 0 ; i < 3 ; i++){ + createThread(i, paramDto); + } + } + + public Integer createThread(Integer methodIndex, ScreenJobBasicDataParamDTO paramDto){ + Future future = service.submit(new Callable() { + @Override + public Integer call() throws Exception { + Thread.sleep(200); + if (methodIndex == 0) { + customerAgency(); + } else if (methodIndex == 1){ + customerGrid(); + } else if (methodIndex == 2){ + customerDept(); + } + return 0; + } + }); + Integer isSuccess = 0; + try { + isSuccess = future.get(); + }catch (Exception e){ + e.printStackTrace(); + } + return isSuccess; + } + + /** + * 014、组织层级 + * + * @return void + * @author Liuchuang + * @since 2020/9/17 14:01 + */ + public void customerAgency() { + // 方法名 + String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); + logger.info("<" + methodName + "|组织层级上传>定时任务开始执行"); + analysisFeignClient.customerAgency(); + logger.info("<" + methodName + "|组织层级上传>定时任务执行结束"); + } + + /** + * 015、网格信息上传 + * + * @return void + * @author Liuchuang + * @since 2020/9/17 14:01 + */ + public void customerGrid() { + // 方法名 + String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); + logger.info("<" + methodName + "|网格信息上传>定时任务开始执行"); + analysisFeignClient.customerGrid(); + logger.info("<" + methodName + "|网格信息上传>定时任务执行结束"); + } + + /** + * 016、部门信息上传 + * + * @return void + * @author Liuchuang + * @since 2020/9/17 14:02 + */ + public void customerDept() { + // 方法名 + String methodName = Thread.currentThread().getStackTrace()[2].getMethodName(); + logger.info("<" + methodName + "|部门信息上传>定时任务开始执行"); + analysisFeignClient.customerDept(); + logger.info("<" + methodName + "|部门信息上传>定时任务执行结束"); + } +}