|
我现在遇到的需求,是要做一个生产计划导入功能.
业务背景:有多个工厂,每个工厂要报每月的不同产品的生产计划.
采用主从表结构.主表:生产月计划表头,从表:生产月计划产品表.
主表字段:工厂,年月,计划人员,表头说明.
因为每月只录入一份数据,故表头主键为工厂,年月).
从表字段:工厂,年月,品号,品名,计划量,单位,行项目说明.
从表头主键为工厂,年月,品号).
从表与主表的关联关系为: (从表.工厂=主表.工厂 AND 从表.年月=主表.年月).
UI2用X5的模版生成,选择模版为:桌面 >> 列表/详细 >> 主从-列表/详细.
运行后可以录入并保存数据.从SQLServer查询的结果如下:
SELECT TOP 1000 [fFactory]
,[fMonth]
,[version]
,[fPlaner]
,[fHMemo]
FROM [PP_FactPlan]
SELECT TOP 1000 [fDFactory]
,[fDMonth]
,[fDPartNo]
,[version]
,[fDPartName]
,[fDQuality]
,[fDUnit]
,[fDMemo]
FROM [PP_PlanProduct]
关掉页面,重新打开时出现错误:
具体文字内容:
===================================
提示
刷新数据失败! ,
执行KSQL出错, KSQL: SELECT PP_PlanProduct.* FROM PP_PlanProduct PP_PlanProduct WHERE
((PP_PlanProduct='2000:201705')) LIMIT 0, 20
--> sql:
--> binds: []
编码:JUSTEP150210
隐藏详细
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
PP_PlanProduct.* FROM PP_PlanProduct PP_PlanProduct WHERE ((PP_PlanProduct='2000:201705')) 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.BusinessException: 编码: JUSTEP150119; 提示: "2000:201705"解码出错, 类型"[String,
String, String]"不匹配 at com.justep.exception.BusinessException.create(Unknown Source) at
com.justep.util.Utils.check(Unknown Source) at com.justep.model.ModelUtils.decode(Unknown Source) at
com.justep.system.ksql.visitor.SQLVisitor.normalizeDim(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.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
===================================
|
|