| | |
| | | return Result.success(materialService.selectTreeByMaterial()); |
| | | } |
| | | |
| | | @ApiOperation(value = "新增-->选择产品大类") |
| | | @GetMapping("/chooseFather") |
| | | public Result chooseFather() { |
| | | return Result.success(materialService.chooseFather()); |
| | | } |
| | | |
| | | @ApiOperation("(1,2级)新增-->物料,标准,型号") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "spId", value = "复制选择的型号id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "ver", value = "复制选择的版本", dataTypeClass = Integer.class) |
| | | }) |
| | | @PostMapping("/add") |
| | | public Result<?> addMaterial(@Validated @RequestBody MaterialDto materialDto) { |
| | | materialService.addMaterial(materialDto); |
| | | return Result.success("添加物料【" + materialDto.getName() + "】成功"); |
| | | public Result<?> addMaterial(@Validated @RequestBody MaterialDto materialDto,Integer spId,Integer ver) { |
| | | return Result.success(materialService.addMaterial(materialDto,spId,ver)); |
| | | } |
| | | |
| | | @ApiOperation(value = "右侧数据展示-->选择版本") |
| | |
| | | return Result.fail("没有该类型!"); |
| | | } |
| | | |
| | | @ApiOperation("添加同一个型号工艺路线,技术指标,物料清单,生产工艺的版本") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "version", value = "当前版本", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/addVersion") |
| | | public Result<?> addVersion(Integer specificationsId ,Integer version) { |
| | | Integer version1 = materialService.addVersion(specificationsId,version); |
| | | return Result.success("添加型号"+specificationsId+"的版本"+version1+"成功"); |
| | | } |
| | | |
| | | } |