/*
 * Ant Group
 * Copyright (c) 2004-2025 All Rights Reserved.
 */
package org.jeecg.modules.database.service.executor;

import org.apache.commons.lang3.StringUtils;
import org.jeecg.modules.database.constant.ExperimentReviewProcessType;
import org.jeecg.modules.database.constant.ExperimentReviewResultEnum;
import org.jeecg.modules.database.entity.*;
import org.jeecg.modules.database.service.IExperimentReviewRuleExecutor;
import org.springframework.stereotype.Component;

/**
 * @author lise
 */

@Component
public class QJ1000411Executor extends BaseExecutor implements IExperimentReviewRuleExecutor {
    @Override
    public String getProcessType() {
        return ExperimentReviewProcessType.QJ10004;
    }

    @Override
    public int getPriority() {
        return 11;
    }

    /**
     * 11
     *
     * 需要老炼而未老炼
     *
     * 可能高估器件的抗辐射性能
     *
     * 老炼后氧化层的氢分布会不一样，并且激活一部分缺陷，对器件的辐射损伤起到加速退化的作用
     *
     * 以前有表征试验证明或设计上证明老炼对总剂量辐射响应的影响可以忽略（电参数符合辐射后规范）
     *
     * 在评定流程中询问用户是否进行了老炼试验，用户选否，启动这条评定建议
     *
     * @param experiment
     * @param sampleInfo
     * @param experimentReview
     * @return
     */
    @Override
    public String execute(Experiment experiment, ExperimentSampleInfo sampleInfo, ExperimentReview experimentReview) {
        if (StringUtils.equals(experimentReview.getNeedBurnin(), "N")) {
            return ExperimentReviewResultEnum.HIGH;
        }
        return ExperimentReviewResultEnum.ITEM_PASS;
    }
}