#@mgr("通用Excel数据导入:字段匹配") #define content() #if(msg) × #(msg) #end 导入配置: 上一步 选择Sheet #for(sheet : excel.sheets) #(sheet.caption) #end 数据预览 #setLocal(hasCache = formCache != null) #if(hasCache) 默认使用上次的导入配置 #end #for(col : tableMeta.columnMetas) #if(ignoreFields.get(col.name)) #continue #end #set(hasParam = "") #(col.remarks) #(col.name)(#(col.type)) #@modeOptions(for.index, col.name) #end 忽略表头行数 立即导入 #end #define after() #end #define modeOptions(index, fieldName) #setLocal(fieldCache = hasCache ? formCache.get(fieldName) : null) #setLocal(modeCache = fieldCache ? fieldCache.get('mode') : "") #set(hasParam = fieldCache ? fieldCache.get('expr').replace('"', '"') : "") Null值 Excel列 常量填充 行号 #for(param : paramsMap) #setLocal(selected = "") #if(fieldName==param.key) #setLocal(selected = "selected") #set(hasParam = '"' + param.value + '"') #end #(param.key) #else 无 #end #end
#(msg)