#
Junjie
2023-11-14 d127d72c6542a66ba394b7789ff544fb0dadfa42
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1213,7 +1213,7 @@
            //获取提升机命令
            NyLiftCommand liftCommand = NyLiftUtils.getLiftCommand(liftProtocol.getLiftNo().intValue(), NyLiftTaskModelType.MOVE_TRAY.id, startSta, targetSta, wrkMast.getWrkNo());
            if (wrkMast.getIoType() == 53) {
            if (wrkMast.getIoType() == 53 || wrkMast.getIoType() == 57) {
                //拣料再回库,重新分配设备工作号
                Random random = new Random();
                int deviceWrk = Math.abs((liftCommand.getTaskNo().intValue() + random.nextInt(9999)));//获取设备工作号
@@ -2287,6 +2287,40 @@
        return false;
    }
    /**
     * AGV补货(悬挂线通知AGV取货)
     */
    public void agvRestockIntoByHangingWire() {
        //检测350和351扫码器
        int[] barcodeStaNo = {10, 11};//10 => 350站扫码器,11 => 351站扫码器
        for (int staNo : barcodeStaNo) {
            // 获取条码扫描仪信息
            BarcodeThread barcodeThread = (BarcodeThread) SlaveConnection.get(SlaveType.Barcode, staNo);
            if (barcodeThread == null) {
                continue;
            }
            String barcode = barcodeThread.getBarcode();
            if(!Cools.isEmpty(barcode)) {
                if (barcode.contains("NoRead")) {
                    continue;
                }
                String agvStaNo = null;
                if (staNo == 10) {
                    agvStaNo = "303-1";
                }else {
                    agvStaNo = "304-1";
                }
                //通知AGV取货
                boolean result = agvRestockCall(agvStaNo, barcode);
                if (result) {
                    barcodeThread.setBarcode("");
                }
                log.info(barcodeThread.getSlave().getId() + "号扫码器,通知AGV取货,条码号:" + barcode);
            }
        }
    }
    // 300站拣料
    public void pick300() {
        //检测300站是否自动、有物、工作号