plc日志文件解析
This commit is contained in:
parent
c8706bb25a
commit
84274d073a
@ -130,10 +130,7 @@ public class PlcLogsServiceImpl implements PlcLogService {
|
|||||||
timeList.add(timestamp);
|
timeList.add(timestamp);
|
||||||
map.put(listField.get(i),timeList);
|
map.put(listField.get(i),timeList);
|
||||||
}else if (i == 1 || i == 2){
|
}else if (i == 1 || i == 2){
|
||||||
List<Object> keyOrUserNameList = new ArrayList<>();
|
continue;
|
||||||
String keyOrUserName = item.get(i);
|
|
||||||
keyOrUserNameList.add(keyOrUserName);
|
|
||||||
map.put(listField.get(i),keyOrUserNameList);
|
|
||||||
}
|
}
|
||||||
else {
|
else {
|
||||||
List<Object> valueList = new ArrayList<>();
|
List<Object> valueList = new ArrayList<>();
|
||||||
@ -146,7 +143,7 @@ public class PlcLogsServiceImpl implements PlcLogService {
|
|||||||
if (i == 0){
|
if (i == 0){
|
||||||
valueList.add(convertToTimestamp(item.get(i),timeFormat));
|
valueList.add(convertToTimestamp(item.get(i),timeFormat));
|
||||||
} else if (i == 1 || i == 2) {
|
} else if (i == 1 || i == 2) {
|
||||||
valueList.add(item.get(i));
|
continue;
|
||||||
} else {
|
} else {
|
||||||
valueList.add(Double.valueOf(item.get(i)));
|
valueList.add(Double.valueOf(item.get(i)));
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user