| | |
| | | import com.ycl.annotation.LogSave; |
| | | import com.ycl.api.CommonResult; |
| | | import com.ycl.controller.BaseController; |
| | | import com.ycl.dto.caseHandler.QueryForViolationParam; |
| | | import com.ycl.dto.statistics.UnlawfulDto; |
| | | import com.ycl.dto.statistics.UnlawfulShopDto; |
| | | import com.ycl.utils.EasyExcelUtils; |
| | | import com.ycl.vo.casePool.QueryForViolationVO; |
| | | 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 org.springframework.web.bind.annotation.*; |
| | | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import java.time.LocalDateTime; |
| | | import java.util.ArrayList; |
| | | import java.util.Arrays; |
| | |
| | | return CommonResult.success(page); |
| | | } |
| | | |
| | | @PostMapping("/export/unlawful") |
| | | @ApiOperation("按各种统计方式-导出") |
| | | public void export(HttpServletResponse response) { |
| | | String sheetName = "按统计方式"; |
| | | EasyExcelUtils.export(response, sheetName, UnlawfulDto.class, ls); |
| | | } |
| | | |
| | | @PostMapping("/export/shop") |
| | | @ApiOperation("门前三包-导出") |
| | | public void exportShop(HttpServletResponse response) { |
| | | 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)); |
| | | String sheetName = "门前三包"; |
| | | EasyExcelUtils.export(response, sheetName, UnlawfulShopDto.class, ls); |
| | | } |
| | | } |
| | |
| | | package com.ycl.dto.statistics; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | /** |
| | | * 类型名称 |
| | | */ |
| | | @ExcelProperty(value = "类型名称", index = 0) |
| | | private String name; |
| | | |
| | | /** |
| | | * 事件总数 |
| | | */ |
| | | @ExcelProperty(value = "事件总数", index = 1) |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 占比 |
| | | */ |
| | | @ExcelProperty(value = "占比", index = 2) |
| | | private Double ratio; |
| | | |
| | | /** |
| | | * 立案 |
| | | */ |
| | | @ExcelProperty(value = "立案", index = 3) |
| | | private Integer register; |
| | | |
| | | /** |
| | | * 暂不立案 |
| | | */ |
| | | @ExcelProperty(value = "暂不立案", index = 4) |
| | | private Integer notRegister; |
| | | |
| | | /** |
| | | * 结案 |
| | | */ |
| | | @ExcelProperty(value = "结案", index = 5) |
| | | private Integer closing; |
| | | |
| | | /** |
| | | * 再学习 |
| | | */ |
| | | @ExcelProperty(value = "再学习", index = 6) |
| | | private Integer relearn; |
| | | |
| | | /** |
| | | * 已审核 |
| | | */ |
| | | @ExcelProperty(value = "已审核", index = 7) |
| | | private Integer checked; |
| | | |
| | | /** |
| | | * 审核率 |
| | | */ |
| | | @ExcelProperty(value = "审核率", index = 8) |
| | | private Double checkedRatio; |
| | | |
| | | /** |
| | | * 立案率 |
| | | */ |
| | | @ExcelProperty(value = "立案率", index = 9) |
| | | private Double registerRatio; |
| | | |
| | | /** |
| | | * 准确率 |
| | | */ |
| | | @ExcelProperty(value = "准确率", index = 10) |
| | | private Double accuracyRatio; |
| | | } |
| | |
| | | package com.ycl.dto.statistics; |
| | | |
| | | import com.alibaba.excel.annotation.ExcelProperty; |
| | | import lombok.AllArgsConstructor; |
| | | import lombok.Data; |
| | | import lombok.NoArgsConstructor; |
| | |
| | | /** |
| | | * 商户名称 |
| | | */ |
| | | @ExcelProperty(value = "商户名称", index = 0) |
| | | private String name; |
| | | |
| | | /** |
| | | * 事件总数 |
| | | */ |
| | | @ExcelProperty(value = "事件总数", index = 1) |
| | | private Integer count; |
| | | |
| | | /** |
| | | * 包卫生 |
| | | */ |
| | | @ExcelProperty(value = "包卫生", index = 2) |
| | | private Integer sanitation; |
| | | |
| | | /** |
| | | * 包秩续 |
| | | */ |
| | | @ExcelProperty(value = "包秩续", index = 3) |
| | | private Integer orderliness; |
| | | |
| | | /** |
| | | * 包设施 |
| | | */ |
| | | @ExcelProperty(value = "包设施", index = 4) |
| | | private Integer facility; |
| | | |
| | | /** |
| | | * 立案 |
| | | */ |
| | | @ExcelProperty(value = "立案", index = 5) |
| | | private Integer register; |
| | | |
| | | /** |
| | | * 已审核 |
| | | */ |
| | | @ExcelProperty(value = "已审核", index = 6) |
| | | private Integer checked; |
| | | |
| | | |
| | | /** |
| | | * 立案率 |
| | | */ |
| | | @ExcelProperty(value = "立案率", index = 7) |
| | | private Double registerRatio; |
| | | |
| | | } |