找回密码
 立即注册

QQ登录

只需一步,快速开始

扁担宽板凳长
金牌服务用户   /  发表于:2024-3-4 17:27  /   查看:781  /  回复:6
本帖最后由 Richard.Huang 于 2024-3-8 10:21 编辑


产品:GcExcel
版本:V7.0.0
调研编号:DOCXLS-9949

image.png759176940.png

image.png125804137.png

avro数据源接入的时候在 6.2.4 开启分页功能正常. 升级到 7.0.0以后开启分页直接报错.
demo已上传, 请尽快帮忙查看一下

AvroResultSetDemo.zip

149.38 KB, 下载次数: 24

评分

参与人数 1金币 +200 收起 理由
Joestar.Xu + 200 赞一个!

查看全部评分

6 个回复

倒序浏览
Joestar.XuSpreadJS 开发认证
超级版主   /  发表于:2024-3-4 17:41:42
沙发
您好,您描述的情况我了解了,这边调研一下,后续有进展我会在本贴中回复您。
SpreadJS 17.0.9 | GcExcel 7.1.2 已发布~
回复 使用道具 举报
Joestar.XuSpreadJS 开发认证
超级版主   /  发表于:2024-3-5 17:26:36
板凳
本帖最后由 Joestar.Xu 于 2024-3-5 17:28 编辑


您好,您描述的情况目前已初步认定为是一个Bug,可以先参考以下Workaround:

您需要像 getColumnLabel 方法一样在 GcResultSetMetaData 中实现 getColumnName 方法。

  1. @Override
  2. public String getColumnLabel(int paramInt) throws SQLException {
  3.    String columnLabel = "c" + (paramInt - 1);
  4.    System.out.println("columnLabel:" + columnLabel);
  5.    return columnLabel;
  6. }

  7. @Override
  8. public String getColumnName(int paramInt) throws SQLException {
  9.    String columnName = "c" + (paramInt - 1);
  10.    System.out.println("columnName:" + columnName);
  11.    return columnName;
  12. }
复制代码


SpreadJS 17.0.9 | GcExcel 7.1.2 已发布~
回复 使用道具 举报
扁担宽板凳长
金牌服务用户   /  发表于:2024-3-5 19:22:09
地板
这个workround 是没有报错了, 但是 数据没有渲染出来
image.png509411010.png
回复 使用道具 举报
Joestar.XuSpreadJS 开发认证
超级版主   /  发表于:2024-3-6 11:08:37
5#
您好,这边调研了一下,漏了两个需要重写的方法:

在GcMockResultSet中:

  1. @Override
  2. public boolean last() throws SQLException {
  3.    this.rowIndex = _records.size();
  4.    return true;
  5. }

  6. @Override
  7. public int getRow() throws SQLException {
  8.         return this.rowIndex;
  9. }
复制代码
SpreadJS 17.0.9 | GcExcel 7.1.2 已发布~
回复 使用道具 举报
Clark.Pan讲师达人认证 悬赏达人认证 SpreadJS 开发认证
超级版主   /  发表于:2024-3-14 17:59:12
6#
您好,请问您的问题是否已经解决,如果仍未解决还请您继续提问。
回复 使用道具 举报
Joestar.XuSpreadJS 开发认证
超级版主   /  发表于:2024-3-20 15:02:32
7#
您好,在升级了7.0.5后需要您修改一下GcMockResultSet 中的 absolute函数的内容来获取和之前版本一致的结果:

  1.         @Override
  2.         public boolean absolute(int row) throws SQLException {
  3.                 if (row <=_records.size()) {
  4.                         this.rowIndex = row;
  5.                         return true;
  6.                 } else {
  7.                         return false;
  8.                 }
  9.         }
复制代码


SpreadJS 17.0.9 | GcExcel 7.1.2 已发布~
回复 使用道具 举报
您需要登录后才可以回帖 登录 | 立即注册
返回顶部