#
lsh
2025-07-07 3e1aa4864da243ade9f8ee6e3a6fc43e1cf5d8b2
#
2个文件已修改
65 ■■■■ 已修改文件
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java 9 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/core/MainProcess.java 56 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
src/main/java/com/zy/asrs/service/impl/MainServiceImpl.java
@@ -1097,11 +1097,11 @@
                    }
                    // 判断堆垛机出库站状态
                    if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) {
//                    if (staProtocol.isAutoing() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")) {
//                    // 判断堆垛机出库站状态
//                    if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
//                            && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                    if (staProtocol.isAutoing() && !staProtocol.isLoading() && staDetl.getCanouting() != null && staDetl.getCanouting().equals("Y")
                            && staProtocol.getWorkNo() == 0 && staProtocol.isOutEnable()) {
                        // 命令下发区 --------------------------------------------------------------------------
                        // 堆垛机控制过滤
@@ -1203,6 +1203,9 @@
                            if (staProtocol.isOutEnable()){
                                CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "没有可出");
                            }
                            if (staProtocol.isLoading()){
                                CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "出库站有物");
                            }
                        } else {
                            CrnErrCache.updateCrnErr(crnProtocol.getCrnNo(), "出库站点:非自动");
                        }
src/main/java/com/zy/core/MainProcess.java
@@ -22,7 +22,7 @@
    private MainServiceImpl mainService;
    // 所属线程
    private Thread thread;
    private Thread thread2;
//    private Thread thread2;
    /**
     * =====>>  开始工作
@@ -40,11 +40,15 @@
                    // 入库  ===>> 入库站到堆垛机站,根据条码扫描生成入库工作档
                    mainService.generateStoreWrkFile(); // 组托
//                    mainService.generateStoreWrkFileIsEmptyMk(); // 组托  空托
                    mainService.generateStoreWrkFileWalk(); // 任务下发
                    mainService.generateStoreWrkFileWalk(); // wms入库任务下发
                    // 出库  ===>>  堆垛机出库站到出库站
                    mainService.crnStnToOutStn();
                    // 入出库  ===>>  堆垛机入出库作业下发
                    mainService.crnIoExecute();
                    // 入库  ===>> 执行对工作档的完成操作
                    mainService.storeFinished();
                    // 堆垛机异常信息记录
                    mainService.recCrnErr();
                    // 任务下发
                    mainService.taskStart();
                    // 出库  ===>>  堆垛机10分钟无任务则回到源点
@@ -56,37 +60,33 @@
        });
        thread.start();
        thread2 = new Thread(() -> {
            while (!Thread.currentThread().isInterrupted()) {
                try {
                    // 间隔
                    Thread.sleep(200);
                    // 系统运行状态判断
                    if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
                        continue;
                    }
                    // 出库  ===>>  堆垛机出库站到出库站
                    mainService.crnStnToOutStn();
                    // 堆垛机异常信息记录
                    mainService.recCrnErr();
                    // 输送线异常信息记录
//                    mainService.recDevErr();
                    // 出库  ===>> 工作档信息写入led显示器
//                    mainService.ledExecute(9);
                    // 其他  ===>> LED显示器复位,显示默认信息
//                    mainService.ledReset(10);
                } catch (Exception e) {
                    e.printStackTrace();
                }
            }
        });
        thread2.start();
//        thread2 = new Thread(() -> {
//            while (!Thread.currentThread().isInterrupted()) {
//                try {
//                    // 间隔
//                    Thread.sleep(200);
//                    // 系统运行状态判断
//                    if (!SystemProperties.WCS_RUNNING_STATUS.get()) {
//                        continue;
//                    }
//                    // 输送线异常信息记录
////                    mainService.recDevErr();
//                    // 出库  ===>> 工作档信息写入led显示器
////                    mainService.ledExecute(9);
//                    // 其他  ===>> LED显示器复位,显示默认信息
////                    mainService.ledReset(10);
//                } catch (Exception e) {
//                    e.printStackTrace();
//                }
//            }
//        });
//        thread2.start();
    }
    @PreDestroy
    public void shutDown(){
        if (thread != null) thread.interrupt();
        if (thread2 != null) thread2.interrupt();
//        if (thread2 != null) thread2.interrupt();
    }
}