Gaokun Wang пре 4 месеци
родитељ
комит
2274d4761c

+ 15 - 3
als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/AlgorithmService.java

@@ -151,7 +151,11 @@ public class AlgorithmService implements IAlgorithmService {
             throw new BusinessException("警告信息不能为空,请检查!");
         }
         // 模型相关信息
-        ModelVo modelVo = modelService.selectById(algorithmBo.getModelId());
+        ModelBo modelBo = new ModelBo();
+        modelBo.setPartId(algorithmBo.getPartId());
+        modelBo.setType("4");
+        List<ModelVo> list = modelService.selectList(modelBo);
+        ModelVo modelVo = list.getFirst();
         if (ObjectUtil.isNull(modelVo)) {
             throw new BusinessException("模型信息为空,请检查!");
         }
@@ -209,8 +213,12 @@ public class AlgorithmService implements IAlgorithmService {
     @Override
     @Transactional
     public String executeFault(AlgorithmBo algorithmBo) {
+        ModelBo modelBo = new ModelBo();
+        modelBo.setPartId(algorithmBo.getPartId());
+        modelBo.setType("5");
+        List<ModelVo> list = modelService.selectList(modelBo);
         // 模型相关信息
-        ModelVo modelVo = modelService.selectByPartId(algorithmBo.getPartId());
+        ModelVo modelVo = list.getFirst();
         if (ObjectUtil.isNull(modelVo)) {
             throw new BusinessException("模型信息为空,请检查!");
         }
@@ -260,7 +268,11 @@ public class AlgorithmService implements IAlgorithmService {
         dataImportBo.setAircraftId(algorithmBo.getAircraftId());
         List<DataImportVo> dataImportVos = dataImportService.selectList(dataImportBo);
         // 模型相关信息
-        ModelVo modelVo = modelService.selectByPartId(algorithmBo.getPartId());
+        ModelBo modelBo = new ModelBo();
+        modelBo.setPartId(algorithmBo.getPartId());
+        modelBo.setType("6");
+        List<ModelVo> list = modelService.selectList(modelBo);
+        ModelVo modelVo = list.getFirst();
         if (ObjectUtil.isNull(modelVo)) {
             throw new BusinessException("模型信息为空,请检查!");
         }