| | |
| | | import com.yuanchu.mom.pojo.dto.StandardDto; |
| | | import com.yuanchu.mom.vo.Result; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiImplicitParam; |
| | | import io.swagger.annotations.ApiImplicitParams; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.validation.annotation.Validated; |
| | |
| | | private StandardService standardService; |
| | | |
| | | @ApiOperation("(3级)新增-->标准,型号") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "spId", value = "复制选择的型号id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "ver", value = "复制选择的版本", dataTypeClass = Integer.class) |
| | | }) |
| | | @PostMapping("/add") |
| | | public Result<?> addStandard(@Validated @RequestBody StandardDto standardDto) { |
| | | standardService.addStandard(standardDto); |
| | | return Result.fail("添加标准【"+ standardDto.getStandard() +"】成功!"); |
| | | public Result<?> addStandard(@Validated @RequestBody StandardDto standardDto,Integer spId,Integer ver) { |
| | | return Result.success(standardService.addStandard(standardDto,spId,ver)); |
| | | } |
| | | |
| | | } |