| | |
| | | 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 |