/*
 Navicat Premium Data Transfer

 Source Server         : 192.168.1.13
 Source Server Type    : MySQL
 Source Server Version : 80018
 Source Host           : 192.168.1.13:2206
 Source Schema         : upcloud_biz_inbound

 Target Server Type    : MySQL
 Target Server Version : 80018
 File Encoding         : 65001

 Date: 14/01/2022 15:45:27
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for dxi_supervision_code
-- ----------------------------
DROP TABLE IF EXISTS `dxi_supervision_code`;
CREATE TABLE `dxi_supervision_code`  (
  `ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID',
  `ENTERPRISE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `WAREHOUSE_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库CODE',
  `CARGO_OWNER_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【1.YEZ_ID,业主内码】货主CODE   ',
  `REF_BILL_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【2.RUCKD_NO? 入出库单号】上级单据ID',
  `REF_BILL_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【RUCKD_NO? 入出库单号】上级单据LINE ID',
  `SUPERVISION_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【3.JIANG_CD,监管码】监管码/防串码/唯一码   ',
  `SCAN_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【4.操作员名称，CAOZ_STAFF】',
  `SCAN_DATE` datetime(0) NOT NULL COMMENT '【5.操作日期，OPER_DATE】扫码时间',
  `COMPANY_CODE` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【6.单位内码（供应商/客户的编码）,取供应商货主客户的编码】',
  `UPLOAD_FLAG` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【7.是否上传，SHANGC_FLG】 是否上传',
  `SUPERVISION_TYPE` decimal(9, 0) NOT NULL COMMENT '【8.监管类型 JIANG_TYPE】(业务类型 ；0购进入库， 1 销售退回 ，2 销售出库， 3 购进退出, 4 不合格，5 盘点)',
  `ITEM_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【9.商品内码，SHANGP_ID】商品编号 ',
  `PICK_TASK_NO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【10.分配单编号(预留)】',
  `CODE_TYPE` decimal(9, 0) NULL DEFAULT NULL COMMENT '【11.TIAOM_TYPE】条码类型（1:监管码  2：防串码  3：唯一码）【条码类型，TIAOM_TYPE】',
  `PACK_LEVEL` decimal(9, 0) NULL DEFAULT NULL COMMENT '【12.BZLB】包装级别(0大包装，1中包装，2小包装)【包装类别，BZLB】',
  `MANUFACTURER_LOT_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '【13.批号 PHID】批号 ',
  `STATUS` decimal(9, 0) NULL DEFAULT NULL COMMENT '【14.状态(预留)】（10：初始，20：已上传）',
  `BILLNO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【15.ERP单据编号(预留)流水号】\n',
  `LINENO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【16.ERP细单行号(预留)行ID】\n',
  `BILL_TYPE` decimal(2, 0) NULL DEFAULT NULL COMMENT '单据类型',
  `STAGE` decimal(2, 0) NULL DEFAULT NULL COMMENT '扫码阶段：0=入库质检 1=PC拣货 2=PC内复核 3=PC外复核 4=补录 5=PDA拣货 6=PDA内复核 7=PDA外复核',
  `ITEM_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `ITEM_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品名称',
  `PRODUCTION_DATE` datetime(0) NULL DEFAULT NULL COMMENT '生成日期',
  `EXPIRED_DATE` datetime(0) NULL DEFAULT NULL COMMENT '有效期至',
  `PACK_SIZE` decimal(20, 7) NULL DEFAULT NULL COMMENT '包装数量',
  `CONTAINER_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器CODE',
  `SUPPLIER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商编码',
  `SHIPPER_CODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户号',
  `PIECE_QTY` decimal(20, 7) NULL DEFAULT NULL COMMENT '数量',
  `LOCATOR_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位CODE',
  `WH_AREA_CATEGORY_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别编码',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `DC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓配中心ID',
  `WAREHOUSE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓ID',
  `CARGO_OWNER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `UNLOCK` decimal(1, 0) NULL DEFAULT NULL COMMENT '是否解锁：0=否 1=是',
  `LOCATOR_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位ID',
  `SUPPLIER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHIPPER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单位(客户)id',
  PRIMARY KEY (`ID`) USING BTREE,
  INDEX `union_key1`(`REF_BILL_ID`, `REF_BILL_LINE_ID`, `SUPERVISION_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '监管码/防窜码/唯一码记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for incoming_record_d
-- ----------------------------
DROP TABLE IF EXISTS `incoming_record_d`;
CREATE TABLE `incoming_record_d`  (
  `LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID标识',
  `BILLID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单ID',
  `BILLNO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单编码',
  `SEQNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单行号',
  `REF_BILLTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联业务单据类型',
  `REF_BILLID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '关联入库单ID',
  `REF_BILLNO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '关联入库单号',
  `REF_SEQNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '关联入库单行号',
  `CONSIGNORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `CONSIGNORCODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主编号',
  `CONSIGNORNAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主名称',
  `ITEMID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `ITEMCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品编码',
  `ITEMNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品名称',
  `PARERNT_ITEMID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '父商品ID',
  `CATEGORY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品规格',
  `PACK_SIZE` decimal(20, 4) NULL DEFAULT NULL COMMENT '包装数量',
  `PACK_UNITS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `MACH_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '加工类型',
  `LOT_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `BATCH_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `PDATE_FROM` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
  `VALID_UNTIL` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '有效期至',
  `MANUFACTURER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产厂家',
  `AFFIRMED_PCS` decimal(20, 4) NOT NULL COMMENT '整件数',
  `AFFIRMED_ODD` decimal(20, 4) NULL DEFAULT NULL COMMENT '零散数',
  `AFFIRMED_FREEQTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '赠品数量',
  `AFFIRMED_QTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '数量',
  `AFFIRMED_WEIGHT` decimal(20, 4) NULL DEFAULT NULL COMMENT '重量',
  `AFFIRMED_VOLUME` decimal(20, 4) NULL DEFAULT NULL COMMENT '体积',
  `PRICE` decimal(20, 4) NULL DEFAULT NULL COMMENT '含税单价',
  `TNI_PRICE` decimal(20, 4) NULL DEFAULT NULL COMMENT '未税单价',
  `AMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '含税金额',
  `TNI_AMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '未税金额',
  `PIECE_COST_TE` decimal(20, 4) NULL DEFAULT NULL COMMENT '成本单价',
  `PIECE_COST_TI` decimal(20, 4) NULL DEFAULT NULL COMMENT '单品含税成本',
  `TAX_RATE` decimal(20, 4) NULL DEFAULT NULL COMMENT '进项税率',
  `ACTUALMANUFACTURER` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际受托生产企业',
  `SPECTREATMTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库特殊处理类型',
  `QTOPERATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员',
  `QTOPERATOR2` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员2',
  `RCVOPERATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货员1',
  `RCVOPERATOR2` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货员2',
  `EXCEPTIONSPEC` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '异常说明',
  `RETURNPROCTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货处理类型',
  `BRANCHAREA` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库区',
  `REMARK` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `ATTR_STR1` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '扩展字段1',
  `ATTR_STR2` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '扩展字段2',
  `ATTR_STR3` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '扩展字段3',
  `ATTR_STR4` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '扩展字段4',
  `ATTR_STR5` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '扩展字段5',
  `CREATEBY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATEDATE` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `LASTMODIFYBY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `LASTMODIFYDATE` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `P_ENTERPRISEID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `P_ENTERPRISENAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业名称',
  `STOCKSTATUS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `RETURNREASON` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `RETURNTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `BELOWGRADEREASON` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `HANDLESTEP` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SAMPLINGNUM` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `RQC_REPORT_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检报告（20210802WMS增加的字段）',
  INDEX `BILLID_U2`(`BILLID`) USING BTREE,
  INDEX `BILLNO_U2`(`BILLNO`) USING BTREE,
  INDEX `LINE_ID_U1`(`LINE_ID`) USING BTREE,
  INDEX `REF_BILLID_U2`(`REF_BILLID`) USING BTREE,
  INDEX `REF_BILLNO_U2`(`REF_BILLNO`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '入库单入库记录明细表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for incoming_record_h
-- ----------------------------
DROP TABLE IF EXISTS `incoming_record_h`;
CREATE TABLE `incoming_record_h`  (
  `BILLID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID标识',
  `BILLNO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '入库单号',
  `BILLTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '入库单类型',
  `BRANCHID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `BRANCHCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库编号',
  `BRANCHNAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库名称',
  `CONSIGNORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `CONSIGNORCODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主据号',
  `CONSIGNORNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主名称',
  `CONSIGNOR_BILL_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主单据号',
  `REFBILLTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联业务单类型',
  `REFBILLID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '关联业务单ID',
  `REFBILLCODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '关联业务单编号',
  `PURORG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业务部门编号',
  `PURORG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '业务部门名称',
  `BUYER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '采购员ID',
  `BUYER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '采购员姓名',
  `SHIPPER_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位类型',
  `SHIPPERID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位ID',
  `SHIPPERCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位编号',
  `SHIPPERNAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位名称',
  `ARRIVE_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货地址',
  `VENDORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID',
  `VENDORCODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商编号',
  `VENDORNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称',
  `ACC_GOODS_BILL_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商随货同行单号',
  `VPO_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商单号',
  `VENDOR_RECEIVE_DATE` datetime(0) NULL DEFAULT NULL COMMENT '供应商接受日期',
  `VENDOR_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商地址',
  `REFBILLNO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '关联采购单号',
  `TOTPCS` decimal(20, 4) NULL DEFAULT NULL COMMENT '总件数',
  `TOTQTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '总量',
  `TOTNETAMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '总未税金额',
  `TOTAMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '总含税金额',
  `OPERATEDATE` datetime(0) NULL DEFAULT NULL COMMENT '制单日期',
  `OPERATOR` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '录入员',
  `CONFIRMER` varchar(33) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核员',
  `QTOPERATOR` varchar(34) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员',
  `QTOPERATOR2` varchar(35) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员2',
  `RCVOPERATOR` varchar(36) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货员1',
  `RCVOPERATOR2` varchar(37) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货员2',
  `ARRIVEDATE` datetime(0) NULL DEFAULT NULL COMMENT '到货时间',
  `RCVFROMDATE` datetime(0) NULL DEFAULT NULL COMMENT '收货时间',
  `QCDATE` datetime(0) NULL DEFAULT NULL COMMENT '验收时间',
  `PAYMENTDAYTYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '账期类型',
  `TRANSFEROPERATORID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '移库操作员编码',
  `TRANSFEROPERATORNAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '移库操作员名称',
  `REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `ATTR_STR1` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性1',
  `ATTR_STR2` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性2',
  `ATTR_STR3` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性3',
  `ATTR_STR4` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性4',
  `ATTR_STR5` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性5',
  `ATTR_STR6` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性6',
  `ATTR_STR7` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性7',
  `ATTR_STR8` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性8',
  `ATTR_STR9` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性9',
  `ATTR_STR10` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性10',
  `ATTR_NUM1` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性1',
  `ATTR_NUM2` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性2',
  `ATTR_NUM3` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性3',
  `ATTR_NUM4` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性4',
  `ATTR_NUM5` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性5',
  `ATTR_DTE1` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展1',
  `ATTR_DTE2` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展2',
  `ATTR_DTE3` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展3',
  `ATTR_DTE4` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展4',
  `ATTR_DTE5` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展5',
  `CREATEBY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '录入员',
  `CREATEDATE` datetime(0) NULL DEFAULT NULL COMMENT '录入时间',
  `LASTMODIFYBY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `LASTMODIFYDATE` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `P_ENTERPRISEID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `P_ENTERPRISENAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业名称',
  `DATASOURCE` varchar(16) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据来源(1ERP 2OMS 3WMS 4SAP)',
  `BUILDING` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物',
  INDEX `BILLID_U1`(`BILLID`) USING BTREE,
  INDEX `BILLNO_U1`(`BILLNO`) USING BTREE,
  INDEX `REFBILLCODE_U1`(`REFBILLCODE`) USING BTREE,
  INDEX `REFBILLID_U1`(`REFBILLID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '入库单入库记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for oms_asn_bill_d
-- ----------------------------
DROP TABLE IF EXISTS `oms_asn_bill_d`;
CREATE TABLE `oms_asn_bill_d`  (
  `LINEID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ASN单明细表ID',
  `SEQNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '明细行号',
  `BILLID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ASN单表ID',
  `BILLNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ASN单号',
  `BRANCHID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '入库仓库ID',
  `BRANCHCODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '入库仓库编号',
  `BRANCHNAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库名称',
  `BRANCHAREAID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库库区ID',
  `BRANCHAREA` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库库区',
  `CONSIGNORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `CONSIGNORNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主名称',
  `ITEMID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `ITEMCODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品编码',
  `ITEMNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品名称',
  `MANUFACTURER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产厂家',
  `PARERNT_ITEMID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '父商品ID',
  `CATEGORY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品类别ID(商品大类)--商品大类表',
  `SIZE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '尺寸',
  `COLOR_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '颜色',
  `REVISION` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '版本',
  `PACK_SIZE` decimal(20, 4) NULL DEFAULT NULL COMMENT '包装数量',
  `PACK_UNITS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `ITEM_PCS` decimal(20, 4) NULL DEFAULT NULL COMMENT '件数',
  `ITEM_ODD` decimal(20, 4) NULL DEFAULT NULL COMMENT '零数',
  `ITEM_QTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '数量',
  `FREE_QTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '赠品数量',
  `ITEM_WEIGHT` decimal(20, 4) NULL DEFAULT NULL COMMENT '重量',
  `ITEM_VOLUME` decimal(20, 4) NULL DEFAULT NULL COMMENT '体积',
  `PRICE` decimal(20, 4) NULL DEFAULT NULL COMMENT '含税单价',
  `TNI_PRICE` decimal(20, 4) NULL DEFAULT NULL COMMENT '未税单价',
  `AMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '含税金额',
  `TNI_AMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '未税金额',
  `MACH_TYPE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '加工类型',
  `LOT_NO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `BATCH_NO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '123' COMMENT '批次号',
  `PDATE_FROM` datetime(0) NULL DEFAULT NULL COMMENT '生产日期',
  `VALID_UNTIL` datetime(0) NULL DEFAULT NULL COMMENT '有效期至',
  `APPROVAL_NUMBER` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准文号',
  `PRODUCTION_PLACE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产地',
  `LINE_REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '行备注',
  `CLOSED_REASON` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '作废原因',
  `REJECT_QTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '拒收数量',
  `RT_VENDORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货厂商',
  `RTREASON` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货原因',
  `PAPERNO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备案凭证号',
  `EDITION` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品印次',
  `STATUS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态',
  `ATTR_STR1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性1',
  `ATTR_STR2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性2',
  `ATTR_STR3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性3',
  `ATTR_STR4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性4',
  `ATTR_STR5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性5',
  `ATTR_STR6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性6',
  `ATTR_STR7` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性7',
  `ATTR_STR8` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性8',
  `ATTR_STR9` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性9',
  `ATTR_STR10` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性10',
  `ATTR_NUM1` decimal(20, 0) NULL DEFAULT NULL COMMENT '数字扩展属性1',
  `ATTR_NUM2` decimal(20, 0) NULL DEFAULT NULL COMMENT '数字扩展属性2',
  `ATTR_NUM3` decimal(20, 0) NULL DEFAULT NULL COMMENT '数字扩展属性3',
  `ATTR_NUM4` decimal(20, 0) NULL DEFAULT NULL COMMENT '数字扩展属性4',
  `ATTR_NUM5` decimal(20, 0) NULL DEFAULT NULL COMMENT '数字扩展属性5',
  `ATTR_DTE1` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展1',
  `ATTR_DTE2` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展2',
  `ATTR_DTE3` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展3',
  `ATTR_DTE4` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展4',
  `ATTR_DTE5` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展5',
  `CREATEBY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '录入员',
  `CREATEDATE` datetime(0) NOT NULL COMMENT '录入时间',
  `LASTMODIFYBY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `LASTMODIFYDATE` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `P_ENTERPRISEID` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `P_ENTERPRISENAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业名称',
  `CONSIGNORCODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主编码',
  `BRANCHAREACODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库库区编码',
  `TYPE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品大类ID',
  `ITEM_ASSISTANT_CODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品的助记码（OMS未下发，WMS查询时使用）',
  `PAPER_NO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `TYPE_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品大类名称',
  `REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`LINEID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'OMS ASN单明细表 ' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for oms_asn_bill_h
-- ----------------------------
DROP TABLE IF EXISTS `oms_asn_bill_h`;
CREATE TABLE `oms_asn_bill_h`  (
  `BILLID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ASN单表ID',
  `BILLNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ASN单号',
  `BILLTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ASN单类型',
  `REF_BILLTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN单来源单据类型',
  `REF_BILLID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单据ID',
  `REF_BILLNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单据号',
  `SHIPPER_TYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '发货单位类型1 客户\n2 供应商\n3 发货仓库',
  `SHIPPERID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '发货单位ID',
  `SHIPPERNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位名称',
  `SHIPMENT_COUNTRY_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位国编号',
  `SHIPMENT_COUNTRY_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位国',
  `SHIPMENT_PROVINCE_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位省编号',
  `SHIPMENT_PROVINCE_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位省',
  `SHIPMENT_CITY_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位市编号',
  `SHIPMENT_CITY_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位市',
  `SHIPMENT_DISTRICT_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位区/县编号',
  `SHIPMENT_DISTRICT_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位区/县',
  `SHIPMENT_TOWN_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位街道/乡镇编号',
  `SHIPMENT_TOWN_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位街道/乡镇',
  `SHIPMENT_COMMUNITY_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位社区/村编号',
  `SHIPMENT_COMMUNITY_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位社区/村',
  `SHIPMENT_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位详细地址',
  `CONSIGNORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `CONSIGNORNAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主名称',
  `CONSIGNOR_BILLNO` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主单据号',
  `BRANCHID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '入库仓库ID',
  `BRANCHCODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库编号',
  `BRANCHNAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库名称',
  `BRANCHAREAID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库库区ID',
  `BRANCHAREA` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库库区',
  `BRANCH_ADDRESS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库详细地址',
  `CATEGORY_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品类别ID',
  `SHIP_TERM` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输条件',
  `ARRIVAL_MODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '到货方式',
  `PRIORITY_LEVEL` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单紧急等级',
  `DELIVERER_CONTACT_TEL` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '送货人联系方式',
  `SHIP_LINE_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输路线ID',
  `CARRIER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '承运商ID',
  `CARRIER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '承运商名称',
  `BUYER_NAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购员名称',
  `BUYER_TEL` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购员联系电话',
  `STATUS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态',
  `BILL_DATE` datetime(0) NULL DEFAULT NULL COMMENT '制单日期',
  `ATTAIN_DATE` datetime(0) NULL DEFAULT NULL COMMENT '预定到货日',
  `EXAMINE_STATE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核状态',
  `TOT_PCS` decimal(20, 4) NULL DEFAULT NULL COMMENT '总件数',
  `TOT_QTY` decimal(20, 4) NULL DEFAULT NULL COMMENT '总数量',
  `TOT_WEIGHT` decimal(20, 4) NULL DEFAULT NULL COMMENT '总重量',
  `TOT_VOLUME` decimal(20, 4) NULL DEFAULT NULL COMMENT '总体积',
  `TOTNETAMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '总未税金额',
  `TOTAMT` decimal(20, 4) NULL DEFAULT NULL COMMENT '总含税金额',
  `CLOSED_REASON` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '作废原因',
  `RT_REASON` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货原因',
  `REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `ATTR_STR1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性1',
  `ATTR_STR2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性2',
  `ATTR_STR3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性3',
  `ATTR_STR4` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性4',
  `ATTR_STR5` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性5',
  `ATTR_STR6` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性6',
  `ATTR_STR7` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性7',
  `ATTR_STR8` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性8',
  `ATTR_STR9` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性9',
  `ATTR_STR10` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性10',
  `ATTR_NUM1` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性1',
  `ATTR_NUM2` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性2',
  `ATTR_NUM3` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性3',
  `ATTR_NUM4` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性4',
  `ATTR_NUM5` decimal(20, 4) NULL DEFAULT NULL COMMENT '数字扩展属性5',
  `ATTR_DTE1` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展1',
  `ATTR_DTE2` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展2',
  `ATTR_DTE3` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展3',
  `ATTR_DTE4` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展4',
  `ATTR_DTE5` datetime(0) NULL DEFAULT NULL COMMENT '日期属性扩展5',
  `CREATEBY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '录入员',
  `CREATEDATE` datetime(0) NOT NULL COMMENT '录入时间',
  `LASTMODIFYBY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `LASTMODIFYDATE` datetime(0) NULL DEFAULT NULL COMMENT '修改时间',
  `P_ENTERPRISEID` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `P_ENTERPRISENAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业名称',
  `SHIPPERCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位类型=客户，客户编码\n发货单位类型=供应商，供应商编码\n发货单位类型=发货仓库，仓库编码',
  `CONSIGNORCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主编码',
  `BRANCHAREACODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库仓库库区编码',
  `CARRIERCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '承运商编码',
  `BUYER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购员/业务员ID',
  `PURORG_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业务部门编号',
  `PURORG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业务部门ID',
  `PURORG_NAME` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业务部门名称',
  `AUDITTIME` datetime(0) NULL DEFAULT NULL COMMENT '审核时间',
  `ENQUIRYSALESMAN` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '要货业务员ID',
  `ENQUIRYDEPARTMENT` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '要货部门ID',
  `AGENT` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '代理商',
  `EXPIRATIONDATE` datetime(0) NULL DEFAULT NULL COMMENT '单据拦截截止日期',
  `PAYMENTDAYTYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '账期类型',
  `REFUNDTYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货类型',
  `ISDISPATCH` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否派单',
  `PAYMENTTYPE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '销退付费方式',
  `TOTALFEE` decimal(20, 4) NULL DEFAULT NULL COMMENT '销退运费',
  `ISUNCHECPRODUCTS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否待检品入库',
  `DELIVERER_CONTACT` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '联系人',
  `SHIPPER_KEYWORDS` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发货单位助记码（WMS查询时使用，WMS方新增加的字段）',
  `VENDORID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `VENDORNAME` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `EXC_REMARKS` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `EXC_RESULTS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHIPPING_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输方式',
  `TRANSPORT_UNIT` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输单位',
  `SHIPMENT_DATE` datetime(0) NULL DEFAULT NULL COMMENT '起运时间',
  `SHIPMENT_PLACE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发运地点',
  `TRANSIT_TIME` varchar(4) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '在途时间',
  `CARRIER_UNIT` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '承运方',
  `CAOZY` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作员',
  `ATTR_STR11` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性11',
  `ATTR_STR12` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性12',
  `ATTR_STR13` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性13',
  `ATTR_STR14` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性14',
  `ATTR_STR15` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '字符扩展属性15',
  `CON_CHANGE_STATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '0：非货主转换单据  1：待货主转换单据 2：已生成货主转换单据 3：已下发货主转换单据',
  PRIMARY KEY (`BILLID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'OMS ASN单表 ' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_exception_headers
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_exception_headers`;
CREATE TABLE `wms_in_exception_headers`  (
  `EXCEPTION_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误单头ID(主键雪花id)',
  `RCV_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单头ID',
  `AUTO_BILL_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据流水好',
  `SRC_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID(PO/XT/YC)',
  `ASN_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `MTL_OWNER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作时间',
  `EXECUTOR_DATE` datetime(0) NOT NULL,
  `NODE_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误发现节点（10收货/20质检/30复检/40上架）',
  `CREATOR` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人id',
  `CREATOR_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改者id',
  `CUSTOM_BILL_NUM` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手工单号',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改者名称',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最新更新时间',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  PRIMARY KEY (`EXCEPTION_HEADER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货异常单头\n来源于异常任务池WMS_IN_TASK_EXCEPTION_DETAIL' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_exception_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_exception_lines`;
CREATE TABLE `wms_in_exception_lines`  (
  `EXCEPTION_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误行ID(主键雪花id)',
  `EXCEPTION_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误单头ID',
  `RCV_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单行ID',
  `RCV_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `SRC_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID(PO/XT/YC)',
  `SRC_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单ID',
  `ASN_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ASN_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业id',
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `MTL_OWNER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库ID',
  `ITEM_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `CONTAINER_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `BATCH_ID_OLD` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧批号ID',
  `BATCH_NUM_OLD` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧批号编码',
  `PRODUCTION_DATE_OLD` datetime(0) NULL DEFAULT NULL COMMENT '旧生产日期',
  `EXPIRED_DATE_OLD` datetime(0) NULL DEFAULT NULL COMMENT '旧有效期至',
  `VENDOR_BATCH_NUM_OLD` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧供应商批次号',
  `MANUFACTURER_LOT_NUM_OLD` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧生产商批号',
  `BATCH_ID_NEW` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新批号',
  `BATCH_NUM_NEW` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新批号编码',
  `PRODUCTION_DATE_NEW` datetime(0) NULL DEFAULT NULL COMMENT '新生产日期',
  `EXPIRED_DATE_NEW` datetime(0) NULL DEFAULT NULL COMMENT '新有效期至',
  `VENDOR_BATCH_NUM_NEW` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新供应商批次号',
  `MANUFACTURER_LOT_NUM_NEW` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新生产商批号',
  `QTY_OLD` decimal(14, 4) NULL DEFAULT NULL COMMENT '旧件数',
  `QTY_NEW` decimal(14, 4) NULL DEFAULT NULL COMMENT '新件数',
  `UOM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '包装含量',
  `PIECE_QTY_OLD` decimal(14, 4) NULL DEFAULT NULL COMMENT '旧总数',
  `PIECE_QTY_NEW` decimal(14, 4) NULL DEFAULT NULL COMMENT '新总数',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者（异常处理人）',
  `EXECUTOR_DATE` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  `NODE_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误发现节点（10收货/20质检/30复检/40上架）',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `TASK_EXCEPTION_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源任务id',
  `CREATOR` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `CREATOR_NAME` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL,
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `MODIFIER_NAME` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL,
  `STATUS` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(0已处理1未处理-默认)',
  `NODE_TASK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误发现节点的任务id',
  `SHOW_PRODUCTION_DATE_NEW` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHOW_EXPIRED_DATE_NEW` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHOW_PRODUCTION_DATE_OLD` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHOW_EXPIRED_DATE_OLD` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`EXCEPTION_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货异常行ID' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_exception_log
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_exception_log`;
CREATE TABLE `wms_in_exception_log`  (
  `EXCEPTION_LOG_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误行日志ID(主键雪花id)',
  `EXCEPTION_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误行ID',
  `EXCEPTION_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '错误单头ID',
  `RCV_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '行ID',
  `RCV_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '头ID',
  `SRC_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID(PO/XT/YC)',
  `SRC_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单ID',
  `ASN_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ASN_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业id',
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `MTL_OWNER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `ITEM_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `CONTAINER_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `BATCH_ID_OLD` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧批号ID',
  `BATCH_NUM_OLD` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧批号编码',
  `PRODUCTION_DATE_OLD` datetime(0) NULL DEFAULT NULL COMMENT '旧生产日期',
  `EXPIRED_DATE_OLD` datetime(0) NULL DEFAULT NULL COMMENT '旧有效期至',
  `VENDOR_BATCH_NUM_OLD` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧供应商批次号',
  `MANUFACTURER_LOT_NUM_OLD` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '旧生产商批号',
  `BATCH_ID_NEW` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新批号',
  `BATCH_NUM_NEW` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新批号编码',
  `PRODUCTION_DATE_NEW` datetime(0) NULL DEFAULT NULL COMMENT '新生产日期',
  `EXPIRED_DATE_NEW` datetime(0) NULL DEFAULT NULL COMMENT '新有效期至',
  `VENDOR_BATCH_NUM_NEW` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新供应商批次号',
  `MANUFACTURER_LOT_NUM_NEW` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '新生产商批号',
  `QTY_OLD` decimal(14, 4) NULL DEFAULT NULL COMMENT '旧件数',
  `QTY_NEW` decimal(14, 4) NULL DEFAULT NULL COMMENT '新件数',
  `UOM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY_OLD` decimal(14, 4) NULL DEFAULT NULL COMMENT '旧总数',
  `PIECE_QTY_NEW` decimal(14, 4) NULL DEFAULT NULL COMMENT '新总数',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者（异常处理人）',
  `EXECUTOR_DATE` datetime(0) NULL DEFAULT NULL COMMENT '操作时间',
  `NODE_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误发现节点（10收货/20质检/30复检/40上架）',
  `CREATOR` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人名称',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '修改者名称',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最新修改时间',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `STATUS` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(是否处理0否1是 默认0)',
  `NODE_TASK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误发现节点的任务id',
  `SHOW_PRODUCTION_DATE_NEW` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHOW_EXPIRED_DATE_NEW` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHOW_PRODUCTION_DATE_OLD` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHOW_EXPIRED_DATE_OLD` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`EXCEPTION_LOG_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货异常日志' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_interface_rqc_bill
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_interface_rqc_bill`;
CREATE TABLE `wms_in_interface_rqc_bill`  (
  `INTERFACE_RQC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主id',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行ID',
  `LOCATOR_NUM` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位编码',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `QTY` decimal(30, 4) NULL DEFAULT NULL COMMENT '数量',
  `CHECK_QTY` decimal(30, 4) NULL DEFAULT NULL COMMENT '抽样数量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `PIECE_QTY` decimal(30, 4) NOT NULL COMMENT '单品数量',
  `CHECK_PIECE_QTY` decimal(30, 4) NOT NULL COMMENT '单品数量(抽样)',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `MANUFACTURER_LOT_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  PRIMARY KEY (`INTERFACE_RQC_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = 'WMS质检接口表\nWMS支持3种质检模式，通过新增的质检参数rqc_process进行区分（到货主，到仓库）：\n1-ERP抽样ERP质检，\n2-WMS抽样ERP质检，\n3-WMS抽样WMS质检。\n\n该数据由ERP下发\n\n抽样/质检\n\n\n?	当rqc_process=1时，抽样质检由ERP完成。WMS上架确认后回传收货信息给ERP，ERP抽样质检完成后下传质检结果给WMS，WMS根据ERP下传的质检结果处理库存和单据。\n?	当rqc_process=2时，抽样由WMS完成，质检由ERP完成。WMS上架确认后回传收货信息给ERP，ERP根据WMS回传的收货信息下传抽样信息。\nn	若需要质检，则WMS根据ERP下传的抽样信息生成质检单，进行抽样送检作业，送检完成后等待ERP下传质检结果，WMS根据ERP下传的质检结果处理库存和单据。\nn	若不需要质检，则WMS根据ERP下传的收货结论处理库存和单据。\n?	当rqc_process=3时，抽样质检由WMS完成。若需要质检，则WMS上架确认后生成质检单，WMS抽样质检完成后回传质检结果给ERP。\n' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_headers
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_headers`;
CREATE TABLE `wms_in_rcv_headers`  (
  `RCV_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单头ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `AUTO_BILL_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '自动单号',
  `SRC_HEADER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单来源id',
  `SRC_AUTO_BILL_NUM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单来源编号',
  `ASN_HEADER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单id',
  `ASN_AUTO_BILL_NUM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单编号',
  `CUSTOM_BILL_NUM` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手工单号',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作员(收货员)',
  `RCV_DATE` datetime(0) NOT NULL COMMENT '收货日期',
  `RCV_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货类型',
  `STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态',
  `STATUS_AS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'status_as(辅助状态，外部系统对接 例如上传ERP)',
  `ORGN_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组织ID',
  `VENDOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `BUYER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购员ID',
  `CUSTOMER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户ID（销退客户ID）XT',
  `SRC_ORGN_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '源组织ID(调拨组织ID)    YC',
  `SRC_WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '源仓库ID(调拨源仓ID)    YC',
  `SRC_MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '源货主ID(移库入库的源货主ID)',
  `CASE_QTY` decimal(30, 4) NOT NULL COMMENT '箱数',
  `PIECE_QTY` decimal(30, 4) NOT NULL COMMENT '单品数量',
  `ACCESS_LEVEL` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'access_level',
  `COMMENTS` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT3` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT4` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT5` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE3` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE4` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE5` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `AUDIT_DATE` datetime(0) NULL DEFAULT NULL COMMENT 'audit_date',
  `AUDITED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'audited_by',
  `PRINT_COUNT` decimal(10, 0) NULL DEFAULT NULL COMMENT '打印次数',
  `PRINT_DATE` datetime(0) NULL DEFAULT NULL COMMENT '打印日期',
  `PRINTED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '打印人',
  `AUDITED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'audited_name',
  `PRINTED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'printed_name',
  `CONFIRMED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准人id',
  `CONFIRMED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准人名称',
  `CONFIRM_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批准时间',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `ITEM_CATEGORY_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品大类(预留)',
  `ASN_REMARK` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单备注说明',
  `NEED_DEPT` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '要货部门',
  `NEED_USER` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '要货业务员',
  `AGENT` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '代理商',
  `SALE_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '销售开票单号',
  `SALE_BILL_TYPE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '账期类型',
  `DEPARTMENT` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门(名称)',
  `BIZ_USER` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '业务员',
  `RETURN_TYPE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货类型(码表-rcv_return_type)',
  `SHIPPER_ZJM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单位助记码',
  PRIMARY KEY (`RCV_HEADER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货单头信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_headers_pic
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_headers_pic`;
CREATE TABLE `wms_in_rcv_headers_pic`  (
  `RCV_HEADER_PIC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '上传ID(主键雪花id)',
  `RCV_HEADER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单头ID',
  `ENTERPRISE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `PIC_FILENAME` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片名称',
  `PIC_FILEURL` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片地址',
  `EXECUTOR_DATE` datetime(0) NOT NULL COMMENT '上传时间',
  `EXECUTOR_USERID` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '上传人id',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `EXECUTOR_USER_NAME` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上传人名称',
  PRIMARY KEY (`RCV_HEADER_PIC_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货单头图片 1:N' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_headers_profiles
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_headers_profiles`;
CREATE TABLE `wms_in_rcv_headers_profiles`  (
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单头ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `TA_TI` decimal(14, 4) NULL DEFAULT NULL COMMENT '含税金额',
  `TA_TE` decimal(14, 4) NULL DEFAULT NULL COMMENT '不含税金额',
  `TA_TAX` decimal(14, 4) NULL DEFAULT NULL COMMENT '税额',
  `CANCELLED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '作废人ID',
  `CANCELLED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '作废人',
  `CANCEL_DATE` datetime(0) NULL DEFAULT NULL COMMENT '作废时间',
  `WAREHOUSE_MANAGER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库管',
  `ORDER_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源预订单ID(销售)',
  `ORDER_AUTO_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源预订单编码（销售）',
  `LICENSE_PLATE_NUMBER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '车牌号码',
  `COLDSTORETYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '冷藏方式',
  `COLD` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '冷藏状态',
  `SHIP_FROM_ADD` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发运地点',
  `SHIP_FROM_DATE` datetime(0) NULL DEFAULT NULL COMMENT '发运日期',
  `SHIP_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输方式',
  `TEMPERATUREC_TYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '温控方式',
  `SHIP_ARRIVE_TIME` datetime(0) NULL DEFAULT NULL COMMENT '到货时间',
  `ARRIVAL_MODE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '到货方式',
  `SHIP_ARRIVE_TEM_PERATURE` decimal(8, 4) NULL DEFAULT NULL COMMENT '到货温度',
  `SHIP_TEMPTRACK` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输过程温度记录',
  `TEMPCINFO` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '温控状况',
  `CARRIERNAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输单位',
  `ORGN_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组织编码',
  `ORGN_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组织名称',
  `VENDOR_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商编码',
  `VENDOR_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称',
  `WAREHOUSE_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码',
  `WAREHOUSE_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库名称',
  `BUYER_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购员编码',
  `BUYER_MANE` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购员名称',
  `CUSTOMER_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户编码',
  `CUSTOMER_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户名称',
  `MTL_OWNER_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主编码',
  `MTL_OWNER_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主名称',
  `SRC_ORGN_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组织编码(移库/调拨组织ID)',
  `SRC_ORGN_NAME` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '组织名称(移库/调拨组织ID)',
  `SRC_WAREHOUSE_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码(移库/调拨源仓ID)',
  `SRC_WAREHOUSE_NAME` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库名称(移库/调拨源仓ID)',
  `SRC_MTL_OWNER_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID(移库入库的源货主编码)',
  `SRC_MTL_OWNER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID(移库入库的源货主名称)',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `SHIP_DAYS` decimal(11, 0) NULL DEFAULT NULL COMMENT '在途时效(超过拦截)',
  `MTL_OWNER_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主单据编号(来源asn单)',
  `TRANSPORTATION_PARTY` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输方',
  `ON_PASSAGE_DAYS` decimal(11, 0) NULL DEFAULT NULL COMMENT '在途时限',
  `SHIP_TEM_PERATURE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '启运温度',
  `SHIP_DATE` datetime(0) NULL DEFAULT NULL COMMENT '启运时间',
  `DEVICE_NO` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '设备/车牌/冷藏箱 号码',
  `TEMPCONTROL_MODE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '温控方式',
  `TEMPCONTROL_STATUS` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '温控状态',
  PRIMARY KEY (`RCV_HEADER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货单头辅助表(冗余字段的存放，收货跨库查询的数据可以从该表出)' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_headers_src_bills
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_headers_src_bills`;
CREATE TABLE `wms_in_rcv_headers_src_bills`  (
  `RCV_HEADER_SRC_BILL_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货来源单列表来源单单头ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单头ID',
  `CONFIRMED_BY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准人',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `SRC_HEADER_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型(CG XT YC)',
  `RCV_DATE` datetime(0) NOT NULL COMMENT '收货日期',
  `RCV_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货类型',
  `LAST_UPDATED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `CONFIRMED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准人名称',
  `CONFIRM_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批准时间',
  `SRC_HEADER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单来源id',
  `SRC_AUTO_BILL_NUM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单来源编号',
  `ASN_HEADER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单id',
  `ASN_AUTO_BILL_NUM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单编号',
  `GMT_CREATE` datetime(0) NOT NULL,
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `GMT_MODIFIED` datetime(0) NOT NULL,
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL,
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`RCV_HEADER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货单对应的源单列表（存类型是ASN+业务单）\n与收货单头 1：N关系' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_instock_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_instock_lines`;
CREATE TABLE `wms_in_rcv_instock_lines`  (
  `IN_BOUND_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '行ID(主键id)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `WH_LOCATOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位ID(实际货位)',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '包装含量',
  `ODD_CASE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '整件数',
  `ODD_PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '零散数',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'batch_id',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `BATCH_PRODUCTION_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批次生产日期',
  `BATCH_EXPIRED_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批次有效期',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批次号',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `COMMENTS` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `ALGORITHM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架推荐库位算法(预留) A1.R1/A2.R2',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者（上架员）',
  `STOCK_STATUS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货库存结论（0不合格/1合格/2待处理/3待检)',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT3` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT4` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT5` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE3` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE4` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE5` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `TASK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务池ID（来源TASK）',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID（冗余，关联收货单）',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID（冗余，关联收货单）',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库ID（冗余，关联收货单）',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型（冗余，关联收货单）',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID（冗余，关联收货单）',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID（冗余，关联收货单）',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID（冗余，关联收货单）',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID（冗余，关联收货单）',
  `WH_AREA_CATEGORY_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别编码',
  `WH_LOCATOR_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位编码',
  `WH_LOCATOR_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位名称',
  `WH_AREA_CATEGORY_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别名称',
  `BLDG_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物编号',
  `WH_AREA_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库区编号',
  `WH_AREA_CATEGORY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别id',
  `INSTOCK_LABEL` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架标签',
  `INVENTORY_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存状态',
  `REAL_WH_LOCATOR_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际货位编号',
  `REAL_WH_LOCATOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际货位id',
  `REAL_WH_LOCATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际货位名称',
  `BLDG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物id',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `SUB_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存子状态(1 正常/2 虚拟/ 3 实物/4 直调)',
  `INVENTORY_OP_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存转换操作类型 0-代管转正常;1-代管转待检;2-待检转正常',
  `HOST_LOCATOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联的代管货位',
  `SECOND_STATUS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主关联库存状态id&code链接符号&',
  PRIMARY KEY (`IN_BOUND_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '上架单行\n来源于上架任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_lines`;
CREATE TABLE `wms_in_rcv_lines`  (
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '行ID(主键雪花id)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '头ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业id',
  `SRC_HEADER_ID` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '来源单ID列表',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单ID',
  `ASN_HEADER_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单ID列表(ASN)',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `LINE_NUM` int(10) NOT NULL COMMENT '行号',
  `UOM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `QTY` decimal(14, 4) NOT NULL COMMENT '总量/包装含量',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '单位含量',
  `PIECE_QTY` decimal(14, 4) NOT NULL COMMENT '商品总数量',
  `ODD_CASE_QTY` decimal(14, 4) NOT NULL COMMENT '整件数',
  `ODD_PIECE_QTY` decimal(14, 4) NOT NULL COMMENT '零散数',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'batch_id',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `BATCH_PRODUCTION_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批次生产日期',
  `BATCH_EXPIRED_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批次有效期',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批次号',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号(手动填)',
  `ERP_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'erp批号（预留字段）',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `STOCK_STATUS` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货结论（0合格/1不合格/2待处理/3拒绝）',
  `RCV_REASON1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理原因',
  `RCV_REASON2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因',
  `RCV_REASON3` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因补充',
  `RCV_RT_REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货原因',
  `WAREHOUSE_AREA` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '推荐库区',
  `WAREHOUSE_LOCATOR` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '推荐库位',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者（收货员）',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT3` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT4` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT5` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE3` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE4` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE5` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `COMMENTS` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `CREATED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `LAST_UPDATED_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `WMS_PIECE_QTY` decimal(32, 4) NULL DEFAULT NULL COMMENT 'WMS已入库最小单位数量？',
  `STATUS_AS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '辅助状态（做上传控制）',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主id',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库id',
  `ITEM_HEALTH_IS_DOUBLE` decimal(14, 0) NULL DEFAULT NULL COMMENT '商品是否双人质检(0否1是 默认0)',
  `FREE_QTY` decimal(11, 4) NULL DEFAULT NULL COMMENT '赠品数量(最小单位数)',
  `ITEM_WEIGHT` decimal(11, 4) NULL DEFAULT NULL COMMENT '商品重量',
  `ITEM_VOLUME` decimal(11, 4) NULL DEFAULT NULL COMMENT '商品体积',
  `APPROVAL_NUMBER` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批准文号',
  `PRODUCTION_PLACE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产地',
  `WAREHOUSE_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库名',
  `WAREHOUSE_AREA_CODES` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '推荐库区code列表',
  `MTL_OWNER_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主名称',
  `ITEM_HEALTH_TWOVOTEFLAG` decimal(14, 0) NULL DEFAULT NULL COMMENT '是否两票制(0否1是) ',
  `DATA_VERSION` decimal(14, 0) NULL DEFAULT NULL COMMENT '数据版本号(每次操作加1)',
  `ITEM_IS_PIECE_OR_CASE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品整散分离标识(0整散合一/1整散分开)',
  `WAREHOUSE_AREA_CATEGORYS` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '推荐库别列表',
  `WAREHOUSE_AREA_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '选择的库区名称',
  `WAREHOUSE_AREA_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '选择的库区id',
  `WAREHOUSE_AREA_CODE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '选择的库区code',
  `BLDG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物id',
  `BLDG_NAME` varchar(58) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物名称',
  `BLDG_CODE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物编号',
  `RCV_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货类型',
  `RCV_DATE` datetime(0) NULL DEFAULT NULL COMMENT '收货日期',
  `DELEGATION_PARTY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '受托企业id(oem厂商id,oms)',
  `DELEGATION_PARTY_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '受托企业名称(oem厂商名称,oms)',
  `SHOW_PRODUCTION_DATE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '显示生产日期',
  `SHOW_EXPIRED_DATE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '显示有效期至',
  `WAREHOUSE_ROOM_CODES` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '推荐库房列表',
  `PIECE_CONVERSION_RATE` decimal(11, 0) NULL DEFAULT NULL COMMENT '最小包装数',
  `ASN_LINE_REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn行备注说明',
  `ITEM_ZJM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品助记码',
  `IS_DELEGATE` int(1) NULL DEFAULT NULL COMMENT '是否委托生产(0否1是)',
  `IS_RETROSPECT` int(1) NULL DEFAULT NULL COMMENT '是否追溯(0否1是)',
  `RQC_REPORT_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检报告单编号(来源批次信息)',
  `WH_LOCATOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位id/用于调账选择',
  `WH_LOCATOR_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位code/用于调账选择',
  `WH_AREA_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位库区code/用于调账选择',
  `WH_AREA_CATEGORY_CODE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别code/用于调账选择',
  `INVENTORY_OP_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存转换操作类型 0-代管转正常;1-代管转待检;2-待检转正常',
  `HOST_LOCATOR_ID` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '关联的代管货位',
  PRIMARY KEY (`RCV_LINE_ID`) USING BTREE,
  INDEX `asn_h_u1`(`ASN_HEADER_ID`) USING BTREE,
  INDEX `asn_l_u1`(`ASN_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货行数据，\r\n数量，批次，容器，收货人，结论，原因\r\n\r\n（收货异常处理日志\r\n在上架前可做，只调整数量和批次信息\r\n未上架，可以修改所有原单数据，保留日志）\r\n\r\n收货行数据=上架+拒收' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_lines_pic
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_lines_pic`;
CREATE TABLE `wms_in_rcv_lines_pic`  (
  `RCV_HEADER_PIC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '上传ID(主键雪花id)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `SRC_HEADER_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购单号',
  `SRC_AUTO_BULL_NUM` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购单号',
  `ENT_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次id',
  `PIC_FILENAME` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图片名称',
  `PIC_FILEURL` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '图片地址',
  `EXECUTOR_DATE` datetime(0) NULL DEFAULT NULL COMMENT '上传时间',
  `EXECUTOR_USERID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上传人员id',
  `EXECUTOR_USER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上传人员名称',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业id',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  PRIMARY KEY (`RCV_HEADER_PIC_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '与收货单行图片 1:N' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_lines_profiles
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_lines_profiles`;
CREATE TABLE `wms_in_rcv_lines_profiles`  (
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '行ID(和rcv_line主键一致)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '头ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `ITEM_NUM` varchar(80) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品编号(冗余)',
  `ITEM_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品名称(冗余)',
  `PARENTITEMID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上级商品ID(冗余)',
  `LINETYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '行类型(预留)',
  `SIZECODE` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '尺寸(冗余)',
  `COLORCODE` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '颜色(冗余)',
  `REVISION` varchar(6) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '版本(冗余)',
  `VENDORITEMCODE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商商品编码(冗余)',
  `CATEGORY_ID` varchar(86) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品分类(冗余)',
  `PIECE_PRICE_TI` decimal(14, 4) NULL DEFAULT NULL COMMENT '单品含税进价',
  `PIECE_PRICE_TE` decimal(14, 4) NULL DEFAULT NULL COMMENT '单品不含税进价',
  `UNIT_PRICE_TI` decimal(14, 4) NULL DEFAULT NULL COMMENT '含税进价',
  `UNIT_PRICE_TE` decimal(14, 4) NULL DEFAULT NULL COMMENT '不含税进价',
  `TA_TI` decimal(14, 4) NULL DEFAULT NULL COMMENT '含税金额',
  `TA_TE` decimal(14, 4) NULL DEFAULT NULL COMMENT '不含税金额',
  `TA_TAX` decimal(14, 4) NULL DEFAULT NULL COMMENT '税额',
  `DISCOUNT_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '扣率',
  `TAX_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '税率',
  `REF_PURCHASE_PRICE_TI` decimal(14, 4) NULL DEFAULT NULL COMMENT '参考进价(单品)',
  `COLDSTORETYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '冷藏方式',
  `COLD` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '冷藏状态',
  `SHIPFROMADD` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '发运地点',
  `SHIPFROMDATE` datetime(0) NULL DEFAULT NULL COMMENT '发运日期',
  `SHIPTYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输方式',
  `TEMPERATURECTYPE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '温控方式',
  `SHIPARRIVETIME` datetime(0) NULL DEFAULT NULL COMMENT '到货时间',
  `SHIPARRIVETEMPERATURE` decimal(8, 4) NULL DEFAULT NULL COMMENT '到货温度',
  `SHIPTEMPTRACK` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输过程温度记录',
  `TEMPCINFO` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '温控状况',
  `CARRIERNAME` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '运输单位',
  `STERILIZELOTNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '灭菌批号',
  `IMPPAPERNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '进口注册证号',
  `CMPACKLOTNO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '中药分装批号',
  `RCVSTOCKSTATUSREASON` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '评定原因',
  `STERILIZEEXPDATE` datetime(0) NULL DEFAULT NULL COMMENT '灭菌效期',
  `STERILIZESNNO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '灭菌序号',
  `PAPERNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'Paper注册证号',
  `COMMENTS` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `CATEGORY_NAME` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品类别名称',
  `ITEM_BARCODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品条码',
  `SPECIFICATION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品规格说明',
  `ITEM_IS_IMPORTED` decimal(2, 0) NULL DEFAULT NULL COMMENT '进口标识',
  `ITEM_HEALTH_LISTED_LICENSOR` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上市许可持有人',
  `ITEM_HEALTH_PRODUCE_LICENSE` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产企业许可证号',
  `ITEM_HEALTH_STORE_CATEGORY` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '存储分类',
  `ITEM_IS_RECHECK` int(1) NULL DEFAULT NULL COMMENT '商品是否复检(0否1是)',
  `IS_INSTRUMENT` int(1) NULL DEFAULT NULL COMMENT '是否器械(0否1是默认0)',
  `MANUFACTURER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产厂家id',
  `MANUFACTURER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产厂家编码',
  `MANUFACTURER_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产厂家名称',
  `ITEM_HEALTH_REGISTER_NBR` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品注册证号',
  `ITEM_HEALTH_COMMON_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品通用名',
  `RETURN_INFO` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '退货单位提供的商品售出期间储存、运输质量控制情况',
  `RETURN_COLD_QUALITY` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货冷藏品出库期质量',
  `RETURN_EXPLAIN` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '退货说明',
  `IS_LOCK` int(1) NULL DEFAULT NULL COMMENT '商品是否锁定(0否1是默认0)',
  `IS_HOSTED` int(1) NULL DEFAULT NULL COMMENT '商品是否代管(0否1是默认0)',
  `ITEM_IS_SPECIAL` int(1) NULL DEFAULT NULL COMMENT '是否特殊品(0否1是默认0)',
  `IS_BACTERIA` int(1) NULL DEFAULT NULL COMMENT '是否无菌(0否1是默认0)',
  `SHELF_LIFE_DAYS` decimal(11, 0) NULL DEFAULT NULL COMMENT '商品有效期(天)',
  `SHELF_LIFE_UNIT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保质期单位类型  年/月/日   默认为日',
  `RETURN_TYPE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货类型',
  `STORE_TEMPERATURE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品存储条件(码表,常温/恒温/阴凉/冷藏/冷冻)',
  `PO_AUDIT_OPINION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '采购审核意见',
  `ALLOW_DECIMAL` varchar(12) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否允许小数拆分(Y是,其他不允许)',
  PRIMARY KEY (`RCV_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货单明细扩展表\n(冗余字段的存放，收货跨库查询的数据可以从该表出)\n运输信息，价格，医药信息等' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_reject_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_reject_lines`;
CREATE TABLE `wms_in_rcv_reject_lines`  (
  `IN_REJECT_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '行ID(主键雪花id)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货行头ID',
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `WAREHOUSE_LOCATOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `PIECE_QTY` decimal(14, 4) NOT NULL COMMENT '商品总数量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `ODD_CASE_QTY` decimal(14, 4) NOT NULL COMMENT '整件数',
  `ODD_PIECE_QTY` decimal(14, 4) NOT NULL COMMENT '零散数',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'batch_id',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `BATCH_PRODUCTION_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批次生产日期',
  `BATCH_EXPIRED_DATE` datetime(0) NULL DEFAULT NULL COMMENT '批次有效期',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批次号',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `COMMENTS` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `RESULT` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论(拒收)',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `EXECUTOR_USER` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT3` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT4` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SEGMENT5` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE3` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE4` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ATTRIBUTE5` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `TASK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务池ID（来源TASK）',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID（冗余，关联收货单）',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID（冗余，关联收货单）',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库ID（冗余，关联收货单）',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型（冗余，关联收货单）',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID（冗余，关联收货单）',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID（冗余，关联收货单）',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID（冗余，关联收货单）',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID（冗余，关联收货单）',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  PRIMARY KEY (`IN_REJECT_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货拒收单行\n来源于拒收任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rcv_temp_save
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rcv_temp_save`;
CREATE TABLE `wms_in_rcv_temp_save`  (
  `ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单头ID(主键雪花id)',
  `CONTENT` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '内容',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `DC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓配中心ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓ID',
  `CARGO_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主id',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `ASN_HEADER_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单id',
  `ASN_AUTO_BILL_NUM` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn单编号',
  PRIMARY KEY (`ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货单头信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_headers
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_headers`;
CREATE TABLE `wms_in_rqc_headers`  (
  `RQC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据id(主键雪花id)',
  `CUSTOM_BILL_NUM` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手工单号',
  `AUTO_BILL_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据自动号',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID(冗余)',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID(冗余)',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID(冗余)',
  `VENDOR_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID(冗余)',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型(冗余)',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID(冗余)',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID(冗余)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `BILL_DATE` datetime(0) NOT NULL COMMENT '单据日期',
  `STATUS` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态',
  `REMARK` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `WORK_BENCH` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工作台',
  `QC_OPERATOR1` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员1',
  `QC_OPERATOR2` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员2',
  `DATA_SRC_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据生成方式（系统自动/人工）部分类型的单据自动生成质检单',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `IS_INSTOCK_PRINT` int(2) NULL DEFAULT NULL COMMENT '是否打印上架标签(0否1是,默认0)',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `RQC_TEMPERATURE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '验收温度',
  PRIMARY KEY (`RQC_HEADER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检单汇总\n关联收货单，可以查询出所有编码，名称信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_line_pic
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_line_pic`;
CREATE TABLE `wms_in_rqc_line_pic`  (
  `RQC_PIC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '唯一行号ID(主键雪花id)',
  `TASK_RQC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID（来源RQC_TASK）',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `RQC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据id',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SOURCE_BILL_TYP` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SOURCE_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SOURCE_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `LINE_NUM` decimal(10, 0) NULL DEFAULT NULL COMMENT '行号',
  `BATCH_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '批号',
  `PIC_FILE_NAME` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片名称',
  `PIC_FILE_URL` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '图片地址',
  `OP_DATE` datetime(0) NOT NULL COMMENT '上传时间',
  `OP_USERID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '上传人员',
  `REFBILLNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '采购单号',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  PRIMARY KEY (`RQC_PIC_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检单图片' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_lines`;
CREATE TABLE `wms_in_rqc_lines`  (
  `RQC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '唯一行号ID(主键雪花id)',
  `RQC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据id',
  `TASK_RQC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检任务池ID（来源RQC_TASK）',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID（冗余，关联收货单）',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID（冗余，关联收货单）',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库ID（冗余，关联收货单）',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型（冗余，关联收货单）',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID（冗余，关联收货单）',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID（冗余，关联收货单）',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID（冗余，关联收货单）',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID（冗余，关联收货单）',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码（冗余，关联收货单行）',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码（冗余，关联收货单行）',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `ODD_CASE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '整件数',
  `ODD_PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '零散数',
  `QC_ODD_CASE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '抽样整件数',
  `QC_ODD_PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '抽样零散数',
  `QC_ODD_CASE_ACT_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '实际抽样整件数',
  `QC_ODD_PIECE_ACT_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '实际抽样零散数',
  `LINE_REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '行备注',
  `QC_STATUS1` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态（0初始/1确认）',
  `QC_RESULT1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论1（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因1',
  `QC_GRADE1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级1(预留)',
  `QC_OPCODE1` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员1',
  `QC_DATE1` datetime(0) NULL DEFAULT NULL COMMENT '质检时间1',
  `QC_STATUS2` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态2（初始/确认）',
  `QC_RESULT2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论2（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因2',
  `QC_GRADE2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级2',
  `QC_OPCODE2` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员2',
  `QC_STATUS3` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态2（初始/确认）',
  `QC_RESULT3` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论2（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON3` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因3',
  `QC_GRADE3` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级3',
  `QC_OPCODE3` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员3',
  `QC_DATE2` datetime(0) NULL DEFAULT NULL COMMENT '质检时间2',
  `QC_DATE3` datetime(0) NULL DEFAULT NULL COMMENT '质检时间3',
  `STOCK_STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存状态(质检状态)',
  `ITEM_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货品标志',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `TIMES` int(2) NULL DEFAULT NULL COMMENT '质检次数',
  `ITEM_HEALTH_IS_DOUBLE` int(2) NULL DEFAULT NULL COMMENT '商品是否双人质检(0否1是,默认0)',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批号',
  `WH_AREA_CATEGORY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际库别',
  `WH_AREA_CODES` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际库区code列表',
  `HANDLING_SUGGESTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理意见',
  `DEF_REASON` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因(码表)',
  `SAMPLE_DATE` datetime(0) NULL DEFAULT NULL COMMENT '抽样日期',
  `RQC_SAMPLE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '抽检关联id',
  `HANDLING_REASON` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理原因(码表)',
  `DEF_REASON_EXT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因补充',
  `HANDLING_MEASURE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理措施(码表)',
  `PICK_GOODS_EXPLAIN` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '提货说明',
  `RETURN_TYPE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '退货类型(码表)',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `RQC_TEMPERATURE` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '验收温度',
  `SECOND_STATUS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主关联库存状态id&code链接符号&',
  PRIMARY KEY (`RQC_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检单明细\n关联收货单，可以查询出所有信息\n\n(结论：合格/不合格/待处理)\n合格/不合格 ：上架任务池\n待处理：复检任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_lines_copy1
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_lines_copy1`;
CREATE TABLE `wms_in_rqc_lines_copy1`  (
  `RQC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '唯一行号ID(主键雪花id)',
  `RQC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据id',
  `TASK_RQC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检任务池ID（来源RQC_TASK）',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID（冗余，关联收货单）',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID（冗余，关联收货单）',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库ID（冗余，关联收货单）',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型（冗余，关联收货单）',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID（冗余，关联收货单）',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID（冗余，关联收货单）',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID（冗余，关联收货单）',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID（冗余，关联收货单）',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码（冗余，关联收货单行）',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码（冗余，关联收货单行）',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(30, 4) NULL DEFAULT NULL COMMENT '最小单位数量',
  `ODD_CASE_QTY` decimal(30, 12) NULL DEFAULT NULL COMMENT '收货整箱数',
  `ODD_PIECE_QTY` decimal(30, 12) NULL DEFAULT NULL COMMENT '收货零散数',
  `QC_ODD_CASE_QTY` decimal(30, 12) NULL DEFAULT NULL COMMENT '抽样整箱数',
  `QC_ODD_PIECE_QTY` decimal(30, 12) NULL DEFAULT NULL COMMENT '抽样零散数',
  `QC_ODD_CASE_ACT_QTY` decimal(30, 12) NULL DEFAULT NULL COMMENT '实际抽样整箱数',
  `QC_ODD_PIECE_ACT_QTY` decimal(30, 12) NULL DEFAULT NULL COMMENT '实际抽样零散数',
  `LINE_REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '行备注',
  `QC_STATUS1` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态（0初始/1确认）',
  `QC_RESULT1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论1（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON1` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因1',
  `QC_GRADE1` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级1(预留)',
  `QC_OPCODE1` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员1',
  `QC_DATE1` datetime(0) NULL DEFAULT NULL COMMENT '质检时间1',
  `QC_STATUS2` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态2（初始/确认）',
  `QC_RESULT2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论2（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON2` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因2',
  `QC_GRADE2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级2',
  `QC_OPCODE2` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员2',
  `QC_STATUS3` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态2（初始/确认）',
  `QC_RESULT3` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论2（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON3` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因3',
  `QC_GRADE3` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级3',
  `QC_OPCODE3` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员3',
  `QC_DATE2` datetime(0) NULL DEFAULT NULL COMMENT '质检时间2',
  `QC_DATE3` datetime(0) NULL DEFAULT NULL COMMENT '质检时间3',
  `STOCK_STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存状态(质检状态)',
  `ITEM_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货品标志',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `TIMES` decimal(2, 0) NULL DEFAULT NULL COMMENT '质检次数',
  `ITEM_HEALTH_IS_DOUBLE` decimal(65, 30) NULL DEFAULT NULL COMMENT '商品是否双人质检(0否1是,默认0)',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批号',
  `WH_AREA_CATEGORY` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际库别',
  `WH_AREA_CODES` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际库区code列表',
  `HANDLING_SUGGESTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理意见(措施)',
  `DEF_REASON` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因',
  `SAMPLE_DATE` datetime(0) NULL DEFAULT NULL COMMENT '抽样日期',
  `RQC_SAMPLE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '抽检关联id',
  PRIMARY KEY (`RQC_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检单明细\n关联收货单，可以查询出所有信息\n\n(结论：合格/不合格/待处理)\n合格/不合格 ：上架任务池\n待处理：复检任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_re_headers
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_re_headers`;
CREATE TABLE `wms_in_rqc_re_headers`  (
  `RQC_RE_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据id(主键雪花id)',
  `CUSTOM_BILL_NUM` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手工单号',
  `AUTO_BILL_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据自动号',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID(冗余)',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID(冗余)',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID(冗余)',
  `VENDOR_ID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID(冗余)',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型(冗余)',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID(冗余)',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID(冗余)',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `BILL_DATE` datetime(0) NOT NULL COMMENT '单据日期',
  `STATUS` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `REMARK` varchar(250) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `WORK_BENCH` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '工作台',
  `QC_OPERATOR1` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检员1',
  `QC_OPERATOR2` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检员2',
  `DATA_SRC_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据生成方式（系统自动/人工）部分类型的单据自动生成质检单',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  PRIMARY KEY (`RQC_RE_HEADER_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检单汇总\n关联收货单，可以查询出所有编码，名称信息' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_re_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_re_lines`;
CREATE TABLE `wms_in_rqc_re_lines`  (
  `RQC_RE_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '唯一行号ID(主键雪花id)',
  `RQC_RE_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据id',
  `TASK_RE_RQC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '质检任务池ID（来源RQC_RE_TASK）',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货行头ID',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID（冗余，关联收货单）',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID（冗余，关联收货单）',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID（冗余，关联收货单）',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型（冗余，关联收货单）',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID（冗余，关联收货单）',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID（冗余，关联收货单）',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID（冗余，关联收货单）',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID（冗余，关联收货单）',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码（冗余，关联收货单行）',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码（冗余，关联收货单行）',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `UOM_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位类型(2019/2020)新老包装',
  `CONVERSION_RATE` decimal(14, 4) NULL DEFAULT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `ODD_CASE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '整件数',
  `ODD_PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '零散数',
  `QC_ODD_CASE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '抽样整件数',
  `QC_ODD_PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '抽样零散数',
  `QC_ODD_CASE_ACT_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '实际抽样整件数',
  `QC_ODD_PIECE_ACT_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '实际抽样零散数',
  `LINE_REMARK` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '行备注',
  `QC_STATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检状态（初始/确认）',
  `QC_RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论（0合格/1不合格/2待处理/3拒绝）',
  `QC_REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因',
  `QC_GRADE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检等级',
  `QC_OPCODE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检员',
  `QC_DATE` datetime(0) NULL DEFAULT NULL COMMENT '质检时间',
  `QC_RE_STATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检状态1（初始/确认）',
  `QC_RE_RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检结论1（0合格/1不合格/2待处理）',
  `QC_RE_REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检原因1',
  `QC_RE_GRADE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检等级1',
  `QC_RE_OPCODE` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检员1',
  `QC_RE_DATE` datetime(0) NULL DEFAULT NULL COMMENT '复检时间1',
  `STOCK_STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '复检最终结论(0合格/1不合格/2待处理/3拒绝）',
  `ITEM_FLAG` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货品标志',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `TIMES` int(2) NULL DEFAULT NULL COMMENT '质检次数',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批号',
  `HANDLING_SUGGESTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理意见',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `ADUIT_SUGGESTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '审核意见',
  `QC_RE_SUGGESTION` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检意见1',
  `QC_RE_RESULT2` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检结论2',
  `QC_RE_OPCODE2` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检员2',
  `QC_RE_DATE2` datetime(0) NULL DEFAULT NULL COMMENT '复检时间2',
  `QC_RE_SUGGESTION2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检意见2',
  `QC_RE_RESULT3` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检结论3',
  `QC_RE_OPCODE3` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检员3',
  `QC_RE_DATE3` datetime(0) NULL DEFAULT NULL COMMENT '复检时间3',
  `QC_RE_SUGGESTION3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检意见3',
  `HANDLING_REASON` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理原因(码表)',
  `DEF_REASON_EXT` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因补充',
  `HANDLING_MEASURE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '处理措施(码表)',
  `DEF_REASON` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '不足原因(码表)',
  PRIMARY KEY (`RQC_RE_LINE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检单明细\n关联收货单，可以查询出所有信息\n\n(结论：合格/不合格/待处理)\n合格/不合格 ：上架任务池\n待处理：复检任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_rechek_headers
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_rechek_headers`;
CREATE TABLE `wms_in_rqc_rechek_headers`  (
  `CONSIGNOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '业主编号(主键雪花id)',
  `ORIGINALBILLNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '采购单号',
  `REFBILLNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单号',
  `BILLNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '质检单号',
  `BILL_DATE` datetime(0) NOT NULL COMMENT '单据日期',
  `COMPANYCODE` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '供应商编码',
  `QCSTATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '质检状态(10初始11已打印13已确认)',
  `REQCSTATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检状态'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '复检单头' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_rechek_lines
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_rechek_lines`;
CREATE TABLE `wms_in_rqc_rechek_lines`  (
  `CONSIGNOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '业主编号',
  `BILLNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '质检单号',
  `RQC_LINEID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '行号',
  `CONTAINERNO` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器',
  `ITEMID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品编码',
  `LOTID` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `QC_STATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '质检状态（10初始13确认）',
  `QC_RESULT` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检结论（合格/不合格）',
  `QC_REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检原因',
  `QCOPCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检人员',
  `QCOPDATE` datetime(0) NULL DEFAULT NULL COMMENT '质检时间',
  `REQCRESULT` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检结论',
  `REQCOPDATE` datetime(0) NULL DEFAULT NULL COMMENT '复检时间',
  `REQCOPCODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检人员',
  `QCODD` decimal(16, 3) NULL DEFAULT NULL COMMENT '零头',
  `QCPCS` decimal(16, 0) NULL DEFAULT NULL COMMENT '件数',
  `QCQTY` decimal(16, 3) NULL DEFAULT NULL COMMENT '数量',
  `TIMES` decimal(2, 0) NULL DEFAULT NULL COMMENT '复检次数'
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '复检单行' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_sample
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_sample`;
CREATE TABLE `wms_in_rqc_sample`  (
  `RQC_SAMPLE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '抽检主键id(雪花)',
  `RCV_HEADER_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头id',
  `RCV_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行id',
  `RQC_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检行id',
  `RQC_HEADER_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检头id',
  `ENTERPRISE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业id',
  `MTL_OWNER_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主id',
  `WAREHOUSE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库id',
  `SRC_BILL_TYPE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源行id',
  `SRC_HEADER_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源头id',
  `ASN_HEADER_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn头id',
  `ASN_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'asn行id',
  `ITEM_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品id',
  `BATCH_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次id',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '包装单位',
  `PIECE_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '商品最小单位总数量',
  `CONVERSION_RATE` decimal(28, 4) NULL DEFAULT NULL COMMENT '包装含量',
  `ODD_CASE_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '整件数(包装单位)',
  `ODD_PIECE_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '零散数',
  `QC_ODD_CASE_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '抽样整件数',
  `QC_ODD_PIECE_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '抽样零散数',
  `QC_ODD_CASE_ACT_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '抽样实际整件数',
  `QC_ODD_PIECE_ACT_QTY` decimal(28, 4) NULL DEFAULT NULL COMMENT '抽检实际零散',
  `REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注说明',
  `SAMPLE_DATE` datetime(0) NULL DEFAULT NULL COMMENT '抽样时间',
  `BATCH_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `CREATOR` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建者id',
  `CREATOR_NAME` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建者名称',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
  `MODIFIER` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新者id',
  `MODIFIER_NAME` varchar(48) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新者名称',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
  `MTL_OWNER_CODE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主编号',
  `WAREHOUSE_CODE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编号',
  `ITEM_CODE` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品编号',
  `MANUFACTURER_LOT_NUM` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品批号',
  `SAMPLE_BY` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '抽样人',
  `TASK_RQC_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检任务id(唯一键)',
  PRIMARY KEY (`RQC_SAMPLE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检抽样表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_st
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_st`;
CREATE TABLE `wms_in_rqc_st`  (
  `RQC_ST_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '质检策略主键id(雪花)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业id',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主id',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库id',
  `VENDOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商id',
  `ST_NAME` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '策略名称',
  `ST_NUM` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '策略编号',
  `REMARK` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注说明',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `EN_REGEXP` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业正则表达式',
  `OC_REGEXP` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主正则',
  `WH_REGEXP` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库正则',
  `REGEXP_DES` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '正则规则说明',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL,
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL,
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品id',
  `ITEM_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品编码',
  `ITEM_NAME` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品名称',
  `ITEM_CATEGORY_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品大类编码',
  `ST_TYPE` int(2) NULL DEFAULT NULL COMMENT '策略类型(0通用;1非通用)',
  `ATTRIBUTE1` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段1',
  `ATTRIBUTE2` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段2',
  `ATTRIBUTE3` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备用字段3',
  `BILL_TYPE` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据类型(入库)',
  PRIMARY KEY (`RQC_ST_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检策略表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_rqc_st_rule
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_rqc_st_rule`;
CREATE TABLE `wms_in_rqc_st_rule`  (
  `RULE_ID` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '质检规则主键id',
  `RQC_ST_ID` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '质检策略id',
  `SEARCH_REGEXP` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '查询条件表达式',
  `MATCH_REGEXP` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '匹配表达式',
  `SORT_INDEX` int(11) NULL DEFAULT NULL COMMENT '规则排序',
  `REGEXP_DES` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '规则说明',
  `REMARK` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备注',
  `STATUS` varchar(2) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '状态(0否1是)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL,
  `CREATOR` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL,
  `MODIFIER` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL,
  `ATTRIBUTE1` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备用字段1',
  `ATTRIBUTE2` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备用字段2',
  `ATTRIBUTE3` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '备用字段3',
  `RULE_NAME` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '抽检规则名称',
  PRIMARY KEY (`RULE_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for wms_in_task_exception_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_exception_detail`;
CREATE TABLE `wms_in_task_exception_detail`  (
  `TASK_EXCEPTION_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识0否1是',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(0不可/1可执行)',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `QC_STATUS` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态（初始/确认）',
  `RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `COMMENTS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注,错误原因',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `NODE_TYPE` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务节点（10收货错误/20质检错误/30复检/40上架错误）',
  `DATA_VERSION` int(10) NULL DEFAULT NULL COMMENT '数据版本号从0开始',
  `NODE_TASK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '错误节点的任务id',
  PRIMARY KEY (`TASK_EXCEPTION_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货异常任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_hosted_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_hosted_detail`;
CREATE TABLE `wms_in_task_hosted_detail`  (
  `TASK_HOSTED_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `COMMENTS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `MANUFACTURER_BATCH_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `TASK_RECHECK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '复检任务id',
  `LOCATOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位id',
  PRIMARY KEY (`TASK_HOSTED_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '代管任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_instock_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_instock_detail`;
CREATE TABLE `wms_in_task_instock_detail`  (
  `TASK_INBOUND_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `COMMENTS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论（0合格/1不合格/2隔离）',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `TASK_TYPE` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '任务类型（收货/移库/补货）',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `DATA_SRC_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '数据生成方式（系统自动/人工）部分类型的单据自动生成质检单',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(0不可用1可用,默认1)',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `SPILTER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拆分者名称',
  `IS_SPILT` decimal(10, 0) NULL DEFAULT NULL COMMENT '是否正在拆分(0否1是)',
  `WH_LOCATOR_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位id',
  `DATA_VERSION` int(10) NULL DEFAULT NULL COMMENT '数据版本号从0开始',
  `IS_LOCK` int(2) NULL DEFAULT NULL COMMENT '数据是否锁定(0否1是拆分/异常处理并发)',
  `WH_AREA_CATEGORY_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别code',
  `WH_AREA_CATEGORY_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别名称',
  `WH_LOCATOR_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位编码',
  `WH_LOCATOR_NAME` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库位名称',
  `BLDG_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物编号',
  `WH_AREA_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库区编号',
  `WH_AREA_CATEGORY_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别id',
  `RQC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检明细行id',
  `BLDG_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '建筑物id',
  `INVENTORY_STATUS` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库存状态',
  `INSTOCK_LABEL` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上架标签',
  `RQC_HEADER_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '质检单头id',
  `LOCATOR_FLOOR_NUM` decimal(4, 0) NULL DEFAULT NULL COMMENT '货位所在楼层(冗余)',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` decimal(2, 0) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `SECOND_STATUS` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主关联库存状态id&code链接符号&',
  PRIMARY KEY (`TASK_INBOUND_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '上架任务池\n合格/不合格的都需要上架' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_pending_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_pending_detail`;
CREATE TABLE `wms_in_task_pending_detail`  (
  `TASK_PENDING_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `COMMENTS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `MANUFACTURER_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  PRIMARY KEY (`TASK_PENDING_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '待处理任务池 (预留)' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_qc_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_qc_detail`;
CREATE TABLE `wms_in_task_qc_detail`  (
  `TASK_RQC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否允许作业标识(0否1是)',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `COMMENTS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论(上一次检查)',
  `REASON` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因(上一次检查)',
  `MANUFACTURER_LOT_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(0已完成1未完成)',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `TIMES` int(2) NULL DEFAULT NULL COMMENT '第几次质检',
  `ITEM_HEALTH_IS_DOUBLE` int(2) NULL DEFAULT NULL COMMENT '是否双人质检(0否1是默认0)',
  `DATA_VERSION` int(10) NULL DEFAULT NULL COMMENT '数据版本号从0开始',
  `IS_LOCK` int(2) NULL DEFAULT NULL COMMENT '数据是否锁定(0否1是拆分/异常处理并发)',
  `SPILTER_NAME` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '拆分人',
  `IS_SPILT` int(2) NULL DEFAULT NULL COMMENT '是否拆分(0否1是)',
  `IS_RECHECKED` int(2) NULL DEFAULT NULL COMMENT '是否来源复检(0否1是,默认0)',
  `IS_SPOT_CHECK` int(2) NULL DEFAULT NULL COMMENT '是否抽检过(0否1是默认0)',
  `IS_SUPERVISE` int(2) NULL DEFAULT NULL COMMENT '是否监管码扫描(0否1是默认0)',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `PRE_NODE_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上一节点行id(用于双人质检记录上一次质检的行id)',
  PRIMARY KEY (`TASK_RQC_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '质检任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_qc_recheck_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_qc_recheck_detail`;
CREATE TABLE `wms_in_task_qc_recheck_detail`  (
  `TASK_RECHECK_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识(默认1)',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `TIMES` int(2) NULL DEFAULT NULL COMMENT '第几次复检',
  `COMMENTS` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
  `RESULT` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论(上一次检查)',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因(上一次检查)',
  `MANUFACTURER_LOT_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态(0已完成,1未完成)',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `DATA_VERSION` int(10) NULL DEFAULT NULL COMMENT '数据版本号从0开始',
  `ITEM_HEALTH_IS_DOUBLE` int(2) NULL DEFAULT NULL COMMENT '是否双人质检(0否1是默认0)',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  `PRE_NODE_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上一节点行id(用于记录上一次复检的行id)',
  PRIMARY KEY (`TASK_RECHECK_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '复检任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_rcv_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_rcv_detail`;
CREATE TABLE `wms_in_task_rcv_detail`  (
  `TASK_RCV_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SOURCE_BILL_TYP` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SOURCE_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SOURCE_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(30, 4) NULL DEFAULT NULL COMMENT '数量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(30, 4) NOT NULL COMMENT '单品数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `MANUFACTURER_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '是否允许作业标识',
  `REMAIN_QTY` decimal(30, 4) NULL DEFAULT NULL COMMENT '余量',
  `RESULT` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论',
  `REASON` char(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  PRIMARY KEY (`TASK_RCV_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '收货任务池（暂时不用，预留）' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_in_task_rejected_detail
-- ----------------------------
DROP TABLE IF EXISTS `wms_in_task_rejected_detail`;
CREATE TABLE `wms_in_task_rejected_detail`  (
  `TASK_REJECTED_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID(主键雪花id)',
  `ENTERPRISE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '企业ID',
  `WAREHOUSE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库ID',
  `SRC_BILL_TYPE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单类型',
  `SRC_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单头ID',
  `SRC_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '来源单行ID',
  `ASN_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN头ID',
  `ASN_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'ASN行ID',
  `RCV_HEADER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货单头ID',
  `RCV_LINE_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '收货行头ID',
  `ITEM_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量/包装含量',
  `UOM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '包装单位',
  `CONVERSION_RATE` decimal(14, 4) NOT NULL COMMENT '包装含量',
  `PIECE_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '总数量',
  `BATCH_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次ID',
  `BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
  `VENDOR_BATCH_NUM` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批号',
  `ACTIVE_FLAG` char(1) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '是否允许作业标识',
  `REMAIN_QTY` decimal(14, 4) NULL DEFAULT NULL COMMENT '余量',
  `RESULT` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结论',
  `REASON` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '原因',
  `MANUFACTURER_LOT_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产商批号',
  `CONTAINER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器编码',
  `GOODS_CASE_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货格编码',
  `EXECUTOR` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '执行者',
  `STATUS` varchar(10) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '状态',
  `SEGMENT1` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `SEGMENT2` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE1` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `ATTRIBUTE2` varchar(240) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '预留字段',
  `GMT_CREATE` datetime(0) NOT NULL COMMENT '创建日期',
  `CREATOR` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'created_name',
  `GMT_MODIFIED` datetime(0) NOT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'last_updated_name',
  `MTL_OWNER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主id',
  `DATA_VERSION` int(10) NULL DEFAULT NULL COMMENT '数据版本号从0开始',
  `REF_BILL_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单(头)id',
  `REF_TYPE` int(2) NULL DEFAULT NULL COMMENT '操作来源单类型 0:收货1:质检2:复检',
  `REF_LINE_ID` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单行(明细)id',
  `REF_BILL_NO` varchar(42) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '操作来源单编号',
  PRIMARY KEY (`TASK_REJECTED_ID`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '拒收任务池' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for wms_supervision_code
-- ----------------------------
DROP TABLE IF EXISTS `wms_supervision_code`;
CREATE TABLE `wms_supervision_code`  (
  `ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'ID',
  `ENTERPRISE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '企业ID',
  `WAREHOUSE_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库CODE',
  `CARGO_OWNER_CODE` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【1.YEZ_ID,业主内码】货主CODE   ',
  `REF_BILL_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【2.RUCKD_NO? 入出库单号】上级单据ID',
  `REF_BILL_LINE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【RUCKD_NO? 入出库单号】上级单据LINE ID',
  `SUPERVISION_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【3.JIANG_CD,监管码】监管码/防串码/唯一码   ',
  `SCAN_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【4.操作员名称，CAOZ_STAFF】',
  `SCAN_DATE` datetime(0) NULL DEFAULT NULL COMMENT '【5.操作日期，OPER_DATE】扫码时间',
  `COMPANY_CODE` varchar(120) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【6.单位内码（供应商/客户的编码）,取供应商货主客户的编码】',
  `UPLOAD_FLAG` varchar(2) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【7.是否上传，SHANGC_FLG】 是否上传',
  `SUPERVISION_TYPE` decimal(9, 0) NULL DEFAULT NULL COMMENT '【8.监管类型 JIANG_TYPE】(业务类型 ；0购进入库， 1 销售退回 ，2 销售出库， 3 购进退出, 4 不合格，5 盘点)',
  `ITEM_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【9.商品内码，SHANGP_ID】商品编号 ',
  `PICK_TASK_NO` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【10.分配单编号(预留)】',
  `CODE_TYPE` decimal(9, 0) NULL DEFAULT NULL COMMENT '【11.TIAOM_TYPE】条码类型（1:监管码  2：防串码  3：唯一码）【条码类型，TIAOM_TYPE】',
  `PACK_LEVEL` decimal(9, 0) NULL DEFAULT NULL COMMENT '【12.BZLB】包装级别(0大包装，1中包装，2小包装)【包装类别，BZLB】',
  `MANUFACTURER_LOT_NUM` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【13.批号 PHID】批号 ',
  `STATUS` decimal(9, 0) NULL DEFAULT NULL COMMENT '【14.状态(预留)】（10：初始，20：已上传）',
  `BILLNO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【15.ERP单据编号(预留)流水号】\n',
  `LINENO` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '【16.ERP细单行号(预留)行ID】\n',
  `BILL_TYPE` decimal(2, 0) NULL DEFAULT NULL COMMENT '单据类型',
  `STAGE` decimal(2, 0) NULL DEFAULT NULL COMMENT '扫码阶段：0=入库质检 1=PC拣货 2=PC内复核 3=PC外复核 4=补录 5=PDA拣货 6=PDA内复核 7=PDA外复核',
  `ITEM_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品ID',
  `ITEM_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '商品名称',
  `PRODUCTION_DATE` datetime(0) NULL DEFAULT NULL COMMENT '生成日期',
  `EXPIRED_DATE` datetime(0) NULL DEFAULT NULL COMMENT '有效期至',
  `PACK_SIZE` decimal(20, 7) NULL DEFAULT NULL COMMENT '包装数量',
  `CONTAINER_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '容器CODE',
  `SUPPLIER_CODE` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商编码',
  `SHIPPER_CODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '客户号',
  `PIECE_QTY` decimal(20, 7) NULL DEFAULT NULL COMMENT '数量',
  `LOCATOR_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位CODE',
  `WH_AREA_CATEGORY_CODE` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '库别编码',
  `GMT_CREATE` datetime(0) NULL DEFAULT NULL COMMENT '创建日期',
  `CREATOR` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `CREATOR_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
  `GMT_MODIFIED` datetime(0) NULL DEFAULT NULL COMMENT '最后修改日期',
  `MODIFIER` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `MODIFIER_NAME` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '最后修改人',
  `DC_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓配中心ID',
  `WAREHOUSE_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓ID',
  `CARGO_OWNER_ID` varchar(30) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货主ID',
  `UNLOCK` decimal(1, 0) NULL DEFAULT NULL COMMENT '是否解锁：0=否 1=是',
  `LOCATOR_ID` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位ID',
  `SUPPLIER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  `SHIPPER_ID` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '收货单位(客户)id',
  `SRC_CODE` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
  PRIMARY KEY (`ID`) USING BTREE,
  UNIQUE INDEX `index_u_supervision`(`REF_BILL_ID`, `REF_BILL_LINE_ID`, `SUPERVISION_CODE`) USING BTREE
) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '监管码/防窜码/唯一码记录表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Triggers structure for table oms_asn_bill_d
-- ----------------------------
DROP TRIGGER IF EXISTS `UPDATE_BILLD_ABSENCE`;
delimiter ;;
CREATE TRIGGER `UPDATE_BILLD_ABSENCE` BEFORE INSERT ON `oms_asn_bill_d` FOR EACH ROW BEGIN
  DECLARE t_CONSIGNORNAME VARCHAR ( 50 );
  DECLARE t_CONSIGNORCODE VARCHAR ( 50 );
  DECLARE t_BRANCHNAME VARCHAR ( 50 );
  DECLARE t_itemcode VARCHAR ( 50 );
  DECLARE t_itemname VARCHAR ( 100 );
  DECLARE t_MANUFACTURER VARCHAR ( 100 );
  DECLARE t_PACK_SIZE int;
  DECLARE t_P_ENTERPRISEID VARCHAR ( 20 );
  
  SELECT  ifnull(item_code,'-') item_code,item_name, MANUFACTURER_ID, CASE_CONVERSION_RATE 
    into t_itemcode,t_itemname,t_MANUFACTURER,t_PACK_SIZE from upcloud_base_item.base_mtl_item_mst where item_id=new.itemid;
    
  select   CARGO_OWNER_CODE,CARGO_OWNER_NAME,'655026008575053824' into  t_CONSIGNORCODE,t_CONSIGNORNAME,t_P_ENTERPRISEID from upcloud_base_chain.base_cargo_owner_mst where CARGO_OWNER_ID=new.consignorid;
  select   WAREHOUSE_NAME into t_branchname from upcloud_base_warehouse.base_wms_wh_mst where WAREHOUSE_CODE=new.BRANCHcode;
         
  SET 
  new.CONSIGNORNAME = t_CONSIGNORNAME,
  new.BRANCHNAME = t_BRANCHNAME,
  new.itemcode = t_itemcode,
  new.itemname = t_itemname,
  new.MANUFACTURER = t_MANUFACTURER,
  new.PACK_SIZE = t_PACK_SIZE,
  new.CONSIGNORCODE = t_CONSIGNORCODE,
  new.P_ENTERPRISEID = t_P_ENTERPRISEID;
END
;;
delimiter ;

-- ----------------------------
-- Triggers structure for table oms_asn_bill_h
-- ----------------------------
DROP TRIGGER IF EXISTS `UPDATE_BILL_ABSENCE`;
delimiter ;;
CREATE TRIGGER `UPDATE_BILL_ABSENCE` BEFORE INSERT ON `oms_asn_bill_h` FOR EACH ROW BEGIN
  DECLARE t_shippername VARCHAR ( 200 );
  DECLARE t_consignorname VARCHAR ( 50 );
  DECLARE t_branchname VARCHAR ( 50 );
  DECLARE t_PRIORITY_LEVEL VARCHAR ( 50 );
  DECLARE t_SHIPPERCODE VARCHAR ( 50 );
  DECLARE t_CONSIGNORCODE VARCHAR ( 50 );
  
  SELECT  SUPPLIER_CODE, SUPPLIER_NAME into t_SHIPPERCODE, t_shippername from upcloud_base_chain.base_supplier_mst where SUPPLIER_ID=new.SHIPPERID;
        
  select   CARGO_OWNER_CODE,CARGO_OWNER_NAME into t_CONSIGNORCODE, t_consignorname from upcloud_base_chain.base_cargo_owner_mst where CARGO_OWNER_ID=new.consignorid;
        
  select   WAREHOUSE_NAME, 1 into t_branchname, t_PRIORITY_LEVEL from upcloud_base_warehouse.base_wms_wh_mst where WAREHOUSE_CODE=new.BRANCHcode;
         
  SET 
  new.shippername = t_shippername,
  new.consignorname = t_consignorname,
  new.branchname = t_branchname,
  new.PRIORITY_LEVEL = t_PRIORITY_LEVEL,
  new.SHIPPERCODE = t_SHIPPERCODE,
  new.CONSIGNORCODE = t_CONSIGNORCODE;
END
;;
delimiter ;

SET FOREIGN_KEY_CHECKS = 1;
