| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.Product; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.service.ProductService; |
| | | import com.yuanchu.limslaboratory.utils.JackSonUtil; |
| | | import com.yuanchu.limslaboratory.utils.RedisUtil; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.util.ObjectUtils; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | import java.util.HashMap; |
| | | import java.util.List; |
| | | import java.util.Map; |
| | | import java.util.Objects; |
| | | |
| | | /** |
| | | * <p> |
| | | * 前端控制器 |
| | | * 前端控制器 |
| | | * </p> |
| | | * |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | |
| | | @Autowired |
| | | private ProductService productService; |
| | | |
| | | @ApiOperation("删除测试标准模块数据") |
| | | @DeleteMapping("/delete") |
| | | @ApiOperation("查询该型号下的项目") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(value = "测试标准ID", name = "productId", dataTypeClass = String.class) |
| | | @ApiImplicitParam(name = "specificationsId", value = "型号ID", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | public Result<?> deleteProductInformation(Integer productId) { |
| | | Integer isDeleteProduct = productService.deleteProductInformation(productId); |
| | | if (isDeleteProduct == 1) { |
| | | return Result.success("删除成功!"); |
| | | } |
| | | return Result.fail("删除失败!"); |
| | | @GetMapping("/page") |
| | | public Result<?> pageProductInformation(Integer specificationsId) { |
| | | return Result.success(productService.pageProductInformation(specificationsId)); |
| | | } |
| | | |
| | | @ApiOperation("填写标准值与内控值,鼠标移开保存") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "标准项目ID", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "required", value = "标准值", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "internal", value = "内控值", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @PostMapping("/write") |
| | | public Result<?> write(Integer id, String required, String internal) { |
| | | return Result.success(productService.write(id, required, internal)); |
| | | } |
| | | |
| | | } |