| | |
| | | <select id="pageList" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO"> |
| | | select * from com_act_acid_record |
| | | <where> |
| | | is_del=0 |
| | | <if test="commonPage.userId !=null"> |
| | | and user_id = #{commonPage.userId} |
| | | </if> |
| | |
| | | <select id="export" resultType="com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelReturn"> |
| | | select * from com_act_acid_record |
| | | <where> |
| | | is_del=0 |
| | | <if test="commonPage.userId !=null"> |
| | | and user_id = #{commonPage.userId} |
| | | </if> |
| | |
| | | </select> |
| | | |
| | | <select id="fiveCount" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record <if test="localCity!=null and localCity!=''"> where local_city like concat('%',#{localCity},'%')</if>) allCount, |
| | | (select count(*) from com_act_acid_record where danger_area = '是' <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) dangerCount, |
| | | (select count(*) from com_act_acid_record where color_mark = '绿码' <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) greenMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '红码' <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) redMark, |
| | | (select count(*) from com_act_acid_record where color_mark = '黄码' <if test="localCity!=null and localCity!=''"> and local_city like concat('%',#{localCity},'%')</if>) yellowMark, |
| | | (select count(*) from com_act_acid_record where travel_card = '是' <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 <if test="localCity!=null and localCity!='' and localCity!='攀枝花市'"> where 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 = '是' <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 = '绿码' <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 = '红码' <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 = '黄码' <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 = '是' <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 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 <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 = '是' <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 = '绿码' <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 = '红码' <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 = '黄码' <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 = '是' <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 = '是' <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 <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 <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> |
| | | |
| | | </mapper> |