diff --git a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/TaskOverdueHandler.java b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/TaskOverdueHandler.java index 18628ff..17edec7 100644 --- a/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/TaskOverdueHandler.java +++ b/hzims-service/operational/src/main/java/com/hnac/hzims/operational/maintenance/scheduled/TaskOverdueHandler.java @@ -50,7 +50,7 @@ public class TaskOverdueHandler { if(CollectionUtil.isNotEmpty(taskEntitySet)) { taskEntitySet.forEach(operMaintenanceTaskEntity -> { OperMaintenanceTaskEntity taskEntity = taskService.getById(operMaintenanceTaskEntity.getId()); - if(StringUtil.isBlank(taskEntity.getFlowTaskName())) { + if(Func.isEmpty(taskEntity) || StringUtil.isBlank(taskEntity.getFlowTaskName())) { redisTemplate.opsForZSet().remove(RedisKeyConstants.MAINTENANCE_TASK_DELAY_LIST,operMaintenanceTaskEntity); } //如果任务仍在待执行则自动结束 diff --git a/hzims-service/ticket/src/main/resources/db/2.0.1.sql b/hzims-service/ticket/src/main/resources/db/2.0.1.sql index 8af5d83..a541b87 100644 --- a/hzims-service/ticket/src/main/resources/db/2.0.1.sql +++ b/hzims-service/ticket/src/main/resources/db/2.0.1.sql @@ -1,33 +1,30 @@ -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人姓名' AFTER `class_group_name`; +ALTER TABLE `hzims_standard_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人姓名' AFTER `class_group_name`; -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人姓名' AFTER `create_user_name`; +ALTER TABLE `hzims_standard_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人姓名' AFTER `create_user_name`; -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `issue_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发令人名称' AFTER `update_user_name`; +ALTER TABLE `hzims_standard_ticket_info` ADD COLUMN `issue_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '发令人名称' AFTER `update_user_name`; -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `access_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受令人名称' AFTER `issue_order_person_name`; +ALTER TABLE `hzims_standard_ticket_info` ADD COLUMN `access_order_person_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '受令人名称' AFTER `issue_order_person_name`; -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `guardian_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `access_order_person_name`; +ALTER TABLE `hzims_standard_ticket_info` ADD COLUMN `guardian_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `access_order_person_name`; -ALTER TABLE `hzims-ticket`.`hzims_standard_ticket_info` ADD COLUMN `principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人名称' AFTER `guardian_name`; +ALTER TABLE `hzims_standard_ticket_info` ADD COLUMN `principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '负责人名称' AFTER `guardian_name`; +ALTER TABLE `hzims_work_ticket_finish` ADD COLUMN `end_principal_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结负责人' AFTER `other_items`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_principal_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结负责人' AFTER `other_items`; +ALTER TABLE `hzims_work_ticket_finish` ADD COLUMN `end_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结许可人' AFTER `end_principal_name`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `end_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作终结许可人' AFTER `end_principal_name`; +ALTER TABLE `hzims_work_ticket_finish` ADD COLUMN `finish_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作票终结许可人' AFTER `end_licensor_name`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_finish` ADD COLUMN `finish_licensor_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '工作票终结许可人' AFTER `end_licensor_name`; +ALTER TABLE `hzims_work_ticket_info` ADD COLUMN `signer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发人名称' AFTER `is_offline`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `is_offline` tinyint(2) NULL DEFAULT 0 COMMENT '是否线下 : 1-线下,0-线上' AFTER `is_start`; +ALTER TABLE `hzims_work_ticket_info` ADD COLUMN `licensor_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `signer_name`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `signer_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '签发人名称' AFTER `is_offline`; +ALTER TABLE `hzims_work_ticket_info` ADD COLUMN `watch_principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值班负责人名称' AFTER `licensor_name`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `licensor_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '许可人名称' AFTER `signer_name`; +ALTER TABLE `hzims_work_ticket_info` ADD COLUMN `implement_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行状态字段:0未执行,1为执行(运行人员确认过)' AFTER `watch_principal_name`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `watch_principal_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '值班负责人名称' AFTER `licensor_name`; +ALTER TABLE `hzims_work_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人名称' AFTER `implement_status`; -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `implement_status` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '执行状态字段:0未执行,1为执行(运行人员确认过)' AFTER `watch_principal_name`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `update_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '修改人名称' AFTER `implement_status`; - -ALTER TABLE `hzims-ticket`.`hzims_work_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `update_user_name`; +ALTER TABLE `hzims_work_ticket_info` ADD COLUMN `create_user_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '创建人名称' AFTER `update_user_name`; diff --git a/hzims-service/ticket/src/main/resources/db/2.0.2.sql b/hzims-service/ticket/src/main/resources/db/2.0.2.sql index f3b3e2f..6c570ce 100644 --- a/hzims-service/ticket/src/main/resources/db/2.0.2.sql +++ b/hzims-service/ticket/src/main/resources/db/2.0.2.sql @@ -1,4 +1,4 @@ -CREATE TABLE `HZIMS_WORK_TASK` ( +CREATE TABLE IF NOT EXISTS `HZIMS_WORK_TASK` ( `ID` BIGINT(20) NOT NULL COMMENT '主键', `CODE` VARCHAR(255) CHARACTER SET UTF8 COLLATE UTF8_GENERAL_CI NULL DEFAULT NULL COMMENT '工作任务单编号', `HEAD` BIGINT(20) NULL DEFAULT NULL COMMENT '工作负责人',