zhangtiansen
2022-09-18 82896616ab61b7fc3aabe4da878832c8cf583ccd
大屏接口
3个文件已修改
74 ■■■■ 已修改文件
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java 2 ●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml 68 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/dao/ComEventMapper.java
@@ -52,7 +52,7 @@
     * @return 处理结果
     * @author zhangtiansen
     * */
    IndexDateVO dateAnalysis(@Param("dto") IndexDateDTO indexDateDTO);
    IndexDateVO dateAnalysis(@Param("dto") IndexDateDTO indexDateDTO,@Param("beginDate") Date beginDate, @Param("endDate")Date endDate);
    /**
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/java/com/panzhihua/service_community/service/impl/ComEventServiceImpl.java
@@ -299,7 +299,7 @@
     * */
    @Override
    public R indexData(IndexDateDTO indexDataDTO) {
        IndexDateVO vo = comEventMapper.dateAnalysis(indexDataDTO);
        IndexDateVO vo = comEventMapper.dateAnalysis(indexDataDTO,DateUtil.beginOfMonth(new Date()),DateUtil.endOfMonth(new Date()));
        //计算率
        if (nonNull(vo.getSuccess()) && !vo.getSuccess().equals(0)){
            if (nonNull(vo.getAccepted()) && !vo.getAccepted().equals(0)){
@@ -406,7 +406,7 @@
            DateUtil.format(dateTime,"yyyy-MM-dd");
            list.add(dateTime);
            //减一天进入下一个月
            now=DateUtil.offsetDay(now,-1);
            now=DateUtil.offsetDay(dateTime,-1);
        }
        return list;
    }
springcloud_k8s_panzhihuazhihuishequ/service_community/src/main/resources/mapper/ComEventMapper.xml
@@ -119,7 +119,7 @@
        </if>) as accepting,
        (SELECT count(id) FROM com_sanshuo_event_info
        where event_process_status = 6
        AND user_event_status not in(3,4)
        AND user_event_status not in(3)
        <if test="dto.type == 1">
            AND type=4
        </if>
@@ -235,17 +235,66 @@
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </if>) as expert
        </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
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </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 type=3
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </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
            <if test="dto.id != null">
                AND center_id=#{dto.id}
            </if>
        </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 type=3
            <if test="dto.id != null">
                AND request_user_community=#{dto.id}
            </if>
        </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_time BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
        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>
            <if test="dto.type=2">
            <if test="dto.type==2">
                 AND type=1
                <if test="dto.id != null">
                    AND center_id=#{dto.id}
@@ -267,13 +316,13 @@
    </select>
    <select id="dateAnalysisYTwo" resultType="java.lang.Integer">
        SELECT COUNT(id) FROM com_sanshuo_event_info
        WHERE create_time BETWEEN DATE_FORMAT(#{beginDate}, '%Y-%m-%d 00:00:00') AND DATE_FORMAT(#{endDate}, '%Y-%m-%d 23:59:59')
        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">
        <if test="dto.type==2">
            AND type=1
            <if test="dto.id != null">
                AND center_id=#{dto.id}
@@ -299,9 +348,10 @@
        group by type
    </select>
    <select id="expertRate" 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
        select count(t.id) as count,t1.level as type  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(7.8)
        group by t1.level
    </select>
    <select id="mediateTypeRate" resultType="com.panzhihua.common.model.vos.sanshuo.EventRateVO">
        select count(t.id) as count,t1.name from com_sanshuo_event_info t