From 909fd8929d7906f1dca68acc05e36e29b0b9192c Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期二, 15 十一月 2022 10:57:30 +0800 Subject: [PATCH] 2022.11.15 --- src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt | 23 ++++++++++++++++++++++- 1 files changed, 22 insertions(+), 1 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt b/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt index 2559588..29140ee 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/business/fume/item/ScoreItem_5.kt @@ -1,8 +1,14 @@ package cn.flightfeather.supervision.business.fume.item import cn.flightfeather.supervision.business.ScoreItem +import cn.flightfeather.supervision.domain.ds1.entity.DustDataResult import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2 +import cn.flightfeather.supervision.domain.ds1.mapper.DustDataResultMapper +import org.springframework.beans.factory.annotation.Autowired import org.springframework.stereotype.Component +import tk.mybatis.mapper.entity.Example +import java.time.LocalDateTime +import java.time.ZoneId import javax.annotation.PostConstruct @Component @@ -19,6 +25,9 @@ override var id: String = "PSQUi9f0f7JK6w9d" override var name: String="娌圭儫鍦ㄧ嚎鐩戞祴鏁版嵁閲忕骇" + + @Autowired + lateinit var dustDataResultMapper: DustDataResultMapper /** * 寰愭眹鍖洪楗洃绠″钩鍙拌仈缃戣褰曘�佸湪绾跨巼鍒嗘瀽鏁版嵁鍜岄珮宄扮粡钀ユ椂娈靛皬鏃惰秴鏍囨儏鍐� @@ -60,7 +69,19 @@ * @return true 褰撴湀楂樺嘲缁忚惀鏃舵鍑虹幇涓夋鍙婁互涓�10鍒嗛挓鍧囧�艰秴鏍囨垨鏄剧ず鍑�鍖栬缃緝鑴� */ private fun condition2(): Boolean { - return false + val r = dustDataResultMapper.selectByExample(Example(DustDataResult::class.java).apply { + createCriteria().andGreaterThanOrEqualTo("drTime", info.sTime) + .andLessThan("drTime", info.eTime) + .andEqualTo("drSceneId", info.sceneId) + }) + + var result = false + r.forEach { + if (it.drExceedTimes > 0) { + result = true + } + } + return result } /** -- Gitblit v1.9.3