Commit 9d92e76e authored by 鲁鸿波's avatar 鲁鸿波

所有作业3天未完成的,需要重新发起申请。

危险作业到交底环节后按固定时间判断是否超时,超时自动取消
parent b60097f4
......@@ -453,6 +453,7 @@ COMMENT ON COLUMN t_hazard_work_plan.is_full IS '是否7~9人(1:是,2:否)';
INSERT INTO "t_sys_dict_type" ("dict_id", "dict_name", "dict_type", "is_sys", "status", "create_by", "create_date", "update_by", "update_date", "remarks", "parent_id", "parent_ids", "tree_sort", "cascaded") VALUES ('1', '危险作业超时检测是否可以执行', 'plan_expired', '1', '0', NULL, '2025-11-28 15:30:11', NULL, '2025-11-28 15:30:11', NULL, NULL, NULL, NULL, '0');
INSERT INTO t_sys_dict_data" ("dict_data_id", "dict_id", "dict_key", "dict_value", "tree_sort", "status", "create_by", "create_date", "update_by", "update_date", "remarks", "parent_id", "parent_ids") VALUES ('4', '1', '1', '可以执行', '0', '0', NULL, '2025-11-28 15:31:44', NULL, '2025-11-28 15:31:44', NULL, '0', '0,');
INSERT INTO "public"."t_sys_dict_data" ("dict_data_id", "dict_id", "dict_key", "dict_value", "tree_sort", "status", "create_by", "create_date", "update_by", "update_date", "remarks", "parent_id", "parent_ids") VALUES ('5ba9557a160d4d2290128553c473028b', '60c11c98359b4cd09b7220202abf9e0b', '12', '已超时自动取消', '12', '0', '1242684364872761344', '2025-12-01 16:29:54', '1242684364872761344', '2025-12-01 16:29:54', '', '0', '0,');
添加表t_hazard_work_plan_expired_log
......
......@@ -627,26 +627,32 @@ public class THazardWorkPlanServiceImpl extends SuperServiceImpl<THazardWorkPlan
THazardWorkPlan updWorkPlan = new THazardWorkPlan();
updWorkPlan.setId(id);
updWorkPlan.setHazardLicensePassTime(new Date());
//updWorkPlan.setHazardLicensePassTime(new Date());
this.updateById(updWorkPlan);
}
//如果为安全许可证关闭
if (WorkPlanStatusEnum.TO_BE_CLOSED.getValue().equals(workStatus)) {
if (WorkPlanStatusEnum.TO_BE_CLOSED.getValue().equals(workStatus) || WorkPlanStatusEnum.TIMEOUT_CANCELED.getValue().equals(workStatus)) {
//关闭流程
executionWorkProcess(id, tHazardWorkPlanDTO.getTaskId(), WorkPlanStatusEnum.CLOSED.getValue(), tHazardWorkPlanDTO.getMap(), tHazardWorkPlan);
THazardWorkPlan updWorkPlan = new THazardWorkPlan();
updWorkPlan.setId(id);
Date scheduledEndTime = tHazardWorkPlan.getScheduledEndTime();
//如果计划结束时间在当前时间之后
if (scheduledEndTime.after(new Date())) {
//更新状态 取消状态
updWorkPlan.setWorkStatus(WorkPlanStatusEnum.CLOSED.getValue());
} else {
//更新状态 超时
updWorkPlan.setWorkStatus(WorkPlanStatusEnum.OVERDUE.getValue());
if(WorkPlanStatusEnum.TIMEOUT_CANCELED.getValue().equals(workStatus)){
updWorkPlan.setWorkStatus(WorkPlanStatusEnum.TIMEOUT_CANCELED.getValue());
}else{
//如果计划结束时间在当前时间之后
if (scheduledEndTime.after(new Date())) {
//更新状态 取消状态
updWorkPlan.setWorkStatus(WorkPlanStatusEnum.CLOSED.getValue());
} else {
//更新状态 超时
updWorkPlan.setWorkStatus(WorkPlanStatusEnum.OVERDUE.getValue());
}
}
//更新结束时间
updWorkPlan.setActualEndTime(new Date());
this.updateById(updWorkPlan);
......
......@@ -88,6 +88,7 @@ public class DynamicCandidateUsersListener implements TaskListener {
String bizId = delegateTask.getVariable("bizKeyId").toString();
THazardWorkPlan byId = tHazardWorkPlanService.getById(bizId);
if (byId != null){
byId.setHazardLicensePassTime(new Date());
byId.setWorkStatus(WorkPlanStatusEnum.TECHNICAL_EXPLANATION.getValue());
tHazardWorkPlanService.updateById(byId);
}
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment