From 0392c333ed3d987cb2ab3dac4e1a972cff405f21 Mon Sep 17 00:00:00 2001 From: feiyu02 <risaku@163.com> Date: 星期四, 25 四月 2024 17:42:08 +0800 Subject: [PATCH] 1. 新增后台任务关联模块 2. 新增自动评分后台任务; 3. 修复部分bug --- src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRuleRep.kt | 19 ++++++++++++++++++- 1 files changed, 18 insertions(+), 1 deletions(-) diff --git a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRuleRep.kt b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRuleRep.kt index 30fbccc..dd40759 100644 --- a/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRuleRep.kt +++ b/src/main/kotlin/cn/flightfeather/supervision/domain/ds1/repository/EvaluationRuleRep.kt @@ -1,5 +1,6 @@ package cn.flightfeather.supervision.domain.ds1.repository +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.lightshare.vo.AreaEvaVo @@ -10,7 +11,10 @@ * 璇勪及瑙勫垯鏁版嵁搴撶浉鍏虫搷浣� */ @Repository -class EvaluationRuleRep(private val evaluationruleMapper: EvaluationruleMapper) { +class EvaluationRuleRep( + private val evaluationruleMapper: EvaluationruleMapper, + private val sceneRep: SceneRep, +) { /** * 鏍规嵁鍙傛暟鏌ヨ鎬昏鍒� @@ -27,4 +31,17 @@ and(createCriteria().orEqualTo("towncode", areaEvaVo.towncode).orIsNull("towncode")) }) } + + fun findAutoEvaluationRule(subTaskId:String): Evaluationrule? { + val scene = sceneRep.findBySubTask(subTaskId) + return findAutoEvaluationRule(Constant.SceneType.getByValue(scene?.typeid.toString())) + } + + fun findAutoEvaluationRule(sceneType: Constant.SceneType): Evaluationrule? { + return evaluationruleMapper.selectOne(Evaluationrule().apply { + scensetypeid = sceneType.value.toByteOrNull() + tasktypeid = 99 + }) + } + } \ No newline at end of file -- Gitblit v1.9.3