|
@@ -943,6 +943,31 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, result);
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 获取添加工作时需要的下拉选项
|
|
|
+ * 0. 算法列表
|
|
|
+ * 1. 车辆列表
|
|
|
+ * 2. 场景列表
|
|
|
+ */
|
|
|
+ @Override
|
|
|
+ public ResponseBodyVO<List<DropDownTypeNewVo>> selectDropDownByTypeNew(SimulationManualProjectParam param) {
|
|
|
+ List<DropDownTypeNewVo> result = new ArrayList<>();
|
|
|
+ if (isEmpty(param.getDropDownType())) {
|
|
|
+ //获取全部(算法,车辆,场景)
|
|
|
+ setAlgorithmDropDownNew(result, param.getAlgorithmType());
|
|
|
+ setVehicleDropDownNew(result, null);
|
|
|
+ setScenePackageDropDownNew(result);
|
|
|
+ } else if ("1".equals(param.getDropDownType())) {
|
|
|
+ setAlgorithmDropDownNew(result, param.getAlgorithmType());
|
|
|
+ } else if ("2".equals(param.getDropDownType())) {
|
|
|
+ setVehicleDropDownNew(result, null);
|
|
|
+ } else if ("3".equals(param.getDropDownType())) {
|
|
|
+ setScenePackageDropDownNew(result);
|
|
|
+ }
|
|
|
+ return new ResponseBodyVO<>(ResponseBodyVO.Response.SUCCESS, result);
|
|
|
+ }
|
|
|
+
|
|
|
@Override
|
|
|
public ResponseBodyVO<ProjectTaskDetailsVo> selectProjectTaskById(SimulationManualProjectParam param) {
|
|
|
ProjectTaskDetailsVo resultVo = new ProjectTaskDetailsVo();
|
|
@@ -4439,4 +4464,178 @@ public class SimulationProjectServiceImpl implements SimulationProjectService {
|
|
|
return algorithmScoreVoList;
|
|
|
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * 查询算法下拉列表
|
|
|
+ *
|
|
|
+ * @param result
|
|
|
+ * @param algorithmType 算法类型
|
|
|
+ */
|
|
|
+ private void setAlgorithmDropDownNew(List<DropDownTypeNewVo> result, String algorithmType) {
|
|
|
+
|
|
|
+ List<DropDownVo> algorithmListSy = new ArrayList<>();
|
|
|
+ List<DropDownVo> algorithmListGy = new ArrayList<>();
|
|
|
+ if (DictConstants.FILE.equals(algorithmType) || DictConstants.GIT.equals(algorithmType)) {
|
|
|
+ AlgorithmPO algorithmPO = new AlgorithmPO();
|
|
|
+ algorithmPO.setCreateUserId(AuthUtil.getCurrentUserId()); // 获取当前用户 id
|
|
|
+ if (StringUtil.isEmpty(algorithmType)) {
|
|
|
+ algorithmPO.setUploadMode("1");
|
|
|
+ } else {
|
|
|
+ algorithmPO.setUploadMode(algorithmType);
|
|
|
+ }
|
|
|
+ List<AlgorithmPO> algorithmBaseInfoSyVo = simulationProjectMapper.selectAlgorithmBaseInfoByIdSy(algorithmPO);
|
|
|
+
|
|
|
+ for (AlgorithmPO v : algorithmBaseInfoSyVo) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(v.getId());
|
|
|
+ dropDownVo.setName(v.getAlgorithmName());
|
|
|
+ dropDownVo.setDescription(v.getDescription());
|
|
|
+ dropDownVo.setShare(v.getShare());
|
|
|
+ algorithmListSy.add(dropDownVo);
|
|
|
+ }
|
|
|
+ List<AlgorithmPO> algorithmBaseInfoGyVo = simulationProjectMapper.selectAlgorithmBaseInfoByIdGy(algorithmPO);
|
|
|
+
|
|
|
+ for (AlgorithmPO v : algorithmBaseInfoGyVo) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(v.getId());
|
|
|
+ dropDownVo.setName(v.getAlgorithmName());
|
|
|
+ dropDownVo.setDescription(v.getDescription());
|
|
|
+ dropDownVo.setShare(v.getShare());
|
|
|
+ algorithmListGy.add(dropDownVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+ } else if (DictConstants.PLATFORM.equals(algorithmType)) {
|
|
|
+ //第三方算法平台获取(索为)
|
|
|
+ String sort = "algorithmId-desc";
|
|
|
+ int page = 1;
|
|
|
+ int size = 999;//全部
|
|
|
+ String urlParam = "&page=" + page + "&size=" + size + "&sort=" + sort;
|
|
|
+ algorithmListSy = getOtherAlgorithmInfo(urlParam);
|
|
|
+
|
|
|
+ }
|
|
|
+ List<DropDownNewVo> listGSy=new ArrayList<>();
|
|
|
+ DropDownNewVo dropDownNewSyVo = new DropDownNewVo();
|
|
|
+ dropDownNewSyVo.setLabel("私有");
|
|
|
+ dropDownNewSyVo.setOptions(algorithmListSy);
|
|
|
+ listGSy.add(dropDownNewSyVo);
|
|
|
+ DropDownNewVo dropDownNewGyVo = new DropDownNewVo();
|
|
|
+ dropDownNewGyVo.setLabel("公有");
|
|
|
+ dropDownNewGyVo.setOptions(algorithmListGy);
|
|
|
+ listGSy.add(dropDownNewGyVo);
|
|
|
+ DropDownTypeNewVo dropDownTypeNewVo = new DropDownTypeNewVo();
|
|
|
+ dropDownTypeNewVo.setDropDownList(listGSy);
|
|
|
+ dropDownTypeNewVo.setType("1");
|
|
|
+ result.add(dropDownTypeNewVo);
|
|
|
+
|
|
|
+ }
|
|
|
+
|
|
|
+ private void setVehicleDropDownNew(List<DropDownTypeNewVo> result, String ConfigId) {
|
|
|
+ ConfigPO configPO = new ConfigPO();
|
|
|
+ if (StringUtil.isNotEmpty(ConfigId)) {
|
|
|
+ configPO.setId(ConfigId);
|
|
|
+ }
|
|
|
+ configPO.setCreateUserId(AuthUtil.getCurrentUserId());
|
|
|
+ List<ConfigPO> vehicleBaseInfoSyVo = simulationProjectMapper.selectConfigVehicleSy(configPO);
|
|
|
+ List<DropDownVo> vehicleSyList = new ArrayList<>();
|
|
|
+ for (ConfigPO v : vehicleBaseInfoSyVo) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(v.getId());
|
|
|
+ dropDownVo.setName(v.getConfigName());
|
|
|
+ dropDownVo.setDescription(v.getDescription());
|
|
|
+ dropDownVo.setShare(v.getShare());
|
|
|
+ //获取传感器信息
|
|
|
+ List<ConfigSensorPO> configSensorVos = simulationProjectMapper.selectConfigSensor(v.getId());
|
|
|
+ String sensor = "";
|
|
|
+ if (!isEmpty(configSensorVos) && configSensorVos.get(0) != null) {
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ for (ConfigSensorPO cv : configSensorVos) {
|
|
|
+ stringBuilder.append(cv.getSensorType()).append(",");
|
|
|
+ }
|
|
|
+ sensor = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
|
|
+
|
|
|
+ }
|
|
|
+ dropDownVo.setSensor(sensor);
|
|
|
+
|
|
|
+ vehicleSyList.add(dropDownVo);
|
|
|
+ }
|
|
|
+
|
|
|
+ List<ConfigPO> vehicleBaseInfoGyVo = simulationProjectMapper.selectConfigVehicleGy(configPO);
|
|
|
+ List<DropDownVo> vehicleGyList = new ArrayList<>();
|
|
|
+ for (ConfigPO v : vehicleBaseInfoGyVo) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(v.getId());
|
|
|
+ dropDownVo.setName(v.getConfigName());
|
|
|
+ dropDownVo.setDescription(v.getDescription());
|
|
|
+ dropDownVo.setShare(v.getShare());
|
|
|
+ //获取传感器信息
|
|
|
+ List<ConfigSensorPO> configSensorVos = simulationProjectMapper.selectConfigSensor(v.getId());
|
|
|
+ String sensor = "";
|
|
|
+ if (!isEmpty(configSensorVos) && configSensorVos.get(0) != null) {
|
|
|
+ StringBuilder stringBuilder = new StringBuilder();
|
|
|
+ for (ConfigSensorPO cv : configSensorVos) {
|
|
|
+ stringBuilder.append(cv.getSensorType()).append(",");
|
|
|
+ }
|
|
|
+ sensor = stringBuilder.substring(0, stringBuilder.lastIndexOf(","));
|
|
|
+
|
|
|
+ }
|
|
|
+ dropDownVo.setSensor(sensor);
|
|
|
+
|
|
|
+ vehicleGyList.add(dropDownVo);
|
|
|
+ }
|
|
|
+ List<DropDownNewVo> listGSy=new ArrayList<>();
|
|
|
+ DropDownNewVo dropDownNewSyVo = new DropDownNewVo();
|
|
|
+ dropDownNewSyVo.setLabel("私有");
|
|
|
+ dropDownNewSyVo.setOptions(vehicleSyList);
|
|
|
+ listGSy.add(dropDownNewSyVo);
|
|
|
+ DropDownNewVo dropDownNewGyVo = new DropDownNewVo();
|
|
|
+ dropDownNewGyVo.setLabel("公有");
|
|
|
+ dropDownNewGyVo.setOptions(vehicleGyList);
|
|
|
+ listGSy.add(dropDownNewGyVo);
|
|
|
+ DropDownTypeNewVo dropDownTypeNewVo = new DropDownTypeNewVo();
|
|
|
+ dropDownTypeNewVo.setDropDownList(listGSy);
|
|
|
+ dropDownTypeNewVo.setType("2");
|
|
|
+ result.add(dropDownTypeNewVo);
|
|
|
+ }
|
|
|
+ private void setScenePackageDropDownNew(List<DropDownTypeNewVo> result) {
|
|
|
+ ScenePackagePO scenePackagePO = new ScenePackagePO();
|
|
|
+ scenePackagePO.setCreateUserId(AuthUtil.getCurrentUserId());
|
|
|
+ List<ScenePackagePO> scenePackageBaseSyVo = simulationProjectMapper.selectScenePackageBaseByIdSy(scenePackagePO);
|
|
|
+ List<DropDownVo> scenePackageSyList = new ArrayList<>();
|
|
|
+ for (ScenePackagePO v : scenePackageBaseSyVo) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(v.getPackageId());
|
|
|
+ dropDownVo.setName(v.getPackageName());
|
|
|
+ dropDownVo.setSceneNum(String.valueOf(v.getSceneNum()));
|
|
|
+ dropDownVo.setShare(v.getShare());
|
|
|
+ scenePackageSyList.add(dropDownVo);
|
|
|
+ }
|
|
|
+ List<ScenePackagePO> scenePackageBaseGyVo = simulationProjectMapper.selectScenePackageBaseByIdGy(scenePackagePO);
|
|
|
+ List<DropDownVo> scenePackageGyList = new ArrayList<>();
|
|
|
+ for (ScenePackagePO v : scenePackageBaseGyVo) {
|
|
|
+ DropDownVo dropDownVo = new DropDownVo();
|
|
|
+ dropDownVo.setId(v.getPackageId());
|
|
|
+ dropDownVo.setName(v.getPackageName());
|
|
|
+ dropDownVo.setSceneNum(String.valueOf(v.getSceneNum()));
|
|
|
+ dropDownVo.setShare(v.getShare());
|
|
|
+ scenePackageGyList.add(dropDownVo);
|
|
|
+ }
|
|
|
+ List<DropDownNewVo> listGSy=new ArrayList<>();
|
|
|
+ DropDownNewVo dropDownNewSyVo = new DropDownNewVo();
|
|
|
+ dropDownNewSyVo.setLabel("私有");
|
|
|
+ dropDownNewSyVo.setOptions(scenePackageSyList);
|
|
|
+ listGSy.add(dropDownNewSyVo);
|
|
|
+ DropDownNewVo dropDownNewGyVo = new DropDownNewVo();
|
|
|
+ dropDownNewGyVo.setLabel("公有");
|
|
|
+ dropDownNewGyVo.setOptions(scenePackageGyList);
|
|
|
+ listGSy.add(dropDownNewGyVo);
|
|
|
+ DropDownTypeNewVo dropDownTypeNewVo = new DropDownTypeNewVo();
|
|
|
+ dropDownTypeNewVo.setDropDownList(listGSy);
|
|
|
+ dropDownTypeNewVo.setType("3");
|
|
|
+ result.add(dropDownTypeNewVo);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
}
|