소스 검색

算法调用修改

Gaokun Wang 6 달 전
부모
커밋
2274d4761c
1개의 변경된 파일15개의 추가작업 그리고 3개의 파일을 삭제
  1. 15 3
      als-modules/agile-assurance/src/main/java/org/eco/als/service/impl/AlgorithmService.java

+ 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("模型信息为空,请检查!");
         }