“djh”
13 小时以前 c1628ae5526ffae9cb12e70778cac8195c405382
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
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
package com.gkhy.exam.admin.controller.web;
 
import com.gkhy.exam.common.api.CommonResult;
import com.gkhy.exam.system.domain.*;
import com.gkhy.exam.system.service.QualitySystemPlanService;
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;
 
    @Autowired
    private QualitySystemPlanService qualitySystemPlanService;
 
    /**
     * 行业模版
     * @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);
    }
 
 
    /**
     * 质量体系策划
     * @param qualitySystemPlan
     * @return
     */
    @ApiOperation(value = "质量体系策划列表(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "pageNum", dataType = "int", required = false, value = "当前页,默认1"),
            @ApiImplicitParam(paramType = "query", name = "pageSize", dataType = "int", required = false, value = "每页数目,默认10"),
    })
    @GetMapping("/list")
    public CommonResult listQualitySystemPlan(QualitySystemPlan qualitySystemPlan){
        return CommonResult.success(qualitySystemPlanService.selectQualitySystemPlanList(qualitySystemPlan));
    }
 
 
    /**
     * 质量体系策划新增
     * @param qualitySystemPlan
     * @return
     */
    @ApiOperation(value = "质量体系策划新增")
    @PostMapping("/insert")
    public CommonResult insertQualitySystemPlan(@RequestBody QualitySystemPlan qualitySystemPlan){
        return qualitySystemPlanService.insertQualitySystemPlan(qualitySystemPlan);
    }
 
    /**
     * 质量体系策划修改
     * @param qualitySystemPlan
     * @return
     */
    @ApiOperation(value = "质量体系策划修改")
    @PostMapping("/update")
    public CommonResult updateQualitySystemPlan(@RequestBody QualitySystemPlan qualitySystemPlan){
        return qualitySystemPlanService.updateQualitySystemPlan(qualitySystemPlan);
    }
 
    /**
     * 质量体系策划删除
     * @param planId
     * @return
     */
    @ApiOperation(value = "质量体系策划删除")
    @GetMapping("/deleted")
    public CommonResult deletedQualitySystemPlan(@RequestParam("planId") Integer planId){
        return qualitySystemPlanService.deletedQualitySystemPlan(planId);
    }
}