heheng
2025-11-28 6d5fc7859473d30a2e4c1f20f748abae652342b8
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
package com.gkhy.exam.admin.controller.web;
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.domain.ProcessInspection;
import com.gkhy.exam.system.domain.StandardizedTemplate;
import com.gkhy.exam.system.service.ProcessInspectionService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiImplicitParam;
import io.swagger.annotations.ApiImplicitParams;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.*;
 
@Api(tags = "过程检验管理")
@RestController
@RequestMapping("/process")
public class ProcessInspectionController {
 
    @Autowired
    private ProcessInspectionService processInspectionService;
 
 
    /**
     * 过程检验列表
     * @param companyId
     * @return
     */
    @ApiOperation(value = "过程检验列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司iD"),
            @ApiImplicitParam(paramType = "query", name = "type", dataType = "int", required = true, value = "类型1过程检验2最终检验"),
            @ApiImplicitParam(paramType = "query", name = "itemId", dataType = "int", required = false, value = "项目iD"),
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = true, value = "页码"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量")
    })
    @GetMapping("/inspection/list")
    public CommonResult selectProcessInspectionList(Integer companyId, @RequestParam("type") Integer templateType,Integer itemId){
        return CommonResult.success(processInspectionService.selectProcessInspectionList(companyId, templateType, itemId));
    }
 
    /**
     * 过程检验新增
     * @param processInspection
     * @return
     */
    @ApiOperation(value = "过程检验新增")
    @PostMapping("/inspection/insert")
    public CommonResult insertProcessInspection(@Validated @RequestBody ProcessInspection processInspection){
        return processInspectionService.insertProcessInspection(processInspection);
    }
 
    /**
     * 过程检验修改
     * @param processInspection
     * @return
     */
    @ApiOperation(value = "过程检验修改")
    @PostMapping("/inspection/update")
    public CommonResult updateProcessInspection(@Validated @RequestBody ProcessInspection processInspection){
        return processInspectionService.updateProcessInspection(processInspection);
    }
 
    /**
     * 过程检验删除
     * @param inspectionId
     * @return
     */
    @ApiOperation(value = "过程检验删除")
    @GetMapping("/inspection/deleted")
    public CommonResult deletedProcessInspection(@RequestParam("inspectionId") Integer inspectionId){
        return processInspectionService.deletedProcessInspection(inspectionId);
    }
 
 
 
 
}