| | |
| | | String uuids = ""; |
| | | for (Map.Entry<Object, Object> entry : map.entrySet()) { |
| | | fieldFse = fieldMetaEntity.getFieldMeta(fieldName); |
| | | if (fieldFse == null || !CmnConst.ATTACHMENT_TYPE.equals(fieldFse.getString(CmnConst.FIELD_TYPE))) { |
| | | if (fieldFse == null || (!CmnConst.ATTACHMENT_TYPE.equals(fieldFse.getString(CmnConst.FIELD_TYPE)) && !"file-image".equals(fieldFse.getString(CmnConst.FIELD_TYPE)))) { |
| | | fse.setValue(entry.getKey().toString(), null); |
| | | continue; |
| | | } |
| | |
| | | } |
| | | return fse; |
| | | } |
| | | |
| | | |
| | | /** |
| | | * 根据附件表数据生成文档索引 |
| | | */ |
| | |
| | | // 遍历附件表 |
| | | DataTableEntity dtAttachment = baseDao.listTable(CmnConst.PRODUCT_SYS_ATTACHMENTS); |
| | | if (BaseUtil.dataTableIsEmpty(dtAttachment)) { |
| | | return ; |
| | | return; |
| | | } |
| | | for (int i = 0; i < dtAttachment.getRows(); i++) { |
| | | // 获取附件信息,并判断是否有表和字段 |
| | | FieldSetEntity fseAttachment = dtAttachment.getFieldSetEntity(i); |
| | | if(BaseUtil.strIsNull(fseAttachment.getString("attachment_data_field")) || BaseUtil.strIsNull(fseAttachment.getString("attachment_data_field"))) { |
| | | if (BaseUtil.strIsNull(fseAttachment.getString("attachment_data_field")) || BaseUtil.strIsNull(fseAttachment.getString("attachment_data_field"))) { |
| | | continue; |
| | | } |
| | | // 查询原数据,有原数据再生成文档检索 |
| | | FieldSetEntity fseRecord = baseDao.getFieldSetEntityByFilter(fseAttachment.getString("attachment_data_table"), fseAttachment.getString("attachment_data_field") + " LIKE ?", new Object[] {"%"+fseAttachment.getUUID()+"%"}, false); |
| | | if(fseRecord != null) { |
| | | FieldSetEntity fseRecord = baseDao.getFieldSetEntityByFilter(fseAttachment.getString("attachment_data_table"), fseAttachment.getString("attachment_data_field") + " LIKE ?", new Object[]{"%" + fseAttachment.getUUID() + "%"}, false); |
| | | if (fseRecord != null) { |
| | | // 生成文档检索信息 |
| | | FieldSetEntity fseIndex = new FieldSetEntity(); |
| | | fseIndex.setTableName("fseIndex"); |