diff --git a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java index 1003009805..1558df9b36 100644 --- a/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java +++ b/epmet-commons/epmet-commons-tools/src/main/java/com/epmet/commons/tools/redis/RedisKeys.java @@ -12,7 +12,6 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.utils.DateUtils; import org.apache.commons.lang3.StringUtils; -import org.apache.poi.ss.formula.functions.T; /** * @author Mark sunlightcs@gmail.com @@ -509,10 +508,6 @@ public class RedisKeys { return rootPrefix.concat("sys:cors"); } - public static String getProjectChangedMsgDistinceKey(String customerId) { - return rootPrefix.concat("project_changed:consume:").concat(customerId); - } - /** * desc:获取防重复提交redis key * @param key diff --git a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java index a77e2be2ad..a2bf983121 100644 --- a/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java +++ b/epmet-module/data-aggregator/data-aggregator-server/src/main/java/com/epmet/dataaggre/service/epmettduck/impl/PrUserProjectServiceImpl.java @@ -410,7 +410,7 @@ public class PrUserProjectServiceImpl extends BaseServiceImpl { - void deleteOldData(@Param("customerId") String customerId,@Param("dateId") String dateId); + void deleteOldData(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("projectId") String projectId); /** * @param customerId @@ -42,16 +42,16 @@ public interface FactOriginProjectCategoryDailyDao extends BaseDao selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId,@Param("subCount")Integer subCount,@Param("projectType")String projectType); + List selectListProjectCategoryGridDailyDTO(@Param("customerId") String customerId, @Param("subCount") Integer subCount, @Param("projectType") String projectType); /** - * @Description 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】 + * @Description 查询客户下,组织直接立项的,各项目分类下的项目数量【筛选组织创建的项目,fact_origin_project_main_daily表gridId为空】 * @Param orgIds * @author zxc * @date 2021/4/13 下午4:36 */ - List selectListProjectCategoryByOrg(@Param("orgIds")List orgIds,@Param("customerId") String customerId, - @Param("subCount") Integer subCount,@Param("projectType")String projectType); + List selectListProjectCategoryByOrg(@Param("orgIds") List orgIds, @Param("customerId") String customerId, + @Param("subCount") Integer subCount, @Param("projectType") String projectType); int deleteByProjectIds(@Param("list") List list); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java index 4fb104b4a1..15aee4e27c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectLogDailyDao.java @@ -36,95 +36,101 @@ import java.util.List; public interface FactOriginProjectLogDailyDao extends BaseDao { /** * 机关被吹哨次数 - * @author zhaoqifeng - * @date 2020/9/18 14:46 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/18 14:46 */ List selectAgencyTransferCount(@Param("customerId") String customerId, @Param("monthId") String monthId, - @Param("level")String level); + @Param("level") String level); /** - * @Description 查询未被退回的项目数 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/9/18 2:50 下午 - */ - List selectNotReturnProject(@Param("customerId") String customerId,@Param("monthId") String monthId,@Param("actionCode") String actionCode,@Param("orgType") String orgType); + * @param customerId + * @param monthId + * @Description 查询未被退回的项目数 + * @author zxc + * @date 2020/9/18 2:50 下午 + */ + List selectNotReturnProject(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("actionCode") String actionCode, @Param("orgType") String orgType); - List selectNotReturn(@Param("customerId")String customerId,@Param("monthId")String monthId); + List selectNotReturn(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @Description 查询项目评价信息 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/9/18 3:28 下午 - */ - List selectProjectEvaluate(@Param("customerId") String customerId,@Param("monthId") String monthId); + * @param customerId + * @param monthId + * @Description 查询项目评价信息 + * @author zxc + * @date 2020/9/18 3:28 下午 + */ + List selectProjectEvaluate(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @Description 网格项目自治率查询 - * @param customerId - * @param monthId - * @author zxc - * @date 2020/9/18 5:25 下午 - */ - List selectProjectAutoNoMy(@Param("customerId") String customerId,@Param("monthId") String monthId); - /** - * @Description 网格项目自治率查询 最新版 - * @Param customerId - * @Param monthId - * @author zxc - * @date 2021/4/12 上午10:46 - */ - List selectProjectAutoNoMyPlus(@Param("customerId") String customerId,@Param("monthId") String monthId); + * @param customerId + * @param monthId + * @Description 网格项目自治率查询 + * @author zxc + * @date 2020/9/18 5:25 下午 + */ + List selectProjectAutoNoMy(@Param("customerId") String customerId, @Param("monthId") String monthId); + + /** + * @Description 网格项目自治率查询 最新版 + * @Param customerId + * @Param monthId + * @author zxc + * @date 2021/4/12 上午10:46 + */ + List selectProjectAutoNoMyPlus(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * 根据日期删除数据 - * @author zhaoqifeng - * @date 2020/9/18 17:32 + * 根据日期删除数据 + * * @param customerId - * @param date - * @return void - */ - void deleteByDate(@Param("customerId") String customerId, @Param("date") String date); + * @param date + * @param projectId + * @return void + * @author zhaoqifeng + * @date 2020/9/18 17:32 + */ + void deleteByDate(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** - * 办结项目满意度 - * @author zhaoqifeng - * @date 2020/9/20 16:44 - * @param customerId - * @param monthId - * @param level - * @return java.util.List - */ + * 办结项目满意度 + * + * @param customerId + * @param monthId + * @param level + * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/20 16:44 + */ List selectSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId, - @Param("level")String level); + @Param("level") String level); /** * 区直部门被吹哨次数 - * @author zhaoqifeng - * @date 2020/9/18 14:46 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/18 14:46 */ List selectDepTransferCount(@Param("customerId") String customerId, @Param("monthId") String monthId, - @Param("level")String level); + @Param("level") String level); /** - * @Description 查询各项目处理了多少机关 * @param agencies * @return + * @Description 查询各项目处理了多少机关 * @author wangc * @date 2020.09.20 23:46 - **/ - List selectProjectParticipatedAgency(@Param("agencies") List agencies, @Param("customerId") String customerId,@Param("dimId") String dimId); + **/ + List selectProjectParticipatedAgency(@Param("agencies") List agencies, @Param("customerId") String customerId, @Param("dimId") String dimId); /*** * @Description 评价周期内被吹哨项目数 @@ -134,8 +140,9 @@ public interface FactOriginProjectLogDailyDao extends BaseDao * @author wangc * @date 2020.10.15 11:20 - */ - List selectAgencyWhistledCount(@Param("agencies") List agencies, @Param("customerId") String customerId,@Param("dimId") String dimId); + */ + List selectAgencyWhistledCount(@Param("agencies") List agencies, @Param("customerId") String customerId, @Param("dimId") String dimId); + /*** * @Description 评价周期内被吹哨且被办结(无论是哪一级办结)的项目数 * @param agencies @@ -144,175 +151,192 @@ public interface FactOriginProjectLogDailyDao extends BaseDao * @author wangc * @date 2020.10.16 10:43 - */ - List selectWhistledAgencyClosedProjectCount(@Param("agencies") List agencies, @Param("customerId") String customerId,@Param("dimId") String dimId); + */ + List selectWhistledAgencyClosedProjectCount(@Param("agencies") List agencies, @Param("customerId") String customerId, @Param("dimId") String dimId); + /*** * @Description 查询机关办结次数 * @param agencies * @return java.util.List * @author wangc * @date 2020.10.14 10:27 - */ - List selectAgencyHandledProjectCount(@Param("agencies") List agencies,@Param("customerId") String customerId,@Param("dimId") String dimId); + */ + List selectAgencyHandledProjectCount(@Param("agencies") List agencies, @Param("customerId") String customerId, @Param("dimId") String dimId); + /** - * @Description 查询评价周期内各级别机关办结的项目Id * @param customerId * @param dimId * @return java.util.List + * @Description 查询评价周期内各级别机关办结的项目Id * @author wangc * @date 2020.10.15 17:29 - */ - List selectProjectIdHandledByAgency(@Param("customerId") String customerId,@Param("dimId") String dimId); + */ + List selectProjectIdHandledByAgency(@Param("customerId") String customerId, @Param("dimId") String dimId); /** - * @Description 计算每个办结项目的总耗时 * @param projectIds * @return java.util.List + * @Description 计算每个办结项目的总耗时 * @author wangc * @date 2020.10.15 17:32 - */ + */ List selectProjectCostTime(@Param("projectIds") List projectIds); + /** * 网格项目响应度 - * @author zhaoqifeng - * @date 2020/9/25 10:01 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 10:01 */ List selectGridResponse(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 组织项目响应度 - * @author zhaoqifeng - * @date 2020/9/25 10:01 + * * @param customerId * @param dateId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 10:01 */ List selectOrgResponseDaily(@Param("customerId") String customerId, @Param("dateId") String dateId, - @Param("level")String level); + @Param("level") String level); /** * 网格项目响应度 - * @author zhaoqifeng - * @date 2020/9/25 10:01 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 10:01 */ List selectGridResponseDaily(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 组织项目响应度 - * @author zhaoqifeng - * @date 2020/9/25 10:01 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 10:01 */ - List selectOrgResponse(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("level")String level); + List selectOrgResponse(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("level") String level); /** * 网格满意率 - * @author zhaoqifeng - * @date 2020/9/27 15:52 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/27 15:52 */ List selectGridSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 组织满意率 - * @author zhaoqifeng - * @date 2020/9/27 15:52 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/27 15:52 */ List selectOrgSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId, - @Param("level")String level); + @Param("level") String level); /** * 网格满意率 - * @author zhaoqifeng - * @date 2020/9/27 15:52 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/27 15:52 */ List selectGridSatisfactionDaily(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 组织满意率 - * @author zhaoqifeng - * @date 2020/9/27 15:52 + * * @param customerId * @param level * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/27 15:52 */ - List selectOrgSatisfactionDaily(@Param("customerId") String customerId, @Param("level")String level, @Param("dateId") String dateId); + List selectOrgSatisfactionDaily(@Param("customerId") String customerId, @Param("level") String level, @Param("dateId") String dateId); /** * 获取部门办结项目数 - * @author zhaoqifeng - * @date 2020/10/16 17:09 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/10/16 17:09 */ List selectDeptClosedProject(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 部门办结项目满意度 - * @author zhaoqifeng - * @date 2020/9/20 16:44 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/20 16:44 */ List selectDeptSatisfaction(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 网格结案率统计 - * @author zhaoqifeng - * @date 2020/9/20 16:44 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/20 16:44 */ List selectGridClosed(@Param("customerId") String customerId, @Param("monthId") String monthId); + List selectAgencyClosed(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 网格自治率统计--按天 - * @author zhaoqifeng - * @date 2021/5/24 17:53 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/24 17:53 */ List selectGridSelfDaily(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 组织网格自治率统计--按天 - * @author zhaoqifeng - * @date 2021/5/24 17:53 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/24 17:53 */ List selectAgencyGridSelfDaily(@Param("customerId") String customerId, @Param("dateId") String dateId); /** - * @return java.util.List * @param projectId + * @return java.util.List * @author yinzuomei * @description 根据项目id, 查询处理明细 * @Date 2021/5/27 12:58 @@ -320,8 +344,8 @@ public interface FactOriginProjectLogDailyDao extends BaseDao selectListByProjectId(String projectId); /** - * @return com.epmet.dto.extract.FactOriginProjectLogDailyDTO * @param projectId + * @return com.epmet.dto.extract.FactOriginProjectLogDailyDTO * @author yinzuomei * @description 查询某一个项目的结案操作明细 * @Date 2021/5/27 12:58 @@ -330,56 +354,67 @@ public interface FactOriginProjectLogDailyDao extends BaseDao + * @author zhaoqifeng + * @date 2021/7/5 17:00 */ List getProjectResponseCount(@Param("customerId") String customerId, @Param("dateId") String dateId); + /** * 项目响应增量 - * @author zhaoqifeng - * @date 2021/7/5 17:01 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 17:01 */ List getProjectResponseIncr(@Param("customerId") String customerId, @Param("dateId") String dateId); + /** * 项目吹哨数 - * @author zhaoqifeng - * @date 2021/7/5 17:01 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 17:01 */ List getProjectTransferCount(@Param("customerId") String customerId, @Param("dateId") String dateId); + /** * 项目吹哨数增量 - * @author zhaoqifeng - * @date 2021/7/5 17:01 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 17:01 */ List getProjectTransferIncr(@Param("customerId") String customerId, @Param("dateId") String dateId); + /** * 项目结案数 - * @author zhaoqifeng - * @date 2021/7/5 17:01 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 17:01 */ List getProjectClosedCount(@Param("customerId") String customerId, @Param("dateId") String dateId); + /** * 项目结案数增量 - * @author zhaoqifeng - * @date 2021/7/5 17:01 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 17:01 */ List getProjectClosedIncr(@Param("customerId") String customerId, @Param("dateId") String dateId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java index 7e8311778c..dad541fcfb 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/evaluationindex/extract/FactOriginProjectMainDailyDao.java @@ -47,53 +47,59 @@ public interface FactOriginProjectMainDailyDao extends BaseDao + * @author zhaoqifeng + * @date 2020/9/17 14:32 */ List getProjectByCustomer(@Param("customerId") String customerId); /** * 获取未结案的项目 - * @author zhaoqifeng - * @date 2020/9/17 14:32 + * * @param customerId + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/17 14:32 */ - List getPendingList(@Param("customerId") String customerId); + List getPendingList(@Param("customerId") String customerId, @Param("projectId") String projectId); /** * 项目超期数 - * @author zhaoqifeng - * @date 2020/9/18 16:28 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/18 16:28 */ List selectOverdueCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @Description 网格办结项目数 * @param gridIds * @param monthId * @param status + * @Description 网格办结项目数 * @author zxc * @date 2020/9/18 2:06 下午 */ - List selectGridClosedProject(@Param("gridIds") List gridIds,@Param("monthId") String monthId,@Param("status") String status); + List selectGridClosedProject(@Param("gridIds") List gridIds, @Param("monthId") String monthId, @Param("status") String status); - List selectTransferRightRatio(@Param("customerId")String customerId, @Param("monthId")String monthId); + List selectTransferRightRatio(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 根据日期删除数据 - * @author zhaoqifeng - * @date 2020/9/18 17:32 + * * @param customerId * @param date + * @param projectId * @return void + * @author zhaoqifeng + * @date 2020/9/18 17:32 */ - void deleteByDate(@Param("customerId") String customerId, @Param("date") String date); + void deleteByDate(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** * @param customerId @@ -105,287 +111,294 @@ public interface FactOriginProjectMainDailyDao extends BaseDao selectShiftProjectCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @return java.lang.Integer * @param customerId * @param monthId * @param topicIdList + * @return java.lang.Integer * @author yinzuomei * @description 9、自建群活跃度——议题转项目率 用 * @Date 2020/9/20 22:27 **/ - Integer selectCountByPartyUser(@Param("customerId") String customerId, @Param("monthId")String monthId, @Param("list")List topicIdList); + Integer selectCountByPartyUser(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("list") List topicIdList); /** - * @return java.lang.Integer * @param customerId * @param gridId * @param communityId - * @param closedStatus :resolved unresolved + * @param closedStatus :resolved unresolved * @param projectStatus :pending closed - * @param isParty 是否是党员 1:是 + * @param isParty 是否是党员 1:是 + * @return java.lang.Integer * @author yinzuomei * @description 具体某个网格或者社区内的项目 * @Date 2020/9/23 18:18 **/ - Integer getGridOrCommunityClosedProjectTotal(@Param("customerId")String customerId, - @Param("gridId") String gridId, - @Param("communityId") String communityId, - @Param("closedStatus") String closedStatus, - @Param("projectStatus") String projectStatus, - @Param("isParty")String isParty); + Integer getGridOrCommunityClosedProjectTotal(@Param("customerId") String customerId, + @Param("gridId") String gridId, + @Param("communityId") String communityId, + @Param("closedStatus") String closedStatus, + @Param("projectStatus") String projectStatus, + @Param("isParty") String isParty); /** - * @return int - * @param customerId - * @param agencyPath - * @param closedStatus :resolved unresolved + * @param customerId + * @param agencyPath + * @param closedStatus :resolved unresolved * @param projectStatus :pending closed - * @param isParty 是否是党员 1:是 - * @author yinzuomei - * @description 组织下:已解决项目 or 已结案项目总数 - * @Date 2020/9/24 17:38 - **/ + * @param isParty 是否是党员 1:是 + * @return int + * @author yinzuomei + * @description 组织下:已解决项目 or 已结案项目总数 + * @Date 2020/9/24 17:38 + **/ int getAgencyClosedProjectTotal(@Param("customerId") String customerId, - @Param("agencyPath")String agencyPath, - @Param("closedStatus")String closedStatus, + @Param("agencyPath") String agencyPath, + @Param("closedStatus") String closedStatus, @Param("projectStatus") String projectStatus, @Param("isParty") String isParty); /** * 组织自治项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getSelfProject(@Param("customerId") String customerId, @Param("monthId")String monthId, + List getSelfProject(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("level") String level); /** * 组织自治项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param dateId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getSelfProjectDaily(@Param("customerId") String customerId, @Param("dateId")String dateId, - @Param("level") String level); + List getSelfProjectDaily(@Param("customerId") String customerId, @Param("dateId") String dateId, + @Param("level") String level); /** * 组织解决项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getResolveProject(@Param("customerId") String customerId, @Param("monthId")String monthId, - @Param("level") String level); + List getResolveProject(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level") String level); /** * 组织解决项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param dateId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getResolveProjectDaily(@Param("customerId") String customerId, @Param("dateId")String dateId, - @Param("level") String level); + List getResolveProjectDaily(@Param("customerId") String customerId, @Param("dateId") String dateId, + @Param("level") String level); /** * 网格解决项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getGridResolveProject(@Param("customerId") String customerId, @Param("monthId")String monthId); + List getGridResolveProject(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 网格解决项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getGridResolveProjectDaily(@Param("customerId") String customerId, @Param("dateId")String dateId); + List getGridResolveProjectDaily(@Param("customerId") String customerId, @Param("dateId") String dateId); /** - * @Description 查询难点赌点的基本信息,要排除之前已经结案过的项目 * @param customerId - * @return java.util.List + * @Description 查询难点赌点的基本信息,要排除之前已经结案过的项目 * @author wangc * @date 2020.09.28 10:19 - */ - List selectDifficultyBaseInfo(@Param("customerId")String customerId,@Param("thresholdValue") Integer thresholdValue); + */ + List selectDifficultyBaseInfo(@Param("customerId") String customerId, @Param("thresholdValue") Integer thresholdValue); /** - * @Description 查询评价周期内新立的项目,是为了增量新增难点赌点的图片库 * @param customerId * @return java.util.List + * @Description 查询评价周期内新立的项目,是为了增量新增难点赌点的图片库 * @author wangc * @date 2020.09.28 11:15 - */ - List selectNewProject(@Param("customerId") String customerId, @Param("list")List list); + */ + List selectNewProject(@Param("customerId") String customerId, @Param("list") List list); /** * 网格解决项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param monthId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getGridProjectCount(@Param("customerId") String customerId, @Param("monthId")String monthId); + List getGridProjectCount(@Param("customerId") String customerId, @Param("monthId") String monthId); /** * 组织解决项目数 - * @author zhaoqifeng - * @date 2020/9/25 15:16 + * * @param customerId * @param monthId * @param level * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/25 15:16 */ - List getOrgProjectCount(@Param("customerId") String customerId, @Param("monthId")String monthId, - @Param("level") String level); + List getOrgProjectCount(@Param("customerId") String customerId, @Param("monthId") String monthId, + @Param("level") String level); /** - * @Description 查询项目总数 + * @Description 查询项目总数 * @Param customerId * @Param dateId * @author zxc * @date 2021/1/28 下午4:01 */ - List selectProjectTotal(@Param("customerId")String customerId, @Param("dateId")String dateId, @Param("monthId")String monthId); + List selectProjectTotal(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("monthId") String monthId); /** - * @Description 组织查询项目总数 + * @Description 组织查询项目总数 * @Param orgIds * @Param dateId * @Param monthId * @author zxc * @date 2021/4/13 上午9:31 */ - List selectProjectTotalByOrg(@Param("orgIds")List orgIds, @Param("dateId")String dateId, @Param("monthId")String monthId); + List selectProjectTotalByOrg(@Param("orgIds") List orgIds, @Param("dateId") String dateId, @Param("monthId") String monthId); /** - * @Description 查询已解决项目数 + * @Description 查询已解决项目数 * @Param customerId * @Param dateId * @author zxc * @date 2021/1/28 下午4:15 */ - List selectResolvedNum(@Param("customerId")String customerId, @Param("dateId")String dateId); + List selectResolvedNum(@Param("customerId") String customerId, @Param("dateId") String dateId); /** - * @Description 组织查询已解决项目数 + * @Description 组织查询已解决项目数 * @Param orgIds * @Param dateId * @author zxc * @date 2021/4/13 上午9:41 */ - List selectResolvedNumByOrg(@Param("orgIds")List orgIds, @Param("dateId")String dateId); + List selectResolvedNumByOrg(@Param("orgIds") List orgIds, @Param("dateId") String dateId); /** - * @Description 查询 满意度评价次数 + * @Description 查询 满意度评价次数 * @Param customerId * @Param dateId * @author zxc * @date 2021/1/29 上午9:10 */ - List selectEvaluateCount(@Param("customerId")String customerId, @Param("dateId")String dateId, @Param("activeCodes") List activeCodes); + List selectEvaluateCount(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("activeCodes") List activeCodes); /** - * @Description 组织 查询 满意度评价次数 + * @Description 组织 查询 满意度评价次数 * @Param orgIds * @Param dateId * @Param activeCodes * @author zxc * @date 2021/4/13 上午9:56 */ - List selectEvaluateCountByOrg(@Param("orgIds")List orgIds, @Param("dateId")String dateId, @Param("activeCodes")List activeCodes); + List selectEvaluateCountByOrg(@Param("orgIds") List orgIds, @Param("dateId") String dateId, @Param("activeCodes") List activeCodes); /** - * @Description 查询本月新增项目数 + * @Description 查询本月新增项目数 * @Param customerId * @Param monthId * @author zxc * @date 2021/1/29 下午2:31 */ - List selectProjectIncr(@Param("customerId")String customerId, @Param("monthId")String monthId); + List selectProjectIncr(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @Description 组织查询本月新增项目数 + * @Description 组织查询本月新增项目数 * @Param orgIds * @Param monthId * @author zxc * @date 2021/4/16 上午9:21 */ - List selectProjectIncrByOrg(@Param("orgIds") List orgIds, @Param("monthId")String monthId); + List selectProjectIncrByOrg(@Param("orgIds") List orgIds, @Param("monthId") String monthId); /** - * @Description 根据状态查询项目数 + * @Description 根据状态查询项目数 * @Param customerId * @Param monthId * @Param status * @author zxc * @date 2021/1/29 下午3:25 */ - List selectProjectCount(@Param("customerId")String customerId, @Param("monthId")String monthId, @Param("status") String status); + List selectProjectCount(@Param("customerId") String customerId, @Param("monthId") String monthId, @Param("status") String status); /** - * @Description 组织根据状态查询项目数 + * @Description 组织根据状态查询项目数 * @Param orgIds * @Param monthId * @Param status * @author zxc * @date 2021/4/16 上午9:26 */ - List selectProjectCountByOrg(@Param("orgIds") List orgIds, @Param("monthId")String monthId, @Param("status") String status); + List selectProjectCountByOrg(@Param("orgIds") List orgIds, @Param("monthId") String monthId, @Param("status") String status); /** - * @Description 本月新增结案项目数 + * @Description 本月新增结案项目数 * @Param customerId * @Param monthId * @author zxc * @date 2021/2/1 上午9:25 */ - List selectClosedIncr(@Param("customerId")String customerId, @Param("monthId")String monthId); + List selectClosedIncr(@Param("customerId") String customerId, @Param("monthId") String monthId); /** - * @Description 组织本月新增结案项目数 + * @Description 组织本月新增结案项目数 * @Param orgIds * @Param monthId * @author zxc * @date 2021/4/16 上午9:35 */ - List selectClosedIncrByOrg(@Param("orgIds") List orgIds, @Param("monthId")String monthId); + List selectClosedIncrByOrg(@Param("orgIds") List orgIds, @Param("monthId") String monthId); /** + * @param customerId + * @param dateId + * @return java.util.List * @Description 初始化screen_project_data数据 * 如果是dateId不为空,则查询前一天的数据 * 否则全查(适用于首次初始化的场景) - * + *

* 这是只查询指定天新增的项目,对于需要更新状态的项目,对历史数据(流转中的项目)进行遍历查询 - * @param customerId - * @param dateId - * @return java.util.List * @author wangc * @date 2021.03.04 22:56 - */ - List initNewScreenProjectData(@Param("customerId")String customerId,@Param("dateId") String dateId,@Param("dataEndTime")String dataEndTime); + */ + List initNewScreenProjectData(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("dataEndTime") String dataEndTime, @Param("projectId") String projectId); /** * desc: 获取难点堵点项目数据 @@ -414,41 +427,45 @@ public interface FactOriginProjectMainDailyDao extends BaseDao + * @author zhaoqifeng + * @date 2021/5/17 15:02 */ List selectPartyMemberProjectStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 获取组织级别党员发布话题转项目统计 - * @author zhaoqifeng - * @date 2021/5/17 15:03 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/17 15:03 */ List selectPartyMemberProjectStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 获取组织级别党员发布话题结案统计 - * @author zhaoqifeng - * @date 2021/5/17 15:02 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/17 15:02 */ List selectPartyMemberClosedProjectStaticByAgency(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 获取组织级别党员发布话题结案统计 - * @author zhaoqifeng - * @date 2021/5/17 15:03 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/17 15:03 */ List selectPartyMemberClosedProjectStaticByGrid(@Param("customerId") String customerId, @Param("dateId") String dateId); @@ -465,69 +482,73 @@ public interface FactOriginProjectMainDailyDao extends BaseDao selectGroupByGrid(@Param("customerId")String customerId, - @Param("gridIds")List gridIds, - @Param("projectStatus")String projectStatus, - @Param("origin")String origin, - @Param("isResolved")String isResolved); + List selectGroupByGrid(@Param("customerId") String customerId, + @Param("gridIds") List gridIds, + @Param("projectStatus") String projectStatus, + @Param("origin") String origin, + @Param("isResolved") String isResolved); /** * 获取组织已结案项目 - * @author zhaoqifeng - * @date 2021/5/26 15:11 + * * @param customerId * @param dateId * @param closedStatus * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/26 15:11 */ List selectAgencyClosedProjectCount(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param( "closedStatus") String closedStatus, @Param("origin") String origin); /** * 组织结案项目统计 - * @author zhaoqifeng - * @date 2021/5/27 14:51 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/5/27 14:51 */ List selectAgencyClosedProjectStaticDaily(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 当前网格内已结案的项目 * - * @author zhaoqifeng - * @date 2021/5/26 15:09 * @param customerId * @param gridId * @param projectStatus 状态:待处理 pending,结案closed - * @param origin 项目来源 来源:议题issue 组织agency - * @param isResolved unresolved,resolved + * @param origin 项目来源 来源:议题issue 组织agency + * @param isResolved unresolved,resolved * @return com.epmet.entity.evaluationindex.extract.GovernProjectInfoDTO + * @author zhaoqifeng + * @date 2021/5/26 15:09 */ - List getGridClosedProjectList(@Param("customerId")String customerId, + List getGridClosedProjectList(@Param("customerId") String customerId, @Param("gridId") String gridId, - @Param("projectStatus")String projectStatus, + @Param("projectStatus") String projectStatus, @Param("origin") String origin, - @Param("isResolved")String isResolved); + @Param("isResolved") String isResolved); /** * 获取项目立项数 - * @author zhaoqifeng - * @date 2021/7/5 14:49 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 14:49 */ - List getMemberProjectCountIncr(@Param("customerId")String customerId, @Param("dateId") String dateId); + List getMemberProjectCountIncr(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 获取项目立项数 - * @author zhaoqifeng - * @date 2021/7/5 14:49 + * * @param customerId * @param dateId * @return java.util.List + * @author zhaoqifeng + * @date 2021/7/5 14:49 */ - List getMemberProjectCount(@Param("customerId")String customerId, @Param("dateId") String dateId); + List getMemberProjectCount(@Param("customerId") String customerId, @Param("dateId") String dateId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java index 814caa647e..f090c31a71 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectDao.java @@ -94,11 +94,12 @@ public interface ProjectDao extends BaseDao { * * @param customerId * @param date + * @param projectId * @return java.util.List * @author zhaoqifeng * @date 2020/9/15 16:13 */ - List selectProjectInfo(@Param("customerId") String customerId, @Param("date") String date); + List selectProjectInfo(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** * 获取用户可滞留天数 @@ -139,16 +140,18 @@ public interface ProjectDao extends BaseDao { List getProjectCategoryData(@Param("customerId") String customerId, @Param("dateId") String dateId); - List selectProjectCategoryData(@Param("customerId") String customerId, @Param("dateId") String dateId); + List selectProjectCategoryData(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("projectId") String projectId); + /** * 获取项目满意度 * * @param customerId + * @param projectId * @return java.util.List * @author zhaoqifeng * @date 2021/5/21 10:06 */ - List selectProjectSatisfaction(@Param("customerId") String customerId); + List selectProjectSatisfaction(@Param("customerId") String customerId, @Param("projectId") String projectId); /** * 根据key查找value @@ -170,8 +173,8 @@ public interface ProjectDao extends BaseDao { * @param projectId * @return 得分 */ - BigDecimal selectProjectSatisfactionScore(@Param("customerId")String customerId, - @Param("projectId")String projectId); + BigDecimal selectProjectSatisfactionScore(@Param("customerId") String customerId, + @Param("projectId") String projectId); /** * 查询当天(dateId)有评价记录的项目id @@ -180,7 +183,7 @@ public interface ProjectDao extends BaseDao { * @param dateId * @return */ - List selectEvaluateProjectIds(@Param("customerId") String customerId, @Param("dateId")String dateId); + List selectEvaluateProjectIds(@Param("customerId") String customerId, @Param("dateId") String dateId); /** * 可根据状态筛选项目id @@ -189,14 +192,15 @@ public interface ProjectDao extends BaseDao { * @param projectStatus 状态:待处理 pending,结案closed * @return */ - List selectClosedProjectIds(@Param("customerId")String customerId, - @Param("origin")String origin, - @Param("projectStatus")String projectStatus); + List selectClosedProjectIds(@Param("customerId") String customerId, + @Param("origin") String origin, + @Param("projectStatus") String projectStatus); /** * 获取已转项目事件事件 + * * @param customerId * @return */ - List getEventList(@Param("customerId")String customerId); + List getEventList(@Param("customerId") String customerId); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java index f9647a4fe0..559e02070a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/dao/project/ProjectProcessDao.java @@ -46,137 +46,152 @@ public interface ProjectProcessDao extends BaseDao { /** * @param projectEntity * @Author sun - * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy-mm-dd格式字段值) + * @Description 查询客户项目处理进展表中是创建项目和结案两种进展的有效数据(创建日期截取yyyy - mm - dd格式字段值) **/ List selectProcessList(ProjectEntity projectEntity); /** * 根据客户查询项目处理进展 - * @author zhaoqifeng - * @date 2020/9/16 15:18 + * * @param customerId * @param date + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/16 15:18 */ - List selectProcessListByCustomer(@Param("customerId") String customerId, @Param("date") String date); + List selectProcessListByCustomer(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** * 根据客户查询响应节点 - * @author zhaoqifeng - * @date 2020/9/16 15:18 + * * @param customerId * @param date + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/16 15:18 */ - List selectResponseProcessList(@Param("customerId") String customerId, @Param("date") String date); + List selectResponseProcessList(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** * 查询各个节点的受理人 - * @author zhaoqifeng - * @date 2020/9/17 10:54 + * * @param customerId * @param date + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/17 10:54 */ - List selectProcessStaffByCustomer(@Param("customerId") String customerId, @Param("date") String date); + List selectProcessStaffByCustomer(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** * 获取满意度评价记录 - * @author zhaoqifeng - * @date 2020/9/17 14:44 + * * @param customerId * @param date + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/17 14:44 */ - List selectSatisfactionRecordByCustomer(@Param("customerId") String customerId, @Param("date") String date); + List selectSatisfactionRecordByCustomer(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** * 获取已结案的项目列表 - * @author zhaoqifeng - * @date 2020/9/17 14:44 + * * @param customerId * @param date + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/17 14:44 */ - List selectClosedProjectList(@Param("customerId") String customerId, @Param("date") String date); + List selectClosedProjectList(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); + /** - * @Description 查询项目-机关各个节点历时详情 * @param customerId - * @param projectStatus 项目状态 pending closed 如果是null则全查 + * @param projectStatus 项目状态 pending closed 如果是null则全查 * @param dateId * @return + * @Description 查询项目-机关各个节点历时详情 * @author wangc * @date 2020.09.17 09:43 - **/ - List selectProjectOrgPeriod(@Param("customerId") String customerId,@Param("projectStatus")String projectStatus,@Param("dateId") String dateId); + **/ + List selectProjectOrgPeriod(@Param("customerId") String customerId, @Param("projectStatus") String projectStatus, @Param("dateId") String dateId); /** - * @Description 根据项目业务改造,在数据抽取时,直接查询出项目节点的耗时 * @param * @return java.util.List + * @Description 根据项目业务改造,在数据抽取时,直接查询出项目节点的耗时 * @author wangc * @date 2020.10.23 11:13 - */ - List selectProjectOrgPeriodDirectly(@Param("customerId") String customerId,@Param("projectStatus")String projectStatus,@Param("dateId") String dateId); + */ + List selectProjectOrgPeriodDirectly(@Param("customerId") String customerId, @Param("projectId") String projectId); /** - * @Description 查询项目-机关各个节点的响应列表 * @param projects * @return + * @Description 查询项目-机关各个节点的响应列表 * @author wangc * @date 2020.09.17 17:56 - **/ + **/ List selectResponseTrace(@Param("projects") List projects); /** - * @Description 查询项目的节点 * @param projects * @return java.util.List + * @Description 查询项目的节点 * @author wangc * @date 2020.10.23 17:02 - */ + */ List selectProjectProcess(@Param("projects") List projects); /** * 获取办结组织 - * @author zhaoqifeng - * @date 2020/9/18 18:01 + * * @param customerId * @param date + * @param projectId * @return java.util.List + * @author zhaoqifeng + * @date 2020/9/18 18:01 */ - List selectFinishOrg(@Param("customerId") String customerId, @Param("date") String date); + List selectFinishOrg(@Param("customerId") String customerId, @Param("date") String date, @Param("projectId") String projectId); /** - * @Description 查找项目最近一次操作说明 * @param list * @return java.util.List + * @Description 查找项目最近一次操作说明 * @author wangc * @date 2020.09.28 14:45 - */ - List selectLatestOperation(@Param("list") List list,@Param("customerId") String customerId); + */ + List selectLatestOperation(@Param("list") List list, @Param("customerId") String customerId); /** - * @Description 查找指定日期结案的项目 * @param customerId * @param dateId * @return java.util.List + * @Description 查找指定日期结案的项目 * @author wangc * @date 2021.03.09 10:49 - */ + */ List selectClosedProjectOnAppointedDay(@Param("customerId") String customerId, @Param("dateId") String dateId); - List selectClosedProjectByProjectIds(@Param("list")List list); + List selectClosedProjectByProjectIds(@Param("list") List list); + /** - * @Description 统计新增项目节点以及被流转到的指向部门 * @param customerId * @param dateId * @param dataEndTime * @return java.util.List + * @Description 统计新增项目节点以及被流转到的指向部门 * @author wangc * @date 2021.03.09 16:25 - */ - List selectProjectProcessAndDirection(@Param("customerId") String customerId, @Param("dateId") String dateId, @Param("dataEndTime")String dataEndTime ); + */ + List selectProjectProcessAndDirection(@Param("customerId") String customerId, @Param("dateId") String dateId, + @Param("dataEndTime") String dataEndTime, @Param("projectId") String projectId); - List selectProcessAttachment(@Param("list")List list); -} \ No newline at end of file + List selectProcessAttachment(@Param("list") List list); +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java index 94a298d514..a09e63861c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/mq/ProjectChangedCustomListener.java @@ -87,21 +87,12 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently redisUtils = SpringContextUtils.getBean(RedisUtils.class); } - String redisKey = RedisKeys.getProjectChangedMsgDistinceKey(msgObj.getCustomerId()); - if (redisUtils.get(redisKey) == null) { - // 该线程启动消费之后,其他线程再收到该客户id的消费请求,则不消费 - redisUtils.set(redisKey, msg, 30); - try { - consumeMessage(msgObj); - } catch (Exception e) { - // 如果消费失败了,清楚该key,收到消息之后可以继续消费 - redisUtils.delete(redisKey); - throw e; - } - log.info("消费了项目变动消息,customer id:{}", msgObj.getCustomerId()); - } else { - log.info("该客户的项目变动消息刚刚消费,请等待30秒,customer id:{}", msgObj.getCustomerId()); + try { + consumeMessage(msgObj); + } catch (Exception e) { + throw e; } + log.info("消费了项目变动消息,customer id:{}", msgObj.getCustomerId()); if (org.apache.commons.lang.StringUtils.isNotBlank(pendingMsgLabel)) { try { @@ -136,6 +127,7 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently String dateId = DimIdGenerator.getDateDimId(new Date()); extractOriginFormDTO.setDateId(dateId); + extractOriginFormDTO.setObjectId(msgObj.getProjectId()); Future aBoolean = SpringContextUtils.getBean(FactOriginExtractService.class).submitProjectRelationData(extractOriginFormDTO,null); try { Object o = aBoolean.get(); @@ -150,7 +142,7 @@ public class ProjectChangedCustomListener implements MessageListenerConcurrently // 【screen_project_process_attachment】 // 【screen_project_img_data】 // 【screen_project_process】这四个表 - SpringContextUtils.getBean(ScreenExtractService.class).extractPartData(customerId,dateId); + SpringContextUtils.getBean(ScreenExtractService.class).extractPartData(customerId, dateId, msgObj.getProjectId()); } logger.info("consumer projectChanged msg success,{}",aBoolean); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java index b3b50560f6..0dca827c0a 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectLogDailyService.java @@ -132,9 +132,10 @@ public interface FactOriginProjectLogDailyService extends BaseService getProjectHandledAgency(List agencies, String customerId, String dimId); - + /** * @Description 办结率 * @param agencies @@ -344,7 +345,7 @@ public interface FactOriginProjectLogDailyService extends BaseService> */ Map> getProjectClosedCount(String customerId, String dateId, Integer type); -} \ No newline at end of file +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java index 056de60e3e..515befcf9d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/FactOriginProjectMainDailyService.java @@ -58,9 +58,10 @@ public interface FactOriginProjectMainDailyService extends BaseService */ - List getPendingList(String customerId); + List getPendingList(String customerId, String projectId); /** * @Description 网格办结项目数 @@ -90,9 +91,10 @@ public interface FactOriginProjectMainDailyService extends BaseService initNewScreenProjectData(String customerId,Integer rows ,String dateId); + List initNewScreenProjectData(String customerId,Integer rows ,String dateId, String projectId); void computerIfExceed(List list,Integer exceedLimit,Integer about2exceedLimit); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java index 28a57a5b3c..845fac75c6 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectCategoryDailyServiceImpl.java @@ -24,7 +24,6 @@ import com.epmet.commons.tools.constant.NumConstant; import com.epmet.commons.tools.constant.StrConstant; import com.epmet.constant.DataSourceConstant; import com.epmet.constant.PingYinConstant; -import com.epmet.constant.PingYinConstants; import com.epmet.dao.evaluationindex.extract.FactOriginProjectCategoryDailyDao; import com.epmet.dto.ProjectCategoryDTO; import com.epmet.dto.extract.form.ExtractOriginFormDTO; @@ -70,6 +69,7 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl entities = new ArrayList<>(); Integer count = baseDao.selectCount(new QueryWrapper().eq("customer_id",customerId)); //如果count = 0 初始化该customer所有数据 @@ -78,7 +78,7 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl projectCategoryData = projectService.getProjectCategoryData(customerId, dateString); - List projectCategoryData = projectService.queryProjectCategoryData(customerId, dateString); + List projectCategoryData = projectService.queryProjectCategoryData(customerId, dateString, projectId); HashSet projectIdSet=new HashSet<>(); if (!CollectionUtils.isEmpty(projectCategoryData)){ projectCategoryData.forEach(data->{ @@ -103,13 +103,13 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl projectIdList = new ArrayList(projectIdSet); - List> partionList= ListUtils.partition(projectIdList, 100); + List> partionList= ListUtils.partition(projectIdList, NumConstant.ONE_HUNDRED); partionList.forEach(list->{ baseDao.deleteByProjectIds(list); }); } //2、先删除后增 - delAndInsert(customerId,dateString,entities); + delAndInsert(customerId,dateString,entities,projectId); } } } @@ -119,13 +119,14 @@ public class FactOriginProjectCategoryDailyServiceImpl extends BaseServiceImpl result){ - baseDao.deleteOldData(customerId, dateId); + public void delAndInsert(String customerId, String dateId, List result, String projectId){ + baseDao.deleteOldData(customerId, dateId, projectId); insertBatch(result); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java index 9bb920fe54..5efb3cd2fc 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/FactOriginProjectLogDailyServiceImpl.java @@ -144,8 +144,8 @@ public class FactOriginProjectLogDailyServiceImpl extends BaseServiceImpl getPendingList(String customerId) { - return baseDao.getPendingList(customerId); + public List getPendingList(String customerId, String projectId) { + return baseDao.getPendingList(customerId, projectId); } @Override @@ -108,8 +108,8 @@ public class FactOriginProjectMainDailyServiceImpl extends BaseServiceImpl initNewScreenProjectData(String customerId,Integer rows , String dateId) { - List projects = baseDao.initNewScreenProjectData(customerId, rows <= NumConstant.ZERO ? "" : dateId, dateId); + public List initNewScreenProjectData(String customerId,Integer rows , String dateId, String projectId) { + List projects = baseDao.initNewScreenProjectData(customerId, rows <= NumConstant.ZERO ? "" : dateId, dateId, projectId); projects.forEach(project -> { if (ProjectConstant.CLOSED_CASE.equals(project.getProjectStatusCode())) { //绿灯事件-结案项目 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java index e1c74d8f30..3c860e4d37 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/todata/impl/ProjectExtractServiceImpl.java @@ -82,11 +82,12 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { public void saveOriginProjectDaily(ExtractOriginFormDTO extractOriginFormDTO) { String dateString = extractOriginFormDTO.getDateId(); String customerId = extractOriginFormDTO.getCustomerId(); + String projectId = extractOriginFormDTO.getObjectId(); List list = new LinkedList<>(); //获取已关闭项目列表 - List closedList = projectProcessService.getClosedProjectList(customerId, dateString); - List pendingList = factOriginProjectMainDailyService.getPendingList(customerId); - List finishOrgList = projectProcessService.getFinishOrg(customerId, dateString); + List closedList = projectProcessService.getClosedProjectList(customerId, dateString, projectId); + List pendingList = factOriginProjectMainDailyService.getPendingList(customerId, projectId); + List finishOrgList = projectProcessService.getFinishOrg(customerId, dateString, projectId); if (!CollectionUtils.isEmpty(closedList)) { if(!CollectionUtils.isEmpty(pendingList)) { List closeProjects = @@ -124,8 +125,8 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } } //获取项目信息 - List projectList = projectService.getProjectInfo(customerId, dateString); - factOriginProjectMainDailyService.deleteByDate(customerId, dateString); + List projectList = projectService.getProjectInfo(customerId, dateString, projectId); + factOriginProjectMainDailyService.deleteByDate(customerId, dateString,projectId); if (!CollectionUtils.isEmpty(projectList)) { Map projectEventMap = projectService.getEventList(customerId); //提取议题ID @@ -230,7 +231,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //满意度 - List satisfaction = projectService.getProjectSatisfaction(customerId); + List satisfaction = projectService.getProjectSatisfaction(customerId, projectId); if (CollectionUtils.isNotEmpty(satisfaction)) { factOriginProjectMainDailyService.updateBatchById(satisfaction); } @@ -238,7 +239,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { final List mainList = list; List logList = new ArrayList<>(); //节点发起人 部门流转退回结案 - List processList = projectProcessService.getProcessListByCustomer(customerId, dateString); + List processList = projectProcessService.getProcessListByCustomer(customerId, dateString, projectId); if (!CollectionUtils.isEmpty(processList)) { logList = processList.stream().map(process -> { //获取日期相关维度 @@ -290,7 +291,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { }).collect(Collectors.toList()); } //节点发起人 响应 - List responseList = projectProcessService.getResponseProcessList(customerId, dateString); + List responseList = projectProcessService.getResponseProcessList(customerId, dateString, projectId); if (!CollectionUtils.isEmpty(responseList)) { logList.addAll(responseList.stream().map(process -> { //获取日期相关维度 @@ -336,7 +337,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { } //项目评论人 - List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString); + List satisfactionRecordList = projectProcessService.getSatisfactionRecord(customerId, dateString, projectId); satisfactionRecordList.forEach(log -> mainList.stream().filter(project -> log.getProjectId().equals(project.getId())).forEach(main -> { //进行满意度评价的居民的所属机关的父机机关信息 @@ -366,7 +367,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { //节点接收人 - List processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString); + List processStaffList = projectProcessService.getProcessStaffByCustomer(customerId, dateString, projectId); logList.addAll(processStaffList.stream().map(process -> { //获取日期相关维度 DimIdGenerator.DimIdBean dimId = DimIdGenerator.getDimIdBean(process.getCreatedTime()); @@ -415,7 +416,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { return entity; }).collect(Collectors.toList())); - factOriginProjectLogDailyService.deleteByDate(customerId, dateString); + factOriginProjectLogDailyService.deleteByDate(customerId, dateString,projectId); if (!logList.isEmpty()) { factOriginProjectLogDailyService.insertBatch(logList); } @@ -432,7 +433,7 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { @Override public void extractProjectPeriodData(ExtractOriginFormDTO param) { List extractData = - projectProcessService.getProjectPeriodDirectly(param.getCustomerId(), param.getDateId()); + projectProcessService.getProjectPeriodDirectly(param.getCustomerId(), param.getObjectId()); List formattingData = new LinkedList<>(); extractData.forEach(original -> { FactOriginProjectOrgPeriodDailyEntity dest @@ -473,7 +474,9 @@ public class ProjectExtractServiceImpl implements ProjectExtractService { formattingData.add(dest); }); if (!CollectionUtils.isEmpty(formattingData)) { - factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(null, param.getCustomerId()); + List projectList = new ArrayList<>(); + projectList.add(param.getObjectId()); + factOriginProjectOrgPeriodDailyDao.deleteByProjectIds(projectList, param.getCustomerId()); Lists.partition(formattingData, NumConstant.ONE_HUNDRED) .forEach(part -> factOriginProjectOrgPeriodDailyDao.insertBatch(part)); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java index 0877c53129..e3a2ab5401 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/ScreenExtractService.java @@ -34,6 +34,6 @@ public interface ScreenExtractService { * @author LiuJanJun * @date 2021/4/27 6:12 下午 */ - void extractPartData(String customerId, String dateId); + void extractPartData(String customerId, String dateId, String projectId); } 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 83d52891dc..0d3d541634 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 @@ -334,7 +334,7 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } catch (Exception e) { log.error("网格员数据统计fact_grid_member_statistics_daily抽取失败,customerId为:" + customerId + "dateId为:" + dateId, e); } - extractPartData(customerId, dateId); + extractPartData(customerId, dateId, null); } finally { latch.countDown(); log.info("extractDaily 4 thread run end ========= dateId:{},customerId:{}", dateId, customerId); @@ -355,10 +355,11 @@ public class ScreenExtractServiceImpl implements ScreenExtractService { } @Override - public void extractPartData(String customerId, String dateId) { + public void extractPartData(String customerId, String dateId, String projectId) { ScreenCentralZoneDataFormDTO param = new ScreenCentralZoneDataFormDTO(); param.setCustomerId(customerId); param.setDateId(dateId); + param.setProjectId(projectId); try { //大屏项目数据抽取_按天抽取 diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java index 230238b288..7215caaa8d 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenGrassrootsGovernDataAbsorptionServiceImpl.java @@ -231,7 +231,7 @@ public class ScreenGrassrootsGovernDataAbsorptionServiceImpl implements ScreenGr return false; } //获取业务库项目标题 - List bizProjectInfoList = projectService.getProjectInfo(param.getCustomerId(), null); + List bizProjectInfoList = projectService.getProjectInfo(param.getCustomerId(), null, null); if (CollectionUtils.isEmpty(bizProjectInfoList)) { log.warn("difficultyDataExtract customerId:{} have any project", param.getCustomerId()); return false; diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java index 6ad38758e4..d4a154acbd 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/evaluationindex/extract/toscreen/impl/ScreenProjectSettleServiceImpl.java @@ -74,7 +74,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic int rows = screenProjectDataService.checkIfExisted(param.getCustomerId()); List metaData = - originMainService.initNewScreenProjectData(param.getCustomerId(), rows , param.getDateId()); + originMainService.initNewScreenProjectData(param.getCustomerId(), rows , param.getDateId(), param.getProjectId()); if(!CollectionUtils.isEmpty(metaData)) { // 查询项目信息 @@ -135,6 +135,7 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic ScreenProjectDataDTO orientCase = new ScreenProjectDataDTO(); orientCase.setCustomerId(param.getCustomerId()); + orientCase.setProjectId( param.getProjectId()); //待更新的数据 需要检测更新的字段为:①projectStatusCode ②closeCaseTime ③allCategoryName ④projectLevel List orientData = screenProjectDataService.getPending(orientCase,param.getDateId()); @@ -188,7 +189,8 @@ public class ScreenProjectSettleServiceImpl implements ScreenProjectSettleServic } // - List processes = processService.buildNewScreenProjectProcessData(param.getCustomerId(), param.getDateId(),!screenProjectProcessService.checkIfHistoricalDataExists(param.getCustomerId())); + List processes = processService.buildNewScreenProjectProcessData(param.getCustomerId(), param.getDateId(), + !screenProjectProcessService.checkIfHistoricalDataExists(param.getCustomerId()), param.getProjectId()); if(!CollectionUtils.isEmpty(processes)){ screenProjectProcessService.insertBatch(processes,param.getCustomerId(),param.getDateId()); List attachments = processService.buildProcessAttachmentData(processes.stream().map(ScreenProjectProcessDTO::getProcessId).distinct().collect(Collectors.toList())); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java index 84386e9ec3..7dd28b1519 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectProcessService.java @@ -52,9 +52,10 @@ public interface ProjectProcessService extends BaseService * @date 2020/9/16 15:42 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getProcessListByCustomer(String customerId, String date); + List getProcessListByCustomer(String customerId, String date, String projectId); /** * 根据客户查询响应节点 @@ -62,9 +63,10 @@ public interface ProjectProcessService extends BaseService * @date 2020/9/30 16:27 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getResponseProcessList(String customerId, String date); + List getResponseProcessList(String customerId, String date, String projectId); /** * 查询各个节点的受理人 @@ -72,9 +74,10 @@ public interface ProjectProcessService extends BaseService * @date 2020/9/17 10:53 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getProcessStaffByCustomer(String customerId, String date); + List getProcessStaffByCustomer(String customerId, String date, String projectId); /** * 获取满意度评价记录 @@ -82,9 +85,10 @@ public interface ProjectProcessService extends BaseService * @date 2020/9/17 13:59 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getSatisfactionRecord(String customerId, String date); + List getSatisfactionRecord(String customerId, String date, String projectId); /** * 获取已结案的项目列表 @@ -92,21 +96,22 @@ public interface ProjectProcessService extends BaseService * @date 2020/9/17 14:43 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getClosedProjectList(String customerId, String date); + List getClosedProjectList(String customerId, String date, String projectId); /** * @Description 直接从项目业务改造获取项目节点耗时信息 * @param customerId - * @param date + * @param projectId * @return java.util.List * @author wangc * @date 2020.10.23 09:10 */ - List getProjectPeriodDirectly(String customerId, String date); + List getProjectPeriodDirectly(String customerId, String projectId); /** * 获取办结组织 @@ -114,9 +119,10 @@ public interface ProjectProcessService extends BaseService * @date 2020/9/20 21:11 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getFinishOrg(String customerId, String date); + List getFinishOrg(String customerId, String date, String projectId); /** * @Description 获得项目最新操作 @@ -156,7 +162,7 @@ public interface ProjectProcessService extends BaseService * @author wangc * @date 2021.03.09 14:49 */ - List buildNewScreenProjectProcessData(String customerId,String dateId,boolean ifRanged); + List buildNewScreenProjectProcessData(String customerId,String dateId,boolean ifRanged, String projectId); /** * @Description 构建节点附件数据 @@ -166,4 +172,4 @@ public interface ProjectProcessService extends BaseService * @date 2021.03.09 16:56 */ List buildProcessAttachmentData(List processIds); -} \ No newline at end of file +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java index ced07132f7..6b844a3481 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/ProjectService.java @@ -94,9 +94,10 @@ public interface ProjectService extends BaseService { * @date 2020/9/15 16:09 * @param customerId * @param date + * @param projectId * @return java.util.List */ - List getProjectInfo(String customerId, String date); + List getProjectInfo(String customerId, String date, String projectId); /** * 获取用户可滞留天数 @@ -155,15 +156,16 @@ public interface ProjectService extends BaseService { */ List getProjectCategoryData(String customerId, String dateId); - List queryProjectCategoryData(String customerId, String dateId); + List queryProjectCategoryData(String customerId, String dateId, String projectId); /** * 获取项目满意度 * @author zhaoqifeng * @date 2021/5/21 10:04 * @param customerId + * @param projectId * @return java.util.List */ - List getProjectSatisfaction(String customerId); + List getProjectSatisfaction(String customerId, String projectId); List selectProjectListByDateId(String customerId, String yesterdayStr, String projectOriginAgency); /** @@ -197,6 +199,7 @@ public interface ProjectService extends BaseService { /** * 获取事件信息 * @param customerId + * @param projectId * @return */ Map getEventList(String customerId); diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java index a71c61bfbd..6844c930e9 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectProcessServiceImpl.java @@ -66,28 +66,28 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl getProcessListByCustomer(String customerId, String date) { - return baseDao.selectProcessListByCustomer(customerId, date); + public List getProcessListByCustomer(String customerId, String date, String projectId) { + return baseDao.selectProcessListByCustomer(customerId, date, projectId); } @Override - public List getResponseProcessList(String customerId, String date) { - return baseDao.selectResponseProcessList(customerId, date); + public List getResponseProcessList(String customerId, String date, String projectId) { + return baseDao.selectResponseProcessList(customerId, date, projectId); } @Override - public List getProcessStaffByCustomer(String customerId, String date) { - return baseDao.selectProcessStaffByCustomer(customerId, date); + public List getProcessStaffByCustomer(String customerId, String date, String projectId) { + return baseDao.selectProcessStaffByCustomer(customerId, date, projectId); } @Override - public List getSatisfactionRecord(String customerId, String date) { - return baseDao.selectSatisfactionRecordByCustomer(customerId, date); + public List getSatisfactionRecord(String customerId, String date, String projectId) { + return baseDao.selectSatisfactionRecordByCustomer(customerId, date, projectId); } @Override - public List getClosedProjectList(String customerId, String date) { - return baseDao.selectClosedProjectList(customerId, date); + public List getClosedProjectList(String customerId, String date, String projectId) { + return baseDao.selectClosedProjectList(customerId, date, projectId); } @@ -96,18 +96,19 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl * @author wangc * @date 2020.10.23 09:10 */ @Override - public List getProjectPeriodDirectly( String customerId, String date) { - return baseDao.selectProjectOrgPeriodDirectly(customerId,null,null); + public List getProjectPeriodDirectly(String customerId, String projectId) { + return baseDao.selectProjectOrgPeriodDirectly(customerId, projectId); } @Override - public List getFinishOrg(String customerId, String date) { - return baseDao.selectFinishOrg(customerId, date); + public List getFinishOrg(String customerId, String date, String projectId) { + return baseDao.selectFinishOrg(customerId, date, projectId); } /** @@ -183,8 +184,8 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl buildNewScreenProjectProcessData(String customerId, String dateId, boolean ifRanged) { - List processes = baseDao.selectProjectProcessAndDirection(customerId, ifRanged ? null : dateId, dateId); + public List buildNewScreenProjectProcessData(String customerId, String dateId, boolean ifRanged, String projectId) { + List processes = baseDao.selectProjectProcessAndDirection(customerId, ifRanged ? null : dateId, dateId, projectId); if(CollectionUtils.isEmpty(processes)) return null; return processes.stream().map(target -> { List points = target.getPoints(); @@ -216,4 +217,4 @@ public class ProjectProcessServiceImpl extends BaseServiceImpl buildProcessAttachmentData(List processIds) { return baseDao.selectProcessAttachment(processIds); } -} \ No newline at end of file +} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java index 5084e99852..990480fa2c 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java +++ b/epmet-module/data-statistical/data-statistical-server/src/main/java/com/epmet/service/project/impl/ProjectServiceImpl.java @@ -78,8 +78,8 @@ public class ProjectServiceImpl extends BaseServiceImpl getProjectInfo(String customerId, String date) { - return baseDao.selectProjectInfo(customerId, date); + public List getProjectInfo(String customerId, String date, String projectId) { + return baseDao.selectProjectInfo(customerId, date, projectId); } @Override @@ -162,20 +162,21 @@ public class ProjectServiceImpl extends BaseServiceImpl queryProjectCategoryData(String customerId, String dateId) { - return baseDao.selectProjectCategoryData(customerId,dateId); + public List queryProjectCategoryData(String customerId, String dateId, String projectId) { + return baseDao.selectProjectCategoryData(customerId,dateId,projectId); } /** * 获取项目满意度 * * @param customerId + * @param projectId * @return java.util.List * @author zhaoqifeng * @date 2021/5/21 10:04 */ @Override - public List getProjectSatisfaction(String customerId) { - List list = baseDao.selectProjectSatisfaction(customerId); + public List getProjectSatisfaction(String customerId, String projectId) { + List list = baseDao.selectProjectSatisfaction(customerId, projectId); if (org.apache.commons.collections4.CollectionUtils.isEmpty(list)) { return Collections.emptyList(); } diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml index e0cfcc7fe7..d2fa192b64 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectCategoryDailyDao.xml @@ -9,6 +9,9 @@ fact_origin_project_category_daily WHERE CUSTOMER_ID = #{customerId} + + AND PROJECT_ID = #{projectId} + AND DATE_FORMAT(CREATED_TIME,'%Y%m%d') = #{dateId} diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml index 4e28cbb74b..36c72e368b 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectLogDailyDao.xml @@ -10,6 +10,9 @@ AND DATE_ID = #{date} + + AND PROJECT_ID = #{projectId} + - \ No newline at end of file + diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml index f111a535eb..60b6f10958 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/evaluationindex/extract/FactOriginProjectMainDailyDao.xml @@ -41,7 +41,12 @@ ID, DATE_ID FROM fact_origin_project_main_daily - WHERE CUSTOMER_ID = #{customerId} + WHERE + 1=1 + + AND ID = #{projectId} + + AND CUSTOMER_ID = #{customerId} AND PROJECT_STATUS = 'pending' diff --git a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml index 9a2ec5b096..715b37f605 100644 --- a/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml +++ b/epmet-module/data-statistical/data-statistical-server/src/main/resources/mapper/project/ProjectDao.xml @@ -92,7 +92,10 @@ FROM project WHERE DEL_FLAG = '0' - AND CUSTOMER_ID = #{customerId} + + AND ID = #{projectId} + + and CUSTOMER_ID = #{customerId} AND DATE_FORMAT(CREATED_TIME, '%Y%m%d') = #{date} @@ -158,6 +161,9 @@ from `project_category` pc where pc.del_flag = '0' + + AND pc.PROJECT_ID = #{projectId} + and pc.customer_id = #{customerId} AND DATE_FORMAT(pc.CREATED_TIME,'%Y%m%d')=#{dateId} @@ -171,6 +177,9 @@ FROM project_satisfaction_statistics WHERE CUSTOMER_ID = #{customerId} + + AND PROJECT_ID = #{projectId} + - \ No newline at end of file + diff --git a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java index 7330d1e3ae..b16637127f 100644 --- a/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java +++ b/epmet-module/epmet-common-service/common-service-server/src/main/java/com/epmet/utils/externalapp/ExtAppJwtAuthProcessor.java @@ -20,6 +20,7 @@ public class ExtAppJwtAuthProcessor extends ExtAppAuthProcessor { @Autowired private ExtAppJwtTokenUtils jwtTokenUtils; + @Override public ExternalAppAuthResultDTO auth(String appId, String token, Long ts) { String secret; if (StringUtils.isBlank(secret = getTokenByAppId(appId))) { diff --git a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java index cf8bd2ffc6..0598e6e43d 100644 --- a/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java +++ b/epmet-module/epmet-third/epmet-third-server/src/main/java/com/epmet/service/impl/ComponentVerifyTicketServiceImpl.java @@ -266,6 +266,7 @@ public class ComponentVerifyTicketServiceImpl implements ComponentVerifyTicketSe * @author wxz * @date 2021.08.30 17:12:15 */ + @Override public void pushComponentAccessToken2PrivateEpmetPlatforms(ComponentAccessTokenFormDTO input) { List platforms = thirdPlatformService.listPlatformsByActionKey(ThirdPlatformActions.PUSH_COMPONENT_ACCESS_TOKEN); platforms.stream().forEach(p -> { diff --git a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java index 99f4e6d1cd..50a77215bf 100644 --- a/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java +++ b/epmet-module/gov-issue/gov-issue-client/src/main/java/com/epmet/dto/result/VoteResultDTO.java @@ -1,5 +1,6 @@ package com.epmet.dto.result; +import com.epmet.commons.tools.constant.NumConstant; import lombok.Data; import java.io.Serializable; @@ -31,7 +32,11 @@ public class VoteResultDTO implements Serializable { /** * 支持:support 反对:oppose */ - private String voteType = ""; - + private String voteType; + public VoteResultDTO() { + this.supportCount = NumConstant.ZERO; + this.oppositionCount = NumConstant.ZERO; + this.voteType = ""; + } } diff --git a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java index b78896b90c..4c90eb6981 100644 --- a/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java +++ b/epmet-module/gov-issue/gov-issue-server/src/main/java/com/epmet/service/impl/IssueVoteStatisticalServiceImpl.java @@ -21,6 +21,7 @@ import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; import com.baomidou.mybatisplus.core.metadata.IPage; import com.epmet.commons.mybatis.service.impl.BaseServiceImpl; import com.epmet.commons.tools.constant.NumConstant; +import com.epmet.commons.tools.constant.StrConstant; import com.epmet.commons.tools.exception.RenException; import com.epmet.commons.tools.page.PageData; import com.epmet.commons.tools.security.dto.TokenDto; @@ -52,6 +53,7 @@ import com.epmet.service.IssueVoteDetailService; import com.epmet.service.IssueVoteStatisticalService; import com.epmet.utils.ModuleConstants; import org.apache.commons.collections4.CollectionUtils; +import org.apache.commons.collections4.ListUtils; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.BeanUtils; import org.springframework.beans.factory.annotation.Autowired; @@ -153,7 +155,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl data = issueSatisfactionDetailDao.evaluationList(formDTO); - if (data.size() == NumConstant.ZERO || data == null) { + if (data == null || data.size() == NumConstant.ZERO ) { return new ArrayList<>(); } //获取头像和昵称 eg:山东路168号-周先生 @@ -237,14 +255,13 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl resultList = data.stream().flatMap(evaluation -> userResiInfoList.stream().filter(user -> + return data.stream().flatMap(evaluation -> userResiInfoList.stream().filter(user -> evaluation.getUserId().equals(user.getUserId())).map(userInfo -> { EvaluationListResultDTO resultDTO = ConvertUtils.sourceToTarget(evaluation, EvaluationListResultDTO.class); - resultDTO.setUserNickName(null == userInfo.getShowName() ? "" : userInfo.getShowName()); - resultDTO.setUserHeadPhoto(null == userInfo.getHeadPhoto() ? "" : userInfo.getHeadPhoto()); + resultDTO.setUserNickName(null == userInfo.getShowName() ? StrConstant.EPMETY_STR : userInfo.getShowName()); + resultDTO.setUserHeadPhoto(null == userInfo.getHeadPhoto() ? StrConstant.EPMETY_STR : userInfo.getHeadPhoto()); return resultDTO; })).collect(Collectors.toList()); - return resultList; } /** @@ -283,7 +300,7 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl statisticalList = baseDao.selectListByIds(ids); if (null != statisticalList && statisticalList.size() > NumConstant.ZERO) { - List statisiticalIds = statisticalList.stream().map(vote -> vote.getIssueId()).collect(Collectors.toList()); + List statisiticalIds = statisticalList.stream().map(IssueVoteStatisticalDTO::getIssueId).collect(Collectors.toList()); if (ids.size() > statisiticalIds.size()) { //差集 @@ -325,16 +342,19 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl collect = notExistedIds.stream().map(issueId -> { - IssueVoteStatisticalDTO dto = new IssueVoteStatisticalDTO(); - dto.setIssueId(issueId); - dto.setSupportCount(NumConstant.ZERO); - dto.setOppositionCount(NumConstant.ZERO); - dto.setVotableCount(Optional.ofNullable(votableCountMap.get(issueGridMap.get(issueId))).orElse(NumConstant.ZERO)); - dto.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);dto.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM); - return dto; - }).collect(Collectors.toList()); - if(!CollectionUtils.isEmpty(collect)) toInsert.addAll(collect);} + List collect = notExistedIds.stream().map(issueId -> { + IssueVoteStatisticalDTO dto = new IssueVoteStatisticalDTO(); + dto.setIssueId(issueId); + dto.setSupportCount(NumConstant.ZERO); + dto.setOppositionCount(NumConstant.ZERO); + dto.setVotableCount(Optional.ofNullable(votableCountMap.get(issueGridMap.get(issueId))).orElse(NumConstant.ZERO)); + dto.setCreatedBy(ModuleConstants.CREATED_BY_SYSTEM);dto.setUpdatedBy(ModuleConstants.CREATED_BY_SYSTEM); + return dto; + }).collect(Collectors.toList()); + if(!CollectionUtils.isEmpty(collect)) { + toInsert.addAll(collect); + } + } /* List summaryList = issueVoteDetailDao.getVotingSummaryList(notExistedIds); @@ -427,8 +447,11 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl listToUpdate = new ArrayList<>(); setVotableCountsAndUpdateCache(listToUpdate,issues,votableCountMap); - // listToUpdate批量更新 - baseDao.updateBatchByIssueId(listToUpdate); + // listToUpdate批量更新 todo 暂时解决下 分批插入 + if (CollectionUtils.isNotEmpty(listToUpdate)) { + ListUtils.partition(listToUpdate, NumConstant.ONE_HUNDRED) + .forEach(part -> baseDao.updateBatchByIssueId(part)); + } } }else{ @@ -550,8 +573,12 @@ public class IssueVoteStatisticalServiceImpl extends BaseServiceImpl assignedStaffEntities, String projectStaffId) { if (true) { return; } - + // 1.项目主信息 BlockChainProjectFormDTO project = null; @@ -131,7 +132,7 @@ public class BlockChainUploadServiceImpl implements BlockChainUploadService { handledStaff.setOrgIdPath(handledStaffEntity.getOrgIdPath()); handledStaff.setProjectId(handledStaffEntity.getProjectId()); } - + if (project == null) { // 处理 BlockChainProcessProjectFormDTO processForm = new BlockChainProcessProjectFormDTO(); diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java index 9ec1029422..41a79e728e 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ProjectServiceImpl.java @@ -2871,8 +2871,8 @@ public class ProjectServiceImpl extends BaseServiceImpl> listResult = govIssueOpenFeignClient.selectCategoryOneLevelListByCustomerId(tokenDto); - if (!listResult.success()){ - throw new EpmetException("查询1级分类列表失败..."); + if (!listResult.success() || CollectionUtils.isEmpty(listResult.getData())){ + throw new EpmetException("查询1级分类列表失败或者结果集为空..."); } List projectCategoryByDateDTOS = baseDao.selectProjectCategoryByDate(formDTO.getStartDate(),formDTO.getEndDate(), formDTO.getOrgId(), listResult.getData().get(NumConstant.ZERO).getCodeLength()); if (CollectionUtils.isEmpty(projectCategoryByDateDTOS)){ diff --git a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java index 90e37213f9..f6a0d6438d 100644 --- a/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java +++ b/epmet-module/gov-project/gov-project-server/src/main/java/com/epmet/service/impl/ResiEventServiceImpl.java @@ -276,6 +276,7 @@ public class ResiEventServiceImpl extends BaseServiceImpl wordList, List imageList) { if (imageList.size() != NumConstant.ZERO) { wordList.forEach(word -> { @@ -286,4 +287,4 @@ public class NoticeCommentServiceImpl extends BaseServiceImpl getList(String dict) { List list = new ArrayList<>(); Map dictMap = new HashMap<>(); diff --git a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java index 218784f968..3df76059d4 100644 --- a/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java +++ b/epmet-user/epmet-user-server/src/main/java/com/epmet/service/impl/VolunteerServiceImpl.java @@ -17,7 +17,6 @@ import com.epmet.feign.EpmetHeartOpenFeignClient; import com.epmet.feign.GovOrgOpenFeignClient; import com.epmet.feign.OperCustomizeOpenFeignClient; import com.epmet.service.VolunteerService; -import org.apache.commons.collections4.CollectionUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.stereotype.Service; @@ -54,6 +53,7 @@ public class VolunteerServiceImpl implements VolunteerService, ResultDataResolve * @param customerId * @return */ + @Override public VolunteerDistributionResultDTO getVolunteerDistributionAndLegends(String customerId, String agencyId) { // 1.查询分布