5-20 三张保养相关表

dev_ksck_axxyy
wangwei 11 months ago
parent 2b74cbd33a
commit 45d8c20e40

@ -515,3 +515,94 @@ ALTER TABLE device_repair
ALTER TABLE device_plan_detail_item
DROP PRIMARY KEY,
ADD PRIMARY KEY (`planId`, `productId`, `itemCode`, `deviceCode`) USING BTREE;
-- Table structure for device_upkeep
-- ----------------------------
CREATE TABLE IF NOT EXISTS `device_upkeep`
(
`taskId` bigint(0) NOT NULL COMMENT '保养任务id',
`planId` bigint(0) NULL DEFAULT NULL COMMENT '计划id',
`planName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '计划名称',
`chargeDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '负责部门编码',
`upkeepUserId` bigint(0) NULL DEFAULT NULL COMMENT '保养人id',
`upkeepUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保养人姓名',
`upkeepUserPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保养人电话',
`deviceCount` int(0) NOT NULL COMMENT '设备数量',
`finishCount` int(0) NOT NULL DEFAULT 0 COMMENT '完成设备数量',
`exceptionCount` int(0) NOT NULL DEFAULT 0 COMMENT '异常数量',
`finishTime` datetime(0) NULL DEFAULT NULL COMMENT '完成时间',
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '任务名称',
`remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '任务备注',
`sysFlag` bit(1) NOT NULL COMMENT '是否系统创建 1/true 是 0/false 否',
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已完成',
`createTime` datetime(0) NOT NULL COMMENT '创建时间',
`createUserId` bigint(0) NULL DEFAULT NULL COMMENT '创建人id',
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '创建人姓名',
`updateTime` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`taskId`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '保养任务表'
ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device_upkeep_detail
-- ----------------------------
CREATE TABLE IF NOT EXISTS `device_upkeep_detail`
(
`taskId` bigint(0) NOT NULL COMMENT '任务id',
`deviceCode` varbinary(255) NOT NULL COMMENT '设备编码',
`deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '部门编码',
`deptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '部门名称',
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已完成 1/true 0/false',
`productId` bigint(0) NOT NULL COMMENT '产品id',
`udi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT 'UDI码',
`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 '批次号',
`serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '序列号',
`productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '生产日期',
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '失效日期',
`manufactory` varchar(255) 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 '计量单位',
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '注册/备案凭证号',
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商ID',
`supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '供应商名称',
`itemCount` int(0) NOT NULL DEFAULT 0 COMMENT '项目数量',
`exceptionCount` int(0) NOT NULL DEFAULT 0 COMMENT '异常数量',
`finishCount` int(0) NOT NULL DEFAULT 0 COMMENT '完成项目数量',
`finishTime` datetime(0) NULL DEFAULT NULL COMMENT '完成时间',
`normalFlag` tinyint(0) NULL DEFAULT NULL COMMENT '保养状态 0异常1.正常',
`livePath` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '现场照片',
`suggestion` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保养建议',
`updateTime` datetime(0) NULL DEFAULT NULL COMMENT '更改时间',
PRIMARY KEY (`taskId`, `deviceCode`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '保养任务明细'
ROW_FORMAT = Dynamic;
-- ----------------------------
-- Table structure for device_upkeep_detail_item
-- ----------------------------
CREATE TABLE IF NOT EXISTS `device_upkeep_detail_item`
(
`taskId` bigint(0) NOT NULL COMMENT '任务id',
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编码',
`itemCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目编码',
`itemName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目名称',
`itemContent` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目内容',
`normalFlag` bit(1) NULL DEFAULT NULL COMMENT '正常标识',
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '完成标识',
`finishTime` datetime(0) NULL DEFAULT NULL COMMENT '完成时间',
`suggestion` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '保养建议',
`upkeepUserId` bigint(0) NULL DEFAULT NULL COMMENT '保养人id',
`upkeepUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保养人姓名',
`upkeepDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保养部门',
`upkeepDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT '保养部门名称',
`updateTime` datetime(0) NULL DEFAULT NULL,
PRIMARY KEY (`taskId`, `deviceCode`, `itemCode`) USING BTREE
) ENGINE = InnoDB
CHARACTER SET = utf8mb4
COLLATE = utf8mb4_0900_ai_ci COMMENT = '设备保养项目'
ROW_FORMAT = Dynamic;

Loading…
Cancel
Save