济菏高速数据中心代码
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

121 lines
4.1 KiB

package com.zc.business.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
import com.zc.business.domain.DcEventTrafficControl;
import com.zc.business.service.IDcEventTrafficControlService;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.PutMapping;
import org.springframework.web.bind.annotation.DeleteMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
import com.ruoyi.common.annotation.Log;
import com.ruoyi.common.core.controller.BaseController;
import com.ruoyi.common.core.domain.AjaxResult;
import com.ruoyi.common.enums.BusinessType;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 交通管制事件
"管制设施"为事件事件子类Controller
*
* @author ruoyi
* @date 2024-01-12
*/
@RestController
@RequestMapping("/system/control")
public class DcEventTrafficControlController extends BaseController
{
@Autowired
private IDcEventTrafficControlService dcEventTrafficControlService;
/**
* 查询交通管制事件
"管制设施"为事件事件子类列表
*/
@PreAuthorize("@ss.hasPermi('system:control:list')")
@GetMapping("/list")
public TableDataInfo list(DcEventTrafficControl dcEventTrafficControl)
{
startPage();
List<DcEventTrafficControl> list = dcEventTrafficControlService.selectDcEventTrafficControlList(dcEventTrafficControl);
return getDataTable(list);
}
/**
* 导出交通管制事件
"管制设施"为事件事件子类列表
*/
@PreAuthorize("@ss.hasPermi('system:control:export')")
@Log(title = "交通管制事件 ", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcEventTrafficControl dcEventTrafficControl)
{
List<DcEventTrafficControl> list = dcEventTrafficControlService.selectDcEventTrafficControlList(dcEventTrafficControl);
ExcelUtil<DcEventTrafficControl> util = new ExcelUtil<>(DcEventTrafficControl.class);
util.exportExcel(response, list, "交通管制事件");
}
/**
* 获取交通管制事件
"管制设施"为事件事件子类详细信息
*/
@PreAuthorize("@ss.hasPermi('system:control:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(dcEventTrafficControlService.selectDcEventTrafficControlById(id));
}
/**
* 新增交通管制事件
"管制设施"为事件事件子类
*/
@PreAuthorize("@ss.hasPermi('system:control:add')")
@Log(title = "交通管制事件", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcEventTrafficControl dcEventTrafficControl)
{
return toAjax(dcEventTrafficControlService.insertDcEventTrafficControl(dcEventTrafficControl));
}
/**
* 修改交通管制事件
"管制设施"为事件事件子类
*/
@PreAuthorize("@ss.hasPermi('system:control:edit')")
@Log(title = "交通管制事件", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcEventTrafficControl dcEventTrafficControl)
{
return toAjax(dcEventTrafficControlService.updateDcEventTrafficControl(dcEventTrafficControl));
}
/**
* 删除交通管制事件
"管制设施"为事件事件子类
*/
@PreAuthorize("@ss.hasPermi('system:control:remove')")
@Log(title = "交通管制事件", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(dcEventTrafficControlService.deleteDcEventTrafficControlByIds(ids));
}
}