diff --git a/1-sql/2026-02-04/yang.sql b/1-sql/2026-02-04/yang.sql new file mode 100644 index 00000000..01d4b1c7 --- /dev/null +++ b/1-sql/2026-02-04/yang.sql @@ -0,0 +1,8 @@ +-- 前一个节点文件的id: inputFileId (已经存在) +-- 为 simulation_job 表新增指定字段 +ALTER TABLE `spdm_baseline`.`simulation_job` + ADD COLUMN `inputFormat` varchar(256) DEFAULT NULL COMMENT '输入主文件正则', +ADD COLUMN `slaveFormat` varchar(256) DEFAULT NULL COMMENT '输入从文件正则', +ADD COLUMN `outputFormat` varchar(256) DEFAULT NULL COMMENT '输出文件正则', +ADD COLUMN `processDefinitionId` varchar(64) DEFAULT NULL COMMENT '流程定义id', +ADD COLUMN `processInstanceId` varchar(64) DEFAULT NULL COMMENT '流程实例id'; \ No newline at end of file diff --git a/common/src/main/java/com/sdm/common/entity/req/pbs/SubmitHpcTaskRemoteReq.java b/common/src/main/java/com/sdm/common/entity/req/pbs/SubmitHpcTaskRemoteReq.java index 44488b20..4f7e427c 100644 --- a/common/src/main/java/com/sdm/common/entity/req/pbs/SubmitHpcTaskRemoteReq.java +++ b/common/src/main/java/com/sdm/common/entity/req/pbs/SubmitHpcTaskRemoteReq.java @@ -80,4 +80,22 @@ public class SubmitHpcTaskRemoteReq implements Serializable { @Schema(description = "当前hpc节点文件目录id,用于hpc文件回传") private Long dirId; + @Schema(description = "求解文件对应的文件夹Id,自动模式前一个节点minio文件夹id") + private Long inputFileId; + + @Schema(description = "输入主文件正则") + private String inputFormat; + + @Schema(description = "输入从文件正则") + private String slaveFormat; + + @Schema(description = "输出文件正则") + private String outputFormat; + + @Schema(description = "流程定义id") + private String processDefinitionId; + + @Schema(description = "流程实例id") + private String processInstanceId; + } diff --git a/flowable/src/main/java/com/sdm/flowable/delegate/handler/HpcHandler.java b/flowable/src/main/java/com/sdm/flowable/delegate/handler/HpcHandler.java index 9846490e..b822a8df 100644 --- a/flowable/src/main/java/com/sdm/flowable/delegate/handler/HpcHandler.java +++ b/flowable/src/main/java/com/sdm/flowable/delegate/handler/HpcHandler.java @@ -67,10 +67,12 @@ public class HpcHandler implements ExecutionHandler,HPCExecu submitHpcTaskRemoteReq.setSoftwareId(config.getUuid()); String beforeNodeId = config.getBeforeNodeId(); String currentNodeId =execution.getCurrentActivityId(); - String masterFileRegularStr = Objects.isNull(params.get("inputFormat"))?"":params.get("inputFormat").toString(); String inputFilesRegularStr = Objects.isNull(params.get("slaveFormat"))?"":params.get("slaveFormat").toString(); - + String outputFormat = Objects.isNull(params.get("outputFormat"))?"":params.get("outputFormat").toString(); + submitHpcTaskRemoteReq.setInputFormat(masterFileRegularStr); + submitHpcTaskRemoteReq.setSlaveFormat(inputFilesRegularStr); + submitHpcTaskRemoteReq.setOutputFormat(outputFormat); log.info("hpc executeMode:{}",params.get("executeMode")); String executeMode = params.get("executeMode").toString(); if(StringUtils.isBlank(executeMode)|| @@ -97,7 +99,8 @@ public class HpcHandler implements ExecutionHandler,HPCExecu // params 取只是测试使用 String processInstanceId = (execution==null||StringUtils.isBlank(execution.getProcessInstanceId()))? params.get("processInstanceId").toString():execution.getProcessInstanceId(); - + submitHpcTaskRemoteReq.setProcessDefinitionId(processDefinitionId); + submitHpcTaskRemoteReq.setProcessInstanceId(processInstanceId); submitHpcTaskRemoteReq.setMasterFileRegularStr(masterFileRegularStr); submitHpcTaskRemoteReq.setInputFilesRegularStr(inputFilesRegularStr); @@ -199,6 +202,12 @@ public class HpcHandler implements ExecutionHandler,HPCExecu ProcessNodeParam beforeNode = beforeNodeParams.get(0); Pair beforePair = getNodeObjectKey(beforeNode); String beforeNodeJectKey = beforePair.getLeft(); + if(Objects.isNull(beforePair.getRight())){ + log.error("前一节点文件dirId不能是null"); + MdcUtil.removeTraceId(); + throw new RuntimeException("前一节点文件dirId不能是null"); + } + submitHpcTaskRemoteReq.setInputFileId(beforePair.getRight()); // 本地求解文件路径 taskLocalBaseDir String simulationFilePath = simulationBaseDir + beforeNodeJectKey; submitHpcTaskRemoteReq.setSimulationFileLocalPath(simulationFilePath); diff --git a/pbs/src/main/java/com/sdm/pbs/model/entity/SimulationJob.java b/pbs/src/main/java/com/sdm/pbs/model/entity/SimulationJob.java index d434c2db..172a3b77 100644 --- a/pbs/src/main/java/com/sdm/pbs/model/entity/SimulationJob.java +++ b/pbs/src/main/java/com/sdm/pbs/model/entity/SimulationJob.java @@ -79,7 +79,7 @@ public class SimulationJob implements Serializable { @TableField("softwareId") private String softwareId; - @Schema(description = "求解文件对应的文件Id") + @Schema(description = "求解文件对应的文件夹Id,自动模式前一个节点minio文件夹id") @TableField("inputFileId") private Long inputFileId; @@ -173,6 +173,26 @@ public class SimulationJob implements Serializable { @TableField("dirId") private Long dirId; + @Schema(description = "输入主文件正则") + @TableField("inputFormat") + private String inputFormat; + + @Schema(description = "输入从文件正则") + @TableField("slaveFormat") + private String slaveFormat; + + @Schema(description = "输出文件正则") + @TableField("outputFormat") + private String outputFormat; + + @Schema(description = "流程定义id") + @TableField("processDefinitionId") + private String processDefinitionId; + + @Schema(description = "流程实例id") + @TableField("processInstanceId") + private String processInstanceId; + @Schema(description = "任务耗时,前端展示字段") @TableField(value = "costTime",exist = false) private String costTime; diff --git a/pbs/src/main/java/com/sdm/pbs/model/req/SubmitHpcTaskReq.java b/pbs/src/main/java/com/sdm/pbs/model/req/SubmitHpcTaskReq.java index ffdabed5..a4c094a1 100644 --- a/pbs/src/main/java/com/sdm/pbs/model/req/SubmitHpcTaskReq.java +++ b/pbs/src/main/java/com/sdm/pbs/model/req/SubmitHpcTaskReq.java @@ -95,4 +95,22 @@ public class SubmitHpcTaskReq { @Schema(description = "当前hpc节点文件目录id,用于hpc文件回传") private Long dirId; + @Schema(description = "求解文件对应的文件夹Id,自动模式前一个节点minio文件夹id") + private Long inputFileId; + + @Schema(description = "输入主文件正则") + private String inputFormat; + + @Schema(description = "输入从文件正则") + private String slaveFormat; + + @Schema(description = "输出文件正则") + private String outputFormat; + + @Schema(description = "流程定义id") + private String processDefinitionId; + + @Schema(description = "流程实例id") + private String processInstanceId; + }