自动化立体仓库 - WMS系统
#
1
1 天以前 1d469834074a19ce291f70a783d9d7725430a6fa
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -917,44 +917,37 @@
        }
        Date now = new Date();
        boolean result = false;
        String orderNo = null;
        String orderNo1 = null;
        for (CombParam.CombMat combMat : param.getCombMats()) {
            if(combMat.getSupplier().equals("1")){
                List<OrderDetlPakin> orderDetlPakins = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>()
                List<OrderDetlPakin> orderDetlPakins2 = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>()
                        .eq("matnr", combMat.getMatnr()).eq("box_type3", combMat.getOrderNo())
                        .eq("standby1", combMat.getStandby1()).eq("standby2", combMat.getStandby2())
                        .eq("standby3", combMat.getStandby3()).eq("box_type2","BU-00001"));//1时检索和得
                if (orderDetlPakins.size() > 0) {
                    orderNo = orderDetlPakins.get(0).getOrderNo();
                    combMat.setBoxType1(orderDetlPakins.get(0).getBoxType1());
                    combMat.setBoxType2(orderDetlPakins.get(0).getBoxType2());
                    combMat.setBoxType3(orderDetlPakins.get(0).getBoxType3());
                    combMat.setMemo(orderDetlPakins.get(0).getMemo());
                    combMat.setSupp(orderDetlPakins.get(0).getSupp());
                    combMat.setSuppCode(orderDetlPakins.get(0).getSuppCode());
                    combMat.setManu(orderDetlPakins.get(0).getManu());//仓库编码
                        .eq("box_type2","BU-00001"));
                if (orderDetlPakins2.size() > 0) {
                    orderNo1 = orderDetlPakins2.get(0).getOrderNo();
                } else {
                    throw new CoolException("未查询到相关订单===>>" + param.getBarcode());
                }
            }else{
                //0
                List<OrderDetlPakin> orderDetlPakins = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>()
                        .eq("matnr", combMat.getMatnr()).eq("box_type3", combMat.getOrderNo())
                        .eq("standby1", combMat.getStandby1()).eq("standby2", combMat.getStandby2())
                        .eq("standby3", combMat.getStandby3()).eq("box_type2","shyucheng.test"));
                if (orderDetlPakins.size() > 0) {
                    orderNo = orderDetlPakins.get(0).getOrderNo();
                    combMat.setBoxType1(orderDetlPakins.get(0).getBoxType1());
                    combMat.setBoxType2(orderDetlPakins.get(0).getBoxType2());
                    combMat.setBoxType3(orderDetlPakins.get(0).getBoxType3());
                    combMat.setMemo(orderDetlPakins.get(0).getMemo());
                    combMat.setSupp(orderDetlPakins.get(0).getSupp());
                    combMat.setSuppCode(orderDetlPakins.get(0).getSuppCode());
                    combMat.setManu(orderDetlPakins.get(0).getManu());//仓库编码
                } else {
                    throw new CoolException("未查询到相关订单===>>" + param.getBarcode());
                }
                result = true;
            }
            //0
            List<OrderDetlPakin> orderDetlPakins = orderDetlPakinService.selectList(new EntityWrapper<OrderDetlPakin>()
                    .eq("matnr", combMat.getMatnr()).eq("box_type3", combMat.getOrderNo())
                    .eq("standby1", combMat.getStandby1()).eq("standby2", combMat.getStandby2())
                    .eq("standby3", combMat.getStandby3()).eq("box_type2","shyucheng.test"));
            if (orderDetlPakins.size() > 0) {
                orderNo = orderDetlPakins.get(0).getOrderNo();
                combMat.setBoxType1(orderDetlPakins.get(0).getBoxType1());
                combMat.setBoxType2(orderDetlPakins.get(0).getBoxType2());
                combMat.setBoxType3(orderDetlPakins.get(0).getBoxType3());
                combMat.setMemo(orderDetlPakins.get(0).getMemo());
                combMat.setSupp(orderDetlPakins.get(0).getSupp());
                combMat.setSuppCode(orderDetlPakins.get(0).getSuppCode());
                combMat.setManu(orderDetlPakins.get(0).getManu());//仓库编码
            } else {
                throw new CoolException("未查询到相关订单===>>" + param.getBarcode());
            }
        }
@@ -965,10 +958,18 @@
        if (Cools.isEmpty(order) || order.getSettle() > 2) {
            throw new CoolException("单据编号已过期");
        }
        Order order1 = orderService.selectByNo(orderNo);
        if (Cools.isEmpty(order1) || order1.getSettle() > 2) {
            throw new CoolException("单据编号已过期");
        }
        if(result){
            order1.setPayType(1);//  y->h
            order1.setSalesman(orderNo1);
            orderService.updateById(order1);
        }
        // 生成入库通知档
        List<DetlDto> detlDtos = new ArrayList<>();
        param.getCombMats().forEach(elem -> {
            // 订单明细数量校验
//                OrderDetl orderDetl = orderDetlService.selectItem(order.getId(), elem.getMatnr(), elem.getBatch());
            OrderDetl orderDetl = OrderInAndOutUtil.selectItem(Boolean.TRUE, order.getId(), elem.getMatnr(), elem.getBatch(),elem.getBrand(),elem.getStandby1(),elem.getStandby2(),elem.getStandby3(),