|
|
|
@ -1045,39 +1045,47 @@ CALL Pro_Temp_ColumnWork('io_code_temp', 'drugLink',
|
|
|
|
|
' tinyint NULL DEFAULT b''0''COMMENT ''药品关联关系是否存在 0不存在 1存在''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `rel_code_batch` (
|
|
|
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`productCode` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '产品编码',
|
|
|
|
|
`subTypeNo` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '类型编码',
|
|
|
|
|
`cascadeRatio` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '包装比例',
|
|
|
|
|
`packageSpec` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '包装规格',
|
|
|
|
|
`comment` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注',
|
|
|
|
|
`batchNo` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号',
|
|
|
|
|
`madeDate` datetime DEFAULT NULL COMMENT '生产日期',
|
|
|
|
|
`validateDate` datetime DEFAULT NULL COMMENT '失效日期',
|
|
|
|
|
`workShop` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产车间',
|
|
|
|
|
`lineName` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产线',
|
|
|
|
|
`lineManager` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '负责人',
|
|
|
|
|
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
`updateUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '更新人',
|
|
|
|
|
`parentCode` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级码',
|
|
|
|
|
`uploadFlagUp` tinyint(1) DEFAULT '0' COMMENT '0 未上传 1已上传 2上传失败',
|
|
|
|
|
`uploadFlagDown` tinyint(1) DEFAULT '0' COMMENT '0 未上传 1已上传 2上传失败',
|
|
|
|
|
`erpId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商ID',
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `rel_code_batch`
|
|
|
|
|
(
|
|
|
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`productCode` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '产品编码',
|
|
|
|
|
`subTypeNo` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '类型编码',
|
|
|
|
|
`cascadeRatio` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '包装比例',
|
|
|
|
|
`packageSpec` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '包装规格',
|
|
|
|
|
`comment` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '备注',
|
|
|
|
|
`batchNo` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号',
|
|
|
|
|
`madeDate` datetime DEFAULT NULL COMMENT '生产日期',
|
|
|
|
|
`validateDate` datetime DEFAULT NULL COMMENT '失效日期',
|
|
|
|
|
`workShop` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产车间',
|
|
|
|
|
`lineName` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产线',
|
|
|
|
|
`lineManager` varchar(40) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '负责人',
|
|
|
|
|
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
`updateUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '更新人',
|
|
|
|
|
`parentCode` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级码',
|
|
|
|
|
`uploadFlagUp` tinyint(1) DEFAULT '0' COMMENT '0 未上传 1已上传 2上传失败',
|
|
|
|
|
`uploadFlagDown` tinyint(1) DEFAULT '0' COMMENT '0 未上传 1已上传 2上传失败',
|
|
|
|
|
`erpId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商ID',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
|
) ENGINE = InnoDB
|
|
|
|
|
AUTO_INCREMENT = 1
|
|
|
|
|
DEFAULT CHARSET = utf8mb4
|
|
|
|
|
COLLATE = utf8mb4_0900_ai_ci;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `rel_code_detail` (
|
|
|
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`curCode` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '当前条码',
|
|
|
|
|
`packLayer` tinyint DEFAULT NULL COMMENT '包装级别',
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `rel_code_detail`
|
|
|
|
|
(
|
|
|
|
|
`id` int NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`curCode` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '当前条码',
|
|
|
|
|
`packLayer` tinyint DEFAULT NULL COMMENT '包装级别',
|
|
|
|
|
`parentCode` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '父级码',
|
|
|
|
|
`flag` tinyint DEFAULT NULL COMMENT '状态',
|
|
|
|
|
`batchIdFk` int DEFAULT NULL COMMENT '产品批次ID外键',
|
|
|
|
|
`flag` tinyint DEFAULT NULL COMMENT '状态',
|
|
|
|
|
`batchIdFk` int DEFAULT NULL COMMENT '产品批次ID外键',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB AUTO_INCREMENT=1 DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_0900_ai_ci;
|
|
|
|
|
) ENGINE = InnoDB
|
|
|
|
|
AUTO_INCREMENT = 1
|
|
|
|
|
DEFAULT CHARSET = utf8mb4
|
|
|
|
|
COLLATE = utf8mb4_0900_ai_ci;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE if not exists `third_ali_drug`
|
|
|
|
@ -1164,7 +1172,13 @@ CALL Pro_Temp_ColumnWork('rel_code_batch', 'threeLevelCount',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('third_ali_drug', 'erpId',
|
|
|
|
|
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''供应商ID''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('third_ali_drug', 'approvalNum',
|
|
|
|
|
' varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT ''批准文号''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
call Modify_index('third_ali_drug', 'approvalNum', 'approvalNum', 'BTREE');
|