Browse Source

Merge branch 'develop' of http://47.108.150.237:10000/www/taais into tl-develop

28968 8 tháng trước cách đây
mục cha
commit
87b759fccf

+ 2 - 6
taais-admin/src/main/resources/application-dev.yml

@@ -1,10 +1,6 @@
 server:
-  video_stable_url: http://localhost:11002/video_stable
-  video_stable_start_url: http://localhost:11002/video_stable
-  video_stable_stop_url: http://localhost:11002/video_stable_stop
-  to_infrared_stop_url: http://localhost:11002/to_infrared_stop
-  track_sequence_stop_url: http://localhost:11003/track_sequence_stop
-  target_detection_stop_url: http://localhost:11003/target_detection_stop
+  video_stable_start_url: http://localhost:11006/video_stable
+  video_stable_stop_url: http://localhost:11006/video_stable_stop
   task_stop_url: http://localhost:11003/stop
 
 # 数据源配置

+ 24 - 11
taais-modules/taais-biz/src/main/java/com/taais/biz/service/impl/DataServiceImpl.java

@@ -252,23 +252,36 @@ public class DataServiceImpl extends BaseServiceImpl<DataMapper, Data> implement
                 }
                 countSize.getAndIncrement();
             });
-            //是否选择已标注,如果已标注则需要检测所有图片是否标注
-            if (!labeledList.isEmpty()) {
-                // 已标注数量
-                long unmarkedCount = labeledList.stream().filter(Boolean.FALSE::equals).count();
+            // TODO 李兆晏 确认逻辑是否正确 start
+//            //是否选择已标注,如果已标注则需要检测所有图片是否标注
+//            if (!labeledList.isEmpty()) {
+//                // 已标注数量
+//                long unmarkedCount = labeledList.stream().filter(Boolean.FALSE::equals).count();
+//                // 未标注数量
+//                long markedCount = labeledList.stream().filter(Boolean.TRUE::equals).count();
+//                // 如果存在未标注的数据,则返回错误信息
+//                if (unmarkedCount > 0 && labeled) {
+//                    String format = String.format("错误: 已标注文件 %d 个,未标注文件 %d 个", markedCount, unmarkedCount);
+//                    return CommonResult.fail(format);
+//                }
+//                // 如果存在标注的数据,则返回错误信息
+//                if (markedCount > 0 && !labeled) {
+//                    String format = String.format("错误: 已标注文件 %d 个,未标注文件 %d 个", markedCount, unmarkedCount);
+//                    return CommonResult.fail(format);
+//                }
+//            }
+            if (labeled){
                 // 未标注数量
+                long unmarkedCount = labeledList.stream().filter(Boolean.FALSE::equals).count();
+                // 已标注数量
                 long markedCount = labeledList.stream().filter(Boolean.TRUE::equals).count();
-                // 如果存在未标注的数据,则返回错误信息
-                if (unmarkedCount > 0 && labeled) {
-                    String format = String.format("错误: 已标注文件 %d 个,未标注文件 %d 个", markedCount, unmarkedCount);
-                    return CommonResult.fail(format);
-                }
-                // 如果存在标注的数据,则返回错误信息
-                if (markedCount > 0 && !labeled) {
+
+                if (unmarkedCount > 0) {
                     String format = String.format("错误: 已标注文件 %d 个,未标注文件 %d 个", markedCount, unmarkedCount);
                     return CommonResult.fail(format);
                 }
             }
+            // TODO 李兆晏 确认逻辑是否正确 end
             dataMapper.insertBatch(dataList);
             FileUtils.deleteFile(destZip);
         } catch (Exception e) {