|
论坛的代码:
Map<String, Object> vars = new HashMap<String, Object>();
String condition = TaskUtils.getExecutorCondition("t", ContextHelper.getPerson().getPersonMembers(), true, vars);
System.out.println("sadsad");
System.out.println(condition);
String query = "select t, t.sName, t.sCURL, t.sProcess, t.sActivity, t.sCreateTime, t.sExecutorFName, t.sExecutorNames, t.sEURL, t.sCreatorFName, t.sShortcut, t.sHints, t.sCreatorFID, t.sExecutorFID, t.sKindID " +
" from SA_Task t " +
" where (t.sKindID='tkTask' or t.sKindID='tkExecutor' or t.sKindID='tkNotice' or t.sKindID IS NULL) " +
" and (t.sStatusID='tesReady' or t.sStatusID='tesExecuting') " +
" and (t.sTypeID IS NULL or t.sTypeID <> 'WORKREMIND')" +
" and " + condition +
" order by t.sCreateTime desc " +
" limit 0,8 ";
return KSQL.select(query, null, "/system/data", null);
为什么报错:
java.lang.reflect.InvocationTargetException
at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:62)
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 t, t.sName, t.sCURL, t.sProcess, t.sActivity, t.sCreateTime, t.sExecutorFName, t.sExecutorNames, t.sEURL, t.sCreatorFName, t.sShortcut, t.sHints, t.sCreatorFID, t.sExecutorFID, t.sKindID from SA_Task t where (t.sKindID='tkTask' or t.sKindID='tkExecutor' or t.sKindID='tkNotice' or t.sKindID IS NULL) and (t.sStatusID='tesReady' or t.sStatusID='tesExecuting') and (t.sTypeID IS NULL or t.sTypeID <> 'WORKREMIND') and (:_efid0 like concat(t.sExecutorFID, '%')) and t.sExecutorFID like '/%' order by t.sCreateTime desc limit 0,8
--> 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.KSQL.select(Unknown Source)
at Rss.testTask(Rss.java:654)
... 27 more
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP154150; 提示: 找不到变量_efid0对应的值
at com.justep.exception.BusinessException.create(Unknown Source)
at com.justep.util.Utils.check(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.VariableNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.CompExpressionNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.LogicalExpressionNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.WhereNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.SelectSentenceNode.accept(Unknown Source)
at com.justep.system.ksql.visitor.SQLVisitor.visitChildren(Unknown Source)
at com.justep.system.ksql.visitor.QueryVisitor.visit(Unknown Source)
at com.justep.system.ksql.node.QuerySentence.accept(Unknown Source)
... 32 more |
|