Преглед на файлове

查询使用卫生间信息

chejianzheng преди 3 месеца
родител
ревизия
a8d19559cd
променени са 1 файла, в които са добавени 2 реда и са изтрити 2 реда
  1. 2 2
      src/main/java/com/wxxcx/index/WxxcxIndexController.java

+ 2 - 2
src/main/java/com/wxxcx/index/WxxcxIndexController.java

@@ -957,7 +957,7 @@ public class WxxcxIndexController<AesException extends Throwable> {
 //                    sql.append("'yuanY'," + itemObj.getString("yuanY") + "),");
 
                     String type = itemObj.getString("type");
-                    if (type.contains("area") || type.contains("otherArea")) {
+                    if (type == null || type.contains("area") || type.contains("otherArea")) {
                         // 子区域
                         subBuffer.append("JSON_OBJECT('name','" + itemObj.getString("name") + "',");
                         subBuffer.append("'type','" + itemObj.getString("type") + "',");
@@ -1030,7 +1030,7 @@ public class WxxcxIndexController<AesException extends Throwable> {
                 for (JsonNode room : roomParamsNode) {
                     // 遍历 roomParamsNode 数组
                     String type = room.path("type").asText();
-                    if (type.contains("area") || type.contains("otherArea")) {
+                    if (type == null || type.contains("area") || type.contains("otherArea")) {
                         Base base = new Base(0, 100, 0, 50, 1, 1);
                         int x = room.path("x").asInt();
                         int y = room.path("y").asInt();