Просмотр исходного кода

激光场景也会生成floorplan_cad.json且是空数据,所以做floorplan.json转换时不做转换后空判断抛出异常了

dsx 2 лет назад
Родитель
Сommit
0aaefafdd4

+ 4 - 4
src/main/java/com/fdkankan/contro/mq/service/impl/CommonServiceImpl.java

@@ -167,11 +167,11 @@ public class CommonServiceImpl implements ICommonService {
         }
         JSONObject json = FloorPlanUserUtil.createFloorPlanUserJson(floorPlanCardFilePath);
         if(Objects.isNull(json)){
-            log.error("生成floorplan.json失败,cadPath:", floorPlanCardFilePath);
-            throw new Exception("生成floorplan.json失败,cadPath:" + floorPlanCardFilePath);
+            log.warn("生成floorplan.json失败,cadPath:{}", floorPlanCardFilePath);
+            return;
         }
-        String hourseTypeJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
-        fYunFileServiceInterface.uploadFile(json.toJSONString().getBytes(), hourseTypeJsonPath);
+        String floorplanJsonPath = String.format(UploadFilePath.DATA_VIEW_PATH, num) + "floorplan.json";
+        fYunFileServiceInterface.uploadFile(json.toJSONString().getBytes(), floorplanJsonPath);
     }
 
     @Override