| | |
| | | sb.append(",c.user_name "); |
| | | sb.append(" from "); |
| | | sb.append(table.getString("table_name")).append(" a "); |
| | | sb.append(" LEFT JOIN (SELECT uuid,directory_name,filing_config_field_uuid FROM product_oa_directory where tricode_parent='").append(fs.getString("filing_catalog")).append("') b "); |
| | | sb.append(" LEFT JOIN (SELECT uuid,directory_name,filing_config_field_uuid FROM product_oa_directory where filing_config_table=? and tricode_parent='").append(fs.getString("filing_catalog")).append("') b "); |
| | | sb.append("on a.").append(fs.getString("field_title")).append("=b.directory_name and a.uuid=b.filing_config_field_uuid "); |
| | | |
| | | sb.append(" LEFT JOIN product_sys_users c on a.").append(fs.getString("field_send_user")).append("=c.user_id"); |
| | |
| | | |
| | | //获取父类文档信息 |
| | | FieldSetEntity parentDirectory = baseDao.getFieldSetByFilter(CmnConst.PRODUCT_OA_DIRECTORY, "tricode=?", new String[]{filing_catalog}, false); |
| | | DataTableEntity fieldDt = baseDao.listTable(sql, new String[]{}); |
| | | DataTableEntity fieldDt = baseDao.listTable(sql, new String[]{table}); |
| | | //获取流程附件并加入到file里 |
| | | DataTableEntity nodeDt = baseDao.listTable(nodeSal, new String[]{}); |
| | | for (int i = 0; i <nodeDt.getRows() ; i++) { |
| | |
| | | String tricode = CodeUtil.getNewCodeByTemp(CmnConst.PRODUCT_OA_DIRECTORY, CmnConst.TRICODE, filing_catalog); |
| | | //获取目录名称 |
| | | String title = fs.getString(field_title); |
| | | directoryUUID = addDirectory(title, tricode, filing_catalog, parentDirectory.getInteger("directory_tier") + 1,fs.getUUID()); |
| | | directoryUUID = addDirectory(title, tricode, filing_catalog, parentDirectory.getInteger("directory_tier") + 1,fs.getUUID(),table); |
| | | |
| | | }else { |
| | | directoryUUID=fs.getString("directory_uuid"); |
| | |
| | | * @param directory_tier 目录层级 |
| | | */ |
| | | |
| | | private String addDirectory(String field_title,String tricode,String tricode_parent,Integer directory_tier,String filing_config_field_uuid){ |
| | | private String addDirectory(String field_title,String tricode,String tricode_parent,Integer directory_tier,String filing_config_field_uuid,String table){ |
| | | //新建目录 |
| | | FieldSetEntity fsDirectory = new FieldSetEntity(); |
| | | fsDirectory.setTableName(CmnConst.PRODUCT_OA_DIRECTORY); |
| | |
| | | fsDirectory.setValue("tricode", tricode); |
| | | fsDirectory.setValue("tricode_parent", tricode_parent); |
| | | fsDirectory.setValue("filing_config_field_uuid", filing_config_field_uuid); |
| | | fsDirectory.setValue("filing_config_table", table); |
| | | |
| | | baseDao.saveFieldSetEntity(fsDirectory); |
| | | return fsDirectory.getUUID(); |