CREATE TABLE "MES_YIELD_ORDER_ASSIGN_DAILY"
(
	"ID"          NUMBER(20, 0) NOT NULL,
	"TENANT_ID"   NVARCHAR2(12),
	"CREATE_USER" NUMBER(20, 0),
	"CREATE_TIME" DATE,
	"CREATE_DEPT" NUMBER(20, 0),
	"UPDATE_USER" NUMBER(20, 0),
	"UPDATE_TIME" DATE,
	"STATUS"      NUMBER(11, 0) NOT NULL,
	"IS_DELETED"  NUMBER(11, 0),
	"OEM_ID"      NUMBER(20, 0),
	"WORK_CENTER_ID"      NUMBER(20, 0),
	"CRAFT_ABILITY_ID"      NUMBER(20, 0),
	"AREA"      NUMBER(20, 4),
	"QUANTITY"      NUMBER(20, 4),
	"BATCH"      NUMBER(12, 0),
	"NUM"      NUMBER(12, 0)
) LOGGING NOCOMPRESS PCTFREE 10 INITRANS 1 STORAGE
(
	BUFFER_POOL DEFAULT
) PARALLEL 1 NOCACHE DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."ID" IS '主键';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."UPDATE_USER" IS '更新人';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."STATUS" IS '状态';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."IS_DELETED" IS '删除标记';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."OEM_ID" IS '供应商';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."WORK_CENTER_ID" IS '作业中心';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."CRAFT_ABILITY_ID" IS '工艺能力';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."AREA" IS '面积';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."QUANTITY" IS '数量';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."BATCH" IS '批数';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_DAILY"."NUM" IS '分派数';
COMMENT ON TABLE "MES_YIELD_ORDER_ASSIGN_DAILY" IS '生产订单日分派';

CREATE TABLE "MES_YIELD_ORDER_ASSIGN_STEER"
(
	"ID"          NUMBER(20, 0) NOT NULL,
	"TENANT_ID"   NVARCHAR2(12),
	"CREATE_USER" NUMBER(20, 0),
	"CREATE_TIME" DATE,
	"CREATE_DEPT" NUMBER(20, 0),
	"UPDATE_USER" NUMBER(20, 0),
	"UPDATE_TIME" DATE,
	"STATUS"      NUMBER(11, 0) NOT NULL,
	"IS_DELETED"  NUMBER(11, 0),
	"OEM_ID"      NUMBER(20, 0),
	"CRAFT_ABILITY_ID"      NUMBER(20, 0),
	"PART_CODE"      NUMBER(20, 0),
	"DAILY_ASSIGN"      NUMBER(20, 4),
	"WEEK_ASSIGN"      NUMBER(20, 4),
	"ASSIGN_SCALE"      NUMBER(12, 0),
	"FACTOR"      NUMBER(12, 0)
) LOGGING NOCOMPRESS PCTFREE 10 INITRANS 1 STORAGE
(
	BUFFER_POOL DEFAULT
) PARALLEL 1 NOCACHE DISABLE ROW MOVEMENT
;
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."ID" IS '主键';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."CREATE_USER" IS '创建人';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."CREATE_TIME" IS '创建时间';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."CREATE_DEPT" IS '创建部门';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."UPDATE_USER" IS '更新人';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."UPDATE_TIME" IS '更新时间';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."STATUS" IS '状态';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."IS_DELETED" IS '删除标记';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."OEM_ID" IS '供应商';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."CRAFT_ABILITY_ID" IS '工艺能力';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."PART_CODE" IS '零件编码';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."DAILY_ASSIGN" IS '累计日分派量';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."WEEK_ASSIGN" IS '周累计分派量';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."ASSIGN_SCALE" IS '分派比例';
COMMENT ON COLUMN "MES_YIELD_ORDER_ASSIGN_STEER"."FACTOR" IS '比例偏差因子';
COMMENT ON TABLE "MES_YIELD_ORDER_ASSIGN_STEER" IS '生产订单分派控制, 主要针对外协';

ALTER TABLE BS_CRAFT_ABILITY ADD IN_FACTORY_PERCENT NUMBER(10,2) NULL;
COMMENT ON COLUMN BS_CRAFT_ABILITY.IN_FACTORY_PERCENT IS '厂内应分比例';
