package com.steering.pss.sale.order;

import com.steering.comm.db.DBCommon;

import CoreFS.SA06.CoreReturnObject;

public class CoreCheckLKRN extends DBCommon {

    /**
     * 查询不利库原因
     * @param ordLnDlyPk
     * @return
     */
    public CoreReturnObject queryNLKRsn(String ordLnDlyPk) {
        Object[] obj = new Object[] { ordLnDlyPk };
        String sql = "select NLK_RSN from SLM_ORDER_LINE_DELIVERY WHERE ORD_LN_DLY_PK = ? ";
        return this.getData(sql, obj);
    }

    /**
     * 评审通过不利库的原因
     * @param ordLnDlyPk
     * @return
     */
    public CoreReturnObject updateNLKRsnPass(String ordLnDlyPk) {
        Object[] obj = new Object[] { ordLnDlyPk };
        String sql = "update  SLM_ORDER_LINE_DELIVERY "
                + "SET NLK_CHECK  = 'S'  WHERE ORD_LN_DLY_PK = ? ";
        return this.setData(sql, obj);
    }

    /**
     * 评审不通过不利库的原因
     * @param ordLnDlyPk
     * @return
     */
    public CoreReturnObject updateNLKRsnBack(String ordLnDlyPk) {
        Object[] obj = new Object[] { ordLnDlyPk };
        String sql = "update  SLM_ORDER_LINE_DELIVERY "
                + " SET IS_LIKU = '0' , NLK_RSN = ''  WHERE ORD_LN_DLY_PK = ? ";
        return this.setData(sql, obj);
    }

}
