feat(web): 添加强制终止工作流功能并实现按作业类型统计

- 在EightworkInfoController中新增forceTerminate接口,支持强制终止工作流并传入关闭原因
- 添加StatisticsByWorkTypeCO数据传输对象用于统计结果返回
- 实现statisticsByWorkType接口,提供按作业类型的统计数据查询功能
- 修改forceTerminate方法参数,支持传递关闭原因到工作流终止处理
- 添加安全措施处理逻辑,在暂存和提交时同步处理安全措施确认步骤
- 新增强制终止命令ForceTerminateCmd和统计相关DTO类
- 在数据库映射文件中添加按作业类型统计数据查询的SQL语句
- 修复任务日志状态检查逻辑,确保正确的流转状态验证
master
fangjiakai 2026-03-31 17:38:10 +08:00
parent f50527a3c1
commit c514ef8b1e
2 changed files with 2 additions and 18 deletions

View File

@ -123,7 +123,7 @@ public class EightworkInfoSaveDraftExe {
handleOtherMeasures(existingInfo.getWorkId(), cmd.getWorkType(), cmd.getOthers());
// 8. 处理安全措施
deleteTaskLogsExceptFirst(existingInfo.getWorkId());
measuresLogsRepository.physicalDeleteByWorkId(existingInfo.getWorkId());
if(ObjectUtil.isNotEmpty(cmd.getOthers()) && cmd.getOthers().containsKey("measures")) {
handleMeasuresStep(cmd,existingInfo.getWorkId());
}
@ -312,15 +312,6 @@ public class EightworkInfoSaveDraftExe {
log.info("暂存时已保存其他安全措施: workId={}, content={}", workId, otherMeasures);
}
/**
* task_log
*/
private void deleteTaskLogsExceptFirst(String workId) {
taskLogRepository.physicalDeleteByWorkId(workId);
log.info("已删除除申请步骤外的 task_log: workId={}", workId);
}
/**
*
*

View File

@ -148,7 +148,7 @@ public class TaskLogAddExe {
taskLogRepository.saveBatch(taskLogs);
// 10. 处理安全措施
deleteTaskLogsExceptFirst(existingInfo.getWorkId());
measuresLogsRepository.physicalDeleteByWorkId(existingInfo.getWorkId());
if(ObjectUtil.isNotEmpty(cmd.getOthers()) && cmd.getOthers().containsKey("measures")) {
handleMeasuresStep(cmd,existingInfo.getWorkId());
}
@ -445,13 +445,6 @@ public class TaskLogAddExe {
return mergedJson.toJSONString();
}
/**
* task_log
*/
private void deleteTaskLogsExceptFirst(String workId) {
taskLogRepository.physicalDeleteByWorkId(workId);
log.info("已删除除申请步骤外的 task_log: workId={}", workId);
}
/**
*