#   字段新增   （表名，字段名，字段类型，修改方式（1：新增，2：修改，3：删除）

-- ----------------------------
-- Table structure for inv_stock_compare
-- ----------------------------
CREATE TABLE IF NOT EXISTS `inv_stock_compare`
(
    `id`               bigint                                                        NOT NULL,
    `status`           int                                                           NOT NULL COMMENT '状态',
    `thrSysId`         int                                                           NOT NULL COMMENT '第三方系统id',
    `thrSysName`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '第三方系统名称',
    `thirdTableField`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '第三方系统字段名',
    `invCode`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库编码',
    `invName`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '仓库名称',
    `mainAction`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '出入库类型',
    `action`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据类型编码',
    `actionName`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '单据类型名称',
    `compareStartDate` date                                                          NOT NULL COMMENT '筛选开始时间',
    `compareEndDate`   date                                                          NOT NULL COMMENT '筛选结束时间',
    `compareTime`      datetime                                                      NULL     DEFAULT NULL COMMENT '对比时间',
    `siftBatchNo`      bit(1)                                                        NOT NULL DEFAULT b'0' COMMENT '是否区分批次号',
    `remark`           text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci         NULL COMMENT '备注',
    `createTime`       datetime                                                      NOT NULL COMMENT '创建时间',
    `createUser`       bigint                                                        NOT NULL COMMENT '创建人id',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '库存对比表'
  ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for inv_stock_compare_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `inv_stock_compare_detail`
(
    `compareId`     bigint                                                        NOT NULL COMMENT '对比id',
    `productId`     bigint                                                        NOT NULL COMMENT '产品id',
    `thrProductId`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '第三方产品编码',
    `nameCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'DI',
    `productName`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '产品名称',
    `cpms`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '产品描述',
    `ggxh`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '规格型号',
    `manufactory`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '生产厂家',
    `ylqxzcrbarmc`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_cs NOT NULL COMMENT '医疗器械注册/备案人名称',
    `zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_as_cs NOT NULL COMMENT '注册证编号/备案批准编号',
    `mainAction`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '出入库类型',
    `count`         int                                                           NOT NULL COMMENT '对应数量',
    `thrCount`      int                                                           NULL DEFAULT NULL COMMENT '第三方数量',
    `compareCount`  int                                                           NULL DEFAULT NULL COMMENT '对比数量',
    PRIMARY KEY (`compareId`, `productId`, `mainAction`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '库存对比明细'
  ROW_FORMAT = Dynamic;


CALL Pro_Temp_ColumnWork('io_order', 'confirmUser', 'varchar(255)', 1);


CREATE TABLE IF NOT EXISTS `sys_app_version`
(
    `id`          int                                                           NOT NULL,
    `type`        varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NOT NULL COMMENT '类型：android,pc,',
    `versionName` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL COMMENT '版本号',
    `versionCode` int                                                           NULL DEFAULT NULL,
    `appName`     varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL COMMENT '应用名称',
    `createTime`  datetime(0)                                                   NULL DEFAULT NULL COMMENT '创建日期',
    `downloadUrl` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '下载地址',
    `updateLog`   varchar(600) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新日志',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci
  ROW_FORMAT = DYNAMIC;

INSERT ignore INTO `sys_app_version`(`id`, `type`, `versionName`, `versionCode`, `appName`, `createTime`, `downloadUrl`,
                                     `updateLog`)
VALUES (1, 'udi_wms_new', '3.0.6', 306, 'UDI扫码终端', '2023-10-30 18:42:24', 'http://192.168.1.11:9150/udiwms_new.apk',
        '1.单据审核移除UDI码异常提示；2优化多项功能');



CALL Pro_Temp_ColumnWork('basic_product_category', 'deptCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_product_category', 'invCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inPreInBack', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'deptNoInvType', 'tinyint', 1);


INSERT ignore INTO sys_param_config(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`,
                                    `paramType`, `paramExplain`, `updateTime`)
VALUES (20088, 0, '单据详情展示方式', 'order_detail_visible', '1', 0, 0, '1:按DI统一排序2：按扫码或录入时间排序', NULL);

CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'sterBatchNo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_biz', 'sterDate', 'varchar(255)', 1);

CALL Pro_Temp_ColumnWork('io_order_detail_code', 'sterBatchNo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_code', 'sterDate', 'varchar(255)', 1);

CALL Pro_Temp_ColumnWork('io_order_detail_result', 'sterBatchNo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('io_order_detail_result', 'sterDate', 'varchar(255)', 1);


UPDATE `auth_menu`
SET `menu_name`   = '耗材字典维护',
    `parent_id`   = 1644,
    `order_num`   = 1,
    `path`        = 'maintain',
    `component`   = 'basic/product/product',
    `query_param` = '{\"vueRouteSource\":1}',
    `is_frame`    = 1,
    `is_cache`    = 0,
    `menu_type`   = 'C',
    `visible`     = '0',
    `status`      = '0',
    `perms`       = 'basic:product:maintain',
    `icon`        = NULL,
    `create_by`   = '超级用户',
    `create_time` = '2023-01-11 17:02:20',
    `update_by`   = NULL,
    `update_time` = NULL,
    `remark`      = NULL
WHERE `menu_id` = 1646;
UPDATE `auth_menu`
SET `menu_name`   = '产品信息导出',
    `parent_id`   = 1616,
    `order_num`   = 2,
    `path`        = 'basic/product/product',
    `component`   = 'basic/product/product',
    `query_param` = '{\"vueRouteSource\":2}',
    `is_frame`    = 1,
    `is_cache`    = 0,
    `menu_type`   = 'C',
    `visible`     = '0',
    `status`      = '0',
    `perms`       = 'thirdSys:product:export',
    `icon`        = '',
    `create_by`   = '超级用户',
    `create_time` = '2022-12-28 11:30:58',
    `update_by`   = NULL,
    `update_time` = NULL,
    `remark`      = NULL
WHERE `menu_id` = 1618;


CREATE TABLE IF NOT EXISTS `thr_product_type`
(
    `id`       int                                                           NOT NULL,
    `code`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别编码',
    `name`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别名称',
    `thirdSys` varchar(255) 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 '备注',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci
  ROW_FORMAT = Dynamic;

CALL Pro_Temp_ColumnWork('basic_udirel', 'uploadFlag', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'uploadMsg', 'varchar(1024)', 1);

CALL Pro_Temp_ColumnWork('thr_products', 'prcitmcode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('thr_products', 'invCode', 'varchar(255)', 1);


/*
 Navicat Premium Data Transfer

 Source Server         : localhost
 Source Server Type    : MySQL
 Source Server Version : 80021
 Source Host           : localhost:3306
 Source Schema         : udi_wms_ct

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

 Date: 18/01/2024 11:05:42
*/


-- ----------------------------
-- Table structure for basic_sk_prescirbe_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_prescirbe_detail`
(
    `id`           bigint                                                        NOT NULL,
    `relId`        bigint                                                        NULL DEFAULT NULL COMMENT '耗材产品id',
    `thrName`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材名称',
    `thrCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材编码',
    `pId`          bigint                                                        NULL DEFAULT NULL COMMENT '项目组套外键',
    `count`        int                                                           NULL DEFAULT NULL COMMENT '数量',
    `measureCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量数量',
    `measureUnit`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位',
    `category`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别',
    `frequency`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '频率',
    `price`        decimal(10, 2)                                                NULL DEFAULT NULL COMMENT '价格',
    `ggxh`         varchar(255) 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 '备注',
    `createTime`   datetime(0)                                                   NULL DEFAULT NULL,
    `createUser`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `updateTime`   datetime(0)                                                   NULL DEFAULT NULL,
    `updateUser`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '处方用药信息表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for basic_sk_prescribe
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_prescribe`
(
    `code`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '处方编码',
    `sickerCode`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '病人编码',
    `prescribeDate` datetime(0)                                                   NULL DEFAULT NULL COMMENT '开方时间',
    `createDr`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '开方医生',
    `amount`        decimal(16, 4)                                                NULL DEFAULT NULL COMMENT '处方费用',
    `deptCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '就诊科室编码',
    `deptName`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '就诊科室名称',
    `diagnosis`     text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci         NULL COMMENT '诊断内容',
    `remark`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
    `createUser`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
    `createTime`    datetime(0)                                                   NULL DEFAULT NULL COMMENT '创建时间',
    `updateUser`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人',
    `updateTime`    datetime(0)                                                   NULL DEFAULT NULL COMMENT '更新时间',
    `adNum`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    PRIMARY KEY (`code`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '患者处方'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for basic_sk_prescribe_item
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_prescribe_item`
(
    `id`            bigint                                                        NOT NULL,
    `thrId`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '第三方id',
    `sickerCode`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '患者编码',
    `prescribeCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '处方编码',
    `relId`         bigint                                                        NULL DEFAULT NULL COMMENT '耗材产品id',
    `itemName`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '名称',
    `itemCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '编码',
    `measureCount`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量数量',
    `measureUnit`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位',
    `category`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别',
    `frequency`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '频率',
    `count`         int                                                           NULL DEFAULT NULL COMMENT '数量',
    `price`         decimal(16, 4)                                                NULL DEFAULT NULL COMMENT '单价',
    `amount`        decimal(16, 4)                                                NULL DEFAULT NULL COMMENT '总价',
    `ggxh`          varchar(255) 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 '备注',
    `adNum`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '处方用药信息表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for basic_sk_prescribe_item_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_prescribe_item_detail`
(
    `id`            bigint                                                        NOT NULL,
    `pId`           varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `sickerCode`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '患者编码',
    `prescribeCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '处方编码',
    `relId`         bigint                                                        NULL DEFAULT NULL COMMENT '耗材产品id',
    `thrName`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材名称',
    `thrCode`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材编码',
    `measureCount`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量数量',
    `measureUnit`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位',
    `category`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别',
    `frequency`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '频率',
    `count`         int                                                           NULL DEFAULT NULL COMMENT '数量',
    `price`         decimal(16, 4)                                                NULL DEFAULT NULL COMMENT '价格',
    `ggxh`          varchar(255) 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 '备注',
    `nameCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `amount`        decimal(10, 3)                                                NULL DEFAULT NULL,
    `adNum`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `updateTime`    datetime(0)                                                   NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '处方用药信息表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for basic_sk_project
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_project`
(
    `id`         bigint                                                        NOT NULL AUTO_INCREMENT,
    `idCode`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '自定义编码',
    `code`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '项目编码',
    `name`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '项目名称',
    `category`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别',
    `ggxh`       varchar(255) 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 '备注',
    `createTime` datetime(0)                                                   NULL DEFAULT NULL,
    `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `updateTime` datetime(0)                                                   NULL DEFAULT NULL,
    `updateUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `type`       tinyint                                                       NULL DEFAULT NULL COMMENT '类型：1：定数包，内部使用；2：项目、组套外部关联',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  AUTO_INCREMENT = 1726788278562713601
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for basic_sk_project_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_project_detail`
(
    `id`           bigint                                                        NOT NULL,
    `relId`        bigint                                                        NULL DEFAULT NULL COMMENT '耗材产品id',
    `thrName`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材名称',
    `thrCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材编码',
    `pId`          bigint                                                        NULL DEFAULT NULL COMMENT '定数包模板id',
    `count`        int                                                           NULL DEFAULT NULL COMMENT '数量',
    `measureCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量数量',
    `measureUnit`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位',
    `category`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别',
    `frequency`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '频率',
    `price`        decimal(10, 2)                                                NULL DEFAULT NULL COMMENT '价格',
    `ggxh`         varchar(255) 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 '备注',
    `createTime`   datetime(0)                                                   NULL DEFAULT NULL,
    `createUser`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `updateTime`   datetime(0)                                                   NULL DEFAULT NULL,
    `updateUser`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '定数包产品关联表'
  ROW_FORMAT = DYNAMIC;

-- ----------------------------
-- Table structure for basic_sk_sicker
-- ----------------------------
CREATE TABLE IF NOT EXISTS `basic_sk_sicker`
(
    `code`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '患者编码',
    `name`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '姓名',
    `adNum`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '住院号',
    `idNum`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '身份证号',
    `phone`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '手机号',
    `gender`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '性别',
    `job`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '职业',
    `bornDate`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '出生年月',
    `nationality`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '国籍',
    `education`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '文化程度',
    `guardianName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '监护人',
    `guardianRel`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '监护人与患者关系',
    `curAddr`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '现居住地',
    `kosekiAddr`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '户籍地',
    `medicalIns`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '医保',
    `createUser`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
    `createTime`   datetime(0)                                                   NULL DEFAULT NULL COMMENT '创建时间',
    `updateUser`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '更新人',
    `updateTime`   datetime(0)                                                   NULL DEFAULT NULL COMMENT '更新时间',
    `remark`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
    `deptName`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `deptCode`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    PRIMARY KEY (`code`) USING BTREE,
    INDEX `code` (`code`) USING BTREE,
    INDEX `adNum` (`adNum`) USING BTREE,
    INDEX `name` (`name`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '患者信息'
  ROW_FORMAT = DYNAMIC;



CALL Pro_Temp_ColumnWork('basic_sk_prescribe', 'adNum', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe_item', 'adNum', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe_item_detail', 'nameCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe_item_detail', 'amount', 'decimal(10, 3)', 1);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe_item_detail', 'adNum', 'varchar(255)', 1);

CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'vailPrescribe', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'inputSick', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_bussiness_type', 'groupBuySplit', 'tinyint', 1);

CALL Pro_Temp_ColumnWork('io_order', 'sickerAdNum', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe_item_detail', 'pId', 'varchar(255)', 2);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe_item_detail', 'updateTime', 'datetime', 1);


CREATE TABLE IF NOT EXISTS `io_stat_detail`
(
    `id`            int                                                           NOT NULL AUTO_INCREMENT,
    `recordKeyFk`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '汇总记录号',
    `relIdFk`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '物资编码主键',
    `nameCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品DI',
    `productName`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品名称',
    `ggxh`          varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '规格型号',
    `batchNo`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
    `inCount`       int                                                           NULL DEFAULT NULL COMMENT '入库数量',
    `inPrice`       decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '入库价格',
    `inAmount`      decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '入库金额',
    `outCount`      int                                                           NULL DEFAULT NULL COMMENT '出库数量',
    `outPrice`      decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '出库价格',
    `outAmount`     decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '出库金额',
    `balanceCount`  int                                                           NULL DEFAULT NULL COMMENT '结余数量',
    `balancePrice`  decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '结余价格',
    `balanceAmount` decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '结余金额',
    `remark`        varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
    `updateTime`    datetime(0)                                                   NULL DEFAULT NULL COMMENT '更新时间',
    `deptCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门',
    `invCode`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci
  ROW_FORMAT = Dynamic;


CALL Pro_Temp_ColumnWork('io_stat_order', 'startDate', 'datetime', 1);
CALL Pro_Temp_ColumnWork('io_stat_order', 'endDate', 'datetime', 1);
CALL Pro_Temp_ColumnWork('io_stat_order', 'status', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('io_stat_order', 'statType', 'tinyint', 1);

CALL Pro_Temp_ColumnWork('basic_sk_prescribe', 'deptName', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_sk_prescribe', 'deptCode', 'varchar(255)', 1);


CREATE TABLE IF NOT EXISTS `io_order_sk_prescribe`
(
    `id`            bigint                                                        NOT NULL AUTO_INCREMENT,
    `pId`           bigint                                                        NOT NULL COMMENT '项目组套外键',
    `sickerCode`    varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '患者编码',
    `prescribeCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '处方编码',
    `relId`         bigint                                                        NULL DEFAULT NULL COMMENT '耗材产品id',
    `thrName`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材名称',
    `thrCode`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '耗材编码',
    `measureCount`  varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量数量',
    `measureUnit`   varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位',
    `category`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '类别',
    `frequency`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '频率',
    `count`         int                                                           NULL DEFAULT NULL COMMENT '数量',
    `price`         decimal(16, 4)                                                NULL DEFAULT NULL COMMENT '价格',
    `ggxh`          varchar(255) 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 '备注',
    `nameCode`      varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `amount`        decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '总金额',
    `adNum`         varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '住院号',
    `realCount`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际数量',
    `realPrice`     decimal(10, 3)                                                NULL DEFAULT NULL COMMENT '实际价格',
    `orderIdFk`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '订单号外键',
    PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '出库单据处方用药耗材对照'
  ROW_FORMAT = DYNAMIC;


CALL Pro_Temp_ColumnWork('inv_stock_compare_detail', 'price', 'decimal(10, 3)', 1);
CALL Pro_Temp_ColumnWork('inv_stock_compare_detail', 'thrPrice', 'decimal(10, 3)', 1);
CALL Pro_Temp_ColumnWork('inv_stock_compare_detail', 'batchNo', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('inv_stock_compare_detail', 'createTime', 'datetime', 1);
CALL Pro_Temp_ColumnWork('inv_stock_compare_detail', 'updateTime', 'datetime', 1);


update basic_bussiness_type
set inputSick = true
WHERE inputSick is null;


CREATE TABLE IF NOT EXISTS `thr_manufacturer`
(
    `id`         bigint                                                        NOT NULL,
    `unitId`     varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL,
    `spell`      varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL,
    `addr`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `creditNo`   varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL,
    `contact`    varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL,
    `mobile`     varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL,
    `thirdSysFk` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci  NULL DEFAULT NULL,
    `name`       varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
    `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '创建人',
    `createTime` datetime(0)                                                   NULL DEFAULT NULL COMMENT '创建时间',
    `updateUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '更新人',
    `updateTime` datetime(0)                                                   NULL DEFAULT NULL COMMENT '更新时间',
    `remark`     varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT '' COMMENT '备注',
    PRIMARY KEY (`id`) USING BTREE,
    UNIQUE INDEX `unique` (`unitId`, `thirdSysFk`) USING BTREE
) ENGINE = InnoDB
  CHARACTER SET = utf8mb4
  COLLATE = utf8mb4_0900_ai_ci COMMENT = '第三方仓库'
  ROW_FORMAT = DYNAMIC;

SET FOREIGN_KEY_CHECKS = 1;



CALL Pro_Temp_ColumnWork('thr_corp', 'kfdm', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'purType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udirel', 'attributeType', 'tinyint', 1);


INSERT ignore INTO basic_product_set(`id`, `parmName`, `parmKey`, `enable`, `supSelect`, `supAdd`, `localAdd`, `remark`,
                                     `sort`, `localEdit`)
VALUES (33, '采购类型', 'purType', 1, 1, 1, 0, '采购类型是否必填字段', 65, 1);

INSERT ignore INTO sys_param_config(`id`, `parentId`, `paramName`, `paramKey`, `paramValue`, `paramStatus`, `paramType`, `paramExplain`, `updateTime`)
VALUES (20099, 0, '三方出入库明细是否组套', 'inv_set_enable', '0', 1, 0, '0：否；1：是', '2023-12-26 09:26:38');

-- ----------------------------
-- Table structure for thr_inv_order
-- ----------------------------
CREATE TABLE IF NOT EXISTS `thr_inv_order`  (
                                  `id` int(0) NOT NULL AUTO_INCREMENT,
                                  `billNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据号',
                                  `billDate` datetime(0) NULL DEFAULT NULL COMMENT '单据时间',
                                  `startDate` datetime(0) NULL DEFAULT NULL COMMENT '库存开始时间',
                                  `endDate` datetime(0) NULL DEFAULT NULL COMMENT '库存结束时间',
                                  `mainAction` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '出入库类型',
                                  `billType` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '第三方单据类型',
                                  `thirdSysFk` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '外部系统',
                                  `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门编码',
                                  `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码',
                                  `spaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位编码',
                                  `status` tinyint(0) NULL DEFAULT NULL COMMENT '单据状态',
                                  `createTime` datetime(0) NULL DEFAULT NULL COMMENT '创建时间',
                                  `createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人',
                                  `updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
                                  `updateUser` varchar(255) 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 '备注',
                                  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci COMMENT = '库存出入库明细' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Table structure for thr_inv_order_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `thr_inv_order_detail`  (
                                         `id` int(0) NOT NULL AUTO_INCREMENT,
                                         `orderIdFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '单据号',
                                         `cpmctymc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '产品通用名称',
                                         `relId` int(0) NULL DEFAULT NULL COMMENT '物资字典主键',
                                         `thrCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '第三方项目编码/耗材字典',
                                         `nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'DI',
                                         `ggxh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '规格型号',
                                         `batchNo` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '批次号',
                                         `measname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计量单位',
                                         `price` decimal(10, 2) NULL DEFAULT NULL COMMENT '价格',
                                         `productionDate` datetime(0) NULL DEFAULT NULL COMMENT '生产日期',
                                         `expireDate` datetime(0) NULL DEFAULT NULL COMMENT '失效日期',
                                         `ylqxzcrbarmc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '医疗器械注册备案人',
                                         `zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '注册/备案号',
                                         `inCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库数量',
                                         `outCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '出库数量',
                                         `supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商',
                                         `deptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门',
                                         `deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门编码',
                                         `invName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库',
                                         `invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '仓库编码',
                                         `spaceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位',
                                         `spaceName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '货位编码',
                                         `reCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '实际数量',
                                         `mainAction` 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 '生产企业',
                                         `remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '备注',
                                         PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_0900_ai_ci ROW_FORMAT = Dynamic;

INSERT ignore INTO auth_menu(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
VALUES (2086, '出入库明细', 1608, 8, 'thrInvOrder', NULL, NULL, 1, 0, 'M', '0', '0', NULL, '', '超级用户', '2024-02-28 11:47:10', NULL, NULL, NULL);
INSERT ignore INTO auth_menu(`menu_id`, `menu_name`, `parent_id`, `order_num`, `path`, `component`, `query_param`, `is_frame`, `is_cache`, `menu_type`, `visible`, `status`, `perms`, `icon`, `create_by`, `create_time`, `update_by`, `update_time`, `remark`)
VALUES (2087, '出入库查询', 2086, 1, 'thirdSys/invOrder/thrInvOrder', 'thirdSys/invOrder/thrInvOrder', NULL, 1, 0, 'C', '0', '0', 'thirdSys:invOrder:thrInvOrder', NULL, '超级用户', '2024-02-28 11:51:21', NULL, NULL, NULL);
