zss
2023-09-21 2dbc49184bd74845c8da694c20d6fd03d7ac87e0
standard-server/src/main/java/com/yuanchu/mom/controller/TechnologyController.java
@@ -29,7 +29,7 @@
    @Autowired
    private TechnologyService technologyService;
    @ApiOperation("右上角新增-->工艺路线-->选择设备组")
    @ApiOperation("右上角新增-->工艺路线-->选择生产设备组")
    @GetMapping("/chooseDevice")
    public Result<?> chooseDevice() {
        return Result.success(technologyService.chooseDevice());
@@ -37,21 +37,18 @@
    @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("/chooseFather")
    public Result<?> chooseFather(Integer specificationsId) {
        return Result.success(technologyService.chooseFather(specificationsId));
    public Result<?> chooseFather(Integer specificationsId,Integer version) {
        return Result.success(technologyService.chooseFather(specificationsId,version));
    }
    @ApiOperation("右上角新增-->工艺路线")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true)
    })
    @PostMapping("/add")
    public Result<?> addTechnology(Integer specificationsId, @Validated @RequestBody TechnologyDto technologyDto) {
        technologyService.addTechnology(specificationsId, technologyDto);
        return Result.success("添加工艺【" + technologyDto.getName() + "】成功");
    public Result<?> addTechnology(@Validated @RequestBody TechnologyDto technologyDto) {
        return Result.success(technologyService.addTechnology(technologyDto));
    }
    @ApiOperation("填写生产定额,鼠标移开保存")
@@ -69,17 +66,22 @@
        return Result.fail("更新失败");
    }
    @ApiOperation("添加同一个型号工艺路线的版本")
    @ApiOperation("选择设备组,鼠标移开保存")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "specificationsId", value = "型号id", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "version", value = "当前版本", dataTypeClass = Integer.class, required = true)
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class, required = true),
            @ApiImplicitParam(name = "deviceGroup", value = "设备组", dataTypeClass = String.class, required = true)
    })
    @PostMapping("/addVersion")
    public Result<?> addVersion(Integer specificationsId ,Integer version) {
        Integer version1 = technologyService.addVersion(specificationsId,version);
        return Result.success("添加型号"+specificationsId+"的工艺路线版本"+version1+"成功");
    @PostMapping("/writeDevice")
    public Result<?> writeDevice(Integer id, String deviceGroup) {
        Integer write = technologyService.writeDevice(id, deviceGroup);
        if (write >= 1) {
            return Result.success("更新成功");
        }
        return Result.fail("更新失败");
    }
    @ApiOperation(value = "删除")
    @ApiImplicitParams(value = {
            @ApiImplicitParam(name = "id", value = "工艺路线id", dataTypeClass = Integer.class,required = true)