根据您的提示,脚本修改后报错:
var user = getItemValue("委托编号");
var rtn = '';
if(user!=null && user.trim().length()>0){
var sql="select item_委托编号,group_concat(distinct item_检测依据) as item_检测依据 from tlk_样品详情表单 where item_委托编号='"+user+"' group by item_委托编号";
var query = queryBySQL(sql);
if(query!=null){
var iter =query.iterator();
if(iter != null && iter.hasNext()){
doc = iter.next();
rtn += doc.getItemValueAsString("检测依据");
}
}
}
return rtn;
错误如下:
Caused by: java.lang.Exception: Field:试验依据-值脚本出错 <br>JavaScriptRunning:[Form.委托表单.Field(__qDSp2cxOBGM41WCz5oS).试验依据.ValueScript]: invalid return (Form.委托表单.Field(__qDSp2cxOBGM41WCz5oS).试验依据.ValueScript#14)
at cn.myapps.runtime.dynaform.form.ejb.Form.recalculateDocument(Form.java:1759)
at cn.myapps.runtime.dynaform.form.ejb.Form.createDocument(Form.java:1139)
at cn.myapps.runtime.dynaform.form.ejb.Form.createDocument(Form.java:1066)
at cn.myapps.runtime.dynaform.form.ejb.Form.createDocument(Form.java:1030)
at cn.myapps.runtime.dynaform.document.ejb.DocumentProcessBean.doNewWithFlowPermission(DocumentProcessBean.java:167)
at cn.myapps.runtime.dynaform.form.service.FormRunTimeServiceImpl.newDocument(FormRunTimeServiceImpl.java:1109)
at cn.myapps.runtime.dynaform.form.controller.FormController.newDocument(FormController.java:194)
at sun.reflect.GeneratedMethodAccessor1803.invoke(Unknown Source)
at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
at java.lang.reflect.Method.invoke(Method.java:498)
at org.springframework.web.method.support.InvocableHandlerMethod.doInvoke(InvocableHandlerMethod.java:209)
at org.springframework.web.method.support.InvocableHandlerMethod.invokeForRequest(InvocableHandlerMethod.java:136)
at org.springframework.web.servlet.mvc.method.annotation.ServletInvocableHandlerMethod.invokeAndHandle(ServletInvocableHandlerMethod.java:102)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.invokeHandlerMethod(RequestMappingHandlerAdapter.java:891)
at org.springframework.web.servlet.mvc.method.annotation.RequestMappingHandlerAdapter.handleInternal(RequestMappingHandlerAdapter.java:797)
at org.springframework.web.servlet.mvc.method.AbstractHandlerMethodAdapter.handle(AbstractHandlerMethodAdapter.java:87)
at org.springframework.web.servlet.DispatcherServlet.doDispatch(DispatcherServlet.java:991)
at org.springframework.web.servlet.DispatcherServlet.doService(DispatcherServlet.java:925)
at org.springframework.web.servlet.FrameworkServlet.processRequest(FrameworkServlet.java:974)
... 56 more
Hibernate: select notificati0_.id as id1_3_, notificati0_.CREATE_TIME as CREATE_T2_3_, notificati0_.DOMAIN_ID as DOMAIN_I3_3_, notificati0_.LINK_PARAMS as LINK_PAR4_3_, notificati0_.MESSAGE_ID as MESSAGE_5_3_, notificati0_.MESSAGE_TYPE as MESSAGE_6_3_, notificati0_.MODULE as MODULE7_3_, notificati0_.RECEIVER_ID as RECEIVER8_3_, notificati0_.SENDER as SENDER9_3_, notificati0_.SENDER_ID as SENDER_10_3_, notificati0_.SUMMARY as SUMMARY11_3_ from mc_notification notificati0_ where notificati0_.RECEIVER_ID=?
Hibernate: select notificati0_.id as id1_3_, notificati0_.CREATE_TIME as CREATE_T2_3_, notificati0_.DOMAIN_ID as DOMAIN_I3_3_, notificati0_.LINK_PARAMS as LINK_PAR4_3_, notificati0_.MESSAGE_ID as MESSAGE_5_3_, notificati0_.MESSAGE_TYPE as MESSAGE_6_3_, notificati0_.MODULE as MODULE7_3_, notificati0_.RECEIVER_ID as RECEIVER8_3_, notificati0_.SENDER as SENDER9_3_, notificati0_.SENDER_ID as SENDER_10_3_, notificati0_.SUMMARY as SUMMARY11_3_ from mc_notification notificati0_ where notificati0_.RECEIVER_ID=?
Hibernate: select count(notice0_.id) as col_0_0_ from mc_notice notice0_ where notice0_.IS_READ=1
Hibernate: select count(comment0_.id) as col_0_0_ from mc_comment comment0_ where comment0_.IS_READ=1
Hibernate: select notificati0_.id as id1_3_, notificati0_.CREATE_TIME as CREATE_T2_3_, notificati0_.DOMAIN_ID as DOMAIN_I3_3_, notificati0_.LINK_PARAMS as LINK_PAR4_3_, notificati0_.MESSAGE_ID as MESSAGE_5_3_, notificati0_.MESSAGE_TYPE as MESSAGE_6_3_, notificati0_.MODULE as MODULE7_3_, notificati0_.RECEIVER_ID as RECEIVER8_3_, notificati0_.SENDER as SENDER9_3_, notificati0_.SENDER_ID as SENDER_10_3_, notificati0_.SUMMARY as SUMMARY11_3_ from mc_notification notificati0_ where notificati0_.RECEIVER_ID=?
Hibernate: select notificati0_.id as id1_3_, notificati0_.CREATE_TIME as CREATE_T2_3_, notificati0_.DOMAIN_ID as DOMAIN_I3_3_, notificati0_.LINK_PARAMS as LINK_PAR4_3_, notificati0_.MESSAGE_ID as MESSAGE_5_3_, notificati0_.MESSAGE_TYPE as MESSAGE_6_3_, notificati0_.MODULE as MODULE7_3_, notificati0_.RECEIVER_ID as RECEIVER8_3_, notificati0_.SENDER as SENDER9_3_, notificati0_.SENDER_ID as SENDER_10_3_, notificati0_.SUMMARY as SUMMARY11_3_ from mc_notification notificati0_ where notificati0_.RECEIVER_ID=?
Hibernate: select count(notice0_.id) as col_0_0_ from mc_notice notice0_ where notice0_.IS_READ=1
Hibernate: select count(comment0_.id) as col_0_0_ from mc_comment comment0_ where comment0_.IS_READ=1 |