package com.steering.pss.plnsaleord.steelMarkingPlan;

import CoreFS.SA06.CoreReturnObject;

import com.steering.comm.db.DBCommon;

/**
 * 铸机基础数据 2016/7/21
 * @author Administrator
 */
public class FrmPlnBasePlineLz extends DBCommon {
    /**
     * 查询
     * @return
     */
    public CoreReturnObject query() {
        return this.getDataBySqlID("FrmPlnBasePlineLz.query");
    }

    /**
     * 新增
     * @return
     */
    public CoreReturnObject add(String plineCodeB, String plineNameB,
            String plineCodeA, String plineNameA, String proceeCode,
            String processDesc, String zbLeftWgt, String maxFlow,
            String maxNum, String username, String defVer) {
        Object[] params = new Object[] { plineCodeB, plineNameB, proceeCode,
                processDesc, maxFlow, zbLeftWgt, username, maxNum, plineCodeA,
                plineNameA, defVer };
        return this.setDataBySqlID("FrmPlnBasePlineLz.add", params);
    }

    /**
     * 验证产线是否存在
     * @param dimater
     * @return
     */
    public CoreReturnObject checkPline(String plineCode, String plineCodeA) {
        Object[] params = new Object[] { plineCode, plineCodeA };
        return this.getDataBySqlID("FrmPlnBasePlineLz.checkPline", params);
    }

    /**
     * 修改
     * @return
     */
    public CoreReturnObject update(String plineCodeB, String plineNameB,
            String plineCodeA, String plineNameA, String proceeCode,
            String processDesc, String zbLeftWgt, String maxFlow,
            String maxNum, String username, String defVer) {
        Object[] params = new Object[] { proceeCode, processDesc, maxFlow,
                zbLeftWgt, username, maxNum, plineCodeA, plineNameA, defVer,
                plineCodeB, plineCodeA };
        return this.setDataBySqlID("FrmPlnBasePlineLz.update", params);
    }

    /**
     * 删除
     * @param dimater 直径
     * @return
     */
    public CoreReturnObject delete(String plineCode) {
        Object[] params = new Object[] { plineCode };
        return this.setDataBySqlID("FrmPlnBasePlineLz.delete", params);
    }
}
