| | |
| | | orderService.checkComplete(order.getOrderNo()); |
| | | |
| | | SaasUtils.insertLog(0,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | null,null,null,null,null,null); |
| | | } |
| | | |
| | | |
| | |
| | | } |
| | | } |
| | | SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(), |
| | | null,null,null,null,null); |
| | | null,null,null,null,null,null); |
| | | |
| | | } |
| | | return R.ok("下架完成"); |
| | |
| | | |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(0,locNo,pla.getBrand(),pla.getWeightAnfme(),user.getUsername(), |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | } |
| | | |
| | | @Override |
| | |
| | | manPakOut.setCount(manPakOut.getCount() + anfme); |
| | | if (manPakOut.getAnfme().equals(manPakOut.getCount())){ |
| | | manPakOut.setStatus(1); |
| | | manPakOut.setUpdateTime(new Date()); |
| | | manPakOutService.updateById(manPakOut); |
| | | } |
| | | |
| | |
| | | }else { |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_3); |
| | | } |
| | | log.info("pla出库v1,更新为待出库或则全部出库,pla:{},anfme:{}",pla,anfme); |
| | | plaService.updateById(pla); |
| | | SaasUtils.insertLog(1,locNo,pla.getBrand(),anfme,null,null, |
| | | pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | |
| | | //更新订单明细 |
| | | Order order = orderService.selectByNo(orderNo); |
| | | OrderDetl orderDetl = orderDetlService.selectById(plaQty.getOrderDetlId()); |
| | | |
| | | if (orderDetl == null){ |
| | | throw new CoolException("订单明细不存在或者不匹配"); |
| | | } |
| | | orderDetl.setQty(orderDetl.getQty() + anfme); |
| | | orderDetlService.updateById(orderDetl); |
| | | |
| | |
| | | throw new CoolException("当前物料剩余库存不足"); |
| | | } |
| | | |
| | | |
| | | log.info("无订单拣货出库,更新为待出库或则全部出库,pla:{},anfme:{}",pla,anfme); |
| | | pla.setWeightAnfme(pla.getWeightAnfme() - anfme); |
| | | if(pla.getWeightAnfme() > 0){ |
| | | pla.setStatus(GlobleParameter.PLA_STATUS_3); |
| | |
| | | |
| | | plaService.updateById(pla); |
| | | |
| | | SaasUtils.insertLog(1,pla.getLocNo(),pla.getBrand(),anfme,null,null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop()); |
| | | SaasUtils.insertLog(1,pla.getLocNo(),pla.getBrand(),anfme,null,null,pla.getBatch(),pla.getPackageNo(),pla.getOwner(),pla.getWorkshop(),null); |
| | | |
| | | } |
| | | |
| | |
| | | plaService.updateById(plaNew); |
| | | |
| | | plaOld.setStatus(GlobleParameter.PLA_STATUS_1); |
| | | plaOld.setQtyAnfme(plaOld.getQtyAnfme() - manPakOut.getCount()); |
| | | plaOld.setQtyAnfme(0.0); |
| | | |
| | | plaService.updateById(plaOld); |
| | | |
| | |
| | | manPakOut.setMaktx(plaNew.getBrand()); |
| | | manPakOut.setBatch(plaNew.getBatch()); |
| | | manPakOut.setBarcode(plaNew.getPackageNo() + ""); |
| | | manPakOut.setUpdateTime(new Date()); |
| | | |
| | | manPakOutService.updateById(manPakOut); |
| | | |
| | |
| | | throw new CoolException("请检查输入的库位码"); |
| | | } |
| | | plaEntityWrapper.eq("loc_no",barcode); |
| | | |
| | | plaEntityWrapper.notLike("status","全部出库"); |
| | | }else { |
| | | throw new CoolException("条码信息有误!"); |
| | | } |
| | | |
| | | |
| | | List<Pla> plaList = plaService.selectList(plaEntityWrapper); |
| | | if (Cools.isEmpty(plaList)){ |
| | | throw new CoolException("未查询到库存物料信息"); |
| | | } |
| | | return plaList; |
| | | } |
| | | |
| | | public boolean checkMaximum(String locNo, int packageNum){ |
| | | |
| | | Node node = nodeService.selectByUuid(locNo); |
| | | Node nodeParent = nodeService.selectById(node.getParentId()); |
| | | |
| | | if(Cools.isEmpty(nodeParent.getMajor())){ |
| | | return true; |
| | | } |
| | | |
| | | //当前库存包数 |
| | | int count = plaService.selectCount(new EntityWrapper<Pla>().eq("loc_no", locNo) |
| | | .notIn("status", "全部出库")); |
| | | |
| | | if(nodeParent.getMajor() < count + packageNum){ |
| | | return false; |
| | | } |
| | | |
| | | return true; |
| | | } |
| | | } |