Merge remote-tracking branch 'origin/station' into station

This commit is contained in:
nieziyan 2023-10-20 17:19:54 +08:00
commit 3c89a884af

View File

@ -2234,9 +2234,16 @@ public class GammaServiceImpl extends AbstractLogOrReport implements IGammaServi
throw new RuntimeException(e);
}
}
//获取当前操作系统名称并转换为小写
String os = System.getProperty("os.name").toLowerCase();
// 创建ProcessBuilder对象
ProcessBuilder pb = new ProcessBuilder(parameterProperties.getFilePath() + StringPool.SLASH + "KORSUM.exe");
ProcessBuilder pb = null;
//如果操作系统是windows 调用KORSUM.exe程序
if (os.contains("win")) {
pb = new ProcessBuilder(parameterProperties.getFilePath() + StringPool.SLASH + "KORSUM.exe");
} else { // 其他操作系统 调用KORSUM
pb = new ProcessBuilder(parameterProperties.getFilePath() + StringPool.SLASH + "KORSUM");
}
// 设置工作目录
pb.directory(new File(parameterProperties.getFilePath()));
try {