[2.13.0]wait to change
This commit is contained in:
@@ -59,7 +59,7 @@ object TrackerSourceColorHelper {
|
||||
}
|
||||
|
||||
// pnc预警
|
||||
WarningHelper.getPncColor(data.uuid.toString()){
|
||||
WarningHelper.getPncColor(data.uuid.toString()) {
|
||||
if (it.isNotBlank()) {
|
||||
color = it
|
||||
}
|
||||
@@ -111,26 +111,29 @@ object TrackerSourceColorHelper {
|
||||
*/
|
||||
@SuppressLint("NewApi")
|
||||
fun isV2I(data: TrackedObject): Pair<SubSource?, Boolean> {
|
||||
val source = data.trackedSourceList.stream().allMatch {
|
||||
it.source == 4
|
||||
}
|
||||
if (source) {
|
||||
val first = data.trackedSourceList.stream()
|
||||
.filter { trackedSource: TrackedSource -> trackedSource.source == 4 }.findFirst()
|
||||
if (first.isPresent) {
|
||||
val subV2I = first.get().subSourceList.stream().allMatch {
|
||||
it.source == 6
|
||||
}
|
||||
if (subV2I) {
|
||||
val subFirst = first.get().subSourceList.stream()
|
||||
.filter { subSource: SubSource -> subSource.source == 6 }
|
||||
.findFirst()
|
||||
if (subFirst.isPresent) {
|
||||
return Pair(subFirst.get(), true)
|
||||
if (data.trackedSourceList.size == 1) { // 如果仅有一个类型
|
||||
val source = data.trackedSourceList.stream().allMatch { it.source == 2 }
|
||||
if (source) {
|
||||
val first = data.trackedSourceList.stream()
|
||||
.filter { trackedSource: TrackedSource -> trackedSource.source == 2 }
|
||||
.findFirst()
|
||||
if (first.isPresent) {
|
||||
val subV2I = first.get().subSourceList.stream().allMatch {
|
||||
it.source == 6
|
||||
}
|
||||
if (subV2I) {
|
||||
val subFirst = first.get().subSourceList.stream()
|
||||
.filter { subSource: SubSource -> subSource.source == 6 }
|
||||
.findFirst()
|
||||
if (subFirst.isPresent) {
|
||||
return Pair(subFirst.get(), true)
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
return Pair(null, false)
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
Reference in New Issue
Block a user