Explorar o código

质检必填项忽略后更新节点状态

lvy hai 1 día
pai
achega
f126ab02a6

+ 5 - 3
blade-service/blade-manager/src/main/java/org/springblade/manager/controller/ExcelTabController.java

@@ -1060,11 +1060,13 @@ public class ExcelTabController extends BladeController {
         AtomicInteger status = new AtomicInteger(1);
         String tableName = tableNode.getInitTableName();
         List<Map<String, Object>> valueMapList = jdbcTemplate.queryForList("select * from " + tableName + " where p_key_id = " + tableNode.getPKeyId());
+        Map<String, Object> map;
         if (CollectionUtil.isEmpty(valueMapList) ||  CollectionUtil.isEmpty(valueMapList.get(0))) {
-            return;
+            map = new HashMap<>();
+        } else {
+            map = valueMapList.get(0);
+            DataStructureFormatUtils.parseDataByKey( map);
         }
-        Map<String, Object> map = valueMapList.get(0);
-        DataStructureFormatUtils.parseDataByKey( map);
         List<WbsFormElement> wbsFormElementList = jdbcTemplate.query("select * from m_wbs_form_element where f_id = ( select id from m_table_info where tab_en_name in ( '" + tableName + "' ) and is_deleted = 0) and is_deleted = 0 and (required = 1 or node_ignore is not null)",
                 new BeanPropertyRowMapper<>(WbsFormElement.class));
         if (CollectionUtil.isEmpty(wbsFormElementList)) {