| | |
| | | * @author 江苏鵷雏网络科技有限公司 |
| | | * @since 2023-07-17 |
| | | */ |
| | | @Api(tags = "标准库-->规格-->查看-->父-->子") |
| | | @Api(tags = "标准库-->5、规格-->查看-->子模块") |
| | | @RestController |
| | | @RequestMapping("/product") |
| | | public class ProductController { |
| | |
| | | @Autowired |
| | | private ProductService productService; |
| | | |
| | | @ApiOperation("测试标准模块-->添加测试标准") |
| | | @ApiOperation("添加测试标准") |
| | | @PostMapping("/add") |
| | | public Result<?> addProductInformation(@RequestHeader("X-Token") String token, @RequestBody Product product) throws Exception { |
| | | Object userMessage = RedisUtil.get(token); |
| | |
| | | return Result.fail("添加物料【"+ product.getName() +"】失败!"); |
| | | } |
| | | |
| | | @ApiOperation("物料库-->根据物料ID查询所有测试标准") |
| | | @ApiOperation("根据物料ID查询所有测试标准") |
| | | @GetMapping("/list") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(value = "物料ID", name = "materialId", dataTypeClass = String.class) |
| | |
| | | return Result.success(listMaterialInformation); |
| | | } |
| | | |
| | | @ApiOperation("物料库-->根据测试标准ID查询基本信息") |
| | | @ApiOperation("根据测试标准ID查询基本信息") |
| | | @GetMapping("/productId") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(value = "测试标准ID", name = "productId", dataTypeClass = String.class) |
| | |
| | | return Result.success(productInformation); |
| | | } |
| | | |
| | | @ApiOperation("物料库-->删除测试标准模块数据") |
| | | @ApiOperation("删除测试标准模块数据") |
| | | @DeleteMapping("/delete") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(value = "测试标准ID", name = "productId", dataTypeClass = String.class) |
| | |
| | | return Result.fail("删除失败!"); |
| | | } |
| | | |
| | | @ApiOperation("物料库-->根据测试标准Id修改数据") |
| | | @ApiOperation("根据测试标准Id修改数据") |
| | | @PutMapping("/update") |
| | | public Result<?> updateMaterialInformation(@RequestBody Product product) { |
| | | Integer isUpdateMaterialSuccess = productService.updateMaterialInformation(product); |