mark
Este commit está contenido en:
padre
0dfff37b3d
commit
2cc12991b0
@ -76,12 +76,23 @@ public enum InfluxClient {
|
||||
}
|
||||
|
||||
public void insert(Event event, String measurement){
|
||||
Point point = Point.measurement(measurement)
|
||||
.addTag("transationId", event.getTransationId())
|
||||
.addTag("inspectionSheetId", event.getInspectionSheetId())
|
||||
.addTag("argName", event.getArgName())
|
||||
.addField("argValue", event.getArgValue())
|
||||
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
||||
Point point = null;
|
||||
if(event.getBatchNum()==null){
|
||||
point = Point.measurement(measurement)
|
||||
.addTag("transationId", event.getTransationId())
|
||||
.addTag("inspectionSheetId", event.getInspectionSheetId())
|
||||
.addTag("argName", event.getArgName())
|
||||
.addField("argValue", event.getArgValue())
|
||||
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
||||
}else {
|
||||
point = Point.measurement(measurement)
|
||||
.addTag("transationId", event.getTransationId())
|
||||
//.addTag("inspectionSheetId", event.getInspectionSheetId())
|
||||
.addTag("batchNum", event.getBatchNum().toString())
|
||||
.addTag("argName", event.getArgName())
|
||||
.addField("argValue", event.getArgValue())
|
||||
.time(event.getTime().toEpochMilli(), WritePrecision.MS);
|
||||
}
|
||||
writeApi.writePoint(point);
|
||||
|
||||
}
|
||||
@ -114,7 +125,7 @@ public enum InfluxClient {
|
||||
}else {
|
||||
point = Point.measurement(measurement)
|
||||
.addTag("transationId", event.getTransationId())
|
||||
.addTag("inspectionSheetId", event.getInspectionSheetId())
|
||||
//.addTag("inspectionSheetId", event.getInspectionSheetId())
|
||||
.addTag("batchNum", event.getBatchNum().toString())
|
||||
.addTag("argName", event.getArgName())
|
||||
.addField("argValue", event.getArgValue())
|
||||
|
@ -19,4 +19,10 @@ public class Event {
|
||||
private String argName;
|
||||
|
||||
private String argValue;
|
||||
|
||||
private String BatchNum;
|
||||
|
||||
private String InspectionSheetId;
|
||||
|
||||
|
||||
}
|
||||
|
Cargando…
Referencia en una nueva incidencia
Block a user