|
public String assetin(String libraryId){
String result = "0";
try{
String ksql = "select count(1) from SAM_ASSET a where a.fLibraryId= '"+libraryId+"' and a.fBizState = 'bsFinished' and a.fIsJoin='1' and a.fApprovedState='已发布' and (a.fVersiondate between to_date('2017-05-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2017-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss'))";
Table table = KSQL.select(ksql, null, "/SAM/assetManage/data", null);
Iterator<Row> rows = table.iterator();
if (rows.hasNext()) {
Row row = rows.next();
result = row.getDecimal(0).toString();
}
}catch(Exception ex){
result = ex.getMessage();
ex.printStackTrace();
}
return result;
}
- 编码: JUSTEP150210; 提示: 执行KSQL出错, KSQL: select count(1) from SAM_ASSET a where a.fLibraryId= '565C51600E88462B80C8D256CB16BB8D' and a.fBizState = 'bsFinished' and a.fIsJoin='1' and a.fApprovedState='已发布' and (a.fVersiondate between to_date('2017-05-01 00:00:00','yyyy-mm-dd hh24:mi:ss') and to_date('2017-05-30 00:00:00','yyyy-mm-dd hh24:mi:ss'))
- --> 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 measure.Assetin.assetin(Assetin.java:16)
- 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 MeasureResult.execute(MeasureResult.java:120)
- 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: 编码: JUSTEP154020; 提示: 不支持KSQL函数TO_DATE
- at com.justep.exception.BusinessException.create(Unknown Source)
- at com.justep.util.Utils.check(Unknown Source)
- at com.justep.system.ksql.fun.FunctionManager.getFunction(Unknown Source)
- at com.justep.system.ksql.visitor.SQLVisitor.visit(Unknown Source)
- at com.justep.system.ksql.node.FunctionNode.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)
- ... 37 more
复制代码
有什么函数可以解决?
|
|