lty
4 天以前 09f634c766e8daeeb687d48fd645f225afc3c082
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -587,7 +587,7 @@
                    String barcode = barcodeThread.getBarcode();
                    // 如果前工位有货 + 扫码器有条码
                    if (staProtocolIn.getStamp() == 1 && barcode != null && !barcode.isEmpty()) {
                    if (staProtocolIn.getStamp() == 1 && !barcode.equals("00000000") && !barcode.isEmpty()) {
                        log.info("生成信号时间: {}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
                        if (wrkMastService.selectOne(new EntityWrapper<WrkMast>()
                                .eq("barcode", barcode)
@@ -631,7 +631,7 @@
                                }
                            } else {
                                String msg = json.getString("msg");
                                if (!"工作档已存在".equals(msg)) {
                                if (!"工作档已存在".equals(msg) && staProtocol.getWorkNo()<9999) {
                                    staProtocol.setWorkNo(wrkNo++);
                                    staProtocol.setStaNo(inSta.getBackSta().shortValue());
                                    devpThread.setPakMk(staProtocol.getSiteId(), false);
@@ -1510,9 +1510,10 @@
                log.info("读取到工作号时间: {}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
            }
            if (staProtocol.isAutoing()  && staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() <9998
//             && staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() <9998
            if (staProtocol.isAutoing() && staProtocol.getWorkNo() > 0 && staProtocol.getWorkNo() <9998
                    && staDetl.getCanining() != null && staDetl.getCanining().equals("Y")) {
                log.info("可入时间: {}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
                log.info("任务满足下发时间: {}", new SimpleDateFormat("yyyy-MM-dd HH:mm:ss.SSS").format(new Date()));
                flag = true;
            }
@@ -1525,6 +1526,7 @@
            }
            // 获取工作状态为2(设备上走)的入库工作档
            WrkMast wrkMast = wrkMastMapper.selectPakInStep2(slave.getId(), staProtocol.getWorkNo(), crnStn.getStaNo());
//            wrkMast = wrkMast1;
            if (null == wrkMast) {
                log.info("" + mark + " - 1" + " - 4" + " - 查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
                News.infoNoLog("" + mark + " - 1" + " - 4" + " - 查询无待入库数据--wrk_sts=2, 工作号={}", staProtocol.getWorkNo());
@@ -1576,17 +1578,6 @@
                News.error("" + mark + " - 1" + " - 16" + " - 堆垛机命令下发失败,堆垛机号={},任务数据={}", wrkMast.getCrnNo(), JSON.toJSON(crnCommand));
            } else {
//                long startTime = System.currentTimeMillis();
//                while ((System.currentTimeMillis() - startTime) < COMMAND_TIMEOUT) {
//
//                    if (true) {
//                        break;
//                    }
//
//                    try{
//                        Thread.sleep(500);
//                    }catch(Exception ignore){}
//                }
                // 修改工作档状态 2.设备上走 => 3.吊车入库中
                Date now = new Date();