| | |
| | | package com.yuanchu.limslaboratory.controller; |
| | | |
| | | |
| | | import com.yuanchu.limslaboratory.pojo.dto.AddSpecifications; |
| | | import com.yuanchu.limslaboratory.pojo.dto.AddStandardDto; |
| | | import com.yuanchu.limslaboratory.service.SpecificationsService; |
| | | import com.yuanchu.limslaboratory.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | |
| | | /** |
| | |
| | | @Autowired |
| | | private SpecificationsService specificationsService; |
| | | |
| | | @ApiOperation("添加物料") |
| | | @PostMapping("/add") |
| | | public Result<?> addSpecificationsInformation(@Validated @RequestBody AddSpecifications addSpecifications) { |
| | | Integer isMaterialSuccess = specificationsService.addSpecificationsInformation(addSpecifications); |
| | | if (isMaterialSuccess == 1) { |
| | | return Result.success("添加物料【"+ addSpecifications.getSpecificationsName() +"】成功!"); |
| | | } |
| | | return Result.fail("添加物料【"+ addSpecifications.getSpecificationsName() +"】失败!"); |
| | | } |
| | | |
| | | @ApiOperation("删除产品规格") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "specificationsId", value = "规格Id", dataTypeClass = Integer.class, required = true) |