  --明细表增加物料计划信息字段
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLS_DETAIL_ENTRY' AND KSQL_COL_NAME ='FMATERIALPLANID') 
 ALTER TABLE T_MRP_PLS_DETAIL_ENTRY ADD (FMATERIALPLANID BIGINT DEFAULT 0 NOT NULL );
 --明细表增加物料计划标识字段
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLS_DETAIL_ENTRY' AND KSQL_COL_NAME ='FPLANTAGSID') 
 ALTER TABLE T_MRP_PLS_DETAIL_ENTRY ADD (FPLANTAGSID BIGINT DEFAULT 0 NOT NULL );
 
   --结果表增加物料计划信息字段
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLS_RESULT' AND KSQL_COL_NAME ='FMATERIALPLANID') 
 ALTER TABLE T_MRP_PLS_RESULT ADD (FMATERIALPLANID BIGINT DEFAULT 0 NOT NULL );
 --结果表增加物料计划标识字段
  IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 'T_MRP_PLS_RESULT' AND KSQL_COL_NAME ='FPLANTAGSID') 
 ALTER TABLE T_MRP_PLS_RESULT ADD (FPLANTAGSID BIGINT DEFAULT 0 NOT NULL );