| | |
| | | String directory_uuid = fieldSetEntity.getString(CmnConst.DIRECTORY_UUID); |
| | | //String key = "%,140,%"; |
| | | DataTableEntity dataTableEntity = new DataTableEntity(); |
| | | FieldSetEntity org = baseDao.getFieldSetByFilter(CmnConst.PRODUCT_OA_DIRECTORY_RIGHTS, "directory_uuid=?", new String[]{directory_uuid}, false); |
| | | |
| | | FieldSetEntity org = recursionRole(directory_uuid); |
| | | if (verifyOrgExist(org.getString("storage_uuid"))) { |
| | | StringBuffer sql = new StringBuffer(); |
| | | sql.append(" SELECT substring_index(substring_index(a.rigths,',',b.help_topic_id+1),',',-1) fun FROM PRODUCT_OA_directory_rights a ") |
| | | .append(" INNER join mysql.help_topic b on b.help_topic_id < (length(a.rigths) - length(replace(a.rigths,',',''))+1) ") |
| | | .append(" WHERE a.directory_uuid = ? "); |
| | | dataTableEntity = baseDao.listTable(sql.toString(), new String[]{directory_uuid}); |
| | | dataTableEntity = baseDao.listTable(sql.toString(), new String[]{org.getString("directory_uuid")}); |
| | | } |
| | | StringBuffer button = new StringBuffer(); |
| | | if (!BaseUtil.dataTableIsEmpty(dataTableEntity)) { |
| | |
| | | return fse; |
| | | } |
| | | |
| | | /** |
| | | * 递归获取权限如果当前文档未配置权限就去递归查询父级权限 |
| | | * @param directory_uuid |
| | | * @return |
| | | */ |
| | | private FieldSetEntity recursionRole(String directory_uuid){ |
| | | FieldSetEntity org = baseDao.getFieldSetByFilter(CmnConst.PRODUCT_OA_DIRECTORY_RIGHTS, "directory_uuid=?", new String[]{directory_uuid}, false); |
| | | if (FieldSetEntity.isEmpty(org)){ |
| | | FieldSetEntity directoryFs = baseDao.getFieldSet(CmnConst.PRODUCT_OA_DIRECTORY, directory_uuid,false); |
| | | FieldSetEntity parentFs = baseDao.getFieldSetByFilter(CmnConst.PRODUCT_OA_DIRECTORY, "tricode=?",new String[]{directoryFs.getString("tricode_parent")},false); |
| | | org=recursionRole(parentFs.getUUID()); |
| | | } |
| | | return org; |
| | | } |
| | | |
| | | @Override |
| | | public JSONObject popBoxGetFileDirectory(FieldSetEntity fse) throws BaseException { |
| | | //文件目录uuid |