|
@@ -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);
|