zhuo
2025-02-28 b9ff0ede78518a3c7c160f12942acd9410c33ce5
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
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
package com.ruoyi.device.controller;
 
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.ruoyi.common.core.domain.Result;
import com.ruoyi.device.dto.DeviceInspectionRecordDto;
import com.ruoyi.device.pojo.DeviceInspectionRecord;
import com.ruoyi.device.service.DeviceInspectionRecordService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.SneakyThrows;
import org.springframework.web.bind.annotation.*;
 
import javax.annotation.Resource;
import javax.servlet.http.HttpServletResponse;
import java.util.Map;
 
/**
 * <p>
 *  设备点检记录表
 * </p>
 *
 * @author 江苏鵷雏网络科技有限公司
 * @since 2024-12-16 04:25:14
 */
@Api(tags = "设备点检记录")
@RestController
@RequestMapping("/deviceInspectionRecord")
public class DeviceInspectionRecordController {
    @Resource
    private DeviceInspectionRecordService deviceInspectionRecordService;
 
    /**
     * 分页查询设备点检记录
     */
    @ApiOperation("分页查询设备点检记录")
    @GetMapping("/getDeviceInspectionRecordByPage")
    public Result<IPage<DeviceInspectionRecord>> getDeviceInspectionRecordByPage(IPage page, DeviceInspectionRecordDto itemParameter) {
        return deviceInspectionRecordService.getDeviceInspectionRecordByPage(page, itemParameter);
    }
 
    /**
     * 查询点检详情
     */
    @ApiOperation("查询点检详情")
    @GetMapping("/getDeviceInspectionRecord")
    public Result getDeviceInspectionRecord(Integer inspectionRecordId) {
        return deviceInspectionRecordService.getDeviceInspectionRecord(inspectionRecordId);
    }
 
    /**
     * 新增设备点检记录
     * @param deviceInspectionRecord  设备点检记录
     */
    @ApiOperation("新增设备点检记录")
    @PostMapping("/addDeviceInspectionRecord")
    public Result addDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceInspectionRecord) {
        return deviceInspectionRecordService.addDeviceInspectionRecord(deviceInspectionRecord);
    }
 
    /**
     * 修改设备点检记录
     */
    @ApiOperation("修改设备点检记录")
    @PostMapping("/updateDeviceInspectionRecord")
    public Result updateDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceInspectionRecord) {
        return deviceInspectionRecordService.updateInspectionRecordAndDetails(deviceInspectionRecord);
    }
 
    /**
     * 删除设备点检记录
     */
    @ApiOperation("删除设备点检记录")
    @DeleteMapping("/deleteDeviceInspectionRecord")
    public Result deleteDeviceInspectionRecord(DeviceInspectionRecordDto deviceInspectionRecord) {
        return deviceInspectionRecordService.deleteDeviceInspectionRecordOrDetails(deviceInspectionRecord);
    }
 
 
    /**
     * 复核点检记录
     * @return
     */
    @ApiOperation(value = "复核核查记录")
    @PostMapping("/reviewDeviceInspectionRecord")
    public Result reviewDeviceInspectionRecord(@RequestBody DeviceInspectionRecordDto deviceExamineRecordDto){
        return deviceInspectionRecordService.reviewDeviceInspectionRecord(deviceExamineRecordDto);
    }
 
 
    /**
     * 导出设备点检记录
     */
    @ApiOperation("导出设备点检记录")
    @GetMapping("/exportDeviceInspectionRecord")
    public Result exportDeviceInspectionRecord(@RequestParam("inspectionRecordId") Integer inspectionRecordId, HttpServletResponse response) {
        return deviceInspectionRecordService.exportDeviceInspectionRecord(inspectionRecordId, response);
    }
}