| | |
| | | public File exportTable(File dir, JSONArray tableInfoArr, Set<String> promptNameSet, Set<String> dictNameSet) { |
| | | DataTableEntity tableDte = getBaseDao().listTable(CoreConst.PRODUCT_SYS_DATAMODEL_TABLE, BaseUtil.buildQuestionMarkFilter("table_name", tableInfoArr.size(), true), tableInfoArr.stream().toArray(), |
| | | new Object[]{}, null, Integer.MAX_VALUE, 1, true); |
| | | return writeString(tableDte, "table_" + getDateTime(), dir); |
| | | return writeString(tableDte, "structure_" + getDateTime(), dir); |
| | | } |
| | | |
| | | /** |
| | |
| | | } |
| | | File file = writeString(dte, "data_" + tableName + "_" + getDateTime(), dir); |
| | | fileList.add(file); |
| | | } |
| | | if(fileList.isEmpty()){ |
| | | return null; |
| | | } |
| | | |
| | | //压缩文件 |
| | |
| | | Set<String> attachmentField = new HashSet<>(); |
| | | for (int i = 0; i < fieldDte.getRows(); i++) { |
| | | String fieldType = fieldDte.getString(i, "field_type"); |
| | | if (FieldType.FILE.equals(FieldType.getByDictValue(fieldType))) { |
| | | if (FieldType.FILE.equals(FieldType.getByDictValue(fieldType,false))) { |
| | | attachmentField.add(fieldDte.getString(i, "field_name")); |
| | | } |
| | | } |