package com.steering.mes.mcp.common;

import CoreFS.SA06.CoreReturnObject;

import com.steering.comm.db.DBCommon;
import com.steering.mes.mcp.entity.CoupCutPlan;
import com.steering.mes.mcp.entity.CoupProcessPlan;
import com.steering.mes.mcp.entity.HttPlan;

public class PlanService extends DBCommon{

	/**
	 * 查询热处理简单作业计划
	 * @param coupProcessPlan
	 * @return
	 */
	public CoreReturnObject getSingleRclPlan(HttPlan plan) {
        return this.getDataBySqlID(
                "PlanService.HeatTreatme.GetSingleRclPlan",
                new Object[] { plan.getBeginTime(),plan.getEndTime(), 
                		plan.getHeatNo(),plan.getRollBatchId() });
    }
	
	/**
	 * 根据计划号查询热处理详细计划
	 * @param planNo
	 * @return
	 */
	public CoreReturnObject getRclPlan(String planNo) {
        return this.getDataBySqlID(
                "PlanService.HeatTreatme.GetRclPlan",new Object[] { planNo});
    }
	/**
	 * 查询热处理作业计划
	 * @param dtStartDate
	 * @param dtEndDate
	 * @param dtHeatNo
	 * @param dtRollbatchId
	 * @return
	 */
	public CoreReturnObject getSingleRclPlanAll(String dtStartDate,String dtEndDate,
			String dtHeatNo,String dtRollbatchId){
		return this.getDataBySqlID("PlanService.HeatTreatme.GetSingleRclPlanAll", 
				new Object[] { dtStartDate, dtEndDate, dtHeatNo, dtRollbatchId });
	}
	
	/**
	 * 接箍切断计划简单查询
	 * @param cutPlan 接箍切断计划实体
	 * @return
	 */
	public CoreReturnObject getSingleJGCutPlan(CoupCutPlan cutPlan){
		Object[] params = new Object[]{cutPlan.getBeginTime(),cutPlan.getEndTime(),
				cutPlan.getJudgeStoveNo(),cutPlan.getBatchNo()};
		return this.getDataBySqlID("PlanService.CutPlan.GetSingleJGCutPlan", params);
	}
	
	/**
	 * 接箍切断计划详细查询
	 * @param planNo 计划号
	 * @return
	 */
	public CoreReturnObject getJGCutPlan(String planNo){
		Object[] params = new Object[]{planNo};
		return this.getDataBySqlID("PlanService.CutPlan.GetJGCutPlan", params);
	}
	
	/**
	 * 接箍加工计划简单查询
	 * @param plan
	 * @return
	 */
	public CoreReturnObject getSingleJGProcessPlan(CoupProcessPlan plan){
		Object[] params = new Object[]{plan.getBeginTime(),plan.getEndTime(),
					plan.getLotNo(),plan.getHeatNo(),plan.getBatchNo()};
		return this.getDataBySqlID("PlanService.ProcessPlan.SingleJGProcessPlan", params);
	}
	
	/**
	 * 接箍加工计划详情查询
	 * @param planNo
	 * @return
	 */
	public CoreReturnObject getJGProcessPlan(String planNo){
		Object[] params = new Object[]{planNo};
		return this.getDataBySqlID("PlanService.ProcessPlan.JGProcessPlan", params);
	}
}
