济菏高速数据中心代码
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.
 
 
 
 
 

128 lines
4.5 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 io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
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
*/
@Api(tags = "交通管制事件")
@RestController
@RequestMapping("/system/control")
public class DcEventTrafficControlController extends BaseController
{
@Autowired
private IDcEventTrafficControlService dcEventTrafficControlService;
/**
* 查询交通管制事件
"管制设施"为事件“事件子类”列表
*/
@ApiOperation("查询交通管制事件")
//@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, "交通管制事件");
}
/**
* 获取交通管制事件
"管制设施"为事件“事件子类”详细信息
*/
@ApiOperation("获取交通管制事件")
// @PreAuthorize("@ss.hasPermi('system:control:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") String id)
{
return AjaxResult.success(dcEventTrafficControlService.selectDcEventTrafficControlById(id));
}
/**
* 新增交通管制事件
"管制设施"为事件“事件子类”
*/
@ApiOperation("新增交通管制事件")
// @PreAuthorize("@ss.hasPermi('system:control:add')")
@Log(title = "交通管制事件", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcEventTrafficControl dcEventTrafficControl)
{
return toAjax(dcEventTrafficControlService.insertDcEventTrafficControl(dcEventTrafficControl));
}
/**
* 修改交通管制事件
"管制设施"为事件“事件子类”
*/
@ApiOperation("修改交通管制事件")
//@PreAuthorize("@ss.hasPermi('system:control:edit')")
@Log(title = "交通管制事件", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcEventTrafficControl dcEventTrafficControl)
{
return toAjax(dcEventTrafficControlService.updateDcEventTrafficControl(dcEventTrafficControl));
}
/**
* 删除交通管制事件
"管制设施"为事件“事件子类”
*/
@ApiOperation("删除交通管制事件")
//@PreAuthorize("@ss.hasPermi('system:control:remove')")
@Log(title = "交通管制事件", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable String[] ids)
{
return toAjax(dcEventTrafficControlService.deleteDcEventTrafficControlByIds(ids));
}
}