package com.ycl.platform.controller; import annotation.Log; import com.ycl.platform.domain.entity.VehicleDataMonitor; import com.ycl.platform.service.IVehicleDataMonitorService; import com.ycl.system.AjaxResult; import com.ycl.system.controller.BaseController; import com.ycl.system.page.TableDataInfo; import com.ycl.utils.poi.ExcelUtil; import enumeration.BusinessType; import jakarta.servlet.http.HttpServletResponse; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; import java.util.List; /** * 卡口过车数据一致性Controller * * @author gonghl * @date 2024-03-19 */ @RestController @RequestMapping("/platform/platform") public class VehicleDataMonitorController extends BaseController { @Autowired private IVehicleDataMonitorService vehicleDataMonitorService; /** * 查询卡口过车数据一致性列表 */ @PreAuthorize("@ss.hasPermi('platform:platform:list')") @GetMapping("/list") public TableDataInfo list(VehicleDataMonitor vehicleDataMonitor) { startPage(); List list = vehicleDataMonitorService.selectVehicleDataMonitorList(vehicleDataMonitor); return getDataTable(list); } /** * 导出卡口过车数据一致性列表 */ @PreAuthorize("@ss.hasPermi('platform:platform:export')") @Log(title = "卡口过车数据一致性", businessType = BusinessType.EXPORT) @PostMapping("/export") public void export(HttpServletResponse response, VehicleDataMonitor vehicleDataMonitor) { List list = vehicleDataMonitorService.selectVehicleDataMonitorList(vehicleDataMonitor); ExcelUtil util = new ExcelUtil(VehicleDataMonitor.class); util.exportExcel(response, list, "卡口过车数据一致性数据"); } /** * 获取卡口过车数据一致性详细信息 */ @PreAuthorize("@ss.hasPermi('platform:platform:query')") @GetMapping(value = "/{id}") public AjaxResult getInfo(@PathVariable("id") Integer id) { return success(vehicleDataMonitorService.selectVehicleDataMonitorById(id)); } /** * 新增卡口过车数据一致性 */ @PreAuthorize("@ss.hasPermi('platform:platform:add')") @Log(title = "卡口过车数据一致性", businessType = BusinessType.INSERT) @PostMapping public AjaxResult add(@RequestBody VehicleDataMonitor vehicleDataMonitor) { return toAjax(vehicleDataMonitorService.insertVehicleDataMonitor(vehicleDataMonitor)); } /** * 修改卡口过车数据一致性 */ @PreAuthorize("@ss.hasPermi('platform:platform:edit')") @Log(title = "卡口过车数据一致性", businessType = BusinessType.UPDATE) @PutMapping public AjaxResult edit(@RequestBody VehicleDataMonitor vehicleDataMonitor) { return toAjax(vehicleDataMonitorService.updateVehicleDataMonitor(vehicleDataMonitor)); } /** * 删除卡口过车数据一致性 */ @PreAuthorize("@ss.hasPermi('platform:platform:remove')") @Log(title = "卡口过车数据一致性", businessType = BusinessType.DELETE) @DeleteMapping("/{ids}") public AjaxResult remove(@PathVariable Integer[] ids) { return toAjax(vehicleDataMonitorService.deleteVehicleDataMonitorByIds(ids)); } }