| | |
| | | return tag.exceptionData.size >= (changeRate[factorType]?.countLimit ?: 1) |
| | | } |
| | | |
| | | override fun needCut(tag: ExceptionTag, hasException: Boolean?): Boolean { |
| | | override fun needCut(tag: ExceptionTag, hasException: Boolean?, data: BaseRealTimeData): Boolean { |
| | | // 按照时长和距离限制将异常截取 |
| | | if (tag.exceptionData.isEmpty()) return false |
| | | |
| | | val se = tag.exceptionData.first() |
| | | val ee = tag.exceptionData.last() |
| | | val ee = data |
| | | |
| | | val sTime = LocalDateTime.ofInstant(se.dataTime?.toInstant(), ZoneId.systemDefault()) |
| | | val eTime = LocalDateTime.ofInstant(ee.dataTime?.toInstant(), ZoneId.systemDefault()) |
| | |
| | | exceptionStatus: ExceptionStatusType, |
| | | ) { |
| | | super.onNewException(tag, factor, exceptionStatus) |
| | | // callback?.let { func -> |
| | | // val exc = tag.exceptionResult.last() |
| | | // func.invoke(exc as PollutedClue) |
| | | // } |
| | | } |
| | | |
| | | override fun mergeExceptionResult() { |
| | | super.mergeExceptionResult() |
| | | latestExceptionResult |
| | | latestCombinedResult |
| | | callback?.let { func -> |
| | | val exc = tag.exceptionResult.last() |
| | | func.invoke(exc as PollutedClue) |
| | | latestExceptionResult.forEach { |
| | | func.invoke(it as PollutedClue) |
| | | } |
| | | latestCombinedResult.forEach { |
| | | func.invoke(it as PollutedClue) |
| | | } |
| | | } |
| | | } |
| | | } |