Files
qhmes/jeecg-boot/db/mes-xsl-master-batch-plan-table.sql
2026-05-29 15:48:58 +08:00

31 lines
1.7 KiB
Java
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
-- 母胶计划建表SQL
SET NAMES utf8mb4;
CREATE TABLE IF NOT EXISTS `mes_xsl_master_batch_plan` (
`id` varchar(32) NOT NULL COMMENT '主键',
`source_order_id` varchar(32) DEFAULT NULL COMMENT '来源生产订单ID',
`order_serial_no` varchar(500) DEFAULT NULL COMMENT '订单流水号',
`order_no` varchar(500) DEFAULT NULL COMMENT '订单编号',
`production_segment_count` int DEFAULT NULL COMMENT '生产段数',
`order_date` date DEFAULT NULL COMMENT '订单日期',
`material_code` varchar(500) DEFAULT NULL COMMENT '物料编号',
`mes_material_name` varchar(500) DEFAULT NULL COMMENT 'MES胶料名称',
`plan_weight` decimal(18,4) DEFAULT NULL COMMENT '计划重量',
`per_car_weight` decimal(18,4) DEFAULT NULL COMMENT '每车重量',
`planned_car_count` int DEFAULT 0 COMMENT '计划车数',
`scheduled_car_count` int DEFAULT 0 COMMENT '已排产车数',
`finished_car_count` int DEFAULT 0 COMMENT '完成车数',
`status` int DEFAULT 0 COMMENT '状态0未开始 1进行中 2已完成',
`tenant_id` int DEFAULT NULL COMMENT '租户',
`sys_org_code` varchar(64) DEFAULT NULL COMMENT '部门编码',
`create_by` varchar(64) DEFAULT NULL COMMENT '创建人',
`create_time` datetime DEFAULT NULL COMMENT '创建时间',
`update_by` varchar(64) DEFAULT NULL COMMENT '更新人',
`update_time` datetime DEFAULT NULL COMMENT '更新时间',
`del_flag` int DEFAULT 0 COMMENT '删除标记0正常1删除',
PRIMARY KEY (`id`),
KEY `idx_mxmbp_source_order` (`source_order_id`),
KEY `idx_mxmbp_material_code` (`material_code`),
UNIQUE KEY `uk_mxmbp_source_order_del` (`source_order_id`, `del_flag`)
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='MES母胶计划';