文件名从 src/main/kotlin/cn/flightfeather/supervision/business/autooutput/score/construction/JADataAnalysis.kt 修改 |
| | |
| | | package cn.flightfeather.supervision.business.autooutput.score.construction |
| | | package cn.flightfeather.supervision.business.autooutput.dataanalysis |
| | | |
| | | import cn.flightfeather.supervision.business.autooutput.AopOutput |
| | | import cn.flightfeather.supervision.business.autooutput.datasource.AopDataSource |
| | | import cn.flightfeather.supervision.business.autooutput.datasource.AopDbMapper |
| | | import cn.flightfeather.supervision.business.autooutput.datasource.AopSceneTypeCheck |
| | | import cn.flightfeather.supervision.business.autooutput.score.AopDataAnalysis |
| | | import cn.flightfeather.supervision.domain.ds2.entity.DustSiteMap |
| | | import cn.flightfeather.supervision.domain.ds2.entity.HourDustData |
| | | import cn.flightfeather.supervision.domain.ds2.mapper.DustSiteMapMapper |
| | |
| | | * 闈欏畨宸ュ湴鎵皹鐩戞祴鏁版嵁缁熻 |
| | | */ |
| | | @Component |
| | | class JADataAnalysis( |
| | | class JACsDataAnalysis( |
| | | aopDbMapper: AopDbMapper, |
| | | aopSceneTypeCheck: AopSceneTypeCheck, |
| | | aopOutput: AopOutput, |
| | |
| | | var count = 0 |
| | | hourDustDataMapper.selectByExample(Example(HourDustData::class.java).apply { |
| | | createCriteria().andBetween("lst", source?.config?.startTime, source?.config?.endTime) |
| | | .andEqualTo("flag", "N") |
| | | }).forEach { |
| | | it?.dustvalue?.let { v -> |
| | | total += v |
| | |
| | | } |
| | | } |
| | | |
| | | override fun overAvgRate(avg: Double, dAvg: Double?): Double { |
| | | override fun overAvgRate(avg: Double, dAvg: Double?): Double? { |
| | | return if (dAvg != null) { |
| | | round(((avg - dAvg) / dAvg) * 1000) / 1000 |
| | | } else { |
| | | .0 |
| | | null |
| | | } |
| | | } |
| | | |