package com.ruoyi.lavorissue.controller;
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
import com.ruoyi.framework.aspectj.lang.annotation.Log;
|
import com.ruoyi.framework.aspectj.lang.enums.BusinessType;
|
import com.ruoyi.framework.web.controller.BaseController;
|
import com.ruoyi.framework.web.domain.AjaxResult;
|
import com.ruoyi.lavorissue.pojo.LaborConf;
|
import com.ruoyi.lavorissue.service.LaborConfService;
|
import io.swagger.annotations.Api;
|
import io.swagger.annotations.ApiOperation;
|
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.web.bind.annotation.*;
|
|
import java.util.List;
|
|
/**
|
* @author :yys
|
* @date : 2025/11/19 14:02
|
*/
|
@RestController
|
@Api(tags = "劳保配置")
|
@RequestMapping("/laborConf")
|
public class LaborConfController extends BaseController {
|
|
@Autowired
|
private LaborConfService laborConfService;
|
|
@GetMapping("/listPage")
|
@Log(title = "查询劳保配置", businessType = BusinessType.OTHER)
|
@ApiOperation("查询劳保配置")
|
public AjaxResult listPage(Page page, LaborConf laborConf) {
|
return laborConfService.listPage(page, laborConf);
|
}
|
|
|
@PostMapping("/add")
|
@Log(title = "添加劳保配置", businessType = BusinessType.INSERT)
|
@ApiOperation("添加劳保配置")
|
public AjaxResult add(@RequestBody LaborConf laborConf) {
|
return laborConfService.save(laborConf) ? success() : error();
|
}
|
|
@PostMapping("/update")
|
@Log(title = "修改劳保配置", businessType = BusinessType.UPDATE)
|
@ApiOperation("修改劳保配置")
|
public AjaxResult update(@RequestBody LaborConf laborConf) {
|
return laborConfService.updateById(laborConf) ? success() : error();
|
}
|
|
@DeleteMapping("/delete")
|
@Log(title = "删除劳保配置", businessType = BusinessType.DELETE)
|
@ApiOperation("删除劳保配置")
|
public AjaxResult delete(@RequestBody List<Long> ids) {
|
return laborConfService.removeBatchByIds(ids) ? success() : error();
|
}
|
|
}
|