wangfei
2025-11-03 c86986fc9dd31522778e0b9893622ddcd882de3e
hangzhoumesParent/moduleService/CacheGlassModule/src/main/java/com/mes/job/OpcCacheGlassNewTask.java
@@ -352,6 +352,7 @@
        Integer d06OutState = s7DataWLExtraTwo.getD06SlotState();
        //状态有3中情况:0空闲 1忙碌 2禁用
        //两条线都为禁用则不出玻璃
        log.info("当前设备为:{},一号设备任务信息:{},二号设备任务信息:{},d06任务信息:{}", deviceId, s7DataWLOne, s7DataWLTwo, d06OutState);
        if (Const.OUT_DISABLE.equals(oneOutState) && Const.OUT_DISABLE.equals(twoOutState)) {
            log.info("设备{}:A09、A10为{},{}非自动状态,无法出片", deviceId, oneOutState, oneOutState);
            return Boolean.FALSE;
@@ -379,8 +380,12 @@
                cell = Const.TWO_OUT_TARGET_POSITION;
            } else if (Const.OUT_FREE.equals(oneOutState)) {
                cell = Const.ONE_OUT_TARGET_POSITION;
            } else {
            } else if (Const.OUT_BUSY.equals(twoOutState)) {
                cell = Const.TWO_OUT_TARGET_POSITION;
            }else if(Const.OUT_BUSY.equals(oneOutState)){
                cell = Const.ONE_OUT_TARGET_POSITION;
            }else{
                return Boolean.FALSE;
            }
        }
        log.info("{}线路计算完成:{}", deviceId, cell);
@@ -428,7 +433,7 @@
        if (null == edgStorageCageDetails) {
//        获取历史表中上次任务最后一片尺寸
            EdgStorageDeviceTaskHistory edgeData = edgStorageDeviceTaskHistoryService.getOne(new LambdaQueryWrapper<EdgStorageDeviceTaskHistory>()
                    .eq(EdgStorageDeviceTaskHistory::getDeviceId, cell)
                    .eq(EdgStorageDeviceTaskHistory::getEndCell, cell)
                    .in(EdgStorageDeviceTaskHistory::getTaskType, Const.GLASS_CACHE_TYPE_OUT, Const.GLASS_CACHE_TYPE_THROUGH)
                    .orderByDesc(EdgStorageDeviceTaskHistory::getId).last("limit 1"));
            log.info("{}获取上次任务信息:{}", deviceId, edgeData);