Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bugfix/select excel expr #17

Merged
merged 4 commits into from
Sep 29, 2021

Conversation

berstpander
Copy link
Contributor

bugfix: Fix the bug of value expression when querying data from the table

  • fix the error that the number of results does not match
  • fix the result of the expression field that does not correspond to the result of referenced field
  • fix the problem that the number of results caused by the round-down division is not enough
  • update sample in demo/19_from_excel.yaml

bug:the result of the query will have one more element
…own division is not enough

问题描述:
原代码为:`selectCount := vari.Toal / len(selects)`
因为整除的向下取整,如果`len(selects)`为3,`vari.Total`为8,则`selectCount`为2
对于每一个`selects`的元素来说,都只会查两个元素,这样加起来一共只有6个结果,
导致另外两个结果只能通过重复查到的数据的方式补充。
解决方案:
将代码改为: `selectCount := vari.Total / len(selects) + 1`,以达到使用人员的真正想要的
即查到足够的数量,而不是通过重复补齐
@aaronchen2k aaronchen2k merged commit e20aa94 into easysoft:master Sep 29, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants