|
本帖最后由 qweasdzxc 于 2017-6-9 16:41 编辑
我这个数据过滤具体怎么写,试了好多次都没写出来,具体怎么写?
- alert(deptCode);
- bizData1.setFilter("org", "SA_OPOrg.sFCode = '/JUSTEP' OR (SA_OPOrg.sFCode not like '/JUSTEP/"+deptCode+"' and SA_OPOrg.sFCode not like '/JUSTEP/Leader')");
- bizData1.refreshData();
复制代码
我用上面的代码报错: AND (SA_OPOrg.sParent IS NULL) 这个条件是怎么设置产生的?我在oracle中自己查询不要这个条件就能做正确过滤出我要的- 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}}
- java.lang.reflect.InvocationTargetException
- at sun.reflect.GeneratedMethodAccessor194.invoke(Unknown Source)
- at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
- at java.lang.reflect.Method.invoke(Method.java:497)
- at com.justep.system.action.Engine.invokeActions(Native Method)
- at com.justep.system.action.Engine.invokeActions(Unknown Source)
- at com.justep.business.server.BusinessServer.doAction(Unknown Source)
- at com.justep.business.server.BusinessServer.doExcute(Unknown Source)
- at com.justep.business.server.BusinessServer.excute(Unknown Source)
- at com.justep.business.server.BusinessServer.excute(Unknown Source)
- at com.justep.business.server.BusinessServerServlet.execService(Unknown Source)
- at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
- at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
- at javax.servlet.http.HttpServlet.service(HttpServlet.java:723)
- at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:290)
- at org.apache.catalina.core.ApplicationFilterChain.doFilter(ApplicationFilterChain.java:206)
- at org.apache.catalina.core.StandardWrapperValve.invoke(StandardWrapperValve.java:233)
- at org.apache.catalina.core.StandardContextValve.invoke(StandardContextValve.java:191)
- at org.apache.catalina.core.StandardHostValve.invoke(StandardHostValve.java:127)
- at org.apache.catalina.valves.ErrorReportValve.invoke(ErrorReportValve.java:103)
- at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
- at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:293)
- at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:861)
- at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:606)
- at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
- at java.lang.Thread.run(Thread.java:745)
- 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
- --> sql:
- --> binds: []
- at com.justep.exception.BusinessException.create(Unknown Source)
- at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
- at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
- at com.justep.system.data.impl.TableUtilsImplement.ksqlSelect(Unknown Source)
- at com.justep.system.data.BizData.query(Unknown Source)
- at com.justep.system.opm.OrgQuery.query(Unknown Source)
- at OPMProcedure.query(OPMProcedure.java:112)
- ... 26 more
- Caused by: com.justep.exception.KSQLException: 编码: JUSTEP154115; 提示: KSQL语法错误, A_OPOrg.sFCode ^^not like '/JUST中未找到需要的元素, 位置233期望是)
- at com.justep.exception.KSQLException.create(Unknown Source)
- at com.justep.system.ksql.token.TokenManager.matchToken(Unknown Source)
- at com.justep.system.ksql.token.TokenManager.match(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.unaryExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.multiExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.addExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.compExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.notExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.andExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.orExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.unaryExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.multiExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.addExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.compExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.notExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.andExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.orExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.unaryExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.multiExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.addExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.compExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.notExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.andExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.orExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.conditionExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.whereExpression(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.selectSentenceNode(Unknown Source)
- at com.justep.system.ksql.parser.QueryParser.start(Unknown Source)
- at com.justep.system.ksql.parser.QueryParser.start(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.parse(Unknown Source)
- ... 32 more
复制代码
|
-
-
|