|
@@ -1,5 +1,6 @@
|
|
|
package com.fdkankan.model.utils;
|
|
|
|
|
|
+import cn.hutool.core.collection.CollUtil;
|
|
|
import com.alibaba.fastjson.JSON;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
@@ -42,6 +43,9 @@ public class CreateHouseJsonUtil {
|
|
|
public static JSONObject createHouseTypeJsonByCad(String filePath) {
|
|
|
|
|
|
JSONArray floors = readFloorJson(filePath);
|
|
|
+ if(CollUtil.isEmpty(floors)){
|
|
|
+ return null;
|
|
|
+ }
|
|
|
|
|
|
JSONObject house = new JSONObject();
|
|
|
house.put("name", "houseType.json");
|