-- 添加建议基本数量，供应仓位，供应库存状态，供应库存类型
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_COL_NAME ='FADVISEBASEQTY') 
 ALTER TABLE T_IM_INVADVICEENTRY ADD (FADVISEBASEQTY DECIMAL(23,10) DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_COL_NAME ='FSUPPLYLOCATION') 
 ALTER TABLE T_IM_INVADVICEENTRY ADD (FSUPPLYLOCATION BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_COL_NAME ='FSUPPLYSTORETYPE') 
 ALTER TABLE T_IM_INVADVICEENTRY ADD (FSUPPLYSTORETYPE BIGINT DEFAULT 0 NOT NULL );
IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_IM_INVADVICEENTRY' AND KSQL_COL_NAME ='FSUPPLYSTORESTATE') 
 ALTER TABLE T_IM_INVADVICEENTRY ADD (FSUPPLYSTORESTATE BIGINT DEFAULT 0 NOT NULL );