
 --供应单据新增是否库存数据字段
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_inhentry' AND KSQL_COL_NAME ='fistock')
 ALTER TABLE t_mrp_inhentry ADD (fistock CHAR(1) DEFAULT '0' NOT NULL );

 --需求单据新增是否库存数据字段
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_demandbillentry' AND KSQL_COL_NAME ='fistock')
 ALTER TABLE t_mrp_demandbillentry ADD (fistock CHAR(1) DEFAULT '0' NOT NULL );

  --需求单据新增是否预测需求字段
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_demandbillentry' AND KSQL_COL_NAME ='fisdemand')
 ALTER TABLE t_mrp_demandbillentry ADD (fisdemand CHAR(1) DEFAULT '0' NOT NULL );

 --BOM展开单据新增组件物料字段
 IF NOT EXISTS (SELECT 1 FROM KSQL_USERCOLUMNS WHERE KSQL_COL_TABNAME = 't_mrp_bomexpandentry' AND KSQL_COL_NAME ='fcomboxmateriel')
 ALTER TABLE t_mrp_bomexpandentry ADD (fcomboxmateriel BIGINT DEFAULT 0 NOT NULL );