自动化立体仓库 - WMS系统
#
LSH
2023-05-25 d14cfd26c49bae091b84e90142b04ec0067c82bb
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -87,6 +87,9 @@
        if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
            throw new CoolException(BaseRes.PARAM);
        }
        if (Cools.isEmpty(param.getBarcode())){
            throw new CoolException("请填写货主信息");
        }
        // 判断是否有相同条码的数据
        if (waitPakinService.selectCount(new EntityWrapper<WaitPakin>().
                eq("zpallet", param.getBarcode()).eq("io_status", "N")) > 0) {
@@ -134,6 +137,7 @@
            for (DetlDto detlDto : detlDtos) {
                String uuid = String.valueOf(System.currentTimeMillis());
                Mat mat = matService.selectByMatnr(detlDto.getMatnr());
                if (Cools.isEmpty(mat)) {
                    throw new CoolException(detlDto.getMatnr() + "商品档案不存在");
@@ -149,6 +153,8 @@
                waitPakin.setAppeTime(now);
                waitPakin.setModiUser(userId);
                waitPakin.setModiTime(now);
                waitPakin.setOwner(param.getOwner());
                waitPakin.setUuid(uuid);
                if (!waitPakinService.insert(waitPakin)) {
                    throw new CoolException("保存入库通知档失败");
                }
@@ -197,6 +203,7 @@
                }
            }
            for (DetlDto detlDto : detlDtos) {
                String uuid = String.valueOf(System.currentTimeMillis());
                Mat mat = matService.selectByMatnr(detlDto.getMatnr());
                if (Cools.isEmpty(mat)) {
                    throw new CoolException(detlDto.getMatnr() + "商品档案不存在");
@@ -213,6 +220,8 @@
                waitPakin.setAppeTime(now);
                waitPakin.setModiUser(userId);
                waitPakin.setModiTime(now);
                waitPakin.setOwner(param.getOwner());
                waitPakin.setUuid(uuid);
                if (!waitPakinService.insert(waitPakin)) {
                    throw new CoolException("保存入库通知档失败");
                }
@@ -235,6 +244,7 @@
        // 获取商品列表
        for(CombParam.CombMat combMat : param.getCombMats()){
            String uuid = String.valueOf(System.currentTimeMillis());
            Mat mat = matService.selectByMatnr(combMat.getMatnr());
            if (Cools.isEmpty(mat)){
                throw new CoolException(combMat.getMatnr() + ":商品档案不存在!");
@@ -253,6 +263,8 @@
            manLocDetl.setBatch(Cools.isEmpty(combMat.getBatch()) ? "" : combMat.getBatch());
            manLocDetl.setAnfme(combMat.getAnfme());
            manLocDetl.setModiTime(now);
            manLocDetl.setUuid(uuid);
            manLocDetl.setOwner(param.getOwner());
            if (!manLocDetlService.insert(manLocDetl)) {
                throw new CoolException("商品上架失败!");
            }
@@ -373,7 +385,7 @@
        Date now = new Date();
        for(OrderDetl orderDetl : orderDetls){
            //查询所有库位状态为F的库位信息
            List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(),orderDetl.getBatch(),null,null);
            List<LocDetl> locDetls = locDetlService.queryStock(orderDetl.getMatnr(),orderDetl.getBatch(),orderDetl.getOwner());
            if (locDetls.size() == 0) {
                throw new CoolException("库存中没有该物料");
            }
@@ -498,6 +510,7 @@
    @Override
    public R manDetlIn(JSONObject json) {
        Date date = new Date();
        int jsonOwner= (int) json.get("owner");
        String jsonLocNo = (String) json.get("locNo");
        Node node = nodeService.selectOne(new EntityWrapper<Node>()
                .eq("name", jsonLocNo));
@@ -528,6 +541,7 @@
            //查询平库中是否有一样的物料号,有的话直接增加数量
            ManLocDetl checkManLocDetl = manLocDetlService.selectInventory(jsonLocNo,orderDetl.getMatnr(),jsonOrderDetl.getBatch());
            if (checkManLocDetl == null) {
                String uuid = String.valueOf(System.currentTimeMillis());
                ManLocDetl manLocDetl = new ManLocDetl();
                Synchro.Copy(orderDetl, manLocDetl);
                manLocDetl.setLocNo(node.getName());
@@ -538,6 +552,8 @@
                manLocDetl.setModiTime(date);
                manLocDetl.setCreateTime(date);
                manLocDetl.setBatch(jsonOrderDetl.getBatch());
                manLocDetl.setUuid(uuid);
                manLocDetl.setOwner(jsonOwner);
                if(!manLocDetlService.insert(manLocDetl)){
                    return R.error("修改平库物料失败!");
                }