瀏覽代碼

添加过滤条件

wangchangsheng 1 年之前
父節點
當前提交
288f22ef76

+ 4 - 2
ims-service/ims-eval/src/main/java/com/ims/eval/controller/EvaluationScoringRuleController.java

@@ -37,8 +37,10 @@ public class EvaluationScoringRuleController {
 	@GetMapping(value = "list")
 	public R list(@RequestParam(value = "pageNum") Integer pageNum,
 				  @RequestParam(value = "pageSize") Integer pageSize,
-				  @RequestParam(value = "indicatorId", required = false) String indicatorId){
-		IPage<EvaluationScoringRule> list = iEvaluationScoringRuleService.list(pageNum,pageSize,indicatorId);
+				  @RequestParam(value = "indicatorId", required = false) String indicatorId,
+				  @RequestParam(value = "scoreRuleName", required = false) String  scoreRuleName,
+				  @RequestParam(value = "businessPhase", required = false) String  businessPhase){
+		IPage<EvaluationScoringRule> list = iEvaluationScoringRuleService.list(pageNum,pageSize,indicatorId,scoreRuleName,businessPhase);
 		return R.ok().data(list);
 	}
 

+ 1 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/IEvaluationScoringRuleService.java

@@ -16,7 +16,7 @@ import java.util.List;
  */
 public interface IEvaluationScoringRuleService extends IService<EvaluationScoringRule> {
 
-	IPage<EvaluationScoringRule> list(Integer pageNum, Integer pageSize, String indicatorId);
+	IPage<EvaluationScoringRule> list(Integer pageNum, Integer pageSize, String indicatorId,String scoreRuleName,String businessPhase);
 
 	boolean saveOrUpdateEvaluationScoringRule(EvaluationScoringRule evaluationScoringRule);
 

+ 10 - 1
ims-service/ims-eval/src/main/java/com/ims/eval/service/impl/EvaluationScoringRuleServiceImpl.java

@@ -45,7 +45,7 @@ public class EvaluationScoringRuleServiceImpl extends ServiceImpl<EvaluationScor
 
 
 	@Override
-	public IPage<EvaluationScoringRule> list(Integer pageNum, Integer pageSize,String indicatorId){
+	public IPage<EvaluationScoringRule> list(Integer pageNum, Integer pageSize,String indicatorId,String scoreRuleName,String businessPhase){
 
 		QueryWrapper<EvaluationScoringRule> qw = new QueryWrapper<>();
 
@@ -59,6 +59,15 @@ public class EvaluationScoringRuleServiceImpl extends ServiceImpl<EvaluationScor
 			qw.lambda().like(EvaluationScoringRule::getIndicatorId, indicatorId);
 		}
 
+		if (StringUtils.isNotEmpty(scoreRuleName)) {
+			qw.lambda().like(EvaluationScoringRule::getScoreRuleName, scoreRuleName);
+		}
+
+		if (StringUtils.isNotEmpty(businessPhase)) {
+			qw.lambda().like(EvaluationScoringRule::getBusinessPhase, businessPhase);
+		}
+
+
 		IPage<EvaluationScoringRule> evaluationScoringRules = baseMapper.selectPage(page,qw);
 
 		try{