heheng
2025-09-12 3b109477ba6bd8dce0f61eb75248e603e584d8af
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
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
package com.gkhy.web.controller.safety;
 
 
import com.gkhy.common.annotation.Log;
import com.gkhy.common.core.controller.BaseController;
import com.gkhy.common.core.domain.AjaxResult;
import com.gkhy.common.core.page.TableDataInfo;
import com.gkhy.common.enums.BusinessType;
import com.gkhy.system.domain.DailySafetyInspection;
import com.gkhy.system.domain.SysNotice;
import com.gkhy.system.service.DailySafetyInspectionService;
import io.swagger.annotations.*;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
import java.util.List;
 
import static com.gkhy.common.utils.PageUtils.startPage;
 
/**
 * <p>
 * 日常安全检查主表 前端控制器
 * </p>
 *
 * @author hh
 * @since 2025-09-08 10:36:52
 */
@RestController
@RequestMapping("/system/dailySafetyInspection")
@Api(tags = "日常安全检查")
public class DailySafetyInspectionController extends BaseController {
 
 
    @Autowired
    private DailySafetyInspectionService dailySafetyInspectionService;
 
    @GetMapping("/list")
    @ApiOperation(value = "日常安全检查列表")
    public TableDataInfo list(DailySafetyInspection dailySafetyInspection)
    {
        startPage();
        List<DailySafetyInspection> list = dailySafetyInspectionService.selectDailySafetyInspectionList(dailySafetyInspection);
        return getDataTable(list);
    }
 
 
    /**
     * 新增编辑日常安全检查
     */
    @PostMapping("/saveDailySafetyInspection")
    @ApiOperation(value = "新增编辑日常安全检查")
    public AjaxResult saveDailySafetyInspection(@Validated @RequestBody DailySafetyInspection dailySafetyInspection)
    {
        return toAjax(dailySafetyInspectionService.saveDailySafetyInspection(dailySafetyInspection));
    }
 
 
    /**
     * 删除通知公告
     */
    @GetMapping("/deleteDailySafetyInspection")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "id", dataType = "int", required = true, value = "id"),
    })
    @ApiOperation(value = "删除日常安全检查")
    public AjaxResult deleteDailySafetyInspection(@RequestParam("id") Long id)
    {
        return toAjax(dailySafetyInspectionService.deleteDailySafetyInspection(id));
    }
 
 
    @GetMapping("/getCheckCount")
    @ApiOperation(value = "25号之后查询是否提交安全检查大于0提交")
    public AjaxResult getCheckCount()
    {
        return AjaxResult.success(dailySafetyInspectionService.getCheckCount());
    }
 
}