Kaynağa Gözat

修改模型执行重复问题

Gaokun Wang 8 ay önce
ebeveyn
işleme
f220a5d5fa

+ 9 - 5
als-modules/agile-assurance/src/main/java/org/eco/als/controller/AlgorithmController.java

@@ -37,7 +37,8 @@ public class AlgorithmController {
     @SaCheckPermission("als:algorithm:execute")
     @PostMapping("/execute/pro")
     public CommonResult<String> executePro(@Validated @RequestBody AlgorithmBo algorithmBo) {
-        return StrUtil.isBlank(algorithmService.executePro(algorithmBo)) ? CommonResult.fail() : CommonResult.success(algorithmService.executePro(algorithmBo), "");
+        String result = algorithmService.executePro(algorithmBo);
+        return StrUtil.isBlank(result) ? CommonResult.fail() : CommonResult.success(result, "");
     }
 
     /**
@@ -49,11 +50,12 @@ public class AlgorithmController {
     @SaCheckPermission("als:algorithm:execute")
     @PostMapping("/execute/falseAlarm")
     public CommonResult<String> executeFalseAlarm(@Validated @RequestBody AlgorithmBo algorithmBo) {
-        return CommonResult.success(algorithmService.executeFalseAlarm(algorithmBo), "");
+        String result = algorithmService.executeFalseAlarm(algorithmBo);
+        return StrUtil.isBlank(result) ? CommonResult.fail() : CommonResult.success(result, "");
     }
 
     /**
-     * 执行古战诊断
+     * 执行故障诊断
      *
      * @param algorithmBo 入参
      * @return org.eco.common.core.core.domain.CommonResult<java.lang.String> 结果
@@ -61,7 +63,8 @@ public class AlgorithmController {
     @SaCheckPermission("als:algorithm:execute")
     @PostMapping("/execute/fault")
     public CommonResult<String> executeFault(@Validated @RequestBody AlgorithmBo algorithmBo) {
-        return StrUtil.isBlank(algorithmService.executeFault(algorithmBo)) ? CommonResult.fail() : CommonResult.success(algorithmService.executeFault(algorithmBo), "");
+        String result = algorithmService.executeFault(algorithmBo);
+        return StrUtil.isBlank(result) ? CommonResult.fail() : CommonResult.success(result, "");
     }
 
     /**
@@ -73,7 +76,8 @@ public class AlgorithmController {
     @SaCheckPermission("als:algorithm:execute")
     @PostMapping("/execute/task")
     public CommonResult<String> batchExecute(@Validated @RequestBody TaskBo taskBo) {
-        return StrUtil.isBlank(algorithmService.batchExecute(taskBo)) ? CommonResult.fail() : CommonResult.success();
+        String result = algorithmService.batchExecute(taskBo);
+        return StrUtil.isBlank(result) ? CommonResult.fail() : CommonResult.success(result, "");
     }
 
     /**

+ 0 - 4
als-modules/agile-assurance/src/main/java/org/eco/als/domain/bo/AirConfigurationBo.java

@@ -20,7 +20,6 @@ public class AirConfigurationBo extends TreeEntity {
     /**
      * 唯一ID
      */
-    @NotNull(message = "唯一ID不能为空")
     private Long id;
 
     /**
@@ -50,19 +49,16 @@ public class AirConfigurationBo extends TreeEntity {
     /**
      * 图号
      */
-    @NotBlank(message = "图号不能为空")
     private String drawingNumber;
 
     /**
      * 供应商
      */
-    @NotBlank(message = "供应商不能为空")
     private String supplier;
 
     /**
      * 描述
      */
-    @NotBlank(message = "描述不能为空")
     private String remarks;