“djh”
5 天以前 99132a43bf344f2aafdd9894b0762d2eedd9767b
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
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
package com.gkhy.exam.admin.controller.web;
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.domain.CompanyIndustryTemplate;
import com.gkhy.exam.system.domain.StandardizedQuality;
import com.gkhy.exam.system.domain.StandardizedTemplate;
import com.gkhy.exam.system.service.StandardizedTemplateService;
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("/template")
public class TemplateController {
 
 
    @Autowired
    private StandardizedTemplateService standardizedTemplateService;
 
    /**
     * 行业模版
     * @param companyId
     * @return
     */
    @ApiOperation(value = "标准化模版(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = false, value = "公司iD"),
            @ApiImplicitParam(paramType = "query", name = "templateType", dataType = "int", required = true, value = "类型1体系标准2技术标准3应用标准4程序文件5作业指导书6记录及表单7技术类8生产类9其他知识产权"),
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = true, value = "页码"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = true, value = "每页数量")
    })
    @GetMapping("/standardizedTemplate/list")
    public CommonResult selectStandardizedTemplateList(Integer companyId, @RequestParam("templateType") Integer templateType){
        return CommonResult.success(standardizedTemplateService.selectStandardizedTemplateList(companyId, templateType));
    }
 
    /**
     * 行业模版新增
     * @param standardizedTemplate
     * @return
     */
    @ApiOperation(value = "标准化模版新增")
    @PostMapping("/standardizedTemplate/insert")
    public CommonResult insertStandardizedTemplate(@Validated @RequestBody StandardizedTemplate standardizedTemplate){
        return standardizedTemplateService.insertStandardizedTemplate(standardizedTemplate);
    }
 
    /**
     * 企业花名册修改
     * @param standardizedTemplate
     * @return
     */
    @ApiOperation(value = "标准化模版修改")
    @PostMapping("/standardizedTemplate/update")
    public CommonResult updateCompanyIndustryTemplate(@Validated @RequestBody StandardizedTemplate standardizedTemplate){
        return standardizedTemplateService.updateStandardizedTemplate(standardizedTemplate);
    }
 
    /**
     * 行业模版删除
     * @param standardizedTemplateId
     * @return
     */
    @ApiOperation(value = "标准化模版删除")
    @GetMapping("/standardizedTemplate/deleted")
    public CommonResult deletedStandardizedTemplate(@RequestParam("standardizedTemplateId") Integer standardizedTemplateId){
        return standardizedTemplateService.deletedStandardizedTemplate(standardizedTemplateId);
    }
 
    /**
     * 行业模版
     * @param companyId
     * @return
     */
    @ApiOperation(value = "获取质量手册")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = true, value = "公司iD"),
    })
    @GetMapping("/standardizedQuality/info")
    public CommonResult selectStandardizedQuality(Integer companyId){
        return CommonResult.success(standardizedTemplateService.selectStandardizedQuality(companyId));
    }
 
    /**
     * 行业模版新增
     * @param standardizedQuality
     * @return
     */
    @ApiOperation(value = "质量手册新增")
    @PostMapping("/standardizedQuality/insert")
    public CommonResult insertStandardizedQuality(@Validated @RequestBody StandardizedQuality standardizedQuality){
        return standardizedTemplateService.insertStandardizedQuality(standardizedQuality);
    }
 
    /**
     * 企业花名册修改
     * @param standardizedQuality
     * @return
     */
    @ApiOperation(value = "质量手册修改")
    @PostMapping("/standardizedQuality/update")
    public CommonResult updateStandardizedQuality(@Validated @RequestBody StandardizedQuality standardizedQuality){
        return standardizedTemplateService.updateStandardizedQuality(standardizedQuality);
    }
 
    /**
     * 行业模版删除
     * @param standardizedQualityId
     * @return
     */
    @ApiOperation(value = "质量手册删除")
    @GetMapping("/standardizedQuality/deleted")
    public CommonResult deletedStandardizedQuality(@RequestParam("standardizedQualityId") Integer standardizedQualityId){
        return standardizedTemplateService.deletedStandardizedQuality(standardizedQualityId);
    }
 
    /**
     * 获取质量手册数据
     * @param companyId
     * @return
     */
    @ApiOperation(value = "获取质量手册数据")
    @GetMapping("/standardizedQuality/dataInfo")
    public CommonResult standardizedQualityDataInfo(@RequestParam("companyId") Integer companyId){
        return standardizedTemplateService.getStandardizedQualityByCompanyId(companyId);
    }
}