优化G30日志

This commit is contained in:
2026-01-11 21:43:17 +08:00
parent 62036f85be
commit 2d2c0779b9
5 changed files with 6 additions and 33 deletions

View File

@@ -45,9 +45,9 @@ public enum DeviceEnum {
CXL1(16, "Exit Looper #1", 720.709, SectionType.EXIT, SourceType.EXIT, Arrays.asList("cxlLength", "cxlCapacity", "tensionCxl")), 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")), 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")), // 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")), TR(18, "Recoiler", 952.819, SectionType.EXIT, SourceType.EXIT, Arrays.asList("coilLength", "speedExitSection", "tensionBr9Tr")),
EXC(20, "Coil Car", 9999999.0, SectionType.EXIT, SourceType.EXIT, Collections.emptyList()), EXC(19, "Coil Car", 9999999.0, SectionType.EXIT, SourceType.EXIT, Collections.emptyList()),
WEIGHT(21, "Weighing Saddle", 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 int idx;
private final String desc; private final String desc;

View File

@@ -73,8 +73,6 @@ public enum L1OperateMatEnum implements IEnum<String>, IOperateMat<L1OperateMatF
PRODUCT("生产完成") { PRODUCT("生产完成") {
@Override @Override
public void operate(L1OperateMatForm form) { public void operate(L1OperateMatForm form) {
log.error("==================================================================");
log.error("form.planId={},entryMatId={}", form.getPlanId(), form.getEntryMatId());
PRODUCT.syncPlanStatus(form.getPlanId(),form.getEntryMatId()); PRODUCT.syncPlanStatus(form.getPlanId(),form.getEntryMatId());
WebSocketUtil.sendSignalMsg(form); WebSocketUtil.sendSignalMsg(form);
} }

View File

@@ -53,16 +53,8 @@ public class AppMeasureHandler implements OpcMessageHandler<AppMeasureMessage> {
BigDecimal lengthAtWelder = entry == null || entry.getStripLocation() == null ? BigDecimal.ZERO : entry.getStripLocation(); BigDecimal lengthAtWelder = entry == null || entry.getStripLocation() == null ? BigDecimal.ZERO : entry.getStripLocation();
// 处理钢卷ID为空的情况 // 处理钢卷ID为空的情况
String coilId =""; String coilId ="";
// if (entry != null && entry.getEntryCoilId() != null){
// coilId = entry.getEntryCoilId();
//
// }else {
if (entry != null) {
log.error("entry{}",entry.getPayOffReelNumber());
}
MatmapDTO matmapDTO =getCurrentRunningCoilId(entry); MatmapDTO matmapDTO =getCurrentRunningCoilId(entry);
coilId = matmapDTO.getMatId(); coilId = matmapDTO.getMatId();
// }
if (StringUtils.isEmpty(coilId) || "".equals(coilId)){ if (StringUtils.isEmpty(coilId) || "".equals(coilId)){
log.error("钢卷号为空,无法执行焊缝跟踪!!!!!!"); log.error("钢卷号为空,无法执行焊缝跟踪!!!!!!");
@@ -83,18 +75,6 @@ public class AppMeasureHandler implements OpcMessageHandler<AppMeasureMessage> {
// 核心逻辑处理 // 核心逻辑处理
tracker.handleMeasure(coilId, lengthAtWelder, entry, furnace, coat, exit); 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) { private MatmapDTO getCurrentRunningCoilId(AppMeasureEntryMessage entry) {

View File

@@ -42,7 +42,6 @@ public class ExitCutHandler implements OpcMessageHandler<ExitCutMessage> {
return; return;
} }
log.info("接受到出口剪切信号:{}", JSONUtil.toJsonStr(message));
// 2. 根据剪切类型,生成产出卷信息 // 2. 根据剪切类型,生成产出卷信息
ExitCoilInfoDTO exitCoilInfo = pdoExCoilService.genExitCoilInfo(trMatmap, message.getCutType()); ExitCoilInfoDTO exitCoilInfo = pdoExCoilService.genExitCoilInfo(trMatmap, message.getCutType());

View File

@@ -30,7 +30,6 @@ import java.util.concurrent.ConcurrentHashMap;
import java.util.concurrent.ConcurrentLinkedDeque; import java.util.concurrent.ConcurrentLinkedDeque;
import java.util.concurrent.ConcurrentMap; import java.util.concurrent.ConcurrentMap;
import static com.fizz.business.constants.enums.DeviceEnum.FUR4;
@Service @Service
@Slf4j @Slf4j
@@ -76,21 +75,19 @@ public class SegmentTrackerService {
AppMeasureExitMessage exit) { AppMeasureExitMessage exit) {
long now = System.currentTimeMillis(); long now = System.currentTimeMillis();
// 4. trackCoilHeadPosition 同步执行
try { try {
log.warn(">>> trackCoilHeadPosition start, thread: {}, coilId: {}", Thread.currentThread().getName(), coilId);
trackCoilHeadPosition(coilId, entryLengthAtWelder, entry, exit); trackCoilHeadPosition(coilId, entryLengthAtWelder, entry, exit);
} catch (Exception e) { } catch (Exception e) {
log.error("trackCoilHeadPosition 执行异常coilId=" + coilId, e); logDataService.logInfo("ERROR","coidId="+coilId+", e="+ e);
} }
Long lastTime = lastLogTimeMap.get(coilId); Long lastTime = lastLogTimeMap.get(coilId);
if (lastTime == null || now - lastTime > intervalTime) { if (lastTime == null || now - lastTime > intervalTime) {
lastLogTimeMap.put(coilId, now); lastLogTimeMap.put(coilId, now);
log.info("【TRACK-START】接收到测量数据 -> CoilId: {}, LengthAtWelder: {}", coilId, entryLengthAtWelder);
logDataService.logInfo("WELDER", "Received measurement data -> CoilId: " + coilId + ", LengthAtWelder: " + entryLengthAtWelder); logDataService.logInfo("WELDER", "Received measurement data -> CoilId: " + coilId + ", LengthAtWelder: " + entryLengthAtWelder);
} }
// 4. trackCoilHeadPosition 同步执行
// 1. 新卷或首次测量初始化 // 1. 新卷或首次测量初始化
BigDecimal weldDev; BigDecimal weldDev;
@@ -121,7 +118,6 @@ public class SegmentTrackerService {
SegmentDTO newSeg = createNewSegment(coilId, entryLengthAtWelder); SegmentDTO newSeg = createNewSegment(coilId, entryLengthAtWelder);
listSegment.addLast(newSeg); listSegment.addLast(newSeg);
if (listSegment.size() > MAX_SEG_COUNT) listSegment.removeFirst(); 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); logDataService.logInfo("WELDER", "New segment created -> CoilId: " + coilId + ", SegmentNo: " + coilSegNum + ", StartLen: " + entryLengthAtWelder);
coilSegNum++; coilSegNum++;
} }