春风项目四线(合箱线、总装线)
wujian
2024-09-10 51b05b093fa15dd477981372f67ae7b3b2747733
jcdm-main/src/main/java/com/jcdm/main/bs/orderScheduling/controller/BsOrderSchedulingController.java
@@ -476,4 +476,27 @@
        }
    }
    @GetMapping("/changeBoxCode")
    public R changeBoxCode(String sfcCode,String newBoxCode){
        if (StringUtils.isEmpty(newBoxCode)){
            return R.fail(500,"箱体码不能为空,请重试");
        }
        if (StringUtils.isEmpty(sfcCode)){
            return R.fail(500,"发动机号不能为空,请重试");
        }
        if (!newBoxCode.contains(",")){
            return R.fail(500,"箱体码格式有误,请重试");
        }
        ProductNewPassStation checkStation = new ProductNewPassStation();
        checkStation.setSfcCode(sfcCode);
        List<ProductNewPassStation> productPassStationList = productNewPassStationService.getProductPassStationList(checkStation);
        if (CollUtil.isNotEmpty(productPassStationList)){
            productNewPassStationService.updateBoxCodeBySfcCode(sfcCode, newBoxCode);
            return R.ok();
        } else {
            return R.fail("未查找到该发动机号对应的箱体");
        }
    }
}