feiyu02
2024-09-27 72a384981ec78139dbe919597b54efedcc7f33aa
src/main/kotlin/cn/flightfeather/supervision/lightshare/service/impl/EvaluationsubruleServiceImpl.kt
@@ -2,10 +2,10 @@
import cn.flightfeather.supervision.common.exception.BizException
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationsubrule2
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationruleMapper
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationsubruleMapper
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationsubruleMapper2
import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRep
import cn.flightfeather.supervision.domain.ds1.repository.EvaluationRuleRep
import cn.flightfeather.supervision.domain.ds1.repository.SceneRep
@@ -16,20 +16,20 @@
@Service
class EvaluationsubruleServiceImpl(
    val evaluationsubruleMapper: EvaluationsubruleMapper,
    val evaluationsubruleMapper: EvaluationsubruleMapper2,
    val evaluationruleMapper: EvaluationruleMapper,
    private val evaluationRep: EvaluationRep,
    private val evaluationRuleRep: EvaluationRuleRep,
    private val sceneRep: SceneRep,
) : EvaluationsubruleService {
    override fun findOne(id: String): Evaluationsubrule = evaluationsubruleMapper.selectByPrimaryKey(id)
    override fun findOne(id: String): Evaluationsubrule2 = evaluationsubruleMapper.selectByPrimaryKey(id)
    override fun findAll(): MutableList<Evaluationsubrule> = evaluationsubruleMapper.selectAll()
    override fun findAll(): MutableList<Evaluationsubrule2> = evaluationsubruleMapper.selectAll()
    override fun save(evaluationsubrule: Evaluationsubrule): Int = evaluationsubruleMapper.insert(evaluationsubrule)
    override fun save(evaluationsubrule: Evaluationsubrule2): Int = evaluationsubruleMapper.insert(evaluationsubrule)
    override fun update(evaluationsubrule: Evaluationsubrule): Int =
    override fun update(evaluationsubrule: Evaluationsubrule2): Int =
        evaluationsubruleMapper.updateByPrimaryKey(evaluationsubrule)
    override fun delete(id: String): Int = evaluationsubruleMapper.deleteByPrimaryKey(id)
@@ -38,13 +38,13 @@
        return evaluationRuleRep.findSubRule(erguid)
    }
    override fun search(districtCode: String, sceneTypeId: String, version: String?): List<Evaluationsubrule> {
        val result = mutableListOf<Evaluationsubrule>()
    override fun search(districtCode: String, sceneTypeId: String, version: String?): List<Evaluationsubrule2> {
        val result = mutableListOf<Evaluationsubrule2>()
        evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
            createCriteria().andEqualTo("districtcode", districtCode)
                .andEqualTo("scensetypeid", sceneTypeId)
        }).takeIf { it.isNotEmpty() }?.get(0)?.let { rule ->
            evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule::class.java).apply {
            evaluationsubruleMapper.selectByExample(Example(Evaluationsubrule2::class.java).apply {
                createCriteria().andEqualTo("erguid", rule.guid)
            })
        }?.also {