|  |  |  | 
|---|
|  |  |  | import com.doumee.core.model.ApiResponse; | 
|---|
|  |  |  | import com.doumee.core.model.PageWrap; | 
|---|
|  |  |  | import com.doumee.core.model.PageData; | 
|---|
|  |  |  | import com.doumee.dao.admin.response.CarEventDTO; | 
|---|
|  |  |  | import com.doumee.dao.business.model.CarEvent; | 
|---|
|  |  |  | import com.doumee.dao.system.vo.CarEventVo; | 
|---|
|  |  |  | import com.doumee.service.business.CarEventService; | 
|---|
|  |  |  | import io.swagger.annotations.Api; | 
|---|
|  |  |  | import io.swagger.annotations.ApiOperation; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.apache.shiro.authz.annotation.RequiresPermissions; | 
|---|
|  |  |  | import org.springframework.beans.factory.annotation.Autowired; | 
|---|
|  |  |  | import org.springframework.web.bind.annotation.*; | 
|---|
|  |  |  | import javax.servlet.http.HttpServletResponse; | 
|---|
|  |  |  | 
|---|
|  |  |  | @PreventRepeat | 
|---|
|  |  |  | @ApiOperation("新建") | 
|---|
|  |  |  | @PostMapping("/create") | 
|---|
|  |  |  | @RequiresPermissions("business:carevent:create") | 
|---|
|  |  |  | //    @RequiresPermissions("business:carevent:create") | 
|---|
|  |  |  | public ApiResponse create(@RequestBody CarEvent carEvent) { | 
|---|
|  |  |  | return ApiResponse.success(carEventService.create(carEvent)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("分页查询") | 
|---|
|  |  |  | @PostMapping("/page") | 
|---|
|  |  |  | @RequiresPermissions("business:carevent:query") | 
|---|
|  |  |  | public ApiResponse<PageData<CarEvent>> findPage (@RequestBody PageWrap<CarEvent> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(carEventService.findPage(pageWrap)); | 
|---|
|  |  |  | //@RequiresPermissions("business:carevent:query") | 
|---|
|  |  |  | public ApiResponse<PageData<CarEventDTO>> findPage (@RequestBody PageWrap<CarEvent> pageWrap) { | 
|---|
|  |  |  | return ApiResponse.success(carEventService.findVisitCarPage(pageWrap)); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("导出Excel") | 
|---|
|  |  |  | @PostMapping("/exportExcel") | 
|---|
|  |  |  | @RequiresPermissions("business:carevent:exportExcel") | 
|---|
|  |  |  | //@RequiresPermissions("business:carevent:exportExcel") | 
|---|
|  |  |  | public void exportExcel (@RequestBody PageWrap<CarEvent> pageWrap, HttpServletResponse response) { | 
|---|
|  |  |  | ExcelExporter.build(CarEvent.class).export(carEventService.findPage(pageWrap).getRecords(), "停车场事件推送记录表", response); | 
|---|
|  |  |  | //        ExcelExporter.build(CarEventVo.class).exportWithFirstAndEnd (carEventService.findPageExcel(pageWrap),"停车场事件推送记录表", null, "停车场事件推送记录导出报表",null , response); | 
|---|
|  |  |  | ExcelExporter.build(CarEventDTO.class).export(carEventService.findVisitCarPage(pageWrap).getRecords(), "停车场事件推送记录表", response); | 
|---|
|  |  |  | } | 
|---|
|  |  |  |  | 
|---|
|  |  |  | @ApiOperation("根据ID查询") | 
|---|