From c6aeb75bd619ba0b22fd7e19e9aa62783b4a010f Mon Sep 17 00:00:00 2001 From: 张天森 <1292933220@qq.com> Date: 星期三, 16 十一月 2022 15:17:34 +0800 Subject: [PATCH] 三说会堂大屏统计修改 --- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml | 2 +- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java | 2 +- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java | 2 +- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java | 12 ++++++++++++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java | 2 +- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java | 4 ++-- springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml | 14 ++++++++++++++ springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java | 10 ++++++++++ 8 files changed, 42 insertions(+), 6 deletions(-) diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java index 56f3c05..33bf3db 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java @@ -127,7 +127,7 @@ * */ @GetMapping("/expertShow") public R expertShow(){ - return comSanShuoExpertService.expertShow(); + return comSanShuoExpertService.expertShow(this.getLoginUserInfo().getAppId()); } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java index 61e7bc6..4fca55c 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java @@ -111,4 +111,16 @@ void insertEventAndExpertRecord(@Param("eventId") Long eventId, @Param("expertId") Long experId,@Param("status")Integer status); void updateLog(@Param("eventId") Long id, @Param("expertId") Long specialistId); + + /** + * 社区专家受理数量 + * */ + int expertSolveCountCommunity(); + + /** + * 行业分中心专家受理数量 + * */ + int expertSolveCountCenter(); + + } diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java index e168098..9867ec4 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComSanshuoExpertDao.java @@ -34,7 +34,7 @@ /** * 专家风采列表 * */ - List<ExpertShowVO> expertShow(); + List<ExpertShowVO> expertShow(String appId); /** * 行业分中心分组专家 diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java index 7a67b05..1405b9f 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/ComSanShuoExpertService.java @@ -29,7 +29,7 @@ * 专家风采列表 * @return 出列记过 * */ - R expertShow(); + R expertShow(String appId); /** * 专家级别与单位范围 diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java index 79811b5..9cf8a12 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java @@ -1113,9 +1113,19 @@ if (type.equals(1)){ //受理级别占比 List<EventRateVO> eventRateVOS = comEventMapper.eventRate(); + //获取专家受理的数量 + Integer expertCount=comEventMapper.expertSolveCountCommunity(); + //获取行业分中心受理数量 + Integer centerCount=comEventMapper.expertSolveCountCenter(); for (EventRateVO eventRateVO : eventRateVOS) { if (nonNull(eventRateVO)){ eventRateVO.setName(typeToName(eventRateVO.getCurrentProcessType())); + if (eventRateVO.getCurrentProcessType().equals(2)){ + eventRateVO.setCount(eventRateVO.getCount()+expertCount); + } + if (eventRateVO.getCurrentProcessType().equals(1)){ + eventRateVO.setCount(eventRateVO.getCount()+centerCount); + } if (nonNull(eventCount) && !eventCount.equals(0)){ //计算占比 eventRateVO.setRate(NumberUtil.div(eventRateVO.getCount(),eventCount,2)); diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java index 2906dcb..b81ac2b 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComSanShuoExpertServiceImpl.java @@ -217,8 +217,8 @@ * 专家风采 * */ @Override - public R expertShow() { - List<ExpertShowVO> expertShowVOS = comSanshuoExpertDao.expertShow(); + public R expertShow(String appId) { + List<ExpertShowVO> expertShowVOS = comSanshuoExpertDao.expertShow(appId); for (ExpertShowVO expertShowVO : expertShowVOS) { if (nonNull(expertShowVO.getLevel())){ if (1==expertShowVO.getLevel()) { diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml index 50b8268..d7e6870 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml @@ -483,6 +483,7 @@ SELECT COUNT(id) FROM com_sanshuo_event_info WHERE create_at BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59') AND event_process_status=6 + AND is_end=1 AND app_id='wx0cef797390444b75' <if test="dto.type == 2"> AND current_process_type=1 @@ -511,6 +512,7 @@ where event_process_status not in(7,8,9) AND app_id='wx0cef797390444b75' group by current_process_type + having current_process_type not in (5) </select> <select id="expertRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO"> select count(id) as count,level as type from com_sanshuo_expert where app_id='wx0cef797390444b75' @@ -530,6 +532,18 @@ <select id="insertEventAndExpertRecord"> insert into com_sanshuo_expert_event values(#{eventId},#{expertId},#{status}) </select> + <select id="expertSolveCountCommunity" resultType="java.lang.Integer"> + select count(t.id) from com_sanshuo_event_info t + left join com_sanshuo_expert t1 on t.specialist_id=t1.id + where t.event_process_status not in (9) + and t1.level=4 + </select> + <select id="expertSolveCountCenter" resultType="java.lang.Integer"> + select count(t.id) from com_sanshuo_event_info t + left join com_sanshuo_expert t1 on t.specialist_id=t1.id + where t.event_process_status not in (9) + and t1.level=2 + </select> <update id="updateLog"> update com_sanshuo_expert_event set status = 2 where event_id=#{eventId} and expert_id=#{expertId} and status=0 diff --git a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml index d2f80a6..fafd5a7 100644 --- a/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml +++ b/springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComSanshuoExpertDao.xml @@ -37,7 +37,7 @@ unit_id,unit from com_sanshuo_expert </sql> <select id="expertShow" resultType="com.panzhihua.common.model.vos.sanshuo.ExpertShowVO"> - select count(id) as 'count',level from com_sanshuo_expert where status=1 and del_flag=1 group by level + select count(id) as 'count',level from com_sanshuo_expert where status=1 and del_flag=1 and app_id=#{appId} group by level </select> <select id="expertPage" resultType="com.panzhihua.common.model.vos.sanshuo.ComSanshuoExpertVO"> select id,level,community_id, -- Gitblit v1.7.1