ZengTao
4 天以前 994b07344c976abcb33ff5eaecd685f6461be5ea
hangzhoumesParent/moduleService/hollowGlassModule/src/main/java/com/mes/job/OpcPlcStorageCageHollowTask.java
@@ -262,23 +262,6 @@
            }
        }
//        }
        //超大尺寸
//        Integer slotMaxHeight = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_MAX_HEIGHT);
//        Integer slotMaxthickness = sysConfigService.queryConfigValue(ConstSysConfig.HOLLOW_SLOT_MAX_THICKNESS);
//        if (slotMaxHeight < Math.min(glassInfoList.get(0).getWidth(), glassInfoList.get(0).getHeight()) || glassInfoList.get(0).getThickness() >= slotMaxthickness) {
//            int count = hollowBigStorageCageDetailsService.count(new LambdaQueryWrapper<HollowBigStorageCageDetails>()
//                    .eq(HollowBigStorageCageDetails::getSlot, THROUGH_SLOT)
//                    .in(HollowBigStorageCageDetails::getState, Const.GLASS_STATE_IN_ALL));
//            if (count > 0) {
//                log.info("直通片台存在玻璃,结束本次进片");
//                //向plc发送报警:直通片台存在玻璃,无法继续直通
//                s7DataZKDLPOne = new S7DataZKDLPOne();
//                s7DataZKDLPOne.setAlramSignal(64);
//                s7SerializerZKDLPOne.write(s7DataZKDLPOne);
//                return;
//            }
//        }
        log.info("将钢化小片表内的状态改为钢化结束,玻璃id有:{}", glassIdList);
        //修改钢化任务表中的状态
        temperingGlassInfoService.update(new LambdaUpdateWrapper<TemperingGlassInfo>()
@@ -286,7 +269,9 @@
        //报工
        log.info("将接收到的玻璃进行钢化自动报工,玻璃id有:{}", glassIdList);
        for (String glass : glassIdList) {
            damageService.autoSubmitReport(glass, inTaskList.get(0).getStartSlot(), "钢化", "进中空理片笼", 1);
            if (from.equals(910)) {
                damageService.autoSubmitReport(glass, inTaskList.get(0).getStartSlot(), "钢化", "进中空理片笼", 1);
            }
        }
        Map<String, List<GlassInfo>> glassListMap = glassInfoList.stream().collect(Collectors.groupingBy(GlassInfo::getGlassId));
@@ -509,20 +494,20 @@
                break;
            }
        }
        for (Integer i : resultList) {
            if (null == hollowGlassOutRelationInfo) {
                cell = i;
                hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
                        .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
                                .eq(HollowGlassOutRelationInfo::getCell, cell)
                                .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
                                .orderByAsc(HollowGlassOutRelationInfo::getId)
                                .last("limit 1")
                        );
            } else {
                break;
            }
        }
//        for (Integer i : resultList) {
//            if (null == hollowGlassOutRelationInfo) {
//                cell = i;
//                hollowGlassOutRelationInfo = hollowGlassOutRelationInfoService
//                        .getOne(new LambdaQueryWrapper<HollowGlassOutRelationInfo>()
//                                .eq(HollowGlassOutRelationInfo::getCell, cell)
//                                .eq(HollowGlassOutRelationInfo::getState, Const.HOLLOW_FLOW_CARD_START)
//                                .orderByAsc(HollowGlassOutRelationInfo::getId)
//                                .last("limit 1")
//                        );
//            } else {
//                break;
//            }
//        }
        if (null != hollowGlassOutRelationInfo) {
            //是否允许中空