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);
|
}
|
|
|
|
|
}
|