|
@@ -20,6 +20,7 @@ import com.miniframe.generate.business.system.model.AFT001BaseModel;
|
|
|
import com.miniframe.model.system.*;
|
|
|
import com.miniframe.model.system.dao.*;
|
|
|
import com.miniframe.service.mq.CaeMQ;
|
|
|
+import com.miniframe.solverconfig.hcfd.HcfdPath;
|
|
|
import com.miniframe.spring.mq.MFMqUtils;
|
|
|
import com.miniframe.tools.XIFileUtils;
|
|
|
import com.miniframe.tools.XiJsonUtil;
|
|
@@ -83,6 +84,7 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
|
|
|
}
|
|
|
JSONObject obj = new JSONObject();
|
|
|
obj.put("filePath",XIFileUtils.getRootPathStr()+ MFConstant.separator+file.getFilepath());
|
|
|
+// obj.put("filePath","F:\\czm\\vtkfile\\tf.ugrid");
|
|
|
obj.put("fileType",modeling.getGridFileType().toLowerCase());
|
|
|
msg.setParamJson(obj.toString());
|
|
|
}
|
|
@@ -103,6 +105,7 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
|
|
|
}
|
|
|
JSONObject obj = new JSONObject();
|
|
|
obj.put("filePath",XIFileUtils.getRootPathStr()+ MFConstant.separator+file.getFilepath());
|
|
|
+// obj.put("filePath","F:\\czm\\vtkfile\\f.vtk");
|
|
|
obj.put("fileType",modeling.getGridFileType().toLowerCase());
|
|
|
msg.setParamJson(obj.toString());
|
|
|
}
|
|
@@ -128,24 +131,33 @@ public class AFT001Service extends AFT001BaseModel implements ExecProcessFlow {
|
|
|
|
|
|
}else if(action.equals("ResultImport")){
|
|
|
if(solver.getSolverModel().equals("HCFDLab")) {
|
|
|
- if (this.getA_aft001().getIsVolume() == "1") {
|
|
|
- JSONObject obj = new JSONObject();
|
|
|
- obj.put("filePath", "/cephfs/Postprocess_Binary");
|
|
|
- obj.put("fileType", "binary");
|
|
|
- obj.put("fileName", "whole_part1.plt,whole_part2.plt,whole_part3.plt");
|
|
|
- msg.setParamJson(obj.toString());
|
|
|
- } else {
|
|
|
- JSONObject obj = new JSONObject();
|
|
|
- obj.put("filePath", "/cephfs/Postprocess_Binary");
|
|
|
- obj.put("fileType", "binary");
|
|
|
- obj.put("fileName", "whole_part4.plt,whole_part5.plt,whole_part6.plt");
|
|
|
- msg.setParamJson(obj.toString());
|
|
|
+ String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+proId;
|
|
|
+ String exePath = jobPath+ MFConstant.separator+"hcfd";
|
|
|
+ String testPath = exePath+ MFConstant.separator+"test";
|
|
|
+ String exeOutPath = testPath+ MFConstant.separator+"data_out";
|
|
|
+ List<File> fileList = HcfdPath.getStepFiles(proId, getA_aft001().getIsVolume(), step);
|
|
|
+ if(fileList.isEmpty()){
|
|
|
+ throw new BusinessException("EB4000017");
|
|
|
+ }
|
|
|
+ String fileName="";
|
|
|
+ for (int i = 0; i < fileList.size(); i++) {
|
|
|
+ if(i==fileList.size()-1){
|
|
|
+ fileName +=fileList.get(i).getName();
|
|
|
+ }else {
|
|
|
+ fileName +=fileList.get(i).getName()+",";
|
|
|
+ }
|
|
|
}
|
|
|
+ JSONObject obj = new JSONObject();
|
|
|
+ obj.put("filePath", exeOutPath);
|
|
|
+ obj.put("fileType", "ascii");
|
|
|
+ obj.put("fileName", fileName);
|
|
|
+ msg.setParamJson(obj.toString());
|
|
|
+
|
|
|
}else if(solver.getSolverModel().equals("FEMLab(结构力学)")){
|
|
|
String jobPath = XIFileUtils.getRootPathStr()+ MFConstant.separator+solver.getPid();
|
|
|
String exePath = jobPath+ MFConstant.separator+"fem";
|
|
|
String exeOutPath = exePath+ MFConstant.separator+"data_out";
|
|
|
- File file = new File(exeOutPath+MFConstant.separator+"dynamicResponse-transient.vtk");
|
|
|
+ File file = new File(exeOutPath+MFConstant.separator+"dynamicResponse-transient.vtk");
|
|
|
if(!file.exists()){
|
|
|
throw new BusinessException("EB4000017");
|
|
|
}
|