/*
 Navicat Premium Data Transfer

 Source Server         : dockerMySql
 Source Server Type    : MySQL
 Source Server Version : 50744
 Source Host           : 127.0.0.1:3306
 Source Schema         : cv

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

 Date: 09/03/2026 13:09:19
*/

SET NAMES utf8mb4;
SET FOREIGN_KEY_CHECKS = 0;

-- ----------------------------
-- Table structure for cv_devp
-- ----------------------------
DROP TABLE IF EXISTS `cv_devp`;
CREATE TABLE `cv_devp`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `dev_no` int(11) NULL DEFAULT NULL COMMENT '编号',
  `dec_desc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '设备描述',
  `in_enable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '可入',
  `out_enable` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '可出',
  `autoing` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '自动',
  `loading` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '有物',
  `canining` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '能入',
  `canouting` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '能出',
  `wrk_no` int(11) NULL DEFAULT NULL COMMENT '工作号',
  `barcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条形码',
  `loc_type` smallint(6) NULL DEFAULT NULL COMMENT '库位类型',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '设备表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_devp
-- ----------------------------
INSERT INTO `cv_devp` VALUES (1, 1001, NULL, 'Y', 'N', 'Y', 'N', 'Y', 'Y', 0, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (2, 1002, NULL, 'Y', 'N', 'Y', 'N', 'Y', 'Y', 0, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (3, 1003, NULL, 'Y', 'N', 'Y', 'N', 'Y', 'Y', 0, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (4, 1004, NULL, 'Y', 'N', 'Y', 'Y', 'Y', 'Y', 0, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (5, 1005, NULL, 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 14, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (6, 1006, NULL, 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 13, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (7, 1007, NULL, 'N', 'Y', 'Y', 'Y', 'Y', 'Y', 9, NULL, 1, 1, 0, NULL, NULL, '2026-03-04 10:30:55', NULL, '2026-03-05 14:57:11', NULL);
INSERT INTO `cv_devp` VALUES (8, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_devp` VALUES (9, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for cv_job
-- ----------------------------
DROP TABLE IF EXISTS `cv_job`;
CREATE TABLE `cv_job`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `task_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务号',
  `barcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条形码',
  `batch_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号',
  `sta_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点号',
  `loc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库位号',
  `job_no` int(11) NULL DEFAULT NULL COMMENT '工作号',
  `job_sts` int(11) NULL DEFAULT NULL COMMENT '工作状态',
  `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `wms_time` datetime NULL DEFAULT NULL COMMENT '入库时间',
  `rcs_time` datetime NULL DEFAULT NULL COMMENT '任务发生时间',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 14 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_job
-- ----------------------------
INSERT INTO `cv_job` VALUES (7, 'TK2603054400', NULL, NULL, NULL, NULL, 8, 2, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job` VALUES (8, 'TK2603054408', '00000011', 'TK2603054408', '1007', 'A102900101', 9, 7, '2026-03-05 13:55:03', '2026-03-05 13:55:01', '2026-03-05 13:55:09', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job` VALUES (9, 'TK2603054404', NULL, NULL, NULL, NULL, 10, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '模拟按按钮');
INSERT INTO `cv_job` VALUES (10, 'TK2603054405', NULL, NULL, NULL, NULL, 11, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '模拟按按钮');
INSERT INTO `cv_job` VALUES (11, 'TK2603054406', NULL, NULL, NULL, NULL, 12, 3, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '模拟按按钮');
INSERT INTO `cv_job` VALUES (12, 'TK2603054409', '00000006', 'TK2603054409', '1007', 'A102400201', 13, 5, '2026-03-05 14:07:16', '2026-03-05 14:07:15', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job` VALUES (13, 'TK2603054410', '00000005', 'TK2603054410', '1007', 'A102500201', 14, 5, '2026-03-05 14:14:19', '2026-03-05 14:09:20', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for cv_job_log
-- ----------------------------
DROP TABLE IF EXISTS `cv_job_log`;
CREATE TABLE `cv_job_log`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `task_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '任务号',
  `barcode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '条形码',
  `batch_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '批次号',
  `sta_no` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '站点号',
  `loc` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '库位号',
  `job_no` int(11) NULL DEFAULT NULL COMMENT '工作号',
  `job_sts` int(11) NULL DEFAULT NULL COMMENT '工作状态',
  `start_time` datetime NULL DEFAULT NULL COMMENT '开始时间',
  `wms_time` datetime NULL DEFAULT NULL COMMENT '入库时间',
  `rcs_time` datetime NULL DEFAULT NULL COMMENT '任务发生时间',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 7 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '任务日志表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_job_log
-- ----------------------------
INSERT INTO `cv_job_log` VALUES (1, 'TK2603054397', '00000006', 'TK2603054397', '1007', 'A103200101', 2, 8, '2026-03-05 13:21:57', '2026-03-05 13:21:55', '2026-03-05 13:22:03', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job_log` VALUES (2, 'TK2603054398', '00000011', 'TK2603054398', '1007', 'A102900101', 3, 8, '2026-03-05 13:36:45', '2026-03-05 13:36:43', '2026-03-05 13:36:50', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job_log` VALUES (3, 'TK2603054399', '00000006', 'TK2603054399', '1007', 'A102400201', 4, 8, '2026-03-05 13:37:25', '2026-03-05 13:37:23', '2026-03-05 13:37:31', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job_log` VALUES (4, 'TK2603054401', '00000009', 'TK2603054401', '1007', 'A102500201', 5, 8, '2026-03-05 13:43:49', '2026-03-05 13:43:47', '2026-03-05 13:43:55', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job_log` VALUES (5, 'TK2603054402', '00000005', 'TK2603054402', '1007', 'A102600201', 6, 8, '2026-03-05 13:43:55', '2026-03-05 13:43:53', '2026-03-05 13:44:13', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);
INSERT INTO `cv_job_log` VALUES (6, 'TK2603054403', '00000012', 'TK2603054403', '1007', 'A102700201', 7, 8, '2026-03-05 13:44:14', '2026-03-05 13:44:01', '2026-03-05 13:46:10', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL);

-- ----------------------------
-- Table structure for cv_work_lastno
-- ----------------------------
DROP TABLE IF EXISTS `cv_work_lastno`;
CREATE TABLE `cv_work_lastno`  (
  `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'ID',
  `type` int(11) NULL DEFAULT NULL COMMENT '类型',
  `wrk_no` int(11) NULL DEFAULT NULL COMMENT '当前工作号',
  `s_no` int(11) NULL DEFAULT NULL COMMENT '起始ID',
  `e_no` int(11) NULL DEFAULT NULL COMMENT '终止ID',
  `status` int(11) NULL DEFAULT NULL COMMENT '状态 1:正常 0:冻结',
  `deleted` int(11) NULL DEFAULT NULL COMMENT '是否删除 1:是 0:否',
  `tenant_id` bigint(20) NULL DEFAULT NULL COMMENT '租户',
  `create_by` bigint(20) NULL DEFAULT NULL COMMENT '添加人员',
  `create_time` datetime NULL DEFAULT NULL COMMENT '添加时间',
  `update_by` bigint(20) NULL DEFAULT NULL COMMENT '修改人员',
  `update_time` datetime NULL DEFAULT NULL COMMENT '修改时间',
  `memo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注',
  PRIMARY KEY (`id`) USING BTREE
) ENGINE = InnoDB AUTO_INCREMENT = 2 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '工作号维护表' ROW_FORMAT = Dynamic;

-- ----------------------------
-- Records of cv_work_lastno
-- ----------------------------
INSERT INTO `cv_work_lastno` VALUES (1, 1, 14, 1, 8999, 1, 0, NULL, NULL, NULL, NULL, NULL, NULL);

SET FOREIGN_KEY_CHECKS = 1;
