feiyu02
2024-01-10 30a53b41f09d2eefd33513a409d472c2166ba1ea
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
package cn.flightfeather.supervision.domain.ds1.repository
 
import cn.flightfeather.supervision.domain.ds1.entity.Evaluationrule
import cn.flightfeather.supervision.domain.ds1.mapper.EvaluationruleMapper
import cn.flightfeather.supervision.lightshare.vo.AreaEvaVo
import org.springframework.stereotype.Repository
import tk.mybatis.mapper.entity.Example
 
/**
 * 评估规则数据库相关操作
 */
@Repository
class EvaluationRuleRep(private val evaluationruleMapper: EvaluationruleMapper) {
 
    /**
     * 根据参数查询总规则
     * @param areaEvaVo 查询参数
     */
    fun findBaseRule(areaEvaVo: AreaEvaVo): List<Evaluationrule?> {
        return evaluationruleMapper.selectByExample(Example(Evaluationrule::class.java).apply {
            createCriteria().andEqualTo("tasktypeid", areaEvaVo.taskTypeId)
                .andEqualTo("scensetypeid", areaEvaVo.scensetypeid)
                .andEqualTo("provincecode", areaEvaVo.provincecode)
                .andEqualTo("citycode", areaEvaVo.citycode)
                .andEqualTo("districtcode", areaEvaVo.districtcode)
                .andEqualTo("towncode", areaEvaVo.towncode)
                .andEqualTo("isuse", true)
        })
    }
}