lidongdong
2022-10-18 dad601cd42e0032a4754ef363ae16dedca5a6c38
Merge remote-tracking branch 'origin/huacheng_test' into huacheng_test
6个文件已修改
209 ■■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/EventRateVO.java 1 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java 18 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/IComEventService.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java 20 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 158 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/common/src/main/java/com/panzhihua/common/model/vos/sanshuo/EventRateVO.java
@@ -15,5 +15,6 @@
    private BigDecimal rate;
    @ApiModelProperty("数量")
    private Integer count;
    private Integer currentProcessType;
    private Integer type;
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoEventController.java
@@ -336,4 +336,22 @@
    public R eventIndexData(@RequestParam Integer type) {
        return comEventService.eventIndexData(type);
    }
    /**
     *可选街道列表
     * */
    @GetMapping("/streetList")
    public R getStreetId(){
        return comEventService.listStreetScreen();
    }
    /**
     *可选社区列表
     * */
    @GetMapping("/communityList")
    public R getCommunityList(){
        return comEventService.listCommunityScreen();
    }
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/api/ComSanShuoExpertApi.java
@@ -155,6 +155,14 @@
        return R.fail();
    }
    /**
     * 导入专家信息
     * */
    @PostMapping("/importExpert")
    public R importExpert(){
        return R.ok();
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/IComEventService.java
@@ -102,4 +102,8 @@
     * 修改流转记录状态
     * */
    void updateEventStransferRecord(Long id);
    R listStreetScreen();
    R listCommunityScreen();
}
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -977,13 +977,13 @@
    @Override
    public R eventIndexData(Integer type) {
        //获取事件总数
        Integer eventCount = comEventMapper.selectCount(new QueryWrapper<ComEvent>().notIn("event_process_status", (7), (8)));
        Integer eventCount = comEventMapper.selectCount(new QueryWrapper<ComEvent>().notIn("event_process_status",(9)));
        if (type.equals(1)){
            //受理级别占比
            List<EventRateVO> eventRateVOS = comEventMapper.eventRate();
            for (EventRateVO eventRateVO : eventRateVOS) {
                if (nonNull(eventRateVO)){
                    eventRateVO.setName(typeToName(eventRateVO.getType()));
                    eventRateVO.setName(typeToName(eventRateVO.getCurrentProcessType()));
                    if (nonNull(eventCount) && !eventCount.equals(0)){
                        //计算占比
                        eventRateVO.setRate(NumberUtil.div(eventRateVO.getCount(),eventCount,2));
@@ -1025,16 +1025,28 @@
        comEventMapper.updateLog(id,comEvent.getSpecialistId());
    }
    @Override
    public R listStreetScreen() {
        return R.ok(comStreetDAO.selectList(new QueryWrapper<ComStreetDO>().eq("app_id", "wx0cef797390444b75")));
    }
    @Override
    public R listCommunityScreen() {
        return null;
    }
    public String typeToName(Integer type){
        switch (type){
            case 1:
                return "行业分中心受理";
            case 2:
                return "街道调解站受理";
            case 3:
                return "街道调解站受理";
            case 2:
                return "社区调解站受理";
            case 4:
                return "区三说会堂受理";
            case 5:
                return "专家受理";
        }
        return null;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -225,280 +225,276 @@
        where event_process_status  in (3,5,6)
        AND user_event_status not in(3,4)
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND type=4
            AND current_process_type=4
        </if>
        ) as accept,
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status = 5
        AND user_event_status not in(3,4)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as accepting,
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status = 6
        AND user_event_status not in(3)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                 AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as accepted,
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status in (6,7)
        AND user_event_status not in(3,4)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as expirences,
        (select count(id) FROM com_sanshuo_event_info
        where event_result=1
        AND user_event_status not in(3,4)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as success,
        (select count(id) FROM com_sanshuo_event_info
        where event_result=2
        AND user_event_status not in(3,4)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as fail,
        (select count(id) from com_sanshuo_expert where `status`=1 and del_flag=1
        AND user_event_status not in(3,4)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as expert,
        (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 not in (8)
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as monthIncrease,
        (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 not in (8)
        AND event_process_status = 6
        <if test="dto.type == 1">
            AND type=4
        </if>
        <if test="dto.type == 2">
            AND type=1
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>) as monthFinish
        FROM com_sanshuo_event_info limit 1
    </select>
    <select id="dateAnalysisY" resultType="java.lang.Integer">
        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')
        <if test="dto.type != null">
            <if test="dto.type == 1">
                AND type=4
        <if test="dto.type == 2">
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
            <if test="dto.type==2">
                 AND type=1
                <if test="dto.id != null">
                    AND center_id=#{dto.id}
                </if>
        </if>
        <if test="dto.type == 3">
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
            <if test="dto.type == 3">
                AND type=2
                <if test="dto.id != null">
                    AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
                </if>
        </if>
        <if test="dto.type == 4">
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
            <if test="dto.type == 4">
                AND type=3
                <if test="dto.id != null">
                    AND request_user_community=#{dto.id}
                </if>
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>
    </select>
    <select id="dateAnalysisYTwo" resultType="java.lang.Integer">
        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
        <if test="dto.type != null">
            <if test="dto.type == 1">
                AND type=4
            </if>
        <if test="dto.type==2">
            AND type=1
        <if test="dto.type == 2">
            AND current_process_type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 3">
            AND type=2
            AND current_process_type=3
            <if test="dto.id != null">
                AND request_user_community in (select com_act.community_id from com_act where street_id=#{dto.id})
            </if>
        </if>
        <if test="dto.type == 4">
            AND type=3
            AND current_process_type=2 OR current_process_type=5
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>
        <if test="dto.type == 1">
            AND current_process_type=4
        </if>
    </select>
    <select id="eventRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
        select count(id) as count,type from com_sanshuo_event_info
        where event_process_status not in(7.8)
        group by type
        group by current_process_type
    </select>
    <select id="expertRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
        select count(t.id) as count,t1.level as type  from com_sanshuo_event_info t