/*
 Navicat Premium Data Transfer

 Source Server         : docker-mysql8
 Source Server Type    : MySQL
 Source Server Version : 80046 (8.0.46)
 Source Host           : localhost:3306
 Source Schema         : wms_standardv2

 Target Server Type    : MySQL
 Target Server Version : 80046 (8.0.46)
 File Encoding         : 65001

 Date: 15/06/2026 19:51:21
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for md_work_order_bom
-- ----------------------------
DROP TABLE IF EXISTS `md_work_order_bom`;
CREATE TABLE `md_work_order_bom`  (
  `id` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
  `item_id` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `item_no` int NULL DEFAULT NULL,
  `material_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'bom物料编码',
  `material_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT 'bom物料名称',
  `spec` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `unit` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '单位',
  `base_unit` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '基本单位',
  `bom_qty` decimal(20, 8) NULL DEFAULT NULL COMMENT 'BOM用量',
  `use_bom_qty` decimal(20, 8) NULL DEFAULT 0.00000000 COMMENT '已搬运BOM数量',
  `work_center` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工作中心',
  `load_port` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '装配位置',
  `dept_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '领料部门',
  `sup_org_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '供货库存组织',
  `warehouse_code` decimal(20, 8) NULL DEFAULT NULL COMMENT '领料仓库',
  `warehouse_name` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '领料仓库名称',
  `stocker_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `stocker_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `work_order_code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '工单编号(对应work_order表order_code字段)',
  `line_pod` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '配送位置',
  `bom_prop1` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `bom_prop2` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `bom_prop3` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `attr_01` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `attr_02` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `attr_03` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `attr_04` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `attr_05` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `attr_06` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL,
  `track_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '跟踪号',
  `wms_qty` decimal(20, 8) NULL DEFAULT NULL,
  `eas5_qty` decimal(20, 8) NULL DEFAULT NULL,
  `eas4_qty` decimal(20, 8) NULL DEFAULT NULL,
  `group_pallet_qty` decimal(20, 8) NOT NULL DEFAULT 0.00000000 COMMENT '已配盘数量',
  `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '配盘状态：1-未完成，2-完成',
  PRIMARY KEY (`id`) USING BTREE,
  INDEX `work_order_code_idx`(`work_order_code` ASC) USING BTREE,
  INDEX `status_idx`(`status` ASC) USING BTREE,
  INDEX `load_port_idx`(`load_port` ASC) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '焊接工单bom详细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of md_work_order_bom
-- ----------------------------
INSERT INTO `md_work_order_bom` VALUES ('C1', 'StHjDLjPQVa0OhoVR0sJyO1JiDk=', 1, '2933215210381', '横梁', '', 'PCS', 'PCS', 10.00000000, 0.00000000, 'E317030: 2', 'E317033-03: 1#[焊接托盘: 16]', '01.09.14.01.02', '01.09.14', 6.01100000, '五期原材料平库', '', '', 'TEST_code_3', 'E317030-03: 1#[焊接托盘: 16]', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, 'J26038674-2.4', 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1);
INSERT INTO `md_work_order_bom` VALUES ('C2', 'StHjDLjPQVa0OhoVR0sJyO1JiDk=', 1, '2933215210382', '螺丝', '', 'PCS', 'PCS', 10.00000000, 0.00000000, 'E317030: 2', 'E317033-03: 1#[焊接托盘: 16]', '01.09.14.01.02', '01.09.14', 6.01100000, '五期原材料平库', '', '', 'TEST_code_3', 'E317030-03: 1#[焊接托盘: 16]', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, 'J26038674-2.4', 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1);
INSERT INTO `md_work_order_bom` VALUES ('C3', 'StHjDLjPQVa0OhoVR0sJyO1JiDk=', 1, '2933215210383', '门架', '', 'PCS', 'PCS', 10.00000000, 5.00000000, 'E317030: 2', 'E317033-03: 1#[焊接托盘: 17]', '01.09.14.01.02', '01.09.14', 6.01100000, '五期原材料平库', '', '', 'TEST_code_3', 'E317030-03: 1#[焊接托盘: 16]', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, 'J26038674-2.4', 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1);
INSERT INTO `md_work_order_bom` VALUES ('C4', 'StHjDLjPQVa0OhoVR0sJyO1JiDk=', 1, '2933215210384', '二级门架', '', 'PCS', 'PCS', 10.00000000, 5.00000000, 'E317030: 2', 'E317033-03: 1#[焊接托盘: 17]', '01.09.14.01.02', '01.09.14', 6.01100000, '五期原材料平库', '', '', 'TEST_code_3', 'E317030-03: 1#[焊接托盘: 16]', '', '', '', NULL, NULL, NULL, NULL, NULL, NULL, 'J26038674-2.4', 0.00000000, 0.00000000, 0.00000000, 0.00000000, 1);

SET FOREIGN_KEY_CHECKS = 1;
