1、生成自动化脚本补充模板路径
This commit is contained in:
@@ -136,6 +136,8 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
|
||||
private static final String TEMP_REPORT_PATH = "/opt/report/";
|
||||
|
||||
private static final String TEMPLATE_PATH = " /opt/script/template staticsAnalyse";
|
||||
|
||||
// 临时文件存储目录
|
||||
private final String tempFileDir = System.getProperty("user.dir") + "/csv_uploads/";
|
||||
|
||||
@@ -1097,6 +1099,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
if (CollectionUtils.isNotEmpty(imageFileIdList)) {
|
||||
String randomId = RandomUtil.generateString(16);
|
||||
log.info("临时路径为:{}" , randomId);
|
||||
String commands = "python /opt/script/exportWord.py " + TEMP_REPORT_PATH + randomId + File.separator + TEMPLATE_PATH;
|
||||
for (Long fileId : imageFileIdList) {
|
||||
dataFeignClient.downloadFileToLocal(fileId, TEMP_REPORT_PATH + randomId);
|
||||
}
|
||||
@@ -1104,7 +1107,7 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
// 父节点信息
|
||||
ProjecInfoReq projecInfoReq = req.getProjecInfoReq();
|
||||
if (ObjectUtils.isNotEmpty(projecInfoReq)) {
|
||||
projecInfoReq.setReportCommand("python /opt/script/exportWord.py /opt/script/project/dynamics1 /opt/script/template dynamics");
|
||||
projecInfoReq.setReportCommand(commands);
|
||||
String jsonString = JSON.toJSONString(projecInfoReq);
|
||||
FileOutputStream projectInfoOutputStream = null;
|
||||
try {
|
||||
@@ -1144,7 +1147,6 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
|
||||
// 调用脚本
|
||||
log.info("调用脚本中。。。。。。");
|
||||
String commands = "python /opt/script/exportWord.py " + TEMP_REPORT_PATH + randomId + File.separator;
|
||||
log.info("command:" + commands);
|
||||
List<String> result = new ArrayList<>();
|
||||
int runningStatus = -1;
|
||||
@@ -1194,10 +1196,6 @@ public class SimulationRunServiceImpl extends ServiceImpl<SimulationRunMapper, S
|
||||
log.info("删除临时路径:{},中。。。。。。",randomId);
|
||||
deleteFolder(new File(TEMP_REPORT_PATH + randomId));
|
||||
}
|
||||
// 性能指标集合
|
||||
List<SimulationPerformance> performanceList = req.getPerformanceList();
|
||||
|
||||
|
||||
}
|
||||
|
||||
@Override
|
||||
|
||||
Reference in New Issue
Block a user