| | |
| | | <if test="commonPage.userId !=null"> |
| | | and user_id = #{commonPage.userId} |
| | | </if> |
| | | <if test="commonPage.checkStatus !=null and commonPage.checkStatus !=''"> |
| | | and check_status = #{commonPage.checkStatus} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword!=''"> |
| | | and (name like concat('%',#{commonPage.keyword},'%') or phone like concat('%',#{commonPage.keyword},'%') or id_card like concat('%',#{commonPage.keyword},'%')) |
| | | and (name like concat('%',#{commonPage.keyword},'%') or phone like concat('%',#{commonPage.keyword},'%') |
| | | or id_card like concat('%',#{commonPage.keyword},'%')) |
| | | </if> |
| | | <if test="commonPage.startTime !=null and commonPage.startTime !=''"> |
| | | and create_time between #{commonPage.startTime} and #{commonPage.stopTime} |
| | | and create_time between #{commonPage.startTime} and #{commonPage.stopTime} |
| | | </if> |
| | | <if test="commonPage.isAddress !=null"> |
| | | <if test="commonPage.isAddress == 0"> |
| | |
| | | and t.user_id = #{commonPage.userId} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword!=''"> |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like |
| | | concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) |
| | | </if> |
| | | <if test="commonPage.startTime !=null and commonPage.startTime !=''"> |
| | | and t.create_time between #{commonPage.startTime} and #{commonPage.stopTime} |
| | | and t.create_time between #{commonPage.startTime} and #{commonPage.stopTime} |
| | | </if> |
| | | <if test="commonPage.isAddress !=null"> |
| | | <if test="commonPage.isAddress == 0"> |
| | |
| | | and t.user_id = #{commonPage.userId} |
| | | </if> |
| | | <if test="commonPage.keyword !=null and commonPage.keyword!=''"> |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) |
| | | and (t.name like concat('%',#{commonPage.keyword},'%') or t.phone like |
| | | concat('%',#{commonPage.keyword},'%') or t.id_card like concat('%',#{commonPage.keyword},'%')) |
| | | </if> |
| | | <if test="commonPage.startTime !=null and commonPage.startTime !=''"> |
| | | and t.create_time between #{commonPage.startTime} and concat(#{commonPage.stopTime},' 23:59:59') |
| | | and t.create_time between #{commonPage.startTime} and concat(#{commonPage.stopTime},' 23:59:59') |
| | | </if> |
| | | <if test="commonPage.isAddress !=null"> |
| | | <if test="commonPage.isAddress == 0"> |
| | |
| | | </select> |
| | | |
| | | <select id="fiveCount" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record where is_del=0 <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) travelCount |
| | | select (select count(*) from com_act_acid_record where is_del=0 <if test="localCity!=null and localCity!=''">and |
| | | local_city like concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if |
| | | test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 <if |
| | | test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if |
| | | test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if |
| | | test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if |
| | | test="localCity!=null and localCity!=''">and local_city like concat('%',#{localCity},'%')</if>) travelCount |
| | | </select> |
| | | |
| | | <select id="areaStatics" resultType="com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO"> |
| | | select (select count(*) from com_act_acid_record where is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if> <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if> <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if><if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if>) travelCount |
| | | select (select count(*) from com_act_acid_record where is_del=0 |
| | | <if |
| | | test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0 |
| | | <if |
| | | test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 |
| | | <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0 |
| | | <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0 |
| | | <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0 |
| | | <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | <if test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59')</if>) travelCount |
| | | </select> |
| | | |
| | | <select id="countryStatics" resultType="Integer"> |
| | | select count(*) from com_act_acid_record where is_del=0 and departure_city like concat('%',#{departureCity},'%') <if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> and local_city like concat('%',#{localCity},'%')</if> |
| | | select count(*) from com_act_acid_record where is_del=0 and departure_city like concat('%',#{departureCity},'%') |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="fiveCountPlus" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record where 1=1 and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) travelCount, |
| | | (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) outsideCount |
| | | select (select count(*) from com_act_acid_record where 1=1 and is_del=0 |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) travelCount, |
| | | (select count(*) from com_act_acid_record where outside_city = '是' and is_del=0 |
| | | <if |
| | | test="date!=null and date!=''">and create_time between concat(#{date},' 00:00:00') and concat(#{date},' |
| | | 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) outsideCount |
| | | </select> |
| | | |
| | | <select id="pushStatics" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record where 1=1 and is_del=0<if test="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and local_city like concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_danger_member t LEFT JOIN com_act_acid_danger_member t1 on t.record_id = t1.id where 1=1 and t.is_del=0<if test="date!=null and date!=''"> and t.create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</if> <if test="localCity!=null and localCity!='' and localCity !='panzhihua'"> and t1.local_city like concat('%',#{localCity},'%')</if>) dangerCount |
| | | select (select count(*) from com_act_acid_record where 1=1 and is_del=0 |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_danger_member t LEFT JOIN com_act_acid_danger_member t1 on t.record_id = |
| | | t1.id where 1=1 and t.is_del=0 |
| | | <if test="date!=null and date!=''">and t.create_time between concat(#{date},' |
| | | 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and t1.local_city like |
| | | concat('%',#{localCity},'%')</if>) dangerCount |
| | | </select> |
| | | |
| | | <select id="selectLastNext" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO"> |
| | | select(select min(id) from com_act_acid_record where id > #{id} and check_status = 0) next_id, |
| | | (select max(id) as next_id from com_act_acid_record where #{id} > id and check_status = 0) last_id |
| | | </select> |
| | | |
| | | <select id="selectAcidCount" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidChartsVO"> |
| | | select count(*) as numOne from com_act_acid_record where 1=1 and is_del=0 |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and local_city like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | </select> |
| | | |
| | | <select id="selectDangerCount" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidChartsVO"> |
| | | select (select count(*) as numOne from com_act_acid_danger_member where type = 1 |
| | | <if test="date!=null and date!=''"> |
| | | and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like |
| | | concat('%',#{localCity},'%')</if>) numberOne, |
| | | (select count(*) as numTwo from com_act_acid_danger_member where type = 2 |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like |
| | | concat('%',#{localCity},'%')</if>) numberTwo |
| | | </select> |
| | | |
| | | <select id="selectCheck" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidChartsVO"> |
| | | select (select count(id) from com_act_acid_danger_member where type=1 |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like |
| | | concat('%',#{localCity},'%')</if>) numTwo,count(id) numOne, |
| | | case |
| | | WHEN status = 1 THEN "集中隔离" |
| | | WHEN status = 2 THEN "居家隔离" |
| | | WHEN status = 3 THEN "健康监测" |
| | | WHEN status = 4 THEN "失联或尚需追踪" |
| | | WHEN status = 5 THEN "排除风险" |
| | | WHEN status = 6 THEN "暂未管控" end name |
| | | from com_act_acid_danger_member where type=1 |
| | | <if test="date!=null and date!=''">and |
| | | create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59') |
| | | </if> |
| | | <if test="localCity!=null and localCity!='' and localCity !='panzhihua'">and relation_name like |
| | | concat('%',#{localCity},'%') |
| | | </if> |
| | | GROUP BY status |
| | | </select> |
| | | |
| | | </mapper> |