diff --git a/business/src/main/java/com/fizz/business/constants/enums/DeviceEnum.java b/business/src/main/java/com/fizz/business/constants/enums/DeviceEnum.java index 4fac1d3..a15f807 100644 --- a/business/src/main/java/com/fizz/business/constants/enums/DeviceEnum.java +++ b/business/src/main/java/com/fizz/business/constants/enums/DeviceEnum.java @@ -45,9 +45,9 @@ public enum DeviceEnum { CXL1(16, "Exit Looper #1", 720.709, SectionType.EXIT, SourceType.EXIT, Arrays.asList("cxlLength", "cxlCapacity", "tensionCxl")), CXL2(17, "Exit Looper #2", 888.789, SectionType.EXIT, SourceType.EXIT, Arrays.asList("cxlLength", "cxlCapacity", "tensionCxl")), // INS(18, "Inspection Station", 940.561, SectionType.EXIT, SourceType.EXIT, Arrays.asList("inspectionStatus")), - TR(19, "Recoiler", 952.819, SectionType.EXIT, SourceType.EXIT, Arrays.asList("coilLength", "speedExitSection", "tensionBr9Tr")), - EXC(20, "Coil Car", 9999999.0, SectionType.EXIT, SourceType.EXIT, Collections.emptyList()), - WEIGHT(21, "Weighing Saddle", 9999999.0, SectionType.EXIT, SourceType.EXIT, Collections.emptyList()); + TR(18, "Recoiler", 952.819, SectionType.EXIT, SourceType.EXIT, Arrays.asList("coilLength", "speedExitSection", "tensionBr9Tr")), + EXC(19, "Coil Car", 9999999.0, SectionType.EXIT, SourceType.EXIT, Collections.emptyList()), + WEIGHT(20, "Weighing Saddle", 9999999.0, SectionType.EXIT, SourceType.EXIT, Collections.emptyList()); private final int idx; private final String desc; diff --git a/business/src/main/java/com/fizz/business/constants/enums/L1OperateMatEnum.java b/business/src/main/java/com/fizz/business/constants/enums/L1OperateMatEnum.java index ab9658a..510dd57 100644 --- a/business/src/main/java/com/fizz/business/constants/enums/L1OperateMatEnum.java +++ b/business/src/main/java/com/fizz/business/constants/enums/L1OperateMatEnum.java @@ -73,8 +73,6 @@ public enum L1OperateMatEnum implements IEnum, IOperateMat { BigDecimal lengthAtWelder = entry == null || entry.getStripLocation() == null ? BigDecimal.ZERO : entry.getStripLocation(); // 处理钢卷ID为空的情况 String coilId =""; -// if (entry != null && entry.getEntryCoilId() != null){ -// coilId = entry.getEntryCoilId(); -// -// }else { - if (entry != null) { - log.error("entry{}",entry.getPayOffReelNumber()); - } MatmapDTO matmapDTO =getCurrentRunningCoilId(entry); coilId = matmapDTO.getMatId(); -// } if (StringUtils.isEmpty(coilId) || "".equals(coilId)){ log.error("钢卷号为空,无法执行焊缝跟踪!!!!!!"); @@ -83,18 +75,6 @@ public class AppMeasureHandler implements OpcMessageHandler { // 核心逻辑处理 tracker.handleMeasure(coilId, lengthAtWelder, entry, furnace, coat, exit); - // 异步执行 trackCoilHeadPosition -// coilTrackExecutor.execute(() -> { -// try { -// log.warn(">>> trackCoilHeadPosition start, thread: {}, coilId: {}", -// Thread.currentThread().getName(), coilId); -// -// tracker.trackCoilHeadPosition(coilId, lengthAtWelder, entry, exit); -// -// } catch (Exception e) { -// log.error("trackCoilHeadPosition 执行异常,coilId=" + coilId, e); -// } -// }); } private MatmapDTO getCurrentRunningCoilId(AppMeasureEntryMessage entry) { diff --git a/business/src/main/java/com/fizz/business/service/hanle/ExitCutHandler.java b/business/src/main/java/com/fizz/business/service/hanle/ExitCutHandler.java index c0cfdae..632e78a 100644 --- a/business/src/main/java/com/fizz/business/service/hanle/ExitCutHandler.java +++ b/business/src/main/java/com/fizz/business/service/hanle/ExitCutHandler.java @@ -42,7 +42,6 @@ public class ExitCutHandler implements OpcMessageHandler { return; } - log.info("接受到出口剪切信号:{}", JSONUtil.toJsonStr(message)); // 2. 根据剪切类型,生成产出卷信息 ExitCoilInfoDTO exitCoilInfo = pdoExCoilService.genExitCoilInfo(trMatmap, message.getCutType()); diff --git a/business/src/main/java/com/fizz/business/service/strip/SegmentTrackerService.java b/business/src/main/java/com/fizz/business/service/strip/SegmentTrackerService.java index 66e88e3..832313b 100644 --- a/business/src/main/java/com/fizz/business/service/strip/SegmentTrackerService.java +++ b/business/src/main/java/com/fizz/business/service/strip/SegmentTrackerService.java @@ -30,7 +30,6 @@ import java.util.concurrent.ConcurrentHashMap; import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.ConcurrentMap; -import static com.fizz.business.constants.enums.DeviceEnum.FUR4; @Service @Slf4j @@ -76,21 +75,19 @@ public class SegmentTrackerService { AppMeasureExitMessage exit) { long now = System.currentTimeMillis(); - + // 4. trackCoilHeadPosition 同步执行 try { - log.warn(">>> trackCoilHeadPosition start, thread: {}, coilId: {}", Thread.currentThread().getName(), coilId); trackCoilHeadPosition(coilId, entryLengthAtWelder, entry, exit); } catch (Exception e) { - log.error("trackCoilHeadPosition 执行异常,coilId=" + coilId, e); + logDataService.logInfo("ERROR","coidId="+coilId+", e="+ e); } Long lastTime = lastLogTimeMap.get(coilId); if (lastTime == null || now - lastTime > intervalTime) { lastLogTimeMap.put(coilId, now); - log.info("【TRACK-START】接收到测量数据 -> CoilId: {}, LengthAtWelder: {}", coilId, entryLengthAtWelder); logDataService.logInfo("WELDER", "Received measurement data -> CoilId: " + coilId + ", LengthAtWelder: " + entryLengthAtWelder); } - // 4. trackCoilHeadPosition 同步执行 + // 1. 新卷或首次测量初始化 BigDecimal weldDev; @@ -121,7 +118,6 @@ public class SegmentTrackerService { SegmentDTO newSeg = createNewSegment(coilId, entryLengthAtWelder); listSegment.addLast(newSeg); if (listSegment.size() > MAX_SEG_COUNT) listSegment.removeFirst(); - log.info("【TRACK】新段生成 -> CoilId: {}, SegmentNo: {}, StartLen: {}", coilId, coilSegNum, entryLengthAtWelder); logDataService.logInfo("WELDER", "New segment created -> CoilId: " + coilId + ", SegmentNo: " + coilSegNum + ", StartLen: " + entryLengthAtWelder); coilSegNum++; }