对比新文件 |
| | |
| | | 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); |
| | | } |
| | | } |