|
SAM_ASSET.fLibraryId = '"+row.getID()+"' and SAM_ASSET.fApprovedState='已发布' and (SAM_ASSET.fLibraryId in (select c.fLibraryId from SAM_ContactIs c where c.fPersonId='"+PersonID+"') or instr(SAM_ASSET.fSearchLibrary,'"+DeptID+"')>0)
上面的条件在SQL的where里没问题,但要想在X5的setFilter中起作用,不自己写SQL,有什么方法吗?现在用下面的方法报错:
mainData.setFilter("idFilter", "SAM_ASSET.fLibraryId = '"+row.getID()+"' and SAM_ASSET.fApprovedState='已发布' and (SAM_ASSET.fLibraryId in (select c.fLibraryId from SAM_ContactIs c where c.fPersonId='"+PersonID+"') or instr(SAM_ASSET.fSearchLibrary,'"+DeptID+"')>0)");
mainData.refreshData();
- 2017-04-29 16:38:47 excute stream action, params:{"accept":"application/json","action":"querySAM_ASSETAction","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"columns":"SAM_ASSET,fAbstract,fAcceptanceDate,fAgencyPublicationNumber,fApprovedState,fBizState,fBizStateName,fCategoryName,fClassificationMachanism,fComplianceToStandards,fCost,fCreateTime,fCreatorFId,fCreatorId,fCurrentActivities,fCurrentExecutors,fDistributionStatement,fDomain,fDomainName,fFacet,fFacetCategory,fFacetLabel,fFacetTerm,fIsAdopt,fIsAudit,fIsComplete,fIsJoin,fIsPass,fIsPublish,fKeyword,fLanguage,fLanguageName,fLibraryId,fLibraryName,fName,fProvider,fReference,fRegistryDate,fRegistryNumber,fRestriction,fRetrievableExtent,fSearchLibrary,fSearchLibraryName,fSearchWay,fSecretLevel,fSecretLevelName,fSecurityCategory,fSort,fTargetEnvironment,fTerm,fTermLabel,fTransferSize,fUrl,fVersionNumber,fVersiondate,fWarranties,version","filter":"(SAM_ASSET.fLibraryId = '565C51600E88462B80C8D256CB16BB8D' and SAM_ASSET.fApprovedState='已发布' and (SAM_ASSET.fLibraryId in (select c.fLibraryId from SAM_ContactIs c where c.fPersonId='fDf9xfCSNvdeDxJZvCX') or instr(SAM_ASSET.fSearchLibrary,'tW0iziUBPS1I37bhdAc')>0))","limit":20,"offset":0,"orderBy":"fCreateTime DESC","variables":{}},"process":"/portal/process/message/messageProcess","translateParameter":{"cellnameByRelation":false,"dataType":"row-list","includeState":true,"rowsConfig":{"concept":"SAM_ASSET","sequence":"SAM_ASSET,fAbstract,fAcceptanceDate,fAgencyPublicationNumber,fApprovedState,fBizState,fBizStateName,fCategoryName,fClassificationMachanism,fComplianceToStandards,fCost,fCreateTime,fCreatorFId,fCreatorId,fCurrentActivities,fCurrentExecutors,fDistributionStatement,fDomain,fDomainName,fFacet,fFacetCategory,fFacetLabel,fFacetTerm,fIsAdopt,fIsAudit,fIsComplete,fIsJoin,fIsPass,fIsPublish,fKeyword,fLanguage,fLanguageName,fLibraryId,fLibraryName,fName,fProvider,fReference,fRegistryDate,fRegistryNumber,fRestriction,fRetrievableExtent,fSearchLibrary,fSearchLibraryName,fSearchWay,fSecretLevel,fSecretLevelName,fSecurityCategory,fSort,fTargetEnvironment,fTerm,fTermLabel,fTransferSize,fUrl,fVersionNumber,fVersiondate,fWarranties,version"},"transformIdcolumn":true,"useNamespace":true}}
- java.lang.reflect.InvocationTargetException
- at sun.reflect.GeneratedMethodAccessor138.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 SAM_ASSET.* FROM SAM_ASSET SAM_ASSET WHERE ((SAM_ASSET.fLibraryId = '565C51600E88462B80C8D256CB16BB8D' and SAM_ASSET.fApprovedState='已发布' and (SAM_ASSET.fLibraryId in (select c.fLibraryId from SAM_ContactIs c where c.fPersonId='fDf9xfCSNvdeDxJZvCX') or instr(SAM_ASSET.fSearchLibrary,'tW0iziUBPS1I37bhdAc')>0))) ORDER BY fCreateTime DESC LIMIT 0, 20
- --> 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 BizProcedure.query(BizProcedure.java:12)
- ... 26 more
- Caused by: com.justep.exception.BusinessException: 编码: JUSTEP154053; 提示: KSQL语法错误, columns中的列fLibraryId必须包含在select查出列中
- at com.justep.exception.BusinessException.create(Unknown Source)
- at com.justep.util.Utils.check(Unknown Source)
- at com.justep.system.ksql.parser.AbstractParser.handleColumns(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)
- ... 31 more
复制代码
|
|