You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
udi-cpt-java/src/main/resources/schemas/schema_v2.1.sql

165 lines
11 KiB
MySQL

# 字段新增 表名字段名字段类型修改方式1新增2修改3删除
CALL Pro_Temp_ColumnWork('basic_udi_rel', 'companyType', 'tinyint', 1);
2 years ago
CALL Pro_Temp_ColumnWork('user_register', 'name', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('user_register', 'tel', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('user_register', 'qq', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('user_register', 'weChat', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('user_register', 'xemail', 'varchar(255)', 1);
2 years ago
-- CALL Pro_Temp_ColumnWork('user_company', 'reason', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('user_register', 'fmobile', 'varchar(255)', 1);
2 years ago
2 years ago
CALL Pro_Temp_ColumnWork('trace_order', 'recordCode', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('trace_order', 'count', 'int', 1);
CALL Pro_Temp_ColumnWork('trace_order', 'invCount', 'int', 1);
CALL Pro_Temp_ColumnWork('trace_product_record', 'companyIdFk', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('sup_cert', 'companyIdFk', 'bigInt', 1);
2 years ago
CALL Pro_Temp_ColumnWork('basic_udi_product', 'categoryLevel', 'varchar(255)', 1);
CALL Pro_Temp_ColumnWork('basic_udi_product', 'groupBuy', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udi_product', 'chsType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udi_product', 'importType', 'tinyint', 1);
CALL Pro_Temp_ColumnWork('basic_udi_product', 'purchaseType', 'tinyint', 1);
2 years ago
/*
Navicat Premium Data Transfer
Source Server : localhost
Source Server Type : MySQL
Source Server Version : 80021
Source Host : localhost:3306
Source Schema : udi_cpt2
Target Server Type : MySQL
Target Server Version : 80021
File Encoding : 65001
Date: 11/01/2024 09:23:13
*/
SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;
-- ----------------------------
-- Table structure for io_stat_month
-- ----------------------------
CREATE TABLE IF NOT EXISTS `io_stat_month`
(
`id` int NOT NULL AUTO_INCREMENT,
`recordKeyFk` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '汇总记录号',
`year` int NULL DEFAULT NULL COMMENT '年度',
`quarter` tinyint NULL DEFAULT NULL COMMENT '季度',
`month` tinyint 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 '批次号',
`beginCount` int NULL DEFAULT NULL COMMENT '期初数量',
`beginPrice` decimal(10, 2) NULL DEFAULT NULL COMMENT '期初价格',
`beginAmount` decimal(10, 2) NULL DEFAULT NULL COMMENT '期初金额',
`inCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '入库数量',
`inPrice` decimal(10, 2) NULL DEFAULT NULL COMMENT '入库价格',
`inAmount` 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 '出库数量',
`outPrice` decimal(10, 2) NULL DEFAULT NULL COMMENT '出库价格',
`outAmount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '出库金额',
`balanceCount` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '结余数量',
`balancePrice` decimal(10, 2) NULL DEFAULT NULL COMMENT '结余价格',
`balanceAmount` 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 '备注',
`updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`invCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`companyIdFk` bigint NULL DEFAULT NULL,
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
`ylqxzcrbarmc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
AUTO_INCREMENT = 15
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci
ROW_FORMAT = DYNAMIC;
-- ----------------------------
-- Table structure for io_stat_order
-- ----------------------------
CREATE TABLE IF NOT EXISTS `io_stat_order`
(
`id` int NOT NULL AUTO_INCREMENT,
`recordKey` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '记录号',
`date` datetime(0) NULL DEFAULT NULL COMMENT '生成时间',
`type` tinyint NULL DEFAULT NULL COMMENT '1:年2.季度345.自定义',
`updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`title` 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 '备注',
`invCode` 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,
`startDate` datetime(0) NULL DEFAULT NULL COMMENT '汇总开始时间',
`endDate` datetime(0) NULL DEFAULT NULL COMMENT '汇总结束时间',
`status` tinyint NULL DEFAULT NULL COMMENT '汇总状态1已完成2.生成中3生成失败',
`statType` tinyint NULL DEFAULT NULL,
`companyIdFk` bigint NULL DEFAULT NULL COMMENT '所属企业ID',
`createUser` 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;
SET FOREIGN_KEY_CHECKS = 1;
CREATE TABLE IF NOT EXISTS `io_stat_set`
(
`id` int NOT NULL AUTO_INCREMENT COMMENT '上报频率',
`code` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上报设置编号',
`title` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '上报设置标题',
`startDate` datetime(0) NULL DEFAULT NULL COMMENT '开始执行时间',
`endDate` datetime(0) NULL DEFAULT NULL COMMENT '结束执行时间',
`frequency` int 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 '创建时间',
`updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更新时间',
`updateUser` datetime(0) 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 COMMENT = '重点品种上报设置表'
ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for io_stat_set_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `io_stat_set_detail`
(
`id` int NOT NULL AUTO_INCREMENT,
`cpmctymc` 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 '规格型号',
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '注册/备案号',
`ylqxzcrbarmc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '医疗器械注册人',
`bussinessType` tinyint NULL DEFAULT NULL COMMENT '企业类型',
`companyName` 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/产品标识',
`provinceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '',
`cityCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '',
`areaCode` 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,
PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '重点品种上报设置明细表'
ROW_FORMAT = Dynamic;
2 years ago