| | |
| | | } |
| | | fieldInfo = BaseUtil.getSingleInfoByCache("表字段信息", new String[]{functionUuid.getString("table_uuid"), fieldName}); |
| | | i++; |
| | | } while (FieldSetEntity.isEmpty(fieldInfo)); |
| | | } while (!FieldSetEntity.isEmpty(fieldInfo)); |
| | | FieldSetEntity fs = new FieldSetEntity(); |
| | | fs.setTableName(CmnConst.PRODUCT_SYS_DATAMODEL_FIELD); |
| | | fs.setValue("table_uuid", functionUuid.getString("table_uuid")); |
| | |
| | | for (int i = 0; i < businessValueField.size(); i++) { |
| | | sql.append("\tT1." + businessValueField.get(i) + " as val_").append(i).append("\n,"); |
| | | } |
| | | sql.append("\tT2.uuid,T2.attachment_size,T2.file_name,T3.dict_label file_type\n"); |
| | | sql.append("\tT2.uuid,T2.attachment_size,T2.file_name,T3.dict_label file_type,T4.record_uuid\n"); |
| | | sql.append("FROM\n"); |
| | | sql.append("\t").append(tableInfo.getString(CoreConst.FIELD_TABLE_NAME)).append(" T1\n"); |
| | | sql.append("\tJOIN product_sys_flow_detail T4 ON T1.uuid=T4.record_uuid\n"); |
| | |
| | | sql.append("\tJOIN product_sys_dict T3 ON T2.attachment_type_uuid=T3.uuid\n"); |
| | | sql.append("WHERE\n"); |
| | | sql.append("\tT1.flow_flag =2\n"); |
| | | sql.append("\tAND T1." + archiveFlagField + " =1\n"); |
| | | sql.append("\tAND T1.").append(archiveFlagField).append(" is null or ").append(archiveFlagField).append("!=1\n"); |
| | | sql.append("\tAND T4.table_name='").append(tableInfo.getString(CoreConst.FIELD_TABLE_NAME)).append("'\n"); |
| | | sql.append("\tGROUP BY 1,2,3,4 limit ").append(pageSize); |
| | | sql.append("\tGROUP BY 1,2,3,4,5 limit ").append(pageSize); |
| | | |
| | | DataTableEntity files = null; |
| | | String filing_catalog = fs.getString("filing_catalog"); |
| | |
| | | document.setValue("created_utc_datetime", new Date()); |
| | | document.setValue("file_size", file.getString("attachment_size")); |
| | | baseDao.saveFieldSetEntity(document); |
| | | baseDao.executeUpdate(" update " + tableInfo.getString("table_name") + " set " + archiveFlagField + "= '1' where uuid=?", new Object[]{file.getString("record_uuid")}); |
| | | } |
| | | } while (!DataTableEntity.isEmpty(files)); |
| | | |