优化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")),
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;

View File

@@ -73,8 +73,6 @@ public enum L1OperateMatEnum implements IEnum<String>, IOperateMat<L1OperateMatF
PRODUCT("生产完成") {
@Override
public void operate(L1OperateMatForm form) {
log.error("==================================================================");
log.error("form.planId={},entryMatId={}", form.getPlanId(), form.getEntryMatId());
PRODUCT.syncPlanStatus(form.getPlanId(),form.getEntryMatId());
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();
// 处理钢卷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<AppMeasureMessage> {
// 核心逻辑处理
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) {

View File

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