| | |
| | | StringBuffer sql = new StringBuffer(); |
| | | |
| | | sql.append("SELECT \n"); |
| | | sql.append(" A.*,B.show_name name, \n"); |
| | | sql.append(" E.route_name,A.*,B.show_name name, \n"); |
| | | sql.append(" CONCAT(CONVERT(a.file_size / 1024, decimal(10,2)), 'KB') file_size_kb, \n"); |
| | | sql.append(" CASE WHEN D.document_uuid IS NOT NULL THEN '1' ELSE '0' END AS is_collection, \n"); |
| | | sql.append(" (SELECT case when COUNT(*)=0 then 1 else COUNT(*) end FROM product_oa_document_history where product_oa_document_history.document_uuid=A.uuid) -1 history_count "); |
| | |
| | | sql.append("LEFT JOIN product_sys_staffs B ON B.user_id = A.created_by \n"); |
| | | sql.append("LEFT JOIN product_sys_attachments C ON C.uuid = B.staff_avatar \n"); |
| | | sql.append("LEFT JOIN product_oa_document_collection D ON D.document_uuid = A.uuid AND D.created_by = ?"); |
| | | sql.append("LEFT JOIN product_sys_function_buttons E ON E.uuid = A.turn_button "); |
| | | |
| | | DataTableEntity documentData = baseDao.listTable(sql.toString(), new String[]{directory_uuid, SpringMVCContextHolder.getCurrentUserId()}, |
| | | fieldSetEntity.getInteger(CmnConst.PAGESIZE), fieldSetEntity.getInteger(CmnConst.CPAGE)); |
| | | baseDao.listInternationDataTable(documentData, null); |