diff --git a/project/src/services/collection.ts b/project/src/services/collection.ts index 3abb167..7559648 100644 --- a/project/src/services/collection.ts +++ b/project/src/services/collection.ts @@ -24,11 +24,13 @@ export function handleDataCollection( SELECT s.Id, s.PointId, mp.PointName FROM Stations s JOIN MeasurementPoints mp ON mp.Id = s.PointId - WHERE s.PLCId = ? AND s.StationIndex = ? + WHERE s.PLCId = ? + ORDER BY s.Id + LIMIT 1 OFFSET ? `).get(plc.id, stationIndex) as { Id: number; PointId: number; PointName: string } | undefined if (!station) { - logger.warn(TAG, `PLC#${plc.id} 工序索引 ${stationIndex} 未找到对应配置`) + logger.warn(TAG, `PLC#${plc.id} 工序偏移 ${stationIndex} 未找到对应配置`) return }