package com.prolog.cs.biz.inbound.service.impl.processor.factory;

import com.prolog.cs.biz.inbound.service.impl.processor.enums.ConclusionEnum;
import com.prolog.cs.biz.inbound.service.impl.processor.enums.RcvTypeStrategyEnum;
import com.prolog.cs.biz.inbound.service.impl.processor.enums.RqcStrategyEnum;
import com.prolog.cs.biz.inbound.service.impl.processor.enums.SubjectStrategyEnum;
import com.prolog.cs.biz.inbound.service.impl.processor.handler.TaskHandler;

import java.util.Map;

/**
 * 中昆药主体工厂实现类
 * 
 * @author Xiong
 *
 */
public class RcvSubjectFactoryS1Impl implements RcvSubjectFactory {

	@Override
	public Object excuteTask(Map<String, Object> dataMap, TaskHandler handler, RcvTypeStrategyEnum rcvType,
			RqcStrategyEnum rqcStrategy, ConclusionEnum conclusionEnum,boolean isAuto) {
		// 操作执行器执行具体任务
		SubjectStrategyEnum subjectStrategy = (SubjectStrategyEnum) getSubjectStrategy();
		Object obj = handler.excute(subjectStrategy, rcvType, rqcStrategy, dataMap, conclusionEnum,isAuto);
		// 处理前
		// 处理后
		return obj;
	}
	@Override
	public Object rfExcuteTask(Map<String, Object> dataMap, TaskHandler handler, RcvTypeStrategyEnum rcvType,
			RqcStrategyEnum rqcStrategy, ConclusionEnum conclusionEnum,boolean isAuto) {
		// 操作执行器执行具体任务
		SubjectStrategyEnum subjectStrategy = (SubjectStrategyEnum) getSubjectStrategy();
		Object obj = handler.rfExcute(subjectStrategy, rcvType, rqcStrategy, dataMap, conclusionEnum,isAuto);
		// 处理前
		// 处理后
		return obj;
	}
	@Override
	public Object getSubjectStrategy() {
		return SubjectStrategyEnum.ZKY;
	}
}
