package org.jeecg.modules.database.service.impl;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import org.jeecg.modules.database.entity.*;
import org.jeecg.modules.database.mapper.ExperimentReviewRuleMapper;
import org.jeecg.modules.database.service.IExperimentReviewRuleService;
import org.springframework.stereotype.Service;

import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;

import java.util.List;

/**
 * @Description: 试验评定规则
 * @Author: jeecg-boot
 * @Date: 2025-06-16
 * @Version: V1.0
 */
@Service
public class ExperimentReviewRuleServiceImpl extends ServiceImpl<ExperimentReviewRuleMapper, ExperimentReviewRule>
        implements IExperimentReviewRuleService {

    @Override
    public List<ExperimentReviewRule> getByType(String processType) {
        return list(new LambdaQueryWrapper<ExperimentReviewRule>().eq(ExperimentReviewRule::getProcessType, processType)
                .orderByAsc(ExperimentReviewRule::getPriority));
    }


}
