Эх сурвалжийг харах

fix:表单回显空校验

侯茂昌 1 жил өмнө
parent
commit
0a75580911

+ 6 - 2
zkqy-process-execution/src/main/java/com/zkqy/execution/produce/utils/EchoNodeFormData.java

@@ -70,11 +70,15 @@ public class EchoNodeFormData {
             if (listKey != null && !listKey.isEmpty()) {
                 //下拉框数据、或者表格多条数据
                 List<Map<String, Object>> maps = commonMapper.selectListMap(item.getTableName(), item.getCondition());
-                commonEntity.get().getResultMap().put(item.getListKey(), maps);
+                if(maps!=null){
+                    commonEntity.get().getResultMap().put(item.getListKey(), maps);
+                }
             } else {
                 //单条数据的回显逻辑
                 CommonEntity common = commonMapper.selectOne(item.getTableName(), item.getCondition());
-                commonEntity.get().getResultMap().putAll(common.getResultMap());
+                if(common!=null){
+                    commonEntity.get().getResultMap().putAll(common.getResultMap());
+                }
             }
         });
         return commonEntity.get();