|
@@ -19,6 +19,7 @@ import api.common.pojo.po.model.ConfigSensorPO;
|
|
|
import api.common.pojo.po.model.VehiclePO;
|
|
|
import api.common.pojo.po.project.*;
|
|
|
import api.common.pojo.po.scene.ScenePackagePO;
|
|
|
+import api.common.pojo.vo.algorithm.AlgorithmVO;
|
|
|
import api.common.pojo.vo.project.*;
|
|
|
import api.common.util.*;
|
|
|
import com.css.simulation.resource.server.domain.service.UserDomainService;
|
|
@@ -91,6 +92,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
@Resource
|
|
|
private AlgorithmMapper algorithmMapper;
|
|
|
@Resource
|
|
|
+ private AlgorithmExpandMapper algorithmExpandMapper;
|
|
|
+ @Resource
|
|
|
private KafkaTemplate<String, String> kafkaTemplate;
|
|
|
@Resource
|
|
|
private DictService dictService;
|
|
@@ -401,17 +404,40 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
ProjectDetailsVO projectDetailsVO;
|
|
|
final String projectType = param.getProjectType();
|
|
|
String details;
|
|
|
+ String algorithmType;
|
|
|
+ String algorithmId;
|
|
|
if (DictConstants.PROJECT_TYPE_MANUAL.equals(projectType)) {
|
|
|
SimulationManualProjectPO simulationManualProjectPO = simulationManualProjectMapper.selectProjectById(param);
|
|
|
details = simulationManualProjectPO.getDetails();
|
|
|
+ algorithmType = simulationManualProjectPO.getAlgorithmType();
|
|
|
+ algorithmId = simulationManualProjectPO.getAlgorithm();
|
|
|
} else if (DictConstants.PROJECT_TYPE_AUTO_SUB.equals(projectType)) {
|
|
|
SimulationManualProjectVO simulationManualProjectVO = simulationAutomaticSubProjectMapper.selectProjectInfo(param);
|
|
|
details = simulationManualProjectVO.getDetails();
|
|
|
+ algorithmType = simulationManualProjectVO.getAlgorithmType();
|
|
|
+ algorithmId = simulationManualProjectVO.getAlgorithm();
|
|
|
} else {
|
|
|
throw new RuntimeException("未知项目类型:" + projectType);
|
|
|
}
|
|
|
projectDetailsVO = JsonUtil.jsonToBean(details, ProjectDetailsVO.class);
|
|
|
|
|
|
+
|
|
|
+ {
|
|
|
+ String algorithmName = null;
|
|
|
+ String algorithmDescription = null;
|
|
|
+ {
|
|
|
+ if (DictConstants.ALGORITHM_UPLOAD_MODE_PLATFORM.equals(algorithmType)) {
|
|
|
+ List<AlgorithmVO> select = algorithmExpandMapper.select(AlgorithmParameter.builder().algorithmId(algorithmId).build());
|
|
|
+ AlgorithmVO algorithmVO = select.get(0);
|
|
|
+ algorithmName = algorithmVO.getAlgorithmName() + "-" + algorithmVO.getAlgorithmVersion();
|
|
|
+ algorithmDescription = select.get(0).getDescription();
|
|
|
+ }
|
|
|
+
|
|
|
+ projectDetailsVO.setAlgorithmName(algorithmName);
|
|
|
+ projectDetailsVO.setAlgorithmDescribe(algorithmDescription);
|
|
|
+ }
|
|
|
+ }
|
|
|
+
|
|
|
|
|
|
List<ProjectRunStateNumVo> states = null;
|
|
|
List<ProjectRunResultRatioNumVo> resultScoreList = null;
|
|
@@ -477,6 +503,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
public ResponseBodyVO<ProjectDetailsVO> selectProjectDetailsByIdForScheduler(SimulationManualProjectParam param) {
|
|
|
|
|
|
ProjectDetailsVO projectDetailsVO = null;
|
|
|
+ String algorithmType = null;
|
|
|
+ String algorithmId = null;
|
|
|
if (DictConstants.PROJECT_TYPE_MANUAL.equals(param.getProjectType())) {
|
|
|
SimulationManualProjectPO po = simulationManualProjectMapper.selectProjectById(param);
|
|
|
projectDetailsVO = JsonUtil.jsonToBean(po.getDetails(), ProjectDetailsVO.class);
|
|
@@ -485,6 +513,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
projectDetailsVO.setFinishTime(getRqStr(po.getFinishTime(), 1));
|
|
|
projectDetailsVO.setNowRunState(po.getNowRunState());
|
|
|
projectDetailsVO.setNowRunStateName(getDictName(DictConstants.PROJECT_RUN_STATE, po.getNowRunState()));
|
|
|
+ algorithmType = po.getAlgorithmType();
|
|
|
+ algorithmId = po.getAlgorithm();
|
|
|
} else if (DictConstants.PROJECT_TYPE_AUTO_SUB.equals(param.getProjectType())) {
|
|
|
SimulationManualProjectVO po = simulationAutomaticSubProjectMapper.selectProjectInfo(param);
|
|
|
projectDetailsVO = JsonUtil.jsonToBean(po.getDetails(), ProjectDetailsVO.class);
|
|
@@ -493,12 +523,29 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
projectDetailsVO.setFinishTime(getRqStr(po.getFinishTime(), 1));
|
|
|
projectDetailsVO.setNowRunState(po.getNowRunState());
|
|
|
projectDetailsVO.setNowRunStateName(getDictName(DictConstants.PROJECT_RUN_STATE, po.getNowRunState()));
|
|
|
-
|
|
|
+ algorithmType = po.getAlgorithmType();
|
|
|
+ algorithmId = po.getAlgorithm();
|
|
|
}
|
|
|
|
|
|
List<AlgorithmScoreVO> firstTargetScore = getFirstTargetScore(param.getId());
|
|
|
projectDetailsVO.setAlgorithmScoreList(firstTargetScore);
|
|
|
|
|
|
+
|
|
|
+ String algorithmName = null;
|
|
|
+ String algorithmDescription = null;
|
|
|
+ {
|
|
|
+ if (DictConstants.ALGORITHM_UPLOAD_MODE_PLATFORM.equals(algorithmType)) {
|
|
|
+ List<AlgorithmVO> select = algorithmExpandMapper.select(AlgorithmParameter.builder().algorithmId(algorithmId).build());
|
|
|
+ AlgorithmVO algorithmVO = select.get(0);
|
|
|
+ algorithmName = algorithmVO.getAlgorithmName() + "-" + algorithmVO.getAlgorithmVersion();
|
|
|
+ algorithmDescription = select.get(0).getDescription();
|
|
|
+ }
|
|
|
+
|
|
|
+ projectDetailsVO.setAlgorithmName(algorithmName);
|
|
|
+ projectDetailsVO.setAlgorithmDescribe(algorithmDescription);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
|
|
|
List<ProjectRunStateNumVo> states = null;
|
|
|
List<ProjectRunResultRatioNumVo> resultScoreList = null;
|
|
@@ -990,10 +1037,10 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
|
|
|
if ("3".equals(algorithmType)) {
|
|
|
String sort = "algorithmId-desc";
|
|
|
- int page = 1;
|
|
|
- int size = 1;
|
|
|
+ int page = 0;
|
|
|
+ int size = 99999;
|
|
|
|
|
|
- String urlParam = "&algorithmId" + algorithmId + "&page=" + page + "&size=" + size + "&sort=" + sort;
|
|
|
+ String urlParam = "&algorithmId=" + algorithmId + "&page=" + page + "&size=" + size + "&sort=" + sort;
|
|
|
List<DropDownVo> otherAlgorithmInfo = getOtherAlgorithmInfo(urlParam);
|
|
|
if (StringUtil.isNotEmpty(otherAlgorithmInfo)) {
|
|
|
DropDownVo dropDownVo = otherAlgorithmInfo.get(0);
|
|
@@ -1539,8 +1586,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
} else if (DictConstants.PLATFORM.equals(algorithmType)) {
|
|
|
|
|
|
String sort = "algorithmId-desc";
|
|
|
- int page = 1;
|
|
|
- int size = 999;
|
|
|
+ int page = 0;
|
|
|
+ int size = 99999;
|
|
|
String urlParam = "&page=" + page + "&size=" + size + "&sort=" + sort;
|
|
|
algorithmList = getOtherAlgorithmInfo(urlParam);
|
|
|
|
|
@@ -5302,8 +5349,8 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
} else if (DictConstants.PLATFORM.equals(algorithmType)) {
|
|
|
|
|
|
String sort = "algorithmId-desc";
|
|
|
- int page = 1;
|
|
|
- int size = 999;
|
|
|
+ int page = 0;
|
|
|
+ int size = 99999;
|
|
|
String urlParam = "&page=" + page + "&size=" + size + "&sort=" + sort;
|
|
|
algorithmListSy = getOtherAlgorithmInfo(urlParam);
|
|
|
|