|
|
|
|
# # 字段新增 (表名,字段名,字段类型,修改方式(1:新增,2:修改,3:删除)
|
|
|
|
|
#
|
|
|
|
|
#
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_info` (
|
|
|
|
|
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编码',
|
|
|
|
|
`deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '部门编码',
|
|
|
|
|
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '1.正常,2变更归属中,3.维修申请中 4.维修中 6.销毁/报废',
|
|
|
|
|
`checkLock` bit(1) NOT NULL DEFAULT b'0' COMMENT '巡检锁定',
|
|
|
|
|
`udi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'UDI码',
|
|
|
|
|
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'DI码',
|
|
|
|
|
`productId` bigint NOT NULL COMMENT '产品id',
|
|
|
|
|
`productName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '产品名称',
|
|
|
|
|
`ggxh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '规格型号',
|
|
|
|
|
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号',
|
|
|
|
|
`serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '序列号',
|
|
|
|
|
`productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产日期',
|
|
|
|
|
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '失效日期',
|
|
|
|
|
`manufactory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产厂家',
|
|
|
|
|
`measname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '计量单位',
|
|
|
|
|
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '注册/备案凭证号',
|
|
|
|
|
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商ID',
|
|
|
|
|
`supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商名称',
|
|
|
|
|
`changeCount` int NOT NULL DEFAULT '0' COMMENT '变更次数',
|
|
|
|
|
`repairApplyCount` int NOT NULL DEFAULT '0' COMMENT '报修次数',
|
|
|
|
|
`repairCount` int NOT NULL DEFAULT '0' COMMENT '维修次数',
|
|
|
|
|
`checkCount` int NOT NULL DEFAULT '0' COMMENT '巡检次数',
|
|
|
|
|
`lastChangeOrderId` bigint NOT NULL COMMENT '最后变更单号',
|
|
|
|
|
`lastRepairApplyId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后报修申请单号',
|
|
|
|
|
`lastRepairApplyTime` datetime DEFAULT NULL COMMENT '最后报修时间',
|
|
|
|
|
`lastRepairId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后维修单号',
|
|
|
|
|
`lastRepairUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后维修负责人名称',
|
|
|
|
|
`lastRepairUserPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后维修人联系电话',
|
|
|
|
|
`lastRepairTime` datetime DEFAULT NULL COMMENT '最后维修时间',
|
|
|
|
|
`lastCheckUserId` bigint DEFAULT NULL COMMENT '最后检查/巡检负责人',
|
|
|
|
|
`lastCheckUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后检查/巡检负责人名称',
|
|
|
|
|
`lastCheckPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '最后检查/巡检人联系电话',
|
|
|
|
|
`lastCheckTime` datetime DEFAULT NULL COMMENT '最后检查/巡检时间',
|
|
|
|
|
`lastCheckTaskId` bigint DEFAULT NULL COMMENT '最后检查/巡检任务id',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '创建时间',
|
|
|
|
|
`createUserId` bigint NOT NULL COMMENT '创建人id',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人名称',
|
|
|
|
|
`assetType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '资产分类',
|
|
|
|
|
`sasacType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '国资分类',
|
|
|
|
|
`assetMnemonicCode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '资产助记码',
|
|
|
|
|
`number` int DEFAULT '1' COMMENT '数量',
|
|
|
|
|
`acquisitionMethod` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '取得方式',
|
|
|
|
|
`purpose` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '用途',
|
|
|
|
|
`depreciationYear` int(10) unsigned zerofill DEFAULT NULL COMMENT '折旧年',
|
|
|
|
|
`depreciationMonth` int(10) unsigned zerofill DEFAULT NULL COMMENT '折旧月',
|
|
|
|
|
`invCode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '存储仓库',
|
|
|
|
|
`estimatedTotalHour` int(10) unsigned zerofill DEFAULT NULL COMMENT '预计总工时',
|
|
|
|
|
`dayHour` int(10) unsigned zerofill DEFAULT NULL COMMENT '单日工时',
|
|
|
|
|
`assetValue` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '单个资产价值',
|
|
|
|
|
`ownFund` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '自有资金',
|
|
|
|
|
`financialAppropriation` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '财政拨款',
|
|
|
|
|
`educationFund` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '科教基金',
|
|
|
|
|
`otherFund` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '其他资金',
|
|
|
|
|
`nonPeerFinancialAppropriation` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '非同级财政拨款',
|
|
|
|
|
`ybbm` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '医疗器械分类编码',
|
|
|
|
|
`catalogname1` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '一级分类名称(学科,品名)',
|
|
|
|
|
`catalogname2` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '二级分类名称(用途、品目)',
|
|
|
|
|
`catalogname3` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '三级分类名称(部位、功能、品种)',
|
|
|
|
|
`catalogCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '编码',
|
|
|
|
|
`catalogCode1` bigint DEFAULT NULL COMMENT '一级分类名称(学科,品名)',
|
|
|
|
|
`catalogCode2` bigint DEFAULT NULL COMMENT '二级分类名称(用途、品目)',
|
|
|
|
|
`catalogCode3` bigint DEFAULT NULL COMMENT '三级分类名称(部位、功能、品种)',
|
|
|
|
|
`managementCategory` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '管理类别',
|
|
|
|
|
`endUser` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '使用人',
|
|
|
|
|
`estimatedResidualValue` decimal(10,2) unsigned zerofill DEFAULT NULL COMMENT '预计残值',
|
|
|
|
|
`currencyType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '币种',
|
|
|
|
|
`purType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '采购类型',
|
|
|
|
|
`purchaseDate` date DEFAULT NULL COMMENT '购置日期',
|
|
|
|
|
`addDate` date DEFAULT NULL COMMENT '添加日期',
|
|
|
|
|
`assetName` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '资产品名',
|
|
|
|
|
`isImperative` bigint DEFAULT NULL COMMENT '是否强检',
|
|
|
|
|
`isMaintain` bigint DEFAULT NULL COMMENT '是否保养',
|
|
|
|
|
`imperativeCycle` bigint DEFAULT NULL COMMENT '检定周期(月)',
|
|
|
|
|
`maintainCycle` bigint DEFAULT NULL COMMENT '保养周期(月)',
|
|
|
|
|
`startImperativeDate` date DEFAULT NULL COMMENT '开始检定日期',
|
|
|
|
|
`startMaintainDate` date DEFAULT NULL COMMENT '开始保养日期',
|
|
|
|
|
`serviceType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修组',
|
|
|
|
|
`maintainType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '保养组',
|
|
|
|
|
`managerUser` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '管理人',
|
|
|
|
|
`approveUser` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '审核人',
|
|
|
|
|
`ledgerAccount` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '对应会计科目',
|
|
|
|
|
`impairmentProvision` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '减值准备',
|
|
|
|
|
`estimatedWorkload` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '预计工作量',
|
|
|
|
|
`completedWorkload` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '已完成工作量',
|
|
|
|
|
`maintenanceType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维保类型',
|
|
|
|
|
`maintenanceCycle` bigint DEFAULT NULL COMMENT '维保周期',
|
|
|
|
|
`startMaintenancDate` date DEFAULT NULL COMMENT '维保开始日期',
|
|
|
|
|
`endMaintenancDate` date DEFAULT NULL COMMENT '维保结束日期',
|
|
|
|
|
`networkType` bigint DEFAULT NULL COMMENT '内外网',
|
|
|
|
|
`UserRole` bigint DEFAULT NULL COMMENT '使用角色',
|
|
|
|
|
`isAddDomain` bigint DEFAULT NULL COMMENT '是否加域',
|
|
|
|
|
`isUDisc` bigint DEFAULT NULL COMMENT 'u盘是否禁用',
|
|
|
|
|
`ascriptionType` bigint DEFAULT NULL COMMENT '设备归类',
|
|
|
|
|
`assetReserveType` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '资产备用类型',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更改日期',
|
|
|
|
|
PRIMARY KEY (`deviceCode`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备表'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE if not exists `device_check`
|
|
|
|
|
(
|
|
|
|
|
`taskId` bigint NOT NULL COMMENT '巡检任务id',
|
|
|
|
|
`planId` bigint DEFAULT NULL COMMENT '计划id',
|
|
|
|
|
`planName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '计划名称',
|
|
|
|
|
`chargeDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '负责部门编码',
|
|
|
|
|
`checkUserId` bigint DEFAULT NULL COMMENT '巡检人id',
|
|
|
|
|
`checkUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '巡检人姓名',
|
|
|
|
|
`checkUserPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '巡检人电话',
|
|
|
|
|
`deviceCount` int NOT NULL COMMENT '设备数量',
|
|
|
|
|
`finishCount` int NOT NULL DEFAULT '0' COMMENT '完成设备数量',
|
|
|
|
|
`exceptionCount` int NOT NULL DEFAULT '0' COMMENT '异常数量',
|
|
|
|
|
`finishTime` datetime 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 COMMENT '任务备注',
|
|
|
|
|
`sysFlag` bit(1) NOT NULL COMMENT '是否系统创建 1/true 是 0/false 否',
|
|
|
|
|
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已完成',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '创建时间',
|
|
|
|
|
`createUserId` bigint DEFAULT NULL COMMENT '创建人id',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '创建人姓名',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (`taskId`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='巡检任务表'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_check_detail`
|
|
|
|
|
(
|
|
|
|
|
`taskId` bigint 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 DEFAULT NULL COMMENT '部门名称',
|
|
|
|
|
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已完成 1/true 0/false',
|
|
|
|
|
`productId` bigint NOT NULL COMMENT '产品id',
|
|
|
|
|
`udi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'UDI码',
|
|
|
|
|
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'DI码',
|
|
|
|
|
`productName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '产品名称',
|
|
|
|
|
`ggxh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '规格型号',
|
|
|
|
|
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号',
|
|
|
|
|
`serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '序列号',
|
|
|
|
|
`productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产日期',
|
|
|
|
|
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '失效日期',
|
|
|
|
|
`manufactory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产厂家',
|
|
|
|
|
`measname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '计量单位',
|
|
|
|
|
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '注册/备案凭证号',
|
|
|
|
|
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商ID',
|
|
|
|
|
`supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商名称',
|
|
|
|
|
`itemCount` int NOT NULL DEFAULT '0' COMMENT '项目数量',
|
|
|
|
|
`exceptionCount` int NOT NULL DEFAULT '0' COMMENT '异常数量',
|
|
|
|
|
`finishCount` int NOT NULL DEFAULT '0' COMMENT '完成项目数量',
|
|
|
|
|
`finishTime` datetime DEFAULT NULL COMMENT '完成时间',
|
|
|
|
|
`repairId` bigint DEFAULT NULL COMMENT '维修单id',
|
|
|
|
|
`normalFlag` tinyint DEFAULT NULL COMMENT '巡检状态 :0:异常;1.正常',
|
|
|
|
|
`livePath` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '现场照片',
|
|
|
|
|
`suggestion` varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '巡检建议',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更改时间',
|
|
|
|
|
PRIMARY KEY (`taskId`,`deviceCode`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='巡检任务明细'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_check_detail_item`
|
|
|
|
|
(
|
|
|
|
|
`taskId` bigint 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) DEFAULT NULL COMMENT '正常标识',
|
|
|
|
|
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '完成标识',
|
|
|
|
|
`finishTime` datetime DEFAULT NULL COMMENT '完成时间',
|
|
|
|
|
`suggestion` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '巡检建议',
|
|
|
|
|
`checkUserId` bigint DEFAULT NULL COMMENT '巡检人id',
|
|
|
|
|
`checkUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '巡检人姓名',
|
|
|
|
|
`checkDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '巡检部门',
|
|
|
|
|
`checkDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '巡检部门名称',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL,
|
|
|
|
|
PRIMARY KEY (`taskId`,`deviceCode`,`itemCode`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备巡检项目'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_repair`
|
|
|
|
|
(
|
|
|
|
|
`id` bigint NOT NULL COMMENT '维修id',
|
|
|
|
|
`applyId` bigint DEFAULT NULL COMMENT '维修申请id',
|
|
|
|
|
`checkTaskId` bigint DEFAULT NULL COMMENT '巡检任务单id',
|
|
|
|
|
`finishFlag` bit(1) NOT NULL DEFAULT b'0' COMMENT '是否已完成 true/false',
|
|
|
|
|
`description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '问题描述',
|
|
|
|
|
`diagnosisInfo` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '诊断信息',
|
|
|
|
|
`innerFlag` bit(1) DEFAULT NULL COMMENT '是否内部维修',
|
|
|
|
|
`repairUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修人姓名',
|
|
|
|
|
`repairUserPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修人联系方式',
|
|
|
|
|
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci 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 NOT NULL COMMENT '部门名称',
|
|
|
|
|
`productId` bigint NOT NULL COMMENT '产品id',
|
|
|
|
|
`udi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'UDI码',
|
|
|
|
|
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'DI码',
|
|
|
|
|
`productName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '产品名称',
|
|
|
|
|
`ggxh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '规格型号',
|
|
|
|
|
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号',
|
|
|
|
|
`serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '序列号',
|
|
|
|
|
`productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产日期',
|
|
|
|
|
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '失效日期',
|
|
|
|
|
`manufactory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产厂家',
|
|
|
|
|
`measname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '计量单位',
|
|
|
|
|
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '注册/备案凭证号',
|
|
|
|
|
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商ID',
|
|
|
|
|
`supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商名称',
|
|
|
|
|
`createUserId` bigint NOT NULL COMMENT '创建人id',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人姓名',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '创建时间',
|
|
|
|
|
`createDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建部门',
|
|
|
|
|
`createDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建部门名称',
|
|
|
|
|
`confirmUserId` bigint DEFAULT NULL COMMENT '确认人id',
|
|
|
|
|
`confirmUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认人姓名',
|
|
|
|
|
`confirmTime` datetime DEFAULT NULL COMMENT '确认时间',
|
|
|
|
|
`confirmRemark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '确认备注',
|
|
|
|
|
`confirmDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认部门',
|
|
|
|
|
`confirmDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认部门名称',
|
|
|
|
|
`confirmPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认人联系方式',
|
|
|
|
|
`repairDeptCode` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '维修部门',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备维修单'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_repair_apply`
|
|
|
|
|
(
|
|
|
|
|
`id` bigint NOT NULL COMMENT '报修单id',
|
|
|
|
|
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '状态 待受理,受理中,维修中,完成',
|
|
|
|
|
`applyDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '报修部门编码',
|
|
|
|
|
`applyDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '报修部门',
|
|
|
|
|
`applyUserId` bigint NOT NULL COMMENT '报修人id',
|
|
|
|
|
`applyUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '报修人姓名',
|
|
|
|
|
`applyUserPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '报修人联系方式',
|
|
|
|
|
`applyTime` datetime NOT NULL COMMENT '报修时间',
|
|
|
|
|
`deviceCount` int NOT NULL COMMENT '设备数量',
|
|
|
|
|
`finishCount` int NOT NULL DEFAULT '0' COMMENT '完成数量',
|
|
|
|
|
`confirmDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认部门',
|
|
|
|
|
`confirmDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认部门名称',
|
|
|
|
|
`confirmUserId` bigint DEFAULT NULL COMMENT '确认人id',
|
|
|
|
|
`confirmUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认人姓名',
|
|
|
|
|
`confirmPhone` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认人联系方式',
|
|
|
|
|
`confirmTime` datetime DEFAULT NULL COMMENT '确认时间',
|
|
|
|
|
`finishTime` datetime DEFAULT NULL COMMENT '完成时间',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备报修单'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_repair_apply_detail`
|
|
|
|
|
(
|
|
|
|
|
`applyId` bigint NOT NULL COMMENT '报修单id',
|
|
|
|
|
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci 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 NOT NULL COMMENT '部门名称',
|
|
|
|
|
`description` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '问题描述',
|
|
|
|
|
`diagnosisInfo` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '诊断信息',
|
|
|
|
|
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '\0' COMMENT '状态 待诊断、待维修、维修中、完成',
|
|
|
|
|
`repairFlag` bit(1) DEFAULT NULL COMMENT '是否需要维修 true/false',
|
|
|
|
|
`repairId` bigint DEFAULT NULL COMMENT '维修单id',
|
|
|
|
|
`productId` bigint NOT NULL COMMENT '产品id',
|
|
|
|
|
`udi` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'UDI码',
|
|
|
|
|
`nameCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT 'DI码',
|
|
|
|
|
`productName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '产品名称',
|
|
|
|
|
`ggxh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '规格型号',
|
|
|
|
|
`batchNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '批次号',
|
|
|
|
|
`serialNo` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '序列号',
|
|
|
|
|
`productionDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产日期',
|
|
|
|
|
`expireDate` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '失效日期',
|
|
|
|
|
`manufactory` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '生产厂家',
|
|
|
|
|
`measname` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '计量单位',
|
|
|
|
|
`zczbhhzbapzbh` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '注册/备案凭证号',
|
|
|
|
|
`supId` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商ID',
|
|
|
|
|
`supName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '供应商名称',
|
|
|
|
|
`confirmUserId` bigint DEFAULT NULL COMMENT '确认人id',
|
|
|
|
|
`confirmUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认人姓名',
|
|
|
|
|
`confirmTime` datetime DEFAULT NULL COMMENT '确认时间',
|
|
|
|
|
`confirmRemark` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '确认备注',
|
|
|
|
|
`confirmDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认部门',
|
|
|
|
|
`confirmDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认部门名称',
|
|
|
|
|
`finishTime` datetime DEFAULT NULL COMMENT '完成时间',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
PRIMARY KEY (`applyId`,`deviceCode`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备报修单明细'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_plan`
|
|
|
|
|
(
|
|
|
|
|
`planId` bigint NOT NULL COMMENT '计划id',
|
|
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '计划名称',
|
|
|
|
|
`chargeDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '负责部门',
|
|
|
|
|
`startDate` date NOT NULL COMMENT '开始日期',
|
|
|
|
|
`endDate` date NOT NULL COMMENT '结束日期',
|
|
|
|
|
`frequency` int NOT NULL COMMENT '频率(天)',
|
|
|
|
|
`execCount` int NOT NULL DEFAULT '0' COMMENT '执行次数',
|
|
|
|
|
`remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '备注',
|
|
|
|
|
`createUserId` bigint NOT NULL COMMENT '创建人id',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人名称',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '创建时间',
|
|
|
|
|
`status` tinyint DEFAULT NULL COMMENT '设备巡检计划状态 :1:草稿;2.已提交',
|
|
|
|
|
PRIMARY KEY (`planId`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备巡检计划'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_plan_detail`
|
|
|
|
|
(
|
|
|
|
|
`planId` bigint NOT NULL COMMENT '计划id',
|
|
|
|
|
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编号',
|
|
|
|
|
`productId` bigint NOT NULL COMMENT '产品id',
|
|
|
|
|
PRIMARY KEY (`planId`,`deviceCode`) USING BTREE,
|
|
|
|
|
UNIQUE KEY `uk_planId_productId` (`planId`,`deviceCode`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='巡检计划明细'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_plan_detail_item`
|
|
|
|
|
(
|
|
|
|
|
`planId` bigint NOT NULL COMMENT '巡检计划明细id',
|
|
|
|
|
`productId` bigint NOT NULL COMMENT '巡检计划产品id',
|
|
|
|
|
`itemCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目编码',
|
|
|
|
|
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL DEFAULT '',
|
|
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目名称',
|
|
|
|
|
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目内容',
|
|
|
|
|
PRIMARY KEY ("planId","productId","itemCode") USING BTREE,
|
|
|
|
|
UNIQUE KEY "uk_planId_deviceCode_itemCode" ("planId","itemCode","deviceCode") USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='巡检设备的项目'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_check_item_dict`
|
|
|
|
|
(
|
|
|
|
|
`code` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目编码',
|
|
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目名称',
|
|
|
|
|
`content` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '项目内容',
|
|
|
|
|
`createUserId` bigint NOT NULL COMMENT '创建人id',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人名称',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '创建时间',
|
|
|
|
|
PRIMARY KEY (`code`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='巡检项目字典'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_change_log`
|
|
|
|
|
(
|
|
|
|
|
`id` bigint NOT NULL COMMENT '日志id',
|
|
|
|
|
`deviceCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '设备编码',
|
|
|
|
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'add:新增入库,change:变更归属',
|
|
|
|
|
`changeOrderId` bigint 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 NOT NULL COMMENT '操作部门',
|
|
|
|
|
`toDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '目标部门',
|
|
|
|
|
`toDeptName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '目标部门',
|
|
|
|
|
`confirmUser` bigint NOT NULL COMMENT '确认人id',
|
|
|
|
|
`confirmUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '确认人姓名',
|
|
|
|
|
`confirmTime` datetime NOT NULL COMMENT '确认时间',
|
|
|
|
|
`confirmRemark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '确认备注',
|
|
|
|
|
`remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '备注',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '操作人姓名',
|
|
|
|
|
`createUser` bigint NOT NULL COMMENT '操作人id',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '操作时间',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备变更日志表'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `device_change_order` (
|
|
|
|
|
`orderId` bigint NOT NULL COMMENT '编码',
|
|
|
|
|
`type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT 'add:新增入库,change:变更归属',
|
|
|
|
|
`status` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '1.待目标部门接收 ,2.完成(目标确认接收) ,3.目标部门拒收,4.取消',
|
|
|
|
|
`deptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建部门',
|
|
|
|
|
`toDeptCode` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '目标部门',
|
|
|
|
|
`confirmUser` bigint DEFAULT NULL COMMENT '确认人id',
|
|
|
|
|
`confirmUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL COMMENT '确认人姓名',
|
|
|
|
|
`confirmTime` datetime DEFAULT NULL COMMENT '确认时间',
|
|
|
|
|
`confirmRemark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '确认备注',
|
|
|
|
|
`remark` text CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci COMMENT '备注',
|
|
|
|
|
`createUserName` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NOT NULL COMMENT '创建人',
|
|
|
|
|
`createUser` bigint DEFAULT NULL COMMENT '创建人id',
|
|
|
|
|
`createTime` datetime NOT NULL COMMENT '创建时间',
|
|
|
|
|
PRIMARY KEY (`orderId`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='设备变更单'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('sync_data_set', 'deviceInfo',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''设备管理数据''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('sync_data_set', 'deviceCheck',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''巡检管理数据''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('sync_data_set', 'deviceRepairApply',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''报修单数据''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair', 'repairDescription',
|
|
|
|
|
' varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''维修内容''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
INSERT ignore INTO `device_info` (`deviceCode`, `deptCode`, `status`, `checkLock`, `udi`, `nameCode`, `productId`, `productName`, `ggxh`, `batchNo`, `serialNo`, `productionDate`, `expireDate`, `manufactory`, `measname`, `zczbhhzbapzbh`, `supId`, `supName`, `changeCount`, `repairApplyCount`, `repairCount`, `checkCount`, `lastChangeOrderId`, `lastRepairApplyId`, `lastRepairApplyTime`, `lastRepairId`, `lastRepairUserName`, `lastRepairUserPhone`, `lastRepairTime`, `lastCheckUserId`, `lastCheckUserName`, `lastCheckPhone`, `lastCheckTime`, `lastCheckTaskId`, `createTime`, `createUserId`, `createUserName`, `assetType`, `sasacType`, `assetMnemonicCode`, `number`, `acquisitionMethod`, `purpose`, `depreciationYear`, `depreciationMonth`, `invCode`, `estimatedTotalHour`, `dayHour`, `assetValue`, `ownFund`, `financialAppropriation`, `educationFund`, `otherFund`, `nonPeerFinancialAppropriation`, `ybbm`, `catalogname1`, `catalogname2`, `catalogname3`, `catalogCode`, `catalogCode1`, `catalogCode2`, `catalogCode3`, `managementCategory`, `endUser`, `estimatedResidualValue`, `currencyType`, `purType`, `purchaseDate`, `addDate`, `assetName`, `isImperative`, `isMaintain`, `imperativeCycle`, `maintainCycle`, `startImperativeDate`, `startMaintainDate`, `serviceType`, `maintainType`, `managerUser`, `approveUser`, `ledgerAccount`, `impairmentProvision`, `estimatedWorkload`, `completedWorkload`, `maintenanceType`, `maintenanceCycle`, `startMaintenancDate`, `endMaintenancDate`, `networkType`, `UserRole`, `isAddDomain`, `isUDisc`, `ascriptionType`, `assetReserveType`, `updateTime`)
|
|
|
|
|
VALUES ('S0790586160', '1002', 'change', b'1', NULL, '06902139333834', 700205494, '金属骨针', 'GZZH04YB φ2.0×200mm', NULL, NULL, NULL, NULL, '大博医疗科技股份有限公司', '枚', '国械注准20173461003,国械注准20173131003', NULL, NULL, 0, 0, 0, 0, 1788043097458315264, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-05-08 11:09:15', 1, '超级用户', NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-05-09 10:48:43');
|
|
|
|
|
|
|
|
|
|
INSERT ignore INTO `device_info` (`deviceCode`, `deptCode`, `status`, `checkLock`, `udi`, `nameCode`, `productId`, `productName`, `ggxh`, `batchNo`, `serialNo`, `productionDate`, `expireDate`, `manufactory`, `measname`, `zczbhhzbapzbh`, `supId`, `supName`, `changeCount`, `repairApplyCount`, `repairCount`, `checkCount`, `lastChangeOrderId`, `lastRepairApplyId`, `lastRepairApplyTime`, `lastRepairId`, `lastRepairUserName`, `lastRepairUserPhone`, `lastRepairTime`, `lastCheckUserId`, `lastCheckUserName`, `lastCheckPhone`, `lastCheckTime`, `lastCheckTaskId`, `createTime`, `createUserId`, `createUserName`, `assetType`, `sasacType`, `assetMnemonicCode`, `number`, `acquisitionMethod`, `purpose`, `depreciationYear`, `depreciationMonth`, `invCode`, `estimatedTotalHour`, `dayHour`, `assetValue`, `ownFund`, `financialAppropriation`, `educationFund`, `otherFund`, `nonPeerFinancialAppropriation`, `ybbm`, `catalogname1`, `catalogname2`, `catalogname3`, `catalogCode`, `catalogCode1`, `catalogCode2`, `catalogCode3`, `managementCategory`, `endUser`, `estimatedResidualValue`, `currencyType`, `purType`, `purchaseDate`, `addDate`, `assetName`, `isImperative`, `isMaintain`, `imperativeCycle`, `maintainCycle`, `startImperativeDate`, `startMaintainDate`, `serviceType`, `maintainType`, `managerUser`, `approveUser`, `ledgerAccount`, `impairmentProvision`, `estimatedWorkload`, `completedWorkload`, `maintenanceType`, `maintenanceCycle`, `startMaintenancDate`, `endMaintenancDate`, `networkType`, `UserRole`, `isAddDomain`, `isUDisc`, `ascriptionType`, `assetReserveType`, `updateTime`)
|
|
|
|
|
VALUES ('S3054245435', '1002', 'repair_apply', b'0', NULL, '06902139333834', 700205494, '金属骨针', 'GZZH04YB φ2.0×200mm', NULL, NULL, NULL, NULL, '大博医疗科技股份有限公司', '枚', '国械注准20173461003,国械注准20173131003', NULL, NULL, 0, 1, 0, 0, 1788042594527952896, '1788055560932900864', '2024-05-08 11:57:21', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-05-08 11:06:23', 1, '超级用户', NULL, NULL, NULL, 1, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-05-09 10:48:36');
|
|
|
|
|
|
|
|
|
|
INSERT ignore INTO `device_repair_apply` (`id`, `status`, `applyDeptCode`, `applyDeptName`, `applyUserId`, `applyUserName`, `applyUserPhone`, `applyTime`, `deviceCount`, `finishCount`, `confirmDeptCode`, `confirmDeptName`, `confirmUserId`, `confirmUserName`, `confirmPhone`, `confirmTime`, `finishTime`, `updateTime`)
|
|
|
|
|
VALUES (1787801533814042624, 'processing', '1002', '手术室', 1, '超级用户', '18238132561', '2024-05-07 19:07:56', 1, 0, '1002', '手术室', 1, '超级用户', '15752121213', '2024-05-07 19:11:48', NULL, '2024-05-09 11:59:52');
|
|
|
|
|
|
|
|
|
|
INSERT ignore INTO `device_repair_apply` (`id`, `status`, `applyDeptCode`, `applyDeptName`, `applyUserId`, `applyUserName`, `applyUserPhone`, `applyTime`, `deviceCount`, `finishCount`, `confirmDeptCode`, `confirmDeptName`, `confirmUserId`, `confirmUserName`, `confirmPhone`, `confirmTime`, `finishTime`, `updateTime`)
|
|
|
|
|
VALUES (1787801935535218688, 'processing', '1002', '手术室', 1, '超级用户', '15866936214', '2024-05-07 19:09:32', 1, 0, '1002', '手术室', 1, '超级用户', '15752121213', '2024-05-07 19:10:46', NULL, '2024-05-09 14:29:19');
|
|
|
|
|
|
|
|
|
|
INSERT ignore INTO `device_repair_apply_detail` (`applyId`, `deviceCode`, `deptCode`, `deptName`, `description`, `diagnosisInfo`, `status`, `repairFlag`, `repairId`, `productId`, `udi`, `nameCode`, `productName`, `ggxh`, `batchNo`, `serialNo`, `productionDate`, `expireDate`, `manufactory`, `measname`, `zczbhhzbapzbh`, `supId`, `supName`, `confirmUserId`, `confirmUserName`, `confirmTime`, `confirmRemark`, `confirmDeptCode`, `confirmDeptName`, `finishTime`, `updateTime`)
|
|
|
|
|
VALUES (1787801533814042624, 'S0185624335', '1002', '手术室', 'SUCCESS!!!!!!!!!!', NULL, 'wait_diagnosis', NULL, NULL, 700205494, NULL, '06902139333834', '金属骨针', 'GZZH04YB φ2.0×200mm', 'zxzxz111', '11111111111111111', '2024-05-01', '2024-05-30', '大博医疗科技股份有限公司', '枚', '国械注准20173461003,国械注准20173131003', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-05-07 19:07:56');
|
|
|
|
|
|
|
|
|
|
INSERT ignore INTO `device_repair_apply_detail` (`applyId`, `deviceCode`, `deptCode`, `deptName`, `description`, `diagnosisInfo`, `status`, `repairFlag`, `repairId`, `productId`, `udi`, `nameCode`, `productName`, `ggxh`, `batchNo`, `serialNo`, `productionDate`, `expireDate`, `manufactory`, `measname`, `zczbhhzbapzbh`, `supId`, `supName`, `confirmUserId`, `confirmUserName`, `confirmTime`, `confirmRemark`, `confirmDeptCode`, `confirmDeptName`, `finishTime`, `updateTime`)
|
|
|
|
|
VALUES (1787801935535218688, 'S1216934642', '1002', '手术室', 'ZZZZZZZZZZZZZZZZZZZZZZZ', NULL, 'wait_diagnosis', NULL, NULL, 700205494, NULL, '06902139333834', '金属骨针', 'GZZH04YB φ2.0×200mm', NULL, NULL, NULL, NULL, '大博医疗科技股份有限公司', '枚', '国械注准20173461003,国械注准20173131003', NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, NULL, '2024-05-07 19:09:32');
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CREATE TABLE IF NOT EXISTS `thr_manufacturer`
|
|
|
|
|
(
|
|
|
|
|
`id` bigint NOT NULL AUTO_INCREMENT,
|
|
|
|
|
`unitId` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`spell` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`addr` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`creditNo` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`contact` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`mobile` varchar(60) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`thirdSysFk` varchar(20) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT NULL,
|
|
|
|
|
`createUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '创建人',
|
|
|
|
|
`createTime` datetime DEFAULT NULL COMMENT '创建时间',
|
|
|
|
|
`updateUser` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '更新人',
|
|
|
|
|
`updateTime` datetime DEFAULT NULL COMMENT '更新时间',
|
|
|
|
|
`remark` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci DEFAULT '' COMMENT '备注',
|
|
|
|
|
PRIMARY KEY (`id`) USING BTREE,
|
|
|
|
|
UNIQUE KEY `unique` (`unitId`,`thirdSysFk`) USING BTREE
|
|
|
|
|
) ENGINE=InnoDB
|
|
|
|
|
AUTO_INCREMENT=1001
|
|
|
|
|
DEFAULT CHARSET=utf8mb4
|
|
|
|
|
COLLATE=utf8mb4_0900_ai_ci COMMENT='第三方往来单位类型'
|
|
|
|
|
ROW_FORMAT=Dynamic;
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_check_item_dict', 'type',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''项目字典类型 1:巡检项目;2:保养项目''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_plan', 'type',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''计划类型 1:巡检计划; 2:保养计划''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_plan_detail_item', 'type',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''项目类型 1:巡检项目; 2:保养项目''',
|
|
|
|
|
1);
|
|
|
|
|
|
|
|
|
|
CALL Pro_Temp_ColumnWork('sync_data_set', 'produceBusiness',
|
|
|
|
|
' tinyint NULL DEFAULT NULL COMMENT ''生产企业信息''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair_apply_detail', 'livePath',
|
|
|
|
|
'varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''维修现场照片''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair', 'livePath',
|
|
|
|
|
'varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''报修现场照片''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair', 'serviceLivePath',
|
|
|
|
|
'varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''维修后现场照片''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair', 'diagnosisLivePath',
|
|
|
|
|
'varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''诊断照片''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair_apply_detail', 'diagnosisLivePath',
|
|
|
|
|
'varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''诊断照片''',
|
|
|
|
|
1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair', 'repairUserId', 'bigint DEFAULT NULL COMMENT''报修人id''', 1);
|
|
|
|
|
CALL Pro_Temp_ColumnWork('device_repair', 'repairDescription',
|
|
|
|
|
' varchar(1024) CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL DEFAULT NULL COMMENT''维修内容''',
|
|
|
|
|
1);
|
|
|
|
|
ALTER TABLE device_repair
|
|
|
|
|
MODIFY COLUMN `diagnosisInfo` longtext CHARACTER SET utf8mb4 COLLATE utf8mb4_0900_ai_ci NULL COMMENT '诊断信息' AFTER `description`;
|
|
|
|
|
ALTER TABLE device_plan_detail_item
|
|
|
|
|
DROP PRIMARY KEY,
|
|
|
|
|
ADD PRIMARY KEY (`planId`, `productId`, `itemCode`, `deviceCode`) USING BTREE;
|