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

116 lines
4.0 KiB

package com.zc.business.controller;
import java.util.List;
import javax.servlet.http.HttpServletResponse;
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.zc.business.domain.DcEventProcess;
import com.zc.business.service.IDcEventProcessService;
import com.ruoyi.common.utils.poi.ExcelUtil;
import com.ruoyi.common.core.page.TableDataInfo;
/**
* 事件处理流程Controller
*
* @author ruoyi
* @date 2024-01-03
*/
@Api(tags = "事件处置流程")
@RestController
@RequestMapping("/system/process")
public class DcEventProcessController extends BaseController
{
@Autowired
private IDcEventProcessService dcEventProcessService;
/**
* 查询事件处理流程列表
*/
@ApiOperation("查询事件处理流程列表")
@PreAuthorize("@ss.hasPermi('system:process:list')")
@GetMapping("/list")
public TableDataInfo list(DcEventProcess dcEventProcess)
{
startPage();
List<DcEventProcess> list = dcEventProcessService.selectDcEventProcessList(dcEventProcess);
return getDataTable(list);
}
/**
* 导出事件处理流程列表
*/
@ApiOperation("导出事件处理流程列表")
@PreAuthorize("@ss.hasPermi('system:process:export')")
@Log(title = "事件处理流程", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, DcEventProcess dcEventProcess)
{
List<DcEventProcess> list = dcEventProcessService.selectDcEventProcessList(dcEventProcess);
ExcelUtil<DcEventProcess> util = new ExcelUtil<>(DcEventProcess.class);
util.exportExcel(response, list, "事件处理流程数据");
}
/**
* 获取事件处理流程详细信息
*/
@ApiOperation("获取事件处理流程详细信息")
@PreAuthorize("@ss.hasPermi('system:process:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(dcEventProcessService.selectDcEventProcessById(id));
}
/**
* 新增事件处理流程
*/
@ApiOperation("新增事件处理流程")
@PreAuthorize("@ss.hasPermi('system:process:add')")
@Log(title = "事件处理流程", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody DcEventProcess dcEventProcess)
{
return toAjax(dcEventProcessService.insertDcEventProcess(dcEventProcess));
}
/**
* 修改事件处理流程
*/
@ApiOperation("修改事件处理流程")
@PreAuthorize("@ss.hasPermi('system:process:edit')")
@Log(title = "事件处理流程", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody DcEventProcess dcEventProcess)
{
return toAjax(dcEventProcessService.updateDcEventProcess(dcEventProcess));
}
/**
* 删除事件处理流程
*/
@ApiOperation("删除事件处理流程")
@PreAuthorize("@ss.hasPermi('system:process:remove')")
@Log(title = "事件处理流程", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(dcEventProcessService.deleteDcEventProcessByIds(ids));
}
}