New file |
| | |
| | | package com.panzhihua.common.model.vos.community.acid; |
| | | |
| | | import lombok.Data; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class ComAcidAreaVO { |
| | | private String name; |
| | | private Integer count; |
| | | } |
New file |
| | |
| | | package com.panzhihua.common.model.vos.community.acid; |
| | | |
| | | import com.panzhihua.common.model.vos.community.reserve.FiveCount; |
| | | import lombok.Data; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * @author zzj |
| | | */ |
| | | @Data |
| | | public class ComAcidStaticVO extends FiveCount { |
| | | private String areaName; |
| | | private List<ComAcidAreaVO> comAcidAreaVOS; |
| | | } |
| | |
| | | private Integer yellowMark; |
| | | private Integer greenMark; |
| | | private Integer travelCount; |
| | | private Integer outsideCount; |
| | | } |
| | |
| | | @GetMapping("/comActAcidRecord/fiveCount") |
| | | R comActAcidRecordFiveCount(@RequestParam("localCity")String localCity); |
| | | |
| | | /** |
| | | * 7项常规统计 |
| | | * @return |
| | | */ |
| | | @GetMapping("/comActAcidRecord/fiveCountPlus") |
| | | R comActAcidRecordFiveCountPlus(@RequestParam("date")String date); |
| | | |
| | | @GetMapping("/comActAcidRecord/statics") |
| | | R comActAcidRecordStatics(@RequestParam("date")String date); |
| | | |
| | | /** |
| | | * 分页查询所有数据 |
| | |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.FiveCount; |
| | |
| | | public R fiveCount(@RequestParam("localCity")String localCity){ |
| | | return this.communityService.comActAcidRecordFiveCount(localCity); |
| | | } |
| | | |
| | | /** |
| | | * 5项常规统计 |
| | | * @return |
| | | */ |
| | | @ApiOperation(value = "7项常规统计",response = FiveCount.class) |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date){ |
| | | return this.communityService.comActAcidRecordFiveCountPlus(date); |
| | | } |
| | | |
| | | |
| | | @ApiOperation(value = "报表统计",response = ComAcidStaticVO.class) |
| | | @GetMapping("/statics") |
| | | public R statics(@RequestParam("date")String date){ |
| | | return this.communityService.comActAcidRecordStatics(date); |
| | | } |
| | | } |
| | |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.io.Serializable; |
| | | import java.util.Date; |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | public R fiveCount(@RequestParam("localCity")String localCity){ |
| | | return this.comActAcidRecordService.fiveCount(localCity); |
| | | } |
| | | |
| | | /** |
| | | * 7项常规统计 |
| | | * @return |
| | | */ |
| | | @GetMapping("fiveCountPlus") |
| | | public R fiveCountPlus(@RequestParam("date")String date){ |
| | | return this.comActAcidRecordService.fiveCountPlus(date); |
| | | } |
| | | |
| | | @GetMapping("/statics") |
| | | public R statics(@RequestParam("date")String date){ |
| | | return this.comActAcidRecordService.statics(date); |
| | | } |
| | | } |
| | |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidAreaVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordExcelVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.model.vos.community.reserve.FiveCount; |
| | |
| | | * @return |
| | | */ |
| | | FiveCount fiveCount(String localCity); |
| | | |
| | | /** |
| | | * 7项统计 |
| | | * @param date |
| | | * @return |
| | | */ |
| | | FiveCount fiveCountPlus(String date); |
| | | |
| | | /** |
| | | * 统计查询 |
| | | * @param localCity |
| | | * @param date |
| | | * @return |
| | | */ |
| | | ComAcidStaticVO areaStatics(@Param("localCity") String localCity, @Param("date") String date); |
| | | |
| | | /** |
| | | * 出发地统计 |
| | | * @param departureCity |
| | | * @param date |
| | | * @return |
| | | */ |
| | | Integer countryStatics(@Param("departureCity") String departureCity, @Param("date") String date); |
| | | } |
| | |
| | | * @return |
| | | */ |
| | | R fiveCount(String localCity); |
| | | |
| | | /** |
| | | * 5项统计 |
| | | * @return |
| | | */ |
| | | R fiveCountPlus(String date); |
| | | |
| | | /** |
| | | * 统计 |
| | | * @return |
| | | */ |
| | | R statics(String date); |
| | | } |
| | |
| | | import com.panzhihua.common.model.dtos.community.acid.ComActAcidRecordDTO; |
| | | import com.panzhihua.common.model.dtos.property.CommonPage; |
| | | import com.panzhihua.common.model.vos.R; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidAreaVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComAcidStaticVO; |
| | | import com.panzhihua.common.model.vos.community.acid.ComActAcidRecordVO; |
| | | import com.panzhihua.common.utlis.StringUtils; |
| | | import com.panzhihua.service_community.entity.ComActAcidRecord; |
| | |
| | | import org.springframework.stereotype.Service; |
| | | |
| | | import javax.annotation.Resource; |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | | |
| | | /** |
| | | * (ComActAcidRecord)表服务实现类 |
| | |
| | | public R fiveCount(String localCity) { |
| | | return R.ok(this.baseMapper.fiveCount(localCity)); |
| | | } |
| | | @Override |
| | | public R fiveCountPlus(String date) { |
| | | return R.ok(this.baseMapper.fiveCountPlus(date)); |
| | | } |
| | | |
| | | @Override |
| | | public R statics(String date) { |
| | | List<ComAcidStaticVO> comAcidStaticVOS=new ArrayList<>(); |
| | | String[] area={"东区","西区","仁和区","米易县","延边县","钒钛新城"}; |
| | | String[] country={"上海市","吉林省","广东省","江苏省","浙江省","山东省","湖北省","山西省","黑龙江省","广西壮族自治区","河北省","辽宁省","河南省","福建省","安徽省","南昌市","西宁市","西安市","文山州","兰州市","邵阳市"}; |
| | | for(String areaName:area){ |
| | | ComAcidStaticVO comAcidStaticVO=this.baseMapper.areaStatics(areaName,date); |
| | | comAcidStaticVO.setAreaName(areaName); |
| | | List<ComAcidAreaVO> comAcidAreaVOS=new ArrayList<>(); |
| | | for(String countryName:country){ |
| | | Integer count=this.baseMapper.countryStatics(countryName,date); |
| | | ComAcidAreaVO comAcidAreaVO=new ComAcidAreaVO(); |
| | | comAcidAreaVO.setName(countryName); |
| | | comAcidAreaVO.setCount(count); |
| | | comAcidAreaVOS.add(comAcidAreaVO); |
| | | } |
| | | comAcidStaticVO.setComAcidAreaVOS(comAcidAreaVOS); |
| | | comAcidStaticVOS.add(comAcidStaticVO); |
| | | } |
| | | return R.ok(comAcidStaticVOS); |
| | | } |
| | | } |
| | |
| | | (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 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!=''"> 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 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 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 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 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 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> |
| | | </select> |
| | | |
| | | <select id="fiveCountPlus" resultType="com.panzhihua.common.model.vos.community.reserve.FiveCount"> |
| | | select (select count(*) from com_act_acid_record <if test="date!=null and date!=''"> where 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="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="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="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="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="date!=null and date!=''"> and create_time between concat(#{date},' 00:00:00') and concat(#{date},' 23:23:59')</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>) outsideCount |
| | | </select> |
| | | |
| | | </mapper> |