| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | import com.yuanchu.limslaboratory.annotation.AuthHandler; |
| | | import com.yuanchu.limslaboratory.pojo.dto.AddStandardDto; |
| | | import com.yuanchu.limslaboratory.service.StandardService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | | * @since 2023-07-11 |
| | | */ |
| | | @Api(tags = "标准库-->2、标准") |
| | | @Api(tags = "标准库-->2、规格(标准)") |
| | | @RestController |
| | | @RequestMapping("/standards") |
| | | public class StandardController { |
| | |
| | | |
| | | @ApiOperation("添加物料") |
| | | @PostMapping("/add") |
| | | @AuthHandler |
| | | public Result<?> addStandardInformation(@Validated @RequestBody AddStandardDto addStandardDto) { |
| | | Integer isMaterialSuccess = standardService.addStandardInformation(addStandardDto); |
| | | if (isMaterialSuccess == 1) { |
| | |
| | | return Result.fail("添加物料【"+ addStandardDto.getStandardName() +"】失败!"); |
| | | } |
| | | |
| | | @ApiOperation("根据ID删除数据") |
| | | @ApiOperation("根据ID删规格") |
| | | @DeleteMapping("/delete") |
| | | @AuthHandler |
| | | public Result<?> deleteStandardsInformation(Integer standardsId) { |
| | | Integer isDeleteMaterialSuccess = standardService.deleteStandardInformation(standardsId); |
| | | if (isDeleteMaterialSuccess == 1) { |