| | |
| | | |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.pojo.dto.AddMaterialDto; |
| | | import com.yuanchu.limslaboratory.pojo.dto.ProductModelDto; |
| | | import com.yuanchu.limslaboratory.utils.MyUtil; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | |
| | | |
| | | @ApiOperation(value = "选择样品名称") |
| | | @GetMapping("/selectmater") |
| | | @AuthHandler |
| | | public Result selectmater() { |
| | | return Result.success(productModelService.selectmater()); |
| | | } |
| | |
| | | |
| | | @ApiOperation("添加标准") |
| | | @PostMapping("/addproductModel") |
| | | @AuthHandler |
| | | public Result<?> addproductModel(@Validated @RequestBody ProductModelDto productModelDto) { |
| | | productModelService.addproductModel(productModelDto); |
| | | return Result.success("添加标准项目【" + productModelDto.getName() + "】成功!"); |
| | |
| | | @ApiImplicitParam(name = "material", value = "样品名称", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @GetMapping("/selectproductModel") |
| | | @AuthHandler |
| | | public Result selectproductModel(String name, String father, String material) { |
| | | return Result.success(productModelService.selectproductModel(name, father, material)); |
| | | } |
| | |
| | | @ApiImplicitParam(name = "id", value = "标准模版id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/selectproductModelById") |
| | | @AuthHandler |
| | | public Result selectproductModelById(Integer id) { |
| | | return Result.success(productModelService.selectproductModelById(id)); |
| | | } |
| | |
| | | @ApiImplicitParam(name = "id", value = "标准模版id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/writeproductModel") |
| | | @AuthHandler |
| | | public Result<?> writeproductModel(Integer id, @Validated @RequestBody ProductModelDto productModelDto) { |
| | | productModelService.writeproductModel(id,productModelDto); |
| | | return Result.success("修改标准项目【" + productModelDto.getName() + "】成功!"); |
| | |
| | | @ApiImplicitParam(name = "id", value = "标准模版id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delproductModel") |
| | | @AuthHandler |
| | | public Result<?> delproductModel(Integer id) { |
| | | productModelService.delproductModel(id); |
| | | return Result.success("删除标准项目成功!"); |