feiyu02
2025-08-14 f373bbf83d9d2a7e5f96118d7dcd658c9fea8bc8
src/test/kotlin/cn/flightfeather/supervision/business/autooutput/AopEvaluationTest.kt
@@ -9,6 +9,8 @@
import cn.flightfeather.supervision.business.autooutput.datasource.AopDataConfig
import cn.flightfeather.supervision.business.autooutput.score.AopCreditCode
import cn.flightfeather.supervision.common.utils.Constant
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationruleMapper
import cn.flightfeather.supervision.domain.ds1.repository.SubTaskRep
import cn.flightfeather.supervision.lightshare.service.SearchService
import cn.flightfeather.supervision.lightshare.vo.ExcelConfigVo
@@ -19,6 +21,7 @@
import org.springframework.boot.test.context.SpringBootTest
import org.springframework.test.context.junit.jupiter.SpringExtension
import org.springframework.test.context.junit4.SpringRunner
import tk.mybatis.mapper.entity.Example
@RunWith(SpringRunner::class)
@ExtendWith(SpringExtension::class)
@@ -51,6 +54,9 @@
    @Autowired
    lateinit var subTaskRep: SubTaskRep
    @Autowired
    lateinit var evaluationruleMapper: EvaluationruleMapper
    /**
     * 静安工地自评
@@ -147,4 +153,22 @@
        val s = subTaskRep.findOne("B6kyaAjJRoGJ2Yur")
        aopEvaluation.executeBySubTask(s!!)
    }
    @Test
    fun test3() {
        val result = evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
            createCriteria()
                .andEqualTo("tasktypeid", 99)
                .andEqualTo("scensetypeid", 1)
            and(createCriteria().orEqualTo("provincecode", "31").orIsNull("provincecode"))
            and(createCriteria().orEqualTo("citycode", "3100").orIsNull("citycode"))
            and(createCriteria().orEqualTo("districtcode", "310104").orIsNull("districtcode"))
            and(createCriteria().orEqualTo("towncode", "310104014").orIsNull("towncode"))
            orderBy("towncode").desc()
                .orderBy("districtcode").desc()
                .orderBy("citycode").desc()
                .orderBy("provincecode").desc()
        })
        println(result.map { it.rulename })
    }
}