过滤及查询

1、 建立过滤条件,分录上的F7过滤

KDBizPromptBox prmt = (KDBizPromptBox) this.kdtEntrys.getColumn("feeType").getEditor().getComponent();

EntityViewInfo view = new EntityViewInfo();

FilterInfo filterInfo = new FilterInfo(); // 建立过滤条件

filterInfo.getFilterItems().add(new FilterItemInfo("number", "108", CompareType.EQUALS));

view.setFilter(filterInfo);

prmt.setEntityViewInfo(view);

2、通用查询

EntityViewInfo evi = new EntityViewInfo();

SelectorItemCollection selector = evi.getSelector();

selector.add(new SelectorItemInfo("id"));

selector.add(new SelectorItemInfo("startDate"));

FilterInfo filter = new FilterInfo();

filter.getFilterItems().add(new FilterItemInfo("accountDate", endAccountDate, CompareType.GREATER));

evi.setFilter(filter);

3、跟1差不多,表头F7过滤

EntityViewInfo view = new EntityViewInfo();

FilterInfo filterInfo = new FilterInfo(); // 建立过滤条件

filterInfo.getFilterItems().add(new FilterItemInfo("number", number, CompareType.GREATER_EQUALS));

view.setFilter(filterInfo);

prmtaccountTo.setEntityViewInfo(view);

prmtaccountTo.getQueryAgent().resetRuntimeEntityView();

4、带or过滤条件,如果不设setMaskString,则默认为and

EntityViewInfo view = new EntityViewInfo();

FilterInfo filterInfo = new FilterInfo(); // 建立过滤条件

filterInfo.getFilterItems().add(new FilterItemInfo("number", "001", CompareType.EQUALS));

filterInfo.getFilterItems().add(new FilterItemInfo("number", "005", CompareType.EQUALS));

filterInfo.setMaskString("#0 or #1");//条件为or (设置过滤条件之间的关系,不设置setMaskString时,默认为and)

view.setFilter(filterInfo);

prmt.setEntityViewInfo(view);

时间: 2024-08-26 05:41:58

过滤及查询的相关文章

django-admin 仿写stark组件action,filter筛选过滤,search查询

写在StandLi里面的方法都是通过ModelSubject这个类里面的stand_li方法,在它里面用StandLi这个类实例化出来一个对象,这个实例化出来的对象把数据传给前端HTML模板进行渲染,所以StandLi这个类里面的方法如果你找不到就是在给前端传数据用的 tag.py 1 from django.conf.urls import url 2 from django.shortcuts import render, redirect, reverse 3 from django.ut

分布式搜索引擎Elasticsearch的查询与过滤

一.写入 先来一个简单的官方例子,插入的参数为 -XPUT ,插入一条记录. curl -XPUT'http://localhost:9200/test/users/1' -d'{ "user": "test", "post_date": "2009-11-15T14:12:12", "message": "Elastic Search" }' { "_index":

[Elasticsearch] 过滤查询以及聚合(Filtering Queries and Aggregations)

本章翻译自Elasticsearch官方指南的Filtering Queries and Aggregations一章. 过滤查询以及聚合 A natural extension to aggregation scoping is filtering. Because the aggregation operates in the context of the query scope, any filter applied to the query will also apply to the

ElasticSearch 常用的查询过滤语句

query 和  filter 的区别请看: http://www.cnblogs.com/ghj1976/p/5292740.html    Filter DSL   term 过滤 term主要用于精确匹配哪些值,比如数字,日期,布尔值或 not_analyzed 的字符串(未经分析的文本数据类型): { "term": { "age":    26           }} { "term": { "date":   &

django orm总结--解决查询结果不区分大小写问题

目录1.1.1 生成查询1.1.2 创建对象1.1.3 保存修改的对象1.1.4 保存 ForeignKey 和 ManyToManyField 字段1.1.5 检索对象1.1.6 检索所有的对象1.1.7 过滤检索特定对象1.1.8 链接过滤1.1.9 过滤结果集是唯一 1.2.1 结果集是延迟的 1.2.2 其他的QuerySet方法1.2.3 限制 QuerySets1.2.4 字段查找1.2.5 跨关系查询1.2.6 过滤器可参考模型字段1.2.7 缓存查询集1.2.8 比较对象1.2.

ElasticSearch结构化查询

ElasticSearch结构化查询 Elasticsearch 提供了丰富的查询过滤语句,而有一些是我们较常用到的. 现在我们快速的介绍一下 这些最常用到的查询过滤语句. term 过滤 term主要用于精确匹配哪些值,比如数字,日期,布尔值或 not_analyzed的字符串(未经分析的文本数据类型): { "term": { "age": 26 }} { "term": { "date": "2014-09-0

Oracle系列:(15)集合查询

使用并集运算,查询20号部门或30号部门的员工信息 select * from emp where deptno = 20 union select * from emp where deptno = 30; 注意: union:二个集合中,如果都有相同的,取其一 union all:二个集合中,如果都有相同的,都取 使用set time/timing on,打开时间的开关 set time on; set time off; 使用set time/timing off,关闭时间的开关 set 

Yii2中多表关联查询(with、join、joinwith)

表结构 现在有客户表.订单表.图书表.作者表, 客户表Customer   (id  customer_name) 订单表Order         (id  order_name   customer_id   book_id) 图书表Book          (id  book_name    author_id) 作者表Author        (id  author_name) 模型定义 下面是这4个个模型的定义,只写出其中的关联 Customer class Customer ex

第三百六十五节,Python分布式爬虫打造搜索引擎Scrapy精讲—elasticsearch(搜索引擎)的查询

第三百六十五节,Python分布式爬虫打造搜索引擎Scrapy精讲-elasticsearch(搜索引擎)的查询 elasticsearch(搜索引擎)的查询 elasticsearch是功能非常强大的搜索引擎,使用它的目的就是为了快速的查询到需要的数据 查询分类: 基本查询:使用elasticsearch内置的查询条件进行查询 组合查询:把多个查询条件组合在一起进行复合查询 过滤:查询同时,通过filter条件在不影响打分的情况下筛选数据