package cn.flightfeather.supervision.business.fume.item
|
|
import cn.flightfeather.supervision.business.ScoreItem
|
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule
|
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
|
import cn.flightfeather.supervision.domain.ds2.entity.LedgerRecord
|
import cn.flightfeather.supervision.domain.ds2.mapper.LedgerRecordMapper
|
import org.springframework.beans.factory.annotation.Autowired
|
import org.springframework.stereotype.Component
|
import tk.mybatis.mapper.entity.Example
|
import javax.annotation.PostConstruct
|
|
@Component
|
class ScoreItem_3: ScoreItem() {
|
companion object {
|
private lateinit var instance: ScoreItem_3
|
}
|
|
@PostConstruct
|
fun init() {
|
instance = this
|
}
|
|
@Autowired
|
lateinit var ledgerRecordMapper: LedgerRecordMapper
|
|
override var id: String = "gxJgISevmhFuMJnE"
|
|
override var name: String="油烟在线监测设备维护"
|
|
/**
|
* 在线台账中运维记录及时提交且确定联网且任一经营高峰在线率高于90%即不扣分,其他扣10分。
|
* 选项如下:
|
* 1.油烟监测设备未按期运维或运维频次不足(少于一季度一次)
|
* 2.油烟监测设备运行异常(指示灯异常、部分模块不运行或缺失等)
|
* 3.油烟监测设备未正常开启
|
*/
|
override fun otherProblem(size: Int): Int? {
|
var i = 0
|
if (condition1()) {
|
if (i > size - 1) i = size - 1
|
return i
|
} else if (condition2()) {
|
i = 2
|
if (i > size - 1) i = size - 1
|
return i
|
}
|
return null
|
}
|
|
/**
|
* @return false 在线台账中运维记录及时提交
|
* true 在线台账中运维记录未及时提交
|
*/
|
private fun condition1(): Boolean {
|
// val l = ledgerRecordMapper.selectByExample(Example(LedgerRecord::class.java).apply {
|
// createCriteria().andEqualTo("lsSubtypeid", 2304)//设备运维记录
|
// .andEqualTo("lrYear", info.year)
|
// .andEqualTo("lrMonth", info.month)
|
// .andEqualTo("lrSubmitid", info.tzUserId)
|
// })
|
// return l.size == 0
|
return false
|
}
|
|
/**
|
* @return false 确定联网且任一经营高峰在线率高于90%即不扣分
|
* true 其他扣10分
|
*/
|
private fun condition2(): Boolean {
|
return false
|
}
|
}
|