hxx 2 tahun lalu
induk
melakukan
2d0d8131ab

+ 15 - 14
src/main/java/com/caesolver/server/SolverService.java

@@ -8,13 +8,12 @@ import java.io.InputStreamReader;
 import java.util.HashMap;
 import java.util.Map;
 
-import org.apache.commons.lang.StringUtils;
+import org.apache.http.HttpResponse;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Value;
 import org.springframework.scheduling.annotation.Async;
-import org.springframework.stereotype.Component;
 import org.springframework.stereotype.Service;
 
 import com.alibaba.fastjson.JSON;
@@ -189,7 +188,8 @@ public class SolverService {
 		paramMap.put("state", "0");
 		paramMap.put("userId","5f06c8bc77234f969d13e160b54c27e3");
 		paramMap.put("resultsState", "0");
-		HttpUtils.doPost("http://192.168.0.43:8087/TransServlet","","",new HashMap<String, String>(),new HashMap<String, String>(),paramMap);
+		HttpResponse resp=HttpUtils.doPost("http://192.168.0.43:8087/TransServlet","","",new HashMap<String, String>(),new HashMap<String, String>(),paramMap);
+		log.info(resp.toString());
 	}
 	
 
@@ -203,10 +203,11 @@ public class SolverService {
 		paramMap.put("state", state);
 		paramMap.put("userId","5f06c8bc77234f969d13e160b54c27e3");
 		paramMap.put("resultsState", resultsState);
-		HttpUtils.doPost(url,"","",new HashMap<String, String>(),new HashMap<String, String>(),paramMap);
+		HttpResponse resp=HttpUtils.doPost(url,"","",new HashMap<String, String>(),new HashMap<String, String>(),paramMap);
+		log.info(resp.toString());
 	}
 	
-	
+
 	
 	
 	/**
@@ -224,17 +225,17 @@ public class SolverService {
 		Runtime runtime = Runtime.getRuntime();
     	String startTime =TimeUtils.getNow();
     	changJobState(jobId, "0","0");
-    	Integer i=0;
-		esSeverPut(projectId, "Solver start", ++i,startTime);
-		sftpUtil.downloadByProjectId(projectId,projectType);
-		jobOrder =createJobOrder(projectId,jobOrder, projectType,orderType,vfreq,afreq,resources);		
-		i=jobExec(runtime, jobOrder, projectId, startTime);	
-		//结果文件处理
-		copyOutFile(projectId, projectType, orderType);	
-		sftpUtil.uploadByProjectId(projectId,projectType);
+//    	Integer i=0;
+//		esSeverPut(projectId, "Solver start", ++i,startTime);
+//		sftpUtil.downloadByProjectId(projectId,projectType);
+//		jobOrder =createJobOrder(projectId,jobOrder, projectType,orderType,vfreq,afreq,resources);		
+//		i=jobExec(runtime, jobOrder, projectId, startTime);	
+//		//结果文件处理
+//		copyOutFile(projectId, projectType, orderType);	
+//		sftpUtil.uploadByProjectId(projectId,projectType);
 		changJobState(jobId, "1","1");
 		//求解结束
-		esSeverPut(projectId, "Solver end", ++i,startTime);
+//		esSeverPut(projectId, "Solver end", ++i,startTime);
 //	    String endTime =TimeUtils.getNow();
 //	    if(projectType.equals(this.HCFD)){
 //	    	this.consume(projectId, startTime, endTime,projectType);

+ 11 - 5
src/main/resources/application.yml

@@ -13,7 +13,7 @@ server:
 #  scheme: http
 
 esserverurl: http://192.168.0.43:8031/
-caeserverurl: http://192.168.0.43:8087/
+caeserverurl: http://192.168.0.43:8087/TransServlet
 #
 #ftp:
 #  host: 192.168.0.43
@@ -35,11 +35,17 @@ sftp:
   privatekey:
   workdir: /opt/files
 
+#FEM:
+#  workdir: C:/FEM/
+#  exePath: C:/FEMLab_example/ADI_FE.exe
+#  postPath: C:/FEMLab_example/FEMPost.exe
+#  rootPath: C
+
 FEM:
-  workdir: C:/FEM/
-  exePath: C:/FEMLab_example/ADI_FE.exe
-  postPath: C:/FEMLab_example/FEMPost.exe
-  rootPath: C
+  workdir: D:/fem_down/
+  exePath: D:/FEMLab_example/ADI_FE.exe
+  postPath: D:/FEMLab_example/FEMPost.exe
+  rootPath: D
   
 HCFD:
   workdir: /home/hcfd/solverdown/

+ 4 - 4
src/main/resources/applicationbak.yml

@@ -36,10 +36,10 @@ sftp:
   workdir: /upload/
 
 FEM:
-  workdir: C:/FEM/
-  exePath: C:/FEMLab_example/ADI_FE.exe
-  postPath: C:/FEMLab_example/FEMPost.exe
-  rootPath: C
+  workdir: D:/fem_down/
+  exePath: D:/FEMLab_example/ADI_FE.exe
+  postPath: D:/FEMLab_example/FEMPost.exe
+  rootPath: D
   
 HCFD:
   workdir: /home/hcfd/solverdown/