|
版本: |
其它(帖子中说明) |
小版本号: |
3.6 |
|
|
数据库: |
Oracle |
服务器操作系统: |
Windows |
应用服务器: |
Tomcat |
客户端操作系统: |
Windows 7 |
浏览器: |
Chrome |
|
|
本帖最后由 tutuaa1111 于 2017-9-1 14:22 编辑
如下图员工基础信息是主表,异动信息从表我想在
点击异动未审核时在员工基础信息列表里只显示异动信息里带未审核的员工基础信息。
代码如下
Model.prototype.button6Click = function(event){
var data1=this.comp('mainData');
var it =this.comp('detailData');
data1.setFilter('filter', "");
var sql = "select ZT_RSDA.* from ZT_RSDA ZT_RSDA optional join ZT_YDYGDA ZT_YDYGDA on ZT_YDYGDA.fRSDAID = ZT_RSDA where ZT_RSDA.fSCZT = 0 AND ZT_RSDA.fLZZT = 0 AND ZT_YDYGDA.fZT = '未审核'";
data1.setFilter('filter', sql);
data1.refreshData();
};
测试会报:
2017-09-01 14:16:03 excute stream action, params:{"accept":"application/json","action":"queryZT_RSDA2Action","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"columns":"ZT_RSDA,fBM,fBZ,fCSRQ,fDABH,fFXFS,fGH,fGL,fGLM,fGW,fHTDQTS,fHTJSRQ,fHTQSRQ,fHTQX,fHYZK,fJB,fJJLXR,fJJLXRDH,fLRR,fLRSJ,fLSRTS,fLXDH,fLZLX,fLZRQ,fLZSHZT,fLZYY,fLZZT,fLZZTS,fNL,fRZRQ,fSCZT,fSFZDZ,fSFZH,fSYBZX,fSYQ,fXB,fXGR,fXGSJ,fXL,fXM,fZT,fZY,fZZFCODE,fZZRQ,version","filter":"(select ZT_RSDA.* from ZT_RSDA ZT_RSDA optional join ZT_YDYGDA ZT_YDYGDA on ZT_YDYGDA.fRSDAID = ZT_RSDA where ZT_RSDA.fSCZT = 0 AND ZT_RSDA.fLZZT = 0 AND ZT_YDYGDA.fZT = '未审核')","limit":5,"offset":0,"variables":{}},"process":"/ZTERP/ZTHR/process/YDGL/yDGLProcess","translateParameter":{"cellnameByRelation":false,"dataType":"row-list","includeState":true,"rowsConfig":{"concept":"ZT_RSDA","sequence":"ZT_RSDA,calcCheckBox,fBM,fBZ,fCSRQ,fDABH,fFXFS,fGH,fGL,fGLM,fGW,fHTDQTS,fHTJSRQ,fHTQSRQ,fHTQX,fHYZK,fJB,fJJLXR,fJJLXRDH,fLRR,fLRSJ,fLSRTS,fLXDH,fLZLX,fLZRQ,fLZSHZT,fLZYY,fLZZT,fLZZTS,fNL,fRZRQ,fSCZT,fSFZDZ,fSFZH,fSYBZX,fSYQ,fXB,fXGR,fXGSJ,fXL,fXM,fZT,fZY,fZZFCODE,fZZRQ,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 ZT_RSDA.* FROM ZT_RSDA ZT_RSDA WHERE (ZT_RSDA.fSCZT = 0 AND ZT_RSDA.fLZZT = 0) AND ((select ZT_RSDA.* from ZT_RSDA ZT_RSDA optional join ZT_YDYGDA ZT_YDYGDA on ZT_YDYGDA.fRSDAID = ZT_RSDA where ZT_RSDA.fSCZT = 0 AND ZT_RSDA.fLZZT = 0 AND ZT_YDYGDA.fZT = '未审核')) LIMIT 0, 5
--> 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:112)
... 26 more
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP154053; 提示: KSQL语法错误, columns中的列fBM必须包含在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
我要是自己写个Action也用这KSQL语句是不会报错。现在业务需求还是在JS里写过滤符合要求。求解为啥js里这SQL会报错。
|
|