| | |
| | | import com.doumee.dao.business.model.CarEvent; |
| | | import com.doumee.dao.system.vo.CarEventVo; |
| | | import com.doumee.service.business.CarEventService; |
| | | import com.doumee.service.business.impl.hksync.HkSyncParkServiceImpl; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | 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; |
| | | import javax.swing.event.CaretEvent; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.List; |
| | |
| | | @RestController |
| | | @RequestMapping("/business/carEvent") |
| | | public class CarEventController extends BaseController { |
| | | |
| | | @Autowired |
| | | private HkSyncParkServiceImpl hkSyncParkService; |
| | | |
| | | @Autowired |
| | | private CarEventService carEventService; |
| | |
| | | @PostMapping("/exportExcel") |
| | | //@RequiresPermissions("business:carevent:exportExcel") |
| | | public void exportExcel (@RequestBody PageWrap<CarEvent> pageWrap, HttpServletResponse response) { |
| | | ExcelExporter.build(CarEventVo.class).exportWithFirstAndEnd (carEventService.findPageExcel(pageWrap),"停车场事件推送记录表", null, "停车场事件推送记录导出报表",null , 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("根据日期(starttime)同步过车数据") |
| | | @PostMapping("/syncByDate") |
| | | @RequiresPermissions("business:carevent:sync") |
| | | public ApiResponse syncByDate(@RequestBody CarEvent param) { |
| | | hkSyncParkService.syncParkRecords(param.getCreateDate()); |
| | | return ApiResponse.success(null); |
| | | } |
| | | @ApiOperation("根据ID查询") |
| | | @GetMapping("/{id}") |
| | | @RequiresPermissions("business:carevent:query") |