|
|
|
@ -1,3 +1,47 @@
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `base_customer`;
|
|
|
|
|
CREATE TABLE `base_customer` (
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '客户编码',
|
|
|
|
|
`brief` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '客户简称',
|
|
|
|
|
`name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '客户全称',
|
|
|
|
|
`industry` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '所属行业',
|
|
|
|
|
`level` tinyint(1) NOT NULL COMMENT '客户级别.字典',
|
|
|
|
|
`user_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人ID,对应用户ID',
|
|
|
|
|
`desc` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '备注',
|
|
|
|
|
|
|
|
|
|
`contact1_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名1姓名',
|
|
|
|
|
`contact1_post` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名1岗位',
|
|
|
|
|
`contact1_method` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名1方法',
|
|
|
|
|
`contact1_email` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名1邮箱',
|
|
|
|
|
`contact1_addr1` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名1地址',
|
|
|
|
|
|
|
|
|
|
`contact2_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名2姓名',
|
|
|
|
|
`contact2_post` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名2岗位',
|
|
|
|
|
`contact2_method` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名2方法',
|
|
|
|
|
`contact2_email` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名2邮箱',
|
|
|
|
|
`contact1_addr2` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名2地址',
|
|
|
|
|
|
|
|
|
|
`contact3_name` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名3姓名',
|
|
|
|
|
`contact3_post` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名3岗位',
|
|
|
|
|
`contact3_method` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名3方法',
|
|
|
|
|
`contact3_email` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名3邮箱',
|
|
|
|
|
`contact1_addr3` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人姓名3地址',
|
|
|
|
|
|
|
|
|
|
`status` tinyint(1) NOT NULL COMMENT '状态,1 表示正常,2 表示禁用',
|
|
|
|
|
|
|
|
|
|
`deleted` bit(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1.是,0.否',
|
|
|
|
|
`creator` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '记录的创建人,对应员工表中的 Id',
|
|
|
|
|
`create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间',
|
|
|
|
|
`updater` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '记录的修改人,对应员工表中的 Id',
|
|
|
|
|
`update_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP ON UPDATE CURRENT_TIMESTAMP COMMENT '更新时间',
|
|
|
|
|
`tenant_id` bigint(20) NOT NULL COMMENT '租户编号',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '客户新表' ROW_FORMAT = Dynamic;
|
|
|
|
|
|
|
|
|
|
SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
DROP TABLE IF EXISTS `base_client`;
|
|
|
|
|
CREATE TABLE `base_client` (
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '自增字段,唯一',
|
|
|
|
@ -214,7 +258,7 @@ SET FOREIGN_KEY_CHECKS = 0;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_wh`;
|
|
|
|
|
CREATE TABLE `wms_wh` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wh_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '仓库编号,唯一',
|
|
|
|
|
`wh_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '仓库名称,唯一',
|
|
|
|
|
`contact` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '联系人',
|
|
|
|
@ -235,7 +279,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_rg`;
|
|
|
|
|
CREATE TABLE `wms_rg` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`rg_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '库区编号,唯一',
|
|
|
|
|
`rg_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '库区名称,唯一',
|
|
|
|
|
`wh_id` bigint(19) NOT NULL COMMENT '仓库 Id,对应 wms_wh 表中的Id',
|
|
|
|
@ -256,7 +300,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_pn`;
|
|
|
|
|
CREATE TABLE `wms_pn` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`pn_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '库位编号,唯一',
|
|
|
|
|
`pn_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '库位名称,唯一',
|
|
|
|
|
`rg_id` bigint(19) NOT NULL COMMENT '库区 Id,对应 wms_rg 表中的Id',
|
|
|
|
@ -279,7 +323,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_check_m_plan`;
|
|
|
|
|
CREATE TABLE `wms_check_m_plan` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`plan_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '编号,唯一',
|
|
|
|
|
`plan_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称,唯一',
|
|
|
|
|
`part_scope` char(1) NOT NULL DEFAULT 'N' COMMENT '只能填写 Y 或者 N,Y 表示包含零库存物料,N 则反之,默认值是 N',
|
|
|
|
@ -305,7 +349,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_check_d_plan`;
|
|
|
|
|
CREATE TABLE `wms_check_d_plan` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`plan_id` bigint(19) NOT NULL COMMENT '盘点计划 Id,对应wms_check_m_plan 表中的 Id',
|
|
|
|
|
`wh_id` bigint(19) NOT NULL COMMENT '仓库 Id,对应 wms_wh 表中的Id 列',
|
|
|
|
|
`d_plan_status` tinyint NOT NULL COMMENT '状态,1 表示正常,2 表示禁用',
|
|
|
|
@ -325,7 +369,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_check_op`;
|
|
|
|
|
CREATE TABLE `wms_check_op` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`plan_id` bigint(19) NOT NULL COMMENT '盘点计划 Id,对应wms_check_m_plan 表中的 Id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '物料 Id,对应 sys_part 表中的 Id',
|
|
|
|
|
`lot_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品批号',
|
|
|
|
@ -351,7 +395,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_temp_recv`;
|
|
|
|
|
CREATE TABLE `wms_temp_recv` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 表中的 Id 列',
|
|
|
|
|
`lot_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品批号',
|
|
|
|
|
`recv_qty` bigint NOT NULL COMMENT '接收的数量',
|
|
|
|
@ -376,7 +420,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_storage`;
|
|
|
|
|
CREATE TABLE `wms_storage` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 表中的 Id 列',
|
|
|
|
|
`lot_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品批号',
|
|
|
|
|
`wh_id` bigint(19) NOT NULL COMMENT '仓库 Id,对应 wms_wh 表中的Id',
|
|
|
|
@ -401,7 +445,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_storage_log`;
|
|
|
|
|
CREATE TABLE `wms_storage_log` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 表中的 Id 列',
|
|
|
|
|
`lot_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品批号',
|
|
|
|
|
`wh_id` bigint(19) NOT NULL COMMENT '仓库 Id,对应 wms_wh 表中的Id',
|
|
|
|
@ -426,7 +470,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `wms_deliver_part`;
|
|
|
|
|
CREATE TABLE `wms_deliver_part` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`so_id` bigint(19) NOT NULL COMMENT '销售订单 Id,对应 int_m_so中 Id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 表中的 Id 列',
|
|
|
|
|
`lot_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品批号',
|
|
|
|
@ -450,7 +494,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_plan`;
|
|
|
|
|
CREATE TABLE `pro_plan` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`plan_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '生产计划编号',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 表中的 Id 列',
|
|
|
|
|
`plan_qty` int(11) NOT NULL COMMENT '计划数量',
|
|
|
|
@ -484,7 +528,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_wo`;
|
|
|
|
|
CREATE TABLE `pro_wo` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '生产工单编号',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 表中的 Id 列',
|
|
|
|
|
`plan_qty` int(11) NOT NULL COMMENT '计划数量',
|
|
|
|
@ -520,7 +564,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_wo_sn`;
|
|
|
|
|
CREATE TABLE `pro_wo_sn` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`seq` int(11) NOT NULL COMMENT '条码顺序号,每张工单的条码顺序号从 1 开始编号,最大值等于工单的计划数量',
|
|
|
|
|
`barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品条码',
|
|
|
|
@ -540,7 +584,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_issue_part`;
|
|
|
|
|
CREATE TABLE `pro_issue_part` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`line_id` bigint(19) NOT NULL COMMENT '生产线 Id,对应 sys_line 中的 Id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '物料 Id,对应 sys_part 中的Id 列',
|
|
|
|
@ -565,7 +609,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_put_in_storage`;
|
|
|
|
|
CREATE TABLE `pro_put_in_storage` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`line_id` bigint(19) NOT NULL COMMENT '生产线 Id,对应 sys_line 中的 Id,生产入库的时候必须填写,委外入库的时候填写null',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '物料 Id,对应 sys_part 中的Id 列',
|
|
|
|
@ -590,7 +634,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_piece_status`;
|
|
|
|
|
CREATE TABLE `pro_piece_status` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`route_id` bigint(19) NOT NULL COMMENT '工艺路线 Id,对应 sys_m_route中的Id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '物料 Id,对应 sys_part 中的Id 列',
|
|
|
|
@ -615,7 +659,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_piece_status_log`;
|
|
|
|
|
CREATE TABLE `pro_piece_status_log` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`route_id` bigint(19) NOT NULL COMMENT '工艺路线 Id,对应 sys_m_route中的Id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '物料 Id,对应 sys_part 中的Id 列',
|
|
|
|
@ -641,7 +685,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_piece_count`;
|
|
|
|
|
CREATE TABLE `pro_piece_count` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '物料 Id,对应 sys_part 中的Id 列',
|
|
|
|
|
`line_id` bigint(19) NOT NULL COMMENT '生产线 Id,对应 sys_line 中的 Id',
|
|
|
|
@ -673,7 +717,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_temp_kpsn`;
|
|
|
|
|
CREATE TABLE `pro_temp_kpsn` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品条码',
|
|
|
|
|
`kp_ barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '原材料条码',
|
|
|
|
|
`tn_id` bigint(19) NOT NULL COMMENT '工位 Id,对应 sys_tn 中的 Id',
|
|
|
|
@ -693,7 +737,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_assy_kpsn`;
|
|
|
|
|
CREATE TABLE `pro_assy_kpsn` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '产品条码',
|
|
|
|
|
`kp_ barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '原材料条码',
|
|
|
|
|
`tn_id` bigint(19) NOT NULL COMMENT '工位 Id,对应 sys_tn 中的 Id',
|
|
|
|
@ -712,7 +756,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_report_work`;
|
|
|
|
|
CREATE TABLE `pro_report_work` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '工单 Id,对应 pro_wo 表中的Id 列',
|
|
|
|
|
`lot_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '物料批号',
|
|
|
|
|
`work_date` date NOT NULL COMMENT '生产日期(日期部分)',
|
|
|
|
@ -737,7 +781,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_pack_m_data`;
|
|
|
|
|
CREATE TABLE `pro_pack_m_data` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`carton_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '箱号',
|
|
|
|
|
`carton_close_flag` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '箱子是否关闭,Y 表示关闭,N 表示未关闭,默认是 N',
|
|
|
|
|
`deleted` bit(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1.是,0.否',
|
|
|
|
@ -755,7 +799,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `pro_pack_d_data`;
|
|
|
|
|
CREATE TABLE `pro_pack_d_data` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`wo_id` bigint(19) NOT NULL COMMENT '生产工单 Id',
|
|
|
|
|
`barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品条码',
|
|
|
|
|
`carton_no` tinyint(19) NOT NULL COMMENT '箱号',
|
|
|
|
@ -775,7 +819,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `qms_sys_check_item`;
|
|
|
|
|
CREATE TABLE `qms_sys_check_item` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`check_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检验项编号',
|
|
|
|
|
`check_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '检验项名称,唯一',
|
|
|
|
|
`check_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型,只能填写功能或者外观',
|
|
|
|
@ -801,7 +845,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `qms_sys_m_check`;
|
|
|
|
|
CREATE TABLE `qms_sys_m_check` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`part_id` bigint(19) NOT NULL COMMENT '成品 Id,对应 sys_part 中的id 列',
|
|
|
|
|
`check_type` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '类型,只能填写功能或者外观',
|
|
|
|
|
`check_status` tinyint(1) NOT NULL COMMENT '状态,1 表示正常,2 表示作废',
|
|
|
|
@ -820,7 +864,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `qms_sys_d_check`;
|
|
|
|
|
CREATE TABLE `qms_sys_d_check` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`check_id` bigint(19) NOT NULL COMMENT '对应 qms_sys_m_check 中的id 列',
|
|
|
|
|
`ps_id` bigint(19) NOT NULL COMMENT '工序 Id,对应 sys_ps 中的 id',
|
|
|
|
|
`check_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '检验项编号观',
|
|
|
|
@ -848,7 +892,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `qms_m_check`;
|
|
|
|
|
CREATE TABLE `qms_m_check` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`barcode` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品条码',
|
|
|
|
|
`ps_id` bigint(19) NOT NULL COMMENT '工序 Id,对应 sys_ps 中的 id',
|
|
|
|
|
`check_result` char(1) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '检验结果,Y 表示合格,N 表示不合格',
|
|
|
|
@ -868,7 +912,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `qms_d_check`;
|
|
|
|
|
CREATE TABLE `qms_d_check` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`check_result_id` bigint(19) NOT NULL COMMENT '对应 qms_m_check 中的 id 列',
|
|
|
|
|
`check_id` bigint(19) NOT NULL COMMENT '对应 qms_sys_m_check 中的id 列',
|
|
|
|
|
`ps_id` bigint(19) NOT NULL COMMENT '工序 Id,对应 sys_ps 中的 id',
|
|
|
|
@ -898,7 +942,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `eqt_type`;
|
|
|
|
|
CREATE TABLE `eqt_type` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`type_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备类型编号,唯一',
|
|
|
|
|
`type_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备类型名称,唯一',
|
|
|
|
|
`eqt_status` tinyint(1) NOT NULL COMMENT '状态,1 表示正常,2 表示报废,3 表示设备暂时不可用',
|
|
|
|
@ -920,7 +964,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `eqt_type_mtn_item`;
|
|
|
|
|
CREATE TABLE `eqt_type_mtn_item` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`eqt_type` bigint(20) NOT NULL COMMENT '设备类型 Id,对应表eqt_type 的 Id 列',
|
|
|
|
|
`mtn_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备保养项目编号,唯一',
|
|
|
|
|
`mtn_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备保养项目名称,唯一',
|
|
|
|
@ -941,7 +985,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `eqt_base`;
|
|
|
|
|
CREATE TABLE `eqt_base` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`eqt_type` bigint(20) NOT NULL COMMENT '设备类型 Id,对应表eqt_type 的 Id 列',
|
|
|
|
|
`eqt_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '设备编号,唯一',
|
|
|
|
|
`eqt_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '设备名称',
|
|
|
|
@ -964,7 +1008,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `int_m_po`;
|
|
|
|
|
CREATE TABLE `int_m_po` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`po_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '采购单号,唯一',
|
|
|
|
|
`po_status` tinyint(1) NULL DEFAULT 1 COMMENT '状态,1 表示正常,2 表示作废',
|
|
|
|
|
`deleted` bit(1) NOT NULL DEFAULT 0 COMMENT '逻辑删除 1.是,0.否',
|
|
|
|
@ -982,7 +1026,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `int_d_po`;
|
|
|
|
|
CREATE TABLE `int_d_po` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`po_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '采购单号,唯一',
|
|
|
|
|
`po_item` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '采购单项次',
|
|
|
|
|
`part_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '物料编码',
|
|
|
|
@ -1002,7 +1046,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `int_m_so`;
|
|
|
|
|
CREATE TABLE `int_m_so` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`so_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '销售订单号,唯一',
|
|
|
|
|
`so_status` tinyint NULL DEFAULT null COMMENT '状态,1 表示正常,2 表示作废',
|
|
|
|
|
`customer_id` bigint NULL DEFAULT null COMMENT '客户 Id,对应 sys_customer',
|
|
|
|
@ -1021,7 +1065,7 @@ SET FOREIGN_KEY_CHECKS = 1;
|
|
|
|
|
-- ----------------------------
|
|
|
|
|
DROP TABLE IF EXISTS `int_d_so`;
|
|
|
|
|
CREATE TABLE `int_d_so` (
|
|
|
|
|
`id` bigint(19) NOT NULL COMMENT '主键id',
|
|
|
|
|
`id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id',
|
|
|
|
|
`so_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '销售订单号',
|
|
|
|
|
`so_item` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '销售订单项次',
|
|
|
|
|
`part_no` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '产品编码',
|
|
|
|
|