package com.steering.mes.mcp.heatTreatment;

import java.util.ArrayList;
import CoreFS.SA06.CoreReturnObject;
import CoreFS.SA08.CoreXmlSqlParsersFactory;

import com.steering.comm.db.DBCommon;

/**
 * 机组对应工序点
 * @author TJG 2016-5-19
 */
public class FrmSizBaseConfigInfo extends DBCommon {

    /**
     * 查询对应关系
     * @param
     * @return
     */
    public CoreReturnObject getQueryBasic(String plincoede, String stationNo) {
        String sql = CoreXmlSqlParsersFactory
                .getSql("FrmSizBaseConfigInfo.GetQueryBasic");
        if (!plincoede.equals("")) {
            sql += " AND T.PLINE_CODE='" + plincoede + "'";
        }
        if (!stationNo.equals("")) {
            sql += " AND T.STATION_CODE='" + stationNo + "'";
        }
        sql += "  ORDER BY T.CREATE_TIME DESC";
        return this.getData(sql);
    }

    /**
     * 新增
     * @param
     * @return
     */
    public CoreReturnObject getAddBasic(ArrayList<String> pram) {
        return this.setDataBySqlID("FrmSizBaseConfigInfo.GetAddBasic", pram
                .toArray());
    }
    /**
     * 修改
     * @param
     * @return
     */
    public CoreReturnObject getUpdateBasic(ArrayList<String> pram) {
        return this.setDataBySqlID("FrmSizBaseConfigInfo.GetUpdateBasic", pram
                .toArray());
    }
    /**
     * 删除
     * @param
     * @return
     */
    public CoreReturnObject getDeleteBasic(ArrayList<String> pram) {
        return this.setDataBySqlID("FrmSizBaseConfigInfo.GetDeleteBasic", pram
                .toArray());
    }
}
