| | |
| | | |
| | | @ApiOperation("右上角新增-->技术指标-->选择工序,工艺") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true) |
| | | @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "version", value = "当前版本", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @GetMapping("/chooseTech") |
| | | public Result<?> chooseTech(Integer specificationsId) { |
| | | return Result.success(productService.chooseTech(specificationsId)); |
| | | public Result<?> chooseTech(Integer specificationsId,Integer version) { |
| | | return Result.success(productService.chooseTech(specificationsId,version)); |
| | | } |
| | | |
| | | @ApiOperation("右上角新增-->技术指标-->选择项目父类") |
| | |
| | | } |
| | | |
| | | @ApiOperation("右上角新增-->技术指标") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "technologyId", value = "工艺路线id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/add") |
| | | public Result<?> addProduct(Integer technologyId, @Validated @RequestBody ProductDto productDto) { |
| | | productService.addProduct(technologyId, productDto); |
| | | public Result<?> addProduct(@Validated @RequestBody ProductDto productDto) { |
| | | productService.addProduct(productDto); |
| | | return Result.success("添加技术指标【" + productDto.getName() + "】成功"); |
| | | } |
| | | |
| | | @ApiOperation("填写标准值与内控值,鼠标移开保存") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class, required = true), |
| | | @ApiImplicitParam(name = "required", value = "标准值", dataTypeClass = String.class, required = true), |
| | | @ApiImplicitParam(name = "internal", value = "内控值", dataTypeClass = String.class, required = true) |
| | | |
| | | @ApiImplicitParam(name = "required", value = "标准值", dataTypeClass = String.class), |
| | | @ApiImplicitParam(name = "internal", value = "内控值", dataTypeClass = String.class) |
| | | }) |
| | | @PostMapping("/write") |
| | | public Result<?> write(Integer id, String required, String internal) { |
| | | Integer write = productService.write(id, required, internal); |
| | | if (write >= 1){ |
| | | return Result.success("更新成功"); |
| | | } |
| | | 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 = productService.addVersion(specificationsId,version); |
| | | return Result.success("添加型号"+specificationsId+"的技术指标版本"+version1+"成功"); |
| | | return Result.success(productService.write(id, required, internal)); |
| | | } |
| | | |
| | | @ApiOperation(value = "删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class,required = true) |
| | | @ApiImplicitParam(name = "id", value = "技术指标id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/delTechById") |
| | | public Result delProById(Integer id) { |
| | | productService.delProById(id); |
| | | return Result.success("删除"+id+"成功!"); |
| | | return Result.success("删除" + id + "成功!"); |
| | | } |
| | | |
| | | @ApiOperation(value = "批量删除") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "ids", value = "技术指标id", dataTypeClass = String.class,required = true) |
| | | @ApiImplicitParam(name = "ids", value = "技术指标id", dataTypeClass = String.class, required = true) |
| | | }) |
| | | @PostMapping("/delAllPro") |
| | | public Result delAllPro(String ids) { |