起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 3922|回复: 1

[结贴] 数据过滤

[复制链接]

506

主题

1631

帖子

3387

积分

论坛元老

Rank: 8Rank: 8

积分
3387
QQ
发表于 2017-6-9 16:34:53 | 显示全部楼层 |阅读模式
本帖最后由 qweasdzxc 于 2017-6-9 16:41 编辑

我这个数据过滤具体怎么写,试了好多次都没写出来,具体怎么写?
  1. alert(deptCode);
  2.           bizData1.setFilter("org", "SA_OPOrg.sFCode = '/JUSTEP' OR (SA_OPOrg.sFCode not like '/JUSTEP/"+deptCode+"' and SA_OPOrg.sFCode not like '/JUSTEP/Leader')");
  3.           bizData1.refreshData();
复制代码

我用上面的代码报错: AND (SA_OPOrg.sParent IS NULL) 这个条件是怎么设置产生的?我在oracle中自己查询不要这个条件就能做正确过滤出我要的
  1. 2017-06-09 16:34:47 excute stream action, params:{"accept":"application/json","action":"queryOrgAction","actionFlag":"__action_0__","activity":"businessActivity2","contentType":"json","executeContext":"","executor":"/ORG01.ogn/0wHT7FqxM6TNiev6BOJ.dpt/B4EQ28gDsEw18QLS2gv.pos/EzlweaF1TMwnghEDsRL@B4EQ28gDsEw18QLS2gv.psm","parameters":{"columns":"SA_OPOrg,sAddress,sCode,sDescription,sFCode,sFID,sFName,sFax,sLevel,sLongName,sName,sNodeKind,sOrgKindID,sParent,sPersonID,sPhone,sSequence,sValidState,sWxDeptID,sZip,version","filter":"(SA_OPOrg.sValidState=1) AND (SA_OPOrg.sOrgKindID in ('ogn','dpt')) AND (SA_OPOrg.sParent IS NULL) AND (SA_OPOrg.sFCode = '/JUSTEP' OR (SA_OPOrg.sFCode not like '/JUSTEP/dept004' and SA_OPOrg.sFCode not like '/JUSTEP/Leader'))","limit":-1,"offset":0,"orderBy":"sSequence ASC","variables":{}},"process":"/SAM/assetManage/process/assetin/assetinProcess","translateParameter":{"cellnameByRelation":false,"dataType":"row-tree","includeState":true,"rowsConfig":{"concept":"SA_OPOrg","sequence":"SA_OPOrg,sAddress,sCode,sDescription,sFCode,sFID,sFName,sFax,sLevel,sLongName,sName,sNodeKind,sOrgKindID,sParent,sPersonID,sPhone,sSequence,sValidState,sWxDeptID,sZip,version"},"transformIdcolumn":true,"useNamespace":true}}
  2. java.lang.reflect.InvocationTargetException
  3.         at sun.reflect.GeneratedMethodAccessor194.invoke(Unknown Source)
  4.         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
  5.         at java.lang.reflect.Method.invoke(Method.java:497)
  6.         at com.justep.system.action.Engine.invokeActions(Native Method)
  7.         at com.justep.system.action.Engine.invokeActions(Unknown Source)
  8.         at com.justep.business.server.BusinessServer.doAction(Unknown Source)
  9.         at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
  10.         at com.justep.business.server.BusinessServer.excute(Unknown Source)
  11.         at com.justep.business.server.BusinessServer.excute(Unknown Source)
  12.         at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
  13.         at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
  14.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  15.         at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
  16.         at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
  17.         at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
  18.         at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
  19.         at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
  20.         at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
  21.         at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
  22.         at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
  23.         at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
  24.         at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
  25.         at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
  26.         at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
  27.         at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
  28.         at java.lang.Thread.run(Thread.java:745)
  29. Caused by: com.justep.exception.BusinessException: 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: SELECT SA_OPOrg.*  FROM SA_OPOrg SA_OPOrg WHERE (SA_OPOrg.sValidState >= 0) AND ((SA_OPOrg.sValidState=1) AND (SA_OPOrg.sOrgKindID in ('ogn','dpt')) AND (SA_OPOrg.sParent IS NULL) AND (SA_OPOrg.sFCode = '/JUSTEP' OR (SA_OPOrg.sFCode not like '/JUSTEP/dept004' and SA_OPOrg.sFCode not like '/JUSTEP/Leader'))) ORDER BY sSequence ASC LIMIT 0, -1
  30. --> sql:
  31. --> binds: []
  32.         at com.justep.exception.BusinessException.create(Unknown Source)
  33.         at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
  34.         at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
  35.         at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
  36.         at com.justep.system.data.BizData.query(Unknown Source)
  37.         at com.justep.system.opm.OrgQuery.query(Unknown Source)
  38.         at OPMProcedure.query(OPMProcedure.java:112)
  39.         ... 26 more
  40. Caused by: com.justep.exception.KSQLException: 编码: JUSTEP154115; 提示: KSQL语法错误, A_OPOrg.sFCode ^^not like '/JUST中未找到需要的元素, 位置233期望是)
  41.         at com.justep.exception.KSQLException.create(Unknown Source)
  42.         at com.justep.system.ksql.token.TokenManager.matchToken(Unknown Source)
  43.         at com.justep.system.ksql.token.TokenManager.match(Unknown Source)
  44.         at com.justep.system.ksql.parser.AbstractParser.unaryExpression(Unknown Source)
  45.         at com.justep.system.ksql.parser.AbstractParser.multiExpression(Unknown Source)
  46.         at com.justep.system.ksql.parser.AbstractParser.addExpression(Unknown Source)
  47.         at com.justep.system.ksql.parser.AbstractParser.compExpression(Unknown Source)
  48.         at com.justep.system.ksql.parser.AbstractParser.notExpression(Unknown Source)
  49.         at com.justep.system.ksql.parser.AbstractParser.andExpression(Unknown Source)
  50.         at com.justep.system.ksql.parser.AbstractParser.orExpression(Unknown Source)
  51.         at com.justep.system.ksql.parser.AbstractParser.unaryExpression(Unknown Source)
  52.         at com.justep.system.ksql.parser.AbstractParser.multiExpression(Unknown Source)
  53.         at com.justep.system.ksql.parser.AbstractParser.addExpression(Unknown Source)
  54.         at com.justep.system.ksql.parser.AbstractParser.compExpression(Unknown Source)
  55.         at com.justep.system.ksql.parser.AbstractParser.notExpression(Unknown Source)
  56.         at com.justep.system.ksql.parser.AbstractParser.andExpression(Unknown Source)
  57.         at com.justep.system.ksql.parser.AbstractParser.orExpression(Unknown Source)
  58.         at com.justep.system.ksql.parser.AbstractParser.unaryExpression(Unknown Source)
  59.         at com.justep.system.ksql.parser.AbstractParser.multiExpression(Unknown Source)
  60.         at com.justep.system.ksql.parser.AbstractParser.addExpression(Unknown Source)
  61.         at com.justep.system.ksql.parser.AbstractParser.compExpression(Unknown Source)
  62.         at com.justep.system.ksql.parser.AbstractParser.notExpression(Unknown Source)
  63.         at com.justep.system.ksql.parser.AbstractParser.andExpression(Unknown Source)
  64.         at com.justep.system.ksql.parser.AbstractParser.orExpression(Unknown Source)
  65.         at com.justep.system.ksql.parser.AbstractParser.conditionExpression(Unknown Source)
  66.         at com.justep.system.ksql.parser.AbstractParser.whereExpression(Unknown Source)
  67.         at com.justep.system.ksql.parser.AbstractParser.selectSentenceNode(Unknown Source)
  68.         at com.justep.system.ksql.parser.QueryParser.start(Unknown Source)
  69.         at com.justep.system.ksql.parser.QueryParser.start(Unknown Source)
  70.         at com.justep.system.ksql.parser.AbstractParser.parse(Unknown Source)
  71.         ... 32 more
复制代码



009.png
010.png

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2017-6-9 17:02:50 | 显示全部楼层
1.树形的平台默认rootFilter是父不为空的过滤
如果不需要可以在rootFilter上设置1=1
2.not like和not in的用法一样参考http://docs.wex5.com/bex5-server-ksql10014
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-25 13:28 , Processed in 0.055974 second(s), 26 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表