起步软件技术论坛
搜索
 找回密码
 注册

QQ登录

只需一步,快速开始

查看: 1186|回复: 3

[结贴] query中left join sa_task表,newData()时报T_seal.sID的默认值不允为空

[复制链接]

16

主题

75

帖子

242

积分

中级会员

Rank: 3Rank: 3

积分
242
QQ
发表于 2014-12-15 15:22:14 | 显示全部楼层 |阅读模式
如题,在概念的标准动作设置里面,queryaction的KSQL语句中left join sa_task(视图),结果在页面中newData()时,报
编码: JUSTEP180012; 提示: KEY-RELATION "T_seal.sID"的默认值不允许为空
信息如下:
<action direct-execute="true" process="/OA_WS/files/process/sealRequisition/sealRequisitionProcess" activity="FatherActivity" action-flag="__action_0__" executor="" execute-context="" name="createT_sealAction"><parameters xmlns:xbiz="http://www.justep.com/xbiz#"><parameter name="table"><xbiz:table><rows><userdata name="concept">T_seal</userdata><userdata name="relations">T_seal.applyNo,T_seal.applyUnitId,T_seal.applyDept,T_seal.applyer,T_seal.applyDatetime,T_seal.sealUnit,T_seal.sealCode,T_seal.usages,T_seal.quantity,T_seal.useReason,T_seal.detailPath,T_seal.toUnitName,T_seal.predictDate,T_seal.outOperator,T_seal.outDate,T_seal.inOperator,T_seal.inDate,T_seal.status,T_seal.version,T_seal.isCountersignCheck,T_files.fileName,T_codes.codename,T_codes[1].codename,Sa_oporg.sName,Sa_oporg[1].sName,Sa_oporg[1].sName,Sa_taskInFiles.sID</userdata><userdata name="model">/OA_WS/files/data</userdata><userdata name="concept-alias">T_seal</userdata><userdata name="id-column-name">T_seal</userdata><userdata name="id-column-type">String</userdata><userdata name="id-column-define">T_seal</userdata><userdata name="relation-alias">applyNo,applyUnitId,applyDept,applyer,applyDatetime,sealUnit,sealCode,usages,quantity,useReason,detailPath,toUnitName,predictDate,outOperator,outDate,inOperator,inDate,status,version,isCountersignCheck,fileName,usageName,statusName,applyOrgName,applyDeptName,sealBelongOgnName,sId</userdata><userdata name="relation-types">String,String,String,String,DateTime,String,String,String,Integer,String,String,String,DateTime,String,DateTime,String,DateTime,Integer,Integer,String,String,String,String,String,String,String,String</userdata><userdata name="update-mode">whereVersion</userdata><row><userdata name="recordState">new</userdata><cell changed="1"/><cell original-value="070000" changed="1">070000</cell><cell original-value="070300" changed="1">070300</cell><cell original-value="%E9%99%88%E6%95%8F" changed="1">%E9%99%88%E6%95%8F</cell><cell original-value="2014-12-15T15%3A10%3A24.493Z" changed="1">2014-12-15T15%3A10%3A24.493Z</cell><cell original-value="070000" changed="1">070000</cell><cell changed="1"/><cell original-value="1" changed="1">1</cell><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell changed="1"/><cell original-value="%E7%9B%96%E7%AB%A0" changed="1">%E7%9B%96%E7%AB%A0</cell><cell changed="1"/><cell original-value="%E7%9F%B3%E6%B4%9E%E5%8F%A3%E6%B1%A1%E6%B0%B4%E5%A4%84%E7%90%86%E5%8E%82" changed="1">%E7%9F%B3%E6%B4%9E%E5%8F%A3%E6%B1%A1%E6%B0%B4%E5%A4%84%E7%90%86%E5%8E%82</cell><cell original-value="%E7%9F%B3%E6%B4%9E%E5%8F%A3%E5%8E%82%E8%B4%A2%E5%8A%A1%E7%A7%91" changed="1">%E7%9F%B3%E6%B4%9E%E5%8F%A3%E5%8E%82%E8%B4%A2%E5%8A%A1%E7%A7%91</cell><cell original-value="%E7%9F%B3%E6%B4%9E%E5%8F%A3%E6%B1%A1%E6%B0%B4%E5%A4%84%E7%90%86%E5%8E%82" changed="1">%E7%9F%B3%E6%B4%9E%E5%8F%A3%E6%B1%A1%E6%B0%B4%E5%A4%84%E7%90%86%E5%8E%82</cell><cell changed="1"/></row></rows></xbiz:table></parameter><parameter name="defaultValues"><xbiz:map/></parameter></parameters><translate-parameter data-type="row-list" transform-idcolumn="true" use-namespace="true" cellname-by-relation="false"><rows-config concept="T_seal" sequence="applyNo,applyUnitId,applyDept,applyer,applyDatetime,sealUnit,sealCode,usages,quantity,useReason,detailPath,toUnitName,predictDate,outOperator,outDate,inOperator,inDate,status,version,isCountersignCheck,fileName,usageName,statusName,applyOrgName,applyDeptName,sealBelongOgnName,sId"/></translate-parameter></action>
java.lang.reflect.InvocationTargetException
        at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
        at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:39)
        at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:25)
        at java.lang.reflect.Method.invoke(Method.java:592)
        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.BusinessServerServlet.execService(Unknown Source)
        at com.justep.business.server.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        at com.justep.x.bs.BusinessServerServlet.service(Unknown Source)
        at javax.servlet.http.HttpServlet.service(HttpServlet.java:717)
        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:102)
        at org.apache.catalina.core.StandardEngineValve.invoke(StandardEngineValve.java:109)
        at org.apache.catalina.connector.CoyoteAdapter.service(CoyoteAdapter.java:298)
        at org.apache.coyote.http11.Http11Processor.process(Http11Processor.java:857)
        at org.apache.coyote.http11.Http11Protocol$Http11ConnectionHandler.process(Http11Protocol.java:588)
        at org.apache.tomcat.util.net.JIoEndpoint$Worker.run(JIoEndpoint.java:489)
        at java.lang.Thread.run(Thread.java:595)
Caused by: com.justep.exception.BusinessException: 编码: JUSTEP180012; 提示: KEY-RELATION "T_seal.sID"的默认值不允许为空
        at com.justep.exception.BusinessException.create(Unknown Source)
        at com.justep.util.Utils.check(Unknown Source)
        at com.justep.system.data.BizData.create(Unknown Source)
        at BizProcedure.create(BizProcedure.java:22)
        ... 26 more

16

主题

75

帖子

242

积分

中级会员

Rank: 3Rank: 3

积分
242
QQ
 楼主| 发表于 2014-12-15 15:23:10 | 显示全部楼层
详细query的KSQL为:
select T_seal.*,T_files.fileName as fileName,T_codes.codename as usageName,T_codes_2.codename as statusName,Sa_oporg.sName as applyOrgName,Sa_oporg_2.sName as applyDeptName,Sa_oporg_4.sName as sealBelongOgnName,Sa_taskInFiles.sID as sId
    from T_seal T_seal
     optional  join T_files T_files on T_seal.sealCode = T_files.fileCode
     optional  join T_codes T_codes on T_seal.usages = T_codes.codevalue AND T_codes.codetype = 'usages'
     optional  join T_codes T_codes_2 on T_seal.status = T_codes_2.codevalue AND T_codes_2.codetype = 'ProcessStatus'
     optional  join Sa_oporg Sa_oporg on T_seal.applyUnitId = Sa_oporg.sCode
     optional  join Sa_oporg Sa_oporg_2 on T_seal.applyDept = Sa_oporg_2.sCode
     optional  join Sa_oporg Sa_oporg_4 on T_seal.sealUnit = Sa_oporg_4.sCode
     optional  join Sa_taskInFiles Sa_taskInFiles on T_seal = Sa_taskInFiles.sData1
    where Sa_taskInFiles.sKindID = 'tkProcessInstance'
    order by T_seal.applyNo desc
其中 Sa_taskInFiles是sa_task视图
回复 支持 反对

使用道具 举报

16

主题

75

帖子

242

积分

中级会员

Rank: 3Rank: 3

积分
242
QQ
 楼主| 发表于 2014-12-15 15:27:10 | 显示全部楼层
另外,我想问下X5的queryAction会影响createAction吗??
回复 支持 反对

使用道具 举报

16

主题

75

帖子

242

积分

中级会员

Rank: 3Rank: 3

积分
242
QQ
 楼主| 发表于 2014-12-15 15:33:54 | 显示全部楼层
解决了,是Sa_taskInFiles的主键关系设置了的问题,应该置空主键关系,结贴吧。
回复 支持 反对

使用道具 举报

您需要登录后才可以回帖 登录 | 注册

本版积分规则

小黑屋|手机版|X3技术论坛|Justep Inc.    

GMT+8, 2024-11-22 22:50 , Processed in 0.060970 second(s), 23 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

快速回复 返回顶部 返回列表