package com.steering.mes.mcp.common;

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

public class McpBaseHelper extends DBCommon {

    /**
     * 查询产线
     * @return
     */
    public CoreReturnObject GetPCode(String arr) {
        String sql = CoreXmlSqlParsersFactory.getSql("McpBaseHelper.GetPCode");
        // sql += CoreConverter.toSqlConditionString("T.DEPARTMENT_CODE", arr);
        sql += " AND T.DEPARTMENT_CODE='" + arr + "'";
        sql += "  ORDER BY T.PLINE_NAME";
        return this.getData(sql);
    }
    /**
     * 根据工序管理部门查询产线
     * @return
     */
    public CoreReturnObject getPlineCode(String proCess,String deparNo) {
        String sql = CoreXmlSqlParsersFactory.getSql("McpBaseHelper.GetPlineCode");
        return this.getData(sql,new Object []{proCess,deparNo});
    }
}
