package com.gx.obe.evaluation.step.resutl.action;

import org.eclipse.swt.SWT;

import com.gx.obe.action.bean.Action;
import com.gx.obe.action.listener.ActionListener;
import com.gx.obe.components.core.Constants;
import com.gx.obe.evaluation.step.resutl.composite.RecommendRankResultTableComposite;
import com.gx.obe.evaluation.step.resutl.composite.RecommonedResultTableComposite;
import com.gx.obe.web.entity.evaluation.EvaluationStep;

/**
 * @Description: 推荐中标候选人结果
 * @author guoyr
 */
public class RecommonedEvaluationResultAction extends Action {
    
    @Override
    public void run() {
        ActionListener actionListener = this.getListener();
        if (null != actionListener) {
            actionListener.onLoad(this);
            EvaluationStep evaluationStep = (EvaluationStep) this.getData("evaluationStep");
            EvaluationStep recommonedRank = (EvaluationStep) this.getData(com.gx.obe.components.core.enumeration.EvaluationStepEnum.RECOMMONED_RANK);
            if (null != recommonedRank) {
                RecommendRankResultTableComposite evaluationComposite = new RecommendRankResultTableComposite(actionListener.getParentComposite(), SWT.NONE);
                evaluationComposite.refresh(getTenderProject(), getTenderProjectRule(), evaluationStep, (String) this.getData(Constants.OPERATOR_USERID));
                actionListener.loadComposite(this, evaluationComposite);
            } else {
                RecommonedResultTableComposite evaluationComposite = new RecommonedResultTableComposite(actionListener.getParentComposite(), SWT.NONE);
                evaluationComposite.refresh(getTenderProject(), getTenderProjectRule(), evaluationStep, (String) this.getData(Constants.OPERATOR_USERID));
                actionListener.loadComposite(this, evaluationComposite);
            }
        }
    }
}
