| | |
| | | @RequestMapping(value = "/barcodeMatnr/add1/auth") |
| | | @ManagerAuth |
| | | public R comb(WaitPakin waitPakin) { |
| | | Mat mat = matService.selectById(waitPakin.getModiUser()); |
| | | MatBarcode matBarcode = matBarcodeService.selectbyMatnr(mat.getMatnr()); |
| | | if (matBarcode == null){ |
| | | throw new CoolException("该物料未与托盘绑定"); |
| | | }else { |
| | | if (!matBarcode.getZpallet().equals(waitPakin.getBarcode())){ |
| | | throw new CoolException("该物料与其他托盘绑定,不能与当前托盘"+waitPakin.getBarcode()+"绑定,与该物料绑定的托盘是"+matBarcode.getZpallet()); |
| | | } |
| | | } |
| | | if (mat.getColor().equals("报废")){ |
| | | throw new CoolException("该物料已报废,请勿绑定"); |
| | | } |
| | | if (Cools.isEmpty(waitPakin.getBarcode())||Cools.isEmpty(waitPakin.getModiUser())||Cools.isEmpty(waitPakin.getAnfme())){ |
| | | return R.error(BaseRes.PARAM); |
| | | } |