|
@@ -1,11 +1,19 @@
|
|
|
package com.ims.eval.service.impl;
|
|
|
|
|
|
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
+import com.ims.common.utils.StringUtils;
|
|
|
+import com.ims.eval.dao.IntervalScoringTableMapper;
|
|
|
import com.ims.eval.entity.EvaluationScoringRule;
|
|
|
import com.ims.eval.dao.EvaluationScoringRuleMapper;
|
|
|
+import com.ims.eval.entity.IndicatorDictionary;
|
|
|
+import com.ims.eval.entity.IntervalScoringTable;
|
|
|
import com.ims.eval.service.IEvaluationScoringRuleService;
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.List;
|
|
|
+
|
|
|
/**
|
|
|
* <p>
|
|
|
* 考评得分规则表 服务实现类
|
|
@@ -17,4 +25,36 @@ import org.springframework.stereotype.Service;
|
|
|
@Service
|
|
|
public class EvaluationScoringRuleServiceImpl extends ServiceImpl<EvaluationScoringRuleMapper, EvaluationScoringRule> implements IEvaluationScoringRuleService {
|
|
|
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private EvaluationScoringRuleMapper evaluationScoringRuleMapper;
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private IntervalScoringTableMapper intervalScoringTableMapper;
|
|
|
+
|
|
|
+
|
|
|
+ @Override
|
|
|
+ public List<EvaluationScoringRule> list(String indicatorUnit,String type,String businessPhase){
|
|
|
+
|
|
|
+ QueryWrapper<EvaluationScoringRule> qw = new QueryWrapper<>();
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(indicatorUnit)) {
|
|
|
+ qw.lambda().eq(EvaluationScoringRule::getIndicatorUnit, indicatorUnit);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(businessPhase)) {
|
|
|
+ qw.lambda().eq(EvaluationScoringRule::getBusinessPhase, businessPhase);
|
|
|
+ }
|
|
|
+ if (StringUtils.isNotEmpty(type)) {
|
|
|
+ qw.lambda().eq(EvaluationScoringRule::getType, type);
|
|
|
+ }
|
|
|
+ List<EvaluationScoringRule> evaluationScoringRules = evaluationScoringRuleMapper.selectList(qw);
|
|
|
+ for (EvaluationScoringRule evaluationScoringRule: evaluationScoringRules){
|
|
|
+ QueryWrapper<IntervalScoringTable> qw1 = new QueryWrapper<>();
|
|
|
+ qw1.eq("rule_id",evaluationScoringRule.getId());
|
|
|
+ List<IntervalScoringTable> intervalScoringTables = intervalScoringTableMapper.selectList(qw1);
|
|
|
+ evaluationScoringRule.setIntervalScoringTableList(intervalScoringTables);
|
|
|
+ }
|
|
|
+ return evaluationScoringRules;
|
|
|
+ }
|
|
|
+
|
|
|
}
|