zss
17 小时以前 7adb23a079e915118dc1f90834f00f6f68da0d07
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
package com.ruoyi.safe.controller;
 
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.framework.web.domain.R;
import com.ruoyi.safe.pojo.SafeAccident;
import com.ruoyi.safe.pojo.SafeContingencyPlan;
import com.ruoyi.safe.service.SafeAccidentService;
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;
 
/**
 * <p>
 * 安全生产--事故上报记录 前端控制器
 * </p>
 *
 * @author 芯导软件(江苏)有限公司
 * @since 2026-01-28 02:40:31
 */
@RestController
@RequestMapping("/safeAccident")
@Api(tags = "安全生产--事故上报记录")
public class SafeAccidentController {
 
    @Autowired
    private SafeAccidentService safeAccidentService;
 
    @GetMapping("/page")
    @ApiOperation("分页查询")
    public R page(Page page, SafeAccident safeAccident) {
        return R.ok(safeAccidentService.pageSafeAccident(page, safeAccident));
    }
 
    @ApiOperation("新增事故上报记录")
    @PostMapping()
    public R add(@RequestBody SafeAccident safeAccident) {
        return R.ok(safeAccidentService.save(safeAccident));
    }
 
    @ApiOperation("修改事故上报记录")
    @PutMapping ()
    public R update(@RequestBody  SafeAccident safeAccident) {
        return R.ok(safeAccidentService.updateById(safeAccident));
    }
 
    @ApiOperation("删除事故上报记录")
    @DeleteMapping("/{ids}")
    public R delSafeCertification(@RequestBody List<Integer> ids) {
        return R.ok(safeAccidentService.removeBatchByIds(ids));
    }
 
}