package com.ycl.platform.controller;
|
|
import annotation.Log;
|
import com.ycl.platform.domain.entity.CheckRule;
|
import com.ycl.platform.domain.vo.CheckRuleVO;
|
import com.ycl.platform.service.ICheckRuleService;
|
import com.ycl.system.AjaxResult;
|
import com.ycl.system.controller.BaseController;
|
import enumeration.BusinessType;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.security.access.prepost.PreAuthorize;
|
import org.springframework.web.bind.annotation.*;
|
|
/**
|
* 考核规则Controller
|
*
|
* @author ruoyi
|
* @date 2024-04-15
|
*/
|
@RestController
|
@RequestMapping("/check/rule")
|
public class CheckRuleController extends BaseController
|
{
|
@Autowired
|
private ICheckRuleService checkRuleService;
|
|
/**
|
* 查询考核规则列表
|
*/
|
@PreAuthorize("@ss.hasPermi('check:rule:list')")
|
@GetMapping("/list")
|
public AjaxResult list(CheckRule checkRule)
|
{
|
CheckRuleVO checkRuleVO = checkRuleService.selectCheckRuleList(checkRule);
|
return success(checkRuleVO);
|
}
|
|
|
/**
|
* 获取考核规则详细信息
|
*/
|
@PreAuthorize("@ss.hasPermi('check:rule:query')")
|
@GetMapping(value = "/{id}")
|
public AjaxResult getInfo(@PathVariable("id") Long id)
|
{
|
return success(checkRuleService.selectCheckRuleById(id));
|
}
|
|
|
/**
|
* 修改考核规则
|
*/
|
@PreAuthorize("@ss.hasPermi('check:rule:edit')")
|
@Log(title = "考核规则", businessType = BusinessType.UPDATE)
|
@PutMapping
|
public AjaxResult edit(@RequestBody CheckRule checkRule)
|
{
|
return toAjax(checkRuleService.updateCheckRule(checkRule));
|
}
|
|
// /**
|
// * 导出考核规则列表
|
// */
|
// @PreAuthorize("@ss.hasPermi('check:rule:export')")
|
// @Log(title = "考核规则", businessType = BusinessType.EXPORT)
|
// @PostMapping("/export")
|
// public void export(HttpServletResponse response, CheckRule checkRule)
|
// {
|
// List<CheckRule> list = checkRuleService.selectCheckRuleList(checkRule);
|
// ExcelUtil<CheckRule> util = new ExcelUtil<CheckRule>(CheckRule.class);
|
// util.exportExcel(response, list, "考核规则数据");
|
// }
|
|
// /**
|
// * 新增考核规则
|
// */
|
// @PreAuthorize("@ss.hasPermi('check:rule:add')")
|
// @Log(title = "考核规则", businessType = BusinessType.INSERT)
|
// @PostMapping
|
// public AjaxResult add(@RequestBody CheckRule checkRule)
|
// {
|
// return toAjax(checkRuleService.insertCheckRule(checkRule));
|
// }
|
}
|