| | |
| | | |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.InspectionProductList; |
| | | import com.yuanchu.limslaboratory.pojo.Instrument; |
| | | import com.yuanchu.limslaboratory.pojo.Product; |
| | | import com.yuanchu.limslaboratory.pojo.dto.InspectionProductListDto; |
| | | import com.yuanchu.limslaboratory.service.PlanService; |
| | | import com.yuanchu.limslaboratory.service.ProductService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | @Resource |
| | | private PlanService planService; |
| | | |
| | | @Resource |
| | | ProductService productService; |
| | | |
| | | @ApiOperation("查询所有检验计划分配") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "pageSize", value = "页数", dataTypeClass = Integer.class, required = true), |
| | |
| | | return Result.success(planService.selectAllPlan(pageSize, countSize, state)); |
| | | } |
| | | |
| | | @ApiOperation("查询检验计划里面的检验项目") |
| | | @ApiOperation("根据项目名查询所有试验方法") |
| | | @GetMapping("/selectInstrumentByProname") |
| | | public Result selectInstrumentByProname(String name) { |
| | | return Result.success(productService.selectInstrumentByProname(name)); |
| | | } |
| | | |
| | | @ApiOperation("选择试验方法") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "样品id", dataTypeClass = Integer.class, required = true) |
| | | @ApiImplicitParam(name = "id", value = "项目id", dataTypeClass = Integer.class, required = true), |
| | | }) |
| | | @GetMapping("/selectProductById/{id}") |
| | | public Result selectProductById(@PathVariable Integer id) { |
| | | return Result.success(planService.selectProductById(id)); |
| | | @PostMapping("/selectProMethodById") |
| | | public Result selectProMethodById(Integer id) { |
| | | Product product = productService.getById(id); |
| | | return Result.success(product.getMethod()); |
| | | } |
| | | |
| | | @ApiOperation("分配检验计划中分配项目") |
| | | @PostMapping("/upPlan") |
| | | public Result upPlan(@RequestBody InspectionProductList inspectionProductList) { |
| | | planService.upPlan(inspectionProductList); |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "检验样品ID", dataTypeClass = Integer.class, required = true), |
| | | }) |
| | | @PutMapping("/upPlan/{id}") |
| | | public Result upPlan(@PathVariable Integer id ,@RequestBody InspectionProductListDto inspectionProductListDto) { |
| | | planService.upPlan(id,inspectionProductListDto); |
| | | return Result.success(); |
| | | } |
| | | |
| | |
| | | }) |
| | | @PutMapping("/delPlan/{id}") |
| | | public Result delPlan(@PathVariable Integer id) { |
| | | return Result.success(planService.delPlan(id)); |
| | | planService.delPlan(id); |
| | | return Result.success(); |
| | | } |
| | | |
| | | @ApiOperation("查询成品检验") |