Quellcode durchsuchen

北仑模型空指针处理

chengyao vor 4 Jahren
Ursprung
Commit
8bce94485b

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/ModelAI.java

@@ -62,7 +62,7 @@ public class ModelAI {
     }
 
     protected JSONObject loadEntity(JSONObject jsonObject, String entityRelationObject, String outputs, String content) {
-        if (jsonObject == null) {
+        if (jsonObject == null || null == jsonObject.getJSONObject(entityRelationObject)) {
             return new JSONObject();
         }
         JSONObject aiOut = jsonObject.getJSONObject(entityRelationObject).getJSONObject(outputs);

+ 1 - 1
kernel/src/main/java/com/lantone/qc/kernel/structure/ai/ThreeLevelWardAI.java

@@ -160,7 +160,7 @@ public class ThreeLevelWardAI extends ModelAI {
      */
     public void putWardRoundCrfData(JSONObject jsonObject, InputInfo inputInfo, int serious) {
         JSONObject aiOut = loadEntity(jsonObject, entityRelationObject, outputs, content);
-        if (aiOut == null) {
+        if (aiOut == null || aiOut.size() == 0) {
             return;
         }
         String wardDate = jsonObject.getString("wardDate");