自动化立体仓库 - WMS系统
pang.jiabao
2025-04-28 a85a8d0c33d4a821a98a0ff6789298a23a180006
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -666,7 +666,7 @@
            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);
        }
@@ -808,7 +808,7 @@
                }
            }
            SaasUtils.insertLog(1,jsonLocNo,jsonOrderDetl.getMatnr(), jsonOrderDetl.getAnfme(),user.getUsername(),
                    null,null,null,null,null);
                    null,null,null,null,null,null);
        }
        return R.ok("下架完成");
@@ -1233,7 +1233,7 @@
        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
@@ -1268,6 +1268,7 @@
        manPakOut.setCount(manPakOut.getCount() + anfme);
        if (manPakOut.getAnfme().equals(manPakOut.getCount())){
            manPakOut.setStatus(1);
            manPakOut.setUpdateTime(new Date());
            manPakOutService.updateById(manPakOut);
        }
@@ -1284,14 +1285,17 @@
        }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);
@@ -1312,7 +1316,7 @@
            throw new CoolException("当前物料剩余库存不足");
        }
        log.info("无订单拣货出库,更新为待出库或则全部出库,pla:{},anfme:{}",pla,anfme);
        pla.setWeightAnfme(pla.getWeightAnfme() - anfme);
        if(pla.getWeightAnfme() > 0){
            pla.setStatus(GlobleParameter.PLA_STATUS_3);
@@ -1322,7 +1326,7 @@
        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);
    }
@@ -1341,7 +1345,7 @@
        plaService.updateById(plaNew);
        plaOld.setStatus(GlobleParameter.PLA_STATUS_1);
        plaOld.setQtyAnfme(plaOld.getQtyAnfme() - manPakOut.getCount());
        plaOld.setQtyAnfme(0.0);
        plaService.updateById(plaOld);
@@ -1356,6 +1360,7 @@
        manPakOut.setMaktx(plaNew.getBrand());
        manPakOut.setBatch(plaNew.getBatch());
        manPakOut.setBarcode(plaNew.getPackageNo() + "");
        manPakOut.setUpdateTime(new Date());
        manPakOutService.updateById(manPakOut);
@@ -1376,16 +1381,34 @@
                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;
    }
}