package com.steering.mes.mcp.heatTreatment;

import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;
import com.steering.comm.converter.CoreConverter;
import com.steering.comm.db.DBCommon;

/**
 * Created by 朱少波 on 2018/6/13.
 */
public class ScrapHelper   extends DBCommon {


    /**
     * 查询工序点
     * @return
     */
    public CoreReturnObject doQuery(String sortCode,String[] gxs) {

        String sql = "";
        sql = CoreXmlSqlParsersFactory.getSql("ClsBaseInfo.COMMQUERY");
        sql += CoreConverter.toSqlConditionString("T.BASECODE", gxs);

        return this.getData(sql, new Object[] { sortCode });
    }


    public CoreReturnObject doQueryBatchNo(String HeatNo,Integer ProcessSeq){
        String sql = "";
        sql = CoreXmlSqlParsersFactory.getSql("ScrapHelper.QueryBatchNoInPortHtt");
        return this.getData(sql, new Object[] { HeatNo,ProcessSeq});
    }


    public CoreReturnObject doQueryBatchHttPort(String HeatNo,Integer ProcessSeq, String BatchNo){
        String sql = "";
        sql = CoreXmlSqlParsersFactory.getSql("ScrapHelper.QueryBatchHttPort");
        return this.getData(sql, new Object[] { HeatNo,ProcessSeq,BatchNo});
    }

    public CoreReturnObject doQueryLoadHttPort(String HeatNo,String Batch,String GroupNo, String JugdeApplyCode){
        String sql = "";
        sql = CoreXmlSqlParsersFactory.getSql("ScrapHelper.QueryLoadHttPort");

        return this.getData(sql, new Object[] { Batch,GroupNo,JugdeApplyCode,HeatNo});
    }
}
