自动化立体仓库 - WMS系统
#
lty
1 天以前 f245b2ecba9428659f2a8fb3e1f3d23bddda1218
src/main/java/com/zy/asrs/service/impl/MobileServiceImpl.java
@@ -864,10 +864,6 @@
                }
            }
            locMast.setLocSts("R");
            if(!locMastService.updateById(locMast)){
                throw new CoolException("新增agv入库任务失败");
            }
            BasAgvLocNoService basAgvLocNoService = SpringUtils.getBean(BasAgvLocNoService.class);
            BasAgvLocNo basAgvLocNoSou = basAgvLocNoService.selectOne(new EntityWrapper<BasAgvLocNo>().eq("loc_no", param.getLocNo()));
            AgvBindCtnrAndBinParam agvBindCtnrAndBinParam = new AgvBindCtnrAndBinParam();
@@ -876,10 +872,15 @@
            agvBindCtnrAndBinParam.setStgBinCode(basAgvLocNoSou.getAgvLocNo());
            agvBindCtnrAndBinParam.setReqCode(String.valueOf(System.currentTimeMillis()));
            agvBindCtnrAndBinParam.setIndBind("1");
            ReturnT<String> resultBind = new PostMesDataUtils().postMesDataArmGrating("AGV容器解绑",
            ReturnT<String> resultBind = new PostMesDataUtils().postMesDataArmGrating("AGV容器绑定",
                    AgvConstant.AGV_URL+"/"+AgvConstant.AGV_1LBind,AgvConstant.getAGVADAPTOR(1), agvBindCtnrAndBinParam);
            if(resultBind.getCode() != 200){
                throw new CoolException("agv入库绑定失败");
            }
            locMast.setBarcode(param.getBarcode());
            locMast.setLocSts("R");
            if(!locMastService.updateById(locMast)){
                throw new CoolException("新增agv入库任务失败");
            }
            OrderInAndOutUtil.updateOrder(Boolean.TRUE,order.getId(), 2L, userId);
        }
@@ -887,7 +888,8 @@
    @Override
    @Transactional
    public void combAuto(CombParam param, Long userId) {
    public void
    combAuto(CombParam param, Long userId) {
        if (Cools.isEmpty(param.getBarcode(), param.getCombMats())) {
            throw new CoolException(BaseRes.PARAM);
        }
@@ -918,21 +920,57 @@
        String orderNo = null;
        for (CombParam.CombMat combMat : param.getCombMats()) {
            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()));
            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());
            if(combMat.getSupplier().equals("1")){
//                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","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());//仓库编码
//                } else {
//                    throw new CoolException("未查询到相关订单===>>" + param.getBarcode());
//                }
                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());
                }
            }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());
                }
            }
        }