package com.ycl.controller.intelligentPatrol; import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.ycl.annotation.LogSave; import com.ycl.api.CommonResult; import com.ycl.controller.BaseController; import com.ycl.dto.statistics.UnlawfulTypeDto; import com.ycl.vo.equipment.HandheldTerminalVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.format.annotation.DateTimeFormat; import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; import java.time.LocalDateTime; import java.util.ArrayList; import java.util.List; /** * StatisticsController * * @version V1.0 * @author: AI * @date: 2022-11-01 16:40 **/ @RestController @RequestMapping("/intelligentPatrol/statistics") @Api(tags = "违章-违法统计") public class StatisticsController extends BaseController { @GetMapping("/unlawful/type") @ApiOperation("按违规类型统计") @LogSave(operationType = "按违规类型统计", contain = "查询") public CommonResult> searchByType(@RequestParam(required = true) Integer currentPage, @RequestParam(required = true) Integer pageSize, @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime beginTime, @RequestParam(required = false) @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") LocalDateTime endTime) { IPage page = new Page<>(); List ls = new ArrayList<>(); ls.add(new UnlawfulTypeDto("市场监管", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("公安", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("自然资源", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("生态环境", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("地方立法", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("地震", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("教育", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("经信", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("林业", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("农村环境卫生", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("气象", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("人防", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("水行政", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("应急管理", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); ls.add(new UnlawfulTypeDto("其他", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9)); page.setTotal(ls.size()); page.setRecords(ls); return CommonResult.success(page); } }