ZengTao
2025-03-14 2c08bfb96d6523dfbf5ae543e94495c151aadbf1
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -307,6 +307,23 @@
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
        }
        if (null == hollowGlassOutRelationInfo) {
            cell = 930;
            hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                    .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                            .eq(HollowGlassOutRelationInfo::getCell, cell)
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
        }
        if (null == hollowGlassOutRelationInfo) {
            cell = 931;
            hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                    .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                            .eq(HollowGlassOutRelationInfo::getCell, cell)
                            .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                    );
        }
        if (null != hollowGlassOutRelationInfo) {
            //是否允许中空
@@ -610,7 +627,6 @@
            log.info("计算玻璃数量过程中出现错误,错误信息{}", e.getMessage());
        }
//        hollowGlassOutRelationInfoService.update
//       重置任务表数据
        bigStorageCageTaskService.updateOutTaskMessage(BIG_STORAGE_CAGE_OUT_TWO_TASK);
@@ -789,14 +805,22 @@
        if (1 != isForce) {
            if (taskType == Const.BIG_STORAGE_AFTER_OUT) {
                if (tempList.size() <= totalLayer) {
                    bigStorageCageTaskList = tempList;
                    int tempSequence = list.get(0).getHollowSequence();
                    List<BigStorageCageTask> resultList = new ArrayList<>();
                    for (int i = 0; i < tempList.size(); i++) {
                        if (tempSequence == list.get(i).getHollowSequence()) {
                            resultList.add(tempList.get(i));
                        } else {
                            break;
                        }
                    }
                    bigStorageCageTaskList = resultList;
                } else {
                    int remainCount = tempList.size() % totalLayer;
                    bigStorageCageTaskList = tempList.subList(0, tempList.size() - remainCount);
                }
            }
        }
        List<String> glassIds = bigStorageCageTaskList.stream().map(BigStorageCageTask::getGlassId).collect(Collectors.toList());
        int glassCount = bigStorageCageTaskList.size();
        //生成出片任务条数不足6补全