“djh”
14 小时以前 49e443c25a4f83768161a843229bf6ff9053bb94
multi-admin/src/main/java/com/gkhy/exam/admin/controller/web/TemplateController.java
@@ -1,9 +1,9 @@
package com.gkhy.exam.admin.controller.web;
import com.gkhy.exam.common.annotation.RepeatSubmit;
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.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;
@@ -22,6 +22,9 @@
    @Autowired
    private StandardizedTemplateService standardizedTemplateService;
    @Autowired
    private QualitySystemPlanService qualitySystemPlanService;
    /**
     * 行业模版
     * @param companyId
@@ -29,13 +32,13 @@
     */
    @ApiOperation(value = "标准化模版(分页)")
    @ApiImplicitParams({
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = true, value = "公司iD"),
            @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(@RequestParam("companyId") Integer companyId, @RequestParam("templateType") Integer templateType){
    public CommonResult selectStandardizedTemplateList(Integer companyId, @RequestParam("templateType") Integer templateType){
        return CommonResult.success(standardizedTemplateService.selectStandardizedTemplateList(companyId, templateType));
    }
@@ -82,7 +85,7 @@
            @ApiImplicitParam(paramType = "query", name = "companyId", dataType = "int", required = true, value = "公司iD"),
    })
    @GetMapping("/standardizedQuality/info")
    public CommonResult selectStandardizedQuality(@RequestParam("companyId") Integer companyId){
    public CommonResult selectStandardizedQuality(Integer companyId){
        return CommonResult.success(standardizedTemplateService.selectStandardizedQuality(companyId));
    }
@@ -119,5 +122,66 @@
        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
     */
    @RepeatSubmit
    @ApiOperation(value = "质量体系策划新增")
    @PostMapping("/insert")
    public CommonResult insertQualitySystemPlan(@RequestBody QualitySystemPlan qualitySystemPlan){
        return qualitySystemPlanService.insertQualitySystemPlan(qualitySystemPlan);
    }
    /**
     * 质量体系策划修改
     * @param qualitySystemPlan
     * @return
     */
    @RepeatSubmit
    @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);
    }
}