zhanghua
2022-11-01 acad75793d64779c8c8b19a98a9d74dc12a8cd5e
违章统计
1个文件已修改
1 文件已复制
1 文件已重命名
161 ■■■■ 已修改文件
ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java 116 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java 6 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java 39 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ycl-platform/src/main/java/com/ycl/controller/intelligentPatrol/StatisticsController.java
@@ -5,8 +5,8 @@
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 com.ycl.dto.statistics.UnlawfulDto;
import com.ycl.dto.statistics.UnlawfulShopDto;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.format.annotation.DateTimeFormat;
@@ -17,6 +17,7 @@
import java.time.LocalDateTime;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;
/**
@@ -31,32 +32,101 @@
@Api(tags = "违章-违法统计")
public class StatisticsController extends BaseController {
    List<UnlawfulDto> ls = new ArrayList<>(Arrays.asList(
            new UnlawfulDto("市场监管", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("公安", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("自然资源", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("生态环境", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("地方立法", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("地震", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("教育", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("经信", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("林业", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("农村环境卫生", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("气象", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("人防", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("水行政", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("应急管理", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0),
            new UnlawfulDto("其他", 100, 0.6, 10, 1, 20, 5, 20, 0.6, 0.9, 0.0))
    );
    @GetMapping("/unlawful/type")
    @ApiOperation("按违规类型统计")
    @LogSave(operationType = "按违规类型统计", contain = "查询")
    public CommonResult<IPage<UnlawfulTypeDto>> 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<UnlawfulTypeDto> page = new Page<>();
        List<UnlawfulTypeDto> 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));
    public CommonResult<IPage<UnlawfulDto>> 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<UnlawfulDto> page = new Page<>();
        page.setTotal(ls.size());
        page.setRecords(ls);
        return CommonResult.success(page);
    }
    @GetMapping("/unlawful/point")
    @ApiOperation("按点位统计")
    @LogSave(operationType = "按点位统计", contain = "查询")
    public CommonResult<IPage<UnlawfulDto>> searchByPoint(@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<UnlawfulDto> page = new Page<>();
        page.setTotal(ls.size());
        page.setRecords(ls);
        return CommonResult.success(page);
    }
    @GetMapping("/unlawful/time")
    @ApiOperation("按时间统计")
    @LogSave(operationType = "按时间统计", contain = "查询")
    public CommonResult<IPage<UnlawfulDto>> searchByTime(@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<UnlawfulDto> page = new Page<>();
        page.setTotal(ls.size());
        page.setRecords(ls);
        return CommonResult.success(page);
    }
    @GetMapping("/unlawful/area")
    @ApiOperation("按区域统计")
    @LogSave(operationType = "按区域统计", contain = "查询")
    public CommonResult<IPage<UnlawfulDto>> searchByArea(@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<UnlawfulDto> page = new Page<>();
        page.setTotal(ls.size());
        page.setRecords(ls);
        return CommonResult.success(page);
    }
    @GetMapping("/unlawful/shop")
    @ApiOperation("门前三包统计")
    @LogSave(operationType = "门前三包统计", contain = "查询")
    public CommonResult<IPage<UnlawfulShopDto>> searchByShop(@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<UnlawfulShopDto> page = new Page<>();
        List<UnlawfulShopDto> ls = new ArrayList<>();
        ls.add(new UnlawfulShopDto("店铺1", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺2", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺3", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺4", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺5", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺6", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺7", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺8", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺9", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺10", 100, 10, 1, 20, 5, 20, 0.6));
        ls.add(new UnlawfulShopDto("店铺11", 100, 10, 1, 20, 5, 20, 0.7));
        ls.add(new UnlawfulShopDto("店铺12", 100, 10, 1, 20, 5, 20, 0.8));
        ls.add(new UnlawfulShopDto("店铺13", 100, 10, 1, 20, 5, 20, 0.9));
        page.setTotal(ls.size());
        page.setRecords(ls);
        return CommonResult.success(page);
    }
}
ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulDto.java
File was renamed from ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java
@@ -15,7 +15,7 @@
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UnlawfulTypeDto {
public class UnlawfulDto {
    /**
     * 类型名称
@@ -67,4 +67,8 @@
     */
    private Double registerRatio;
    /**
     * 准确率
     */
    private Double accuracyRatio;
}
ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
copy from ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java copy to ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulShopDto.java
File was copied from ycl-platform/src/main/java/com/ycl/dto/statistics/UnlawfulTypeDto.java
@@ -6,7 +6,7 @@
/**
 * UnlawfulTypeDto 按违规类型统计
 * UnlawfulShopDto 门前三包统计
 *
 * @version V1.0
 * @author: AI
@@ -15,10 +15,10 @@
@Data
@AllArgsConstructor
@NoArgsConstructor
public class UnlawfulTypeDto {
public class UnlawfulShopDto {
    /**
     * 类型名称
     * 商户名称
     */
    private String name;
@@ -28,9 +28,19 @@
    private Integer count;
    /**
     * 占比
     * 包卫生
     */
    private Double ratio;
    private Integer sanitation;
    /**
     * 包秩续
     */
    private Integer orderliness;
    /**
     * 包设施
     */
    private Integer facility;
    /**
     * 立案
@@ -38,29 +48,10 @@
    private Integer register;
    /**
     * 暂不立案
     */
    private Integer notRegister;
    /**
     * 结案
     */
    private Integer closing;
    /**
     * 再学习
     */
    private Integer relearn;
    /**
     * 已审核
     */
    private Integer checked;
    /**
     * 审核率
     */
    private Double checkedRatio;
    /**
     * 立案率