|
@@ -903,9 +903,7 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
}
|
|
|
|
|
|
} else {
|
|
|
- AlgorithmPO algorithmPO = new AlgorithmPO();
|
|
|
- algorithmPO.setId(algorithmId);
|
|
|
- algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmById(algorithmPO);
|
|
|
+ algorithmBaseInfoVo = simulationProjectMapper.selectAlgorithmById(algorithmId);
|
|
|
}
|
|
|
return algorithmBaseInfoVo;
|
|
|
}
|
|
@@ -1523,18 +1521,23 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
//1 查询算法名称
|
|
|
String algorithmId = simulationManualProjectVo.getAlgorithm();
|
|
|
String algorithmType = simulationManualProjectVo.getAlgorithmType();
|
|
|
- String algorithmName = "算法平台已删除该算法";
|
|
|
- if(DictConstants.ALGORITHM_UPLOAD_MODE_PLATFORM.equals(algorithmType)){
|
|
|
+ String algorithmName;
|
|
|
+ if (DictConstants.ALGORITHM_UPLOAD_MODE_PLATFORM.equals(algorithmType)) {
|
|
|
//1 获取 token
|
|
|
algorithmName = algoPlatformService.selectAlgorithmNameByAlgorithmId(algorithmId).getInfo();
|
|
|
- }else {
|
|
|
- AlgorithmPO algorithmPO = new AlgorithmPO();
|
|
|
- algorithmPO.setId(algorithmId);
|
|
|
- List<AlgorithmPO> algorithmBaseInfoVos = simulationProjectMapper.selectAlgorithmBaseInfoById(algorithmPO);
|
|
|
- if (!isEmpty(algorithmBaseInfoVos)) {
|
|
|
- algorithmName = algorithmBaseInfoVos.get(0).getAlgorithmName();
|
|
|
+ if (StringUtil.isEmpty(algorithmName)) {
|
|
|
+ algorithmName = "算法平台已删除该算法";
|
|
|
+ }
|
|
|
+ } else {
|
|
|
+
|
|
|
+ AlgorithmPO algorithmPO = simulationProjectMapper.selectAlgorithmById(algorithmId);
|
|
|
+ if (algorithmPO != null && StringUtil.isNotEmpty(algorithmPO.getAlgorithmName())) {
|
|
|
+ algorithmName = algorithmPO.getAlgorithmName();
|
|
|
+ } else {
|
|
|
+ algorithmName = "仿真平台不存在该算法";
|
|
|
}
|
|
|
}
|
|
|
+
|
|
|
simulationManualProjectVo.setAlgorithm(algorithmName);
|
|
|
//2 是否是自动项目
|
|
|
if (!isAuto) {
|