| | |
| | | Node node = nodeService.selectOne(new EntityWrapper<Node>() |
| | | .eq("name", jsonLocNo)); |
| | | |
| | | if (node.getParentName().equals("A") || node.getParentName().equals("B")){ |
| | | if (node.getRow1() == 1 && locDetls.size() >=11){ |
| | | return R.error("该库位排已满"); |
| | | } |
| | | if (node.getRow1() == 6 && locDetls.size() >=4){ |
| | | return R.error("该库位排已满"); |
| | | } |
| | | if (node.getRow1() == 12 && locDetls.size() >=4){ |
| | | return R.error("该库位排已满"); |
| | | } |
| | | |
| | | } |
| | | if (locDetls.size() >=12){ |
| | | return R.error("该库位排已满"); |
| | | } |
| | | // if (node.getParentName().equals("A") || node.getParentName().equals("B")){ |
| | | // if (node.getRow1() == 1 && locDetls.size() >=11){ |
| | | // return R.error("该库位排已满"); |
| | | // } |
| | | // if (node.getRow1() == 6 && locDetls.size() >=4){ |
| | | // return R.error("该库位排已满"); |
| | | // } |
| | | // if (node.getRow1() == 12 && locDetls.size() >=4){ |
| | | // return R.error("该库位排已满"); |
| | | // } |
| | | // |
| | | // } |
| | | // if (locDetls.size() >=12){ |
| | | // return R.error("该库位排已满"); |
| | | // } |
| | | |
| | | |
| | | |
| | |
| | | return R.error("入库数量大于可入数量"); |
| | | } |
| | | //查询平库中是否有一样的物料号,有的话直接增加数量 |
| | | // ManLocDetl checkManLocDetl = manLocDetlService.selectInventory(jsonLocNo,orderDetl.getMatnr(),jsonOrderDetl.getBatch()); |
| | | // if (checkManLocDetl == null) { |
| | | ManLocDetl checkManLocDetl = manLocDetlService.selectInventory(jsonLocNo,orderDetl.getMatnr(),jsonOrderDetl.getBatch()); |
| | | if (checkManLocDetl == null) { |
| | | |
| | | ManLocDetl manLocDetl = new ManLocDetl(); |
| | | Synchro.Copy(orderDetl, manLocDetl); |
| | |
| | | if(!manLocDetlService.insert(manLocDetl)){ |
| | | return R.error("插入平库物料失败!"); |
| | | } |
| | | // } |
| | | // else { |
| | | // if (checkManLocDetl.getWeight() == null){ |
| | | // checkManLocDetl.setWeight(0.0); |
| | | // } |
| | | // if (jsonOrderDetl.getWeight() == null){ |
| | | // jsonOrderDetl.setWeight(0.0); |
| | | // } |
| | | // if(manLocDetlService.increase(checkManLocDetl.getAnfme() + jsonOrderDetl.getAnfme(), |
| | | // node.getName(), |
| | | // jsonOrderDetl.getMatnr(), |
| | | // jsonOrderDetl.getBatch(),checkManLocDetl.getWeight()+jsonOrderDetl.getWeight() |
| | | // )<=0 |
| | | // ){ |
| | | // return R.error("修改平库物料失败!"); |
| | | // } |
| | | // |
| | | // } |
| | | } |
| | | else { |
| | | if (checkManLocDetl.getWeight() == null){ |
| | | checkManLocDetl.setWeight(0.0); |
| | | } |
| | | if (jsonOrderDetl.getWeight() == null){ |
| | | jsonOrderDetl.setWeight(0.0); |
| | | } |
| | | if(manLocDetlService.increase(checkManLocDetl.getAnfme() + jsonOrderDetl.getAnfme(), |
| | | node.getName(), |
| | | jsonOrderDetl.getMatnr(), |
| | | jsonOrderDetl.getBatch(),checkManLocDetl.getWeight()+jsonOrderDetl.getWeight() |
| | | )<=0 |
| | | ){ |
| | | return R.error("修改平库物料失败!"); |
| | | } |
| | | |
| | | } |
| | | orderDetl.setQty(orderDetl.getQty() + jsonOrderDetl.getAnfme()); |
| | | orderDetl.setWorkQty(orderDetl.getWorkQty() + jsonOrderDetl.getAnfme()); |
| | | orderDetl.setUpdateTime(date); |