From 4df461673ff8b350df032429c07bc973a3b83c7f Mon Sep 17 00:00:00 2001 From: xyc <jc_xiong@hotmail.com> Date: 星期五, 02 八月 2024 09:58:35 +0800 Subject: [PATCH] 修改仿真后台 --- modules/mainPart/src/main/java/com/zt/life/modules/mainPart/async/PythonLib.java | 9 ++++----- 1 files changed, 4 insertions(+), 5 deletions(-) diff --git a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/async/PythonLib.java b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/async/PythonLib.java index 8562456..43d6bdb 100644 --- a/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/async/PythonLib.java +++ b/modules/mainPart/src/main/java/com/zt/life/modules/mainPart/async/PythonLib.java @@ -2,14 +2,13 @@ import com.alibaba.fastjson.JSONObject; import com.zt.common.servlet.Result; -import com.zt.life.modules.mainPart.taskReliability.model.PythonResult; +import com.zt.life.modules.mainPart.taskReliability.model.ReliaSimLibResult; import com.zt.life.modules.mainPart.taskReliability.model.SimulatAssess; 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.data.redis.core.RedisTemplate; -import org.springframework.scheduling.annotation.Async; import org.springframework.stereotype.Component; import java.io.BufferedReader; @@ -66,7 +65,7 @@ // if (exitCode == 0) { logger.info("鍚姩python璁$畻鎴愬姛"); if (line != null) { - PythonResult rtn = JSONObject.parseObject(line, PythonResult.class); + ReliaSimLibResult rtn = JSONObject.parseObject(line, ReliaSimLibResult.class); if ("0".equals(rtn.getCode())) { result = Result.ok(); } else { @@ -115,7 +114,6 @@ private void setParamToRedis(SimulatAssess simulatAssess) { String key = simulatAssess.getId().toString() + taskType; logger.info("redis key锛�" + key); -/* String xmlfile = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<des name=\"General system\">\n" + " <tasks>\n" + @@ -244,7 +242,7 @@ " </repair_model>\n" + " </repair_models>\n" + "</des>"; -*/ +/* String xmlfile = "<?xml version=\"1.0\" encoding=\"utf-8\"?>\n" + "<des name=\"General system\">\n" + " <tasks>\n" + @@ -345,6 +343,7 @@ " </repair_model>\n" + " </repair_models>\n" + "</des>"; +*/ JSONObject jsonObject = new JSONObject(); /* Long simulate_times = 10000L; -- Gitblit v1.9.1