plc日志文件解析

This commit is contained in:
huguanghan 2024-11-15 14:59:05 +08:00
parent c8706bb25a
commit 84274d073a

View File

@ -130,10 +130,7 @@ public class PlcLogsServiceImpl implements PlcLogService {
timeList.add(timestamp);
map.put(listField.get(i),timeList);
}else if (i == 1 || i == 2){
List<Object> keyOrUserNameList = new ArrayList<>();
String keyOrUserName = item.get(i);
keyOrUserNameList.add(keyOrUserName);
map.put(listField.get(i),keyOrUserNameList);
continue;
}
else {
List<Object> valueList = new ArrayList<>();
@ -146,7 +143,7 @@ public class PlcLogsServiceImpl implements PlcLogService {
if (i == 0){
valueList.add(convertToTimestamp(item.get(i),timeFormat));
} else if (i == 1 || i == 2) {
valueList.add(item.get(i));
continue;
} else {
valueList.add(Double.valueOf(item.get(i)));
}