| | |
| | | return R.ok("补仓成功,等待立库调拨"); |
| | | } |
| | | |
| | | @Override |
| | | public R asrsStockTransferLocMode(AsrsTransferParam param, Long userId) { |
| | | if (Cools.isEmpty(param.getNode_id(), param.getMatnr(), param.getSafe_qua(), param.getAmount())) { |
| | | return R.error("数量错误"); |
| | | } |
| | | Node node = nodeService.selectById(param.getNode_id()); |
| | | Mat mat = matService.selectByMatnr(param.getMatnr()); |
| | | if (node == null || mat == null) { |
| | | return R.error(); |
| | | } |
| | | double anfme = Arith.subtract(2, param.getSafe_qua(), param.getAmount()); |
| | | List<StockTransferParam> params = new ArrayList<>(); |
| | | StockTransferParam transferParam = new StockTransferParam(); |
| | | transferParam.setMatnr(param.getMatnr()); |
| | | transferParam.setAnfme(anfme); |
| | | transferParam.setAllotNo(param.getNode_id()+ "_" +param.getMatnr()); |
| | | transferParam.setLocNo(param.getLocNo()); |
| | | params.add(transferParam); |
| | | Result1 result = asrsService.stockTransferLocMode(params); |
| | | if (result.getCode() == 500) { |
| | | if (Cools.isEmpty(result.getData())) { |
| | | throw new CoolException(result.getMsg()); |
| | | } else { |
| | | throw new CodeCoolException("20001-" + result.getData()); |
| | | } |
| | | } |
| | | |
| | | return R.ok("补仓成功,等待立库调拨"); |
| | | } |
| | | |
| | | @Override |
| | | public R stockCheck(StoCheckParam param, Long userId) { |