| | |
| | | |
| | | private static final String ALARM_MODULE = "中空"; |
| | | private static final String ALARM_TYPE = "中空大理片"; |
| | | private static final String ALARM_CODE = "sizeSame"; |
| | | private static final String ALARM_CODE_SIZE = "sizeSame"; |
| | | private static final String ALARM_CODE_ID = "idSame"; |
| | | |
| | | /** |
| | | * 直通格子 |
| | |
| | | List<ProductAlarmInfo> alarmInfos = productAlarmInfoService.list(new LambdaQueryWrapper<ProductAlarmInfo>() |
| | | .eq(ProductAlarmInfo::getState, Const.LOAD_RAW_GLASS_NEW) |
| | | .eq(ProductAlarmInfo::getAlarmModule, ALARM_MODULE) |
| | | .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE) |
| | | .eq(ProductAlarmInfo::getAlarmCode, ALARM_CODE)); |
| | | .eq(ProductAlarmInfo::getAlarmType, ALARM_TYPE)); |
| | | if (CollectionUtil.isNotEmpty(alarmInfos)) { |
| | | log.info("界面报警,等待人工干预处理"); |
| | | return; |
| | |
| | | for (Map.Entry<String, Long> entry : glassCountMap.entrySet()) { |
| | | if (entry.getValue() > 1) { |
| | | log.info("进片玻璃{}存在相同,结束本次任务", entry.getKey()); |
| | | ProductAlarmInfo alarmInfo = new ProductAlarmInfo(); |
| | | alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW); |
| | | alarmInfo.setAlarmModule(ALARM_MODULE); |
| | | alarmInfo.setAlarmType(ALARM_TYPE); |
| | | alarmInfo.setAlarmCode(ALARM_CODE_ID); |
| | | alarmInfo.setAlarmMessage(entry.getKey()); |
| | | productAlarmInfoService.save(alarmInfo); |
| | | //向plc发送报警:同一车进片玻璃存在相同 |
| | | s7DataZKDLPOne = new S7DataZKDLPOne(); |
| | | s7DataZKDLPOne.setAlramSignal(2); |
| | |
| | | if (CollectionUtil.isNotEmpty(detailsList)) { |
| | | log.info("理片笼存在相同的进片玻璃{},结束本次任务", detailsList); |
| | | //向plc发送报警:理片笼存在相同的进片玻璃 |
| | | List<String> sameGlassIds = detailsList.stream() |
| | | .map(HollowBigStorageCageDetails::getGlassId) |
| | | .collect(Collectors.toList()); |
| | | ProductAlarmInfo alarmInfo = new ProductAlarmInfo(); |
| | | alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW); |
| | | alarmInfo.setAlarmModule(ALARM_MODULE); |
| | | alarmInfo.setAlarmType(ALARM_TYPE); |
| | | alarmInfo.setAlarmCode(ALARM_CODE_ID); |
| | | alarmInfo.setAlarmMessage(sameGlassIds.toString()); |
| | | productAlarmInfoService.save(alarmInfo); |
| | | s7DataZKDLPOne = new S7DataZKDLPOne(); |
| | | s7DataZKDLPOne.setAlramSignal(4); |
| | | s7SerializerZKDLPOne.write(s7DataZKDLPOne); |
| | |
| | | alarmInfo.setState(Const.LOAD_RAW_GLASS_NEW); |
| | | alarmInfo.setAlarmModule(ALARM_MODULE); |
| | | alarmInfo.setAlarmType(ALARM_TYPE); |
| | | alarmInfo.setAlarmCode(ALARM_CODE); |
| | | alarmInfo.setAlarmCode(ALARM_CODE_SIZE); |
| | | alarmInfo.setAlarmMessage(info.getGlassId()); |
| | | productAlarmInfoService.save(alarmInfo); |
| | | //重置详情表数据 |