| | |
| | | } |
| | | |
| | | } |
| | | |
| | | |
| | | @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("未查找到该发动机号对应的箱体"); |
| | | } |
| | | } |
| | | } |