|
给数据送一条日期筛选条件,如下
data.setFilter('filter2',"stringToDate(Sfc_shop_ticket.record_date ) >= justep.Date.fromString('" + this.comp("input2").val() + "', justep.Date.STANDART_FORMAT_SHOT ) and stringToDate(Sfc_shop_ticket.record_date ) <= justep.Date.fromString('" + this.comp("input1").val() + "', justep.Date.STANDART_FORMAT_SHOT )");
报错
2017-03-07 08:00:10 excute stream action, params:{"accept":"application/json","action":"querySfc_shop_ticketAction","actionFlag":"__action_0__","activity":"staticActivity1","contentType":"json","executeContext":"","executor":"","parameters":{"columns":"Sfc_shop_ticket,accum_qty,actual_hours,check_date,check_man,dept_code,employee,employee_dept,end_date,flag,grade_hours_1,grade_hours_2,grade_hours_3,grade_hours_4,grade_hours_5,grade_qty_1,grade_qty_2,grade_qty_3,grade_qty_4,grade_qty_5,gzl,hours_code,id,idle_hours,iii,item_code,lll,op_no,order_no,other_hours,out_op_cost,out_op_unit,plan_hours,plan_qty,record_date,remarks,remind_qty,run_time,run_unit,scrap_hours,scrap_qty,setup_time,shift,shift_seq,start_date,wc_code","filter":"(employee='gxj') AND (stringToDate(Sfc_shop_ticket.record_date ) >= justep.Date.fromString('2017-03-01', justep.Date.STANDART_FORMAT_SHOT ) and stringToDate(Sfc_shop_ticket.record_date ) <= justep.Date.fromString('2017-03-07', justep.Date.STANDART_FORMAT_SHOT ))","limit":20,"offset":0,"variables":{}},"process":"/erp/cjgl/process/gp/gpProcess","translateParameter":{"cellnameByRelation":false,"dataType":"row-list","includeState":true,"rowsConfig":{"concept":"Sfc_shop_ticket","sequence":"Sfc_shop_ticket,accum_qty,actual_hours,calcCheckBox,check_date,check_man,dept_code,employee,employee_dept,end_date,flag,grade_hours_1,grade_hours_2,grade_hours_3,grade_hours_4,grade_hours_5,grade_qty_1,grade_qty_2,grade_qty_3,grade_qty_4,grade_qty_5,gzl,hours_code,id,idle_hours,iii,item_code,lll,op_no,order_no,other_hours,out_op_cost,out_op_unit,plan_hours,plan_qty,record_date,remarks,remind_qty,run_time,run_unit,scrap_hours,scrap_qty,setup_time,shift,shift_seq,start_date,wc_code"},"transformIdcolumn":true,"useNamespace":true}}
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 Sfc_shop_ticket.* FROM Sfc_shop_ticket Sfc_shop_ticket WHERE ((employee='gxj') AND (stringToDate(Sfc_shop_ticket.record_date ) >= justep.Date.fromString('2017-03-01', justep.Date.STANDART_FORMAT_SHOT ) and stringToDate(Sfc_shop_ticket.record_date ) <= justep.Date.fromString('2017-03-07', justep.Date.STANDART_FORMAT_SHOT ))) 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)
... 27 more
Caused by: com.justep.exception.KSQLException: 编码: JUSTEP154115; 提示: KSQL语法错误, >= justep.Date^^.fromString('20中未找到需要的元素, 位置152期望是)
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.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
该怎样修改,请大神赐教!
|
|