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

QQ登录

只需一步,快速开始

查看: 4647|回复: 4

[结贴] 自定义函数

[复制链接]

138

主题

364

帖子

1339

积分

金牌会员

Rank: 6Rank: 6

积分
1339
QQ
发表于 2019-12-3 11:51:04 | 显示全部楼层 |阅读模式
版本: 小版本号:
数据库: 服务器操作系统: 应用服务器:
客户端操作系统: 浏览器:
自定义函数做默认值
控制台报错如下:
2019-12-03 11:49:04 [SQL Time]sql 执行时间:2ms, exec KSQL: select SA_DocLinkDefine,SA_DocLinkDefine.sDefineItems,SA_DocLinkDefine.sActivity,SA_DocLinkDefine.sPersonFID from SA_DocLinkDefine SA_DocLinkDefine where (SA_DocLinkDefine.sProcess='/Office/ManagementSystem/process/Apply/applyProcess' and (SA_DocLinkDefine.sActivity='' or SA_DocLinkDefine.sActivity IS NULL)) or (SA_DocLinkDefine.sProcess='/Office/ManagementSystem/process/Apply/applyProcess' and SA_DocLinkDefine.sActivity='mainActivity')  order by SA_DocLinkDefine.sActivity desc
  --> sql:SELECT  SA_DocLinkDefine.sID, SA_DocLinkDefine.SDEFINEITEMS AS sDefineItems, SA_DocLinkDefine.SACTIVITY AS sActivity, SA_DocLinkDefine.SPERSONFID AS sPersonFID FROM SA_DocLinkDefine SA_DocLinkDefine  WHERE  ( (SA_DocLinkDefine.SPROCESS = ?) AND ( (SA_DocLinkDefine.SACTIVITY = ?) OR (SA_DocLinkDefine.SACTIVITY IS NULL) ) ) OR ( (SA_DocLinkDefine.SPROCESS = ?) AND (SA_DocLinkDefine.SACTIVITY = ?) )   ORDER BY SA_DocLinkDefine.SACTIVITY DESC
--> binds:[/Office/ManagementSystem/process/Apply/applyProcess, , /Office/ManagementSystem/process/Apply/applyProcess, mainActivity]
2019-12-03 11:49:04 excute stream action, params:{"accept":"application/json","action":"createOF_BasicInforAction","actionFlag":"__action_0__","activity":"mainActivity","contentType":"json","executeContext":"","executor":"","parameters":{"table":{"@type":"table","rows":[],"userdata":{"idColumnDefine":"OF_BasicInfor","idColumnName":"OF_BasicInfor","idColumnType":"String","model":"/Office/ManagementSystem/data","relationAlias":"fAppendix,fApplicant,fBNumber,fCPerson,fCPhone,fDepartment,fHead,fLinkName,fProject,fProjectID,fReason,fTPhone,fTime,fType,fTypeID,fUType,fUTypeID,version","relationTypes":"Text,String,String,String,String,String,String,String,String,String,Text,String,Date,String,String,String,String,Integer","relations":"OF_BasicInfor.fAppendix,OF_BasicInfor.fApplicant,OF_BasicInfor.fBNumber,OF_BasicInfor.fCPerson,OF_BasicInfor.fCPhone,OF_BasicInfor.fDepartment,OF_BasicInfor.fHead,OF_BasicInfor.fLinkName,OF_BasicInfor.fProject,OF_BasicInfor.fProjectID,OF_BasicInfor.fReason,OF_BasicInfor.fTPhone,OF_BasicInfor.fTime,OF_BasicInfor.fType,OF_BasicInfor.fTypeID,OF_BasicInfor.fUType,OF_BasicInfor.fUTypeID,OF_BasicInfor.version","updateMode":"whereVersion"}}},"process":"/Office/ManagementSystem/process/Apply/applyProcess","translateParameter":{"cellnameByRelation":false,"dataType":"row-list","includeState":true,"rowsConfig":{"concept":"OF_BasicInfor","sequence":"OF_BasicInfor,fAppendix,fApplicant,fBNumber,fCPerson,fCPhone,fDepartment,fHead,fLinkName,fProject,fProjectID,fReason,fTPhone,fTime,fType,fTypeID,fUType,fUTypeID,relation0,version"},"transformIdcolumn":true,"useNamespace":true}}
java.lang.reflect.InvocationTargetException
at sun.reflect.GeneratedMethodAccessor168.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 com.justep.micro.service.MicroServiceFilter.doFilter(Unknown Source)
at org.apache.catalina.core.ApplicationFilterChain.internalDoFilter(ApplicationFilterChain.java:235)
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.model.exception.ModelException: 编码: JUSTEP154064; 提示: 计算表达式currentmanager()出错
at com.justep.model.exception.ModelException.create(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.evaluate(Unknown Source)
at com.justep.system.data.Expression.evaluate(Unknown Source)
at com.justep.system.data.BizData.create(Unknown Source)
at BizProcedure.create(BizProcedure.java:22)
... 29 more
Caused by: com.justep.model.exception.ModelException: 编码: JUSTEP154075; 提示: 调用函数currentmanager出错
at com.justep.model.exception.ModelException.create(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.functionExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.constExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.unaryExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.multiExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.addExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.compExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.notExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.andExpression(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.orExpression(Unknown Source)
... 33 more
Caused by: com.justep.model.exception.ModelException: 编码: JUSTEP154068; 提示: 在模块/Office/ManagementSystem/logic/code中, 查找函数currentmanager对应的Java方法ManagementSystem.manager时出错
at com.justep.model.exception.ModelException.create(Unknown Source)
at com.justep.system.ksql.parser.ExpressionImpl.getMethod(Unknown Source)
... 42 more
Caused by: java.lang.ClassNotFoundException: 模块"/Office/ManagementSystem/logic/code"中找不到方法"ManagementSystem.manager"
at com.justep.model.impl.ModelImpl$DynamicClassManager.getDynamicMethod(Unknown Source)
at com.justep.model.impl.ModelImpl.getModelMethod(Unknown Source)
... 43 more
2019-12-03 11:49:06 [SQL Time]sql 执行时间:6ms, exec KSQL: SELECT SA_Task.*  FROM SA_Task SA_Task WHERE ((SA_Task.sStatusID='tesReady' or SA_Task.sStatusID='tesExecuting')  and (:_efid0 like concat(SA_Task.sExecutorFID, '%')) and SA_Task.sExecutorFID like '/%' ) ORDER BY sCreateTime DESC LIMIT 0, 5
  --> sql:SELECT  SA_Task.sID AS SA_Task, SA_Task.SACTIVITY AS sActivity, SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SDATA1 AS sData1, SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SEURL AS sEURL, SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames, SA_Task.SKINDID AS sKindID, SA_Task.SNAME AS sName, SA_Task.SPROCESS AS sProcess, SA_Task.SSTATUSID AS sStatusID FROM SA_Task SA_Task  WHERE  ( (SA_Task.SSTATUSID = ?) OR (SA_Task.SSTATUSID = ?) ) AND ( ?  LIKE concat_ws('',SA_Task.SEXECUTORFID, ?)) AND (SA_Task.SEXECUTORFID LIKE ?)   ORDER BY sCreateTime DESC
--> binds:[tesReady, tesExecuting, [url=]/ORG01.ogn/PSN01@ORG01.psm[/url], %, /%]
2019-12-03 11:49:06 [SQL Time]sql 执行时间:5ms, exec KSQL: SELECT SA_Task.*  FROM SA_Task SA_Task WHERE ((SA_Task.sStatusID='tesReady' or SA_Task.sStatusID='tesExecuting')  and SA_Task.sExecutorFID like '/%' and (SA_Task.sCreatorPersonID=:_cpid)) ORDER BY sCreateTime DESC LIMIT 0, 5
  --> sql:SELECT  SA_Task.sID AS SA_Task, SA_Task.SACTIVITY AS sActivity, SA_Task.SCURL AS sCURL, SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SDATA1 AS sData1, SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames, SA_Task.SNAME AS sName, SA_Task.SPROCESS AS sProcess FROM SA_Task SA_Task  WHERE  ( (SA_Task.SSTATUSID = ?) OR (SA_Task.SSTATUSID = ?) ) AND (SA_Task.SEXECUTORFID LIKE ?) AND (SA_Task.SCREATORPERSONID =  ? )   ORDER BY sCreateTime DESC
--> binds:[tesReady, tesExecuting, /%, PSN01]
2019-12-03 11:49:06 [SQL Time]sql 执行时间:6ms, exec KSQL: SELECT SA_Task.*  FROM SA_Task SA_Task WHERE ((SA_Task.sStatusID='tesReady' or SA_Task.sStatusID='tesExecuting')  and (:_efid0 like concat(SA_Task.sExecutorFID, '%')) and SA_Task.sExecutorFID like '/%' ) ORDER BY sCreateTime DESC LIMIT 0, 1
  --> sql:SELECT  SA_Task.sID AS SA_Task, SA_Task.SAIACTIVE AS sAIActive, SA_Task.SAIID AS sAIID, SA_Task.SAISTATUSID AS sAIStatusID, SA_Task.SAISTATUSNAME AS sAIStatusName, SA_Task.SACTIVE AS sActive, SA_Task.SACTIVITY AS sActivity, SA_Task.SACTIVITYINTEMPLATE AS sActivityInTemplate, SA_Task.SACTIVITYNAME AS sActivityName, SA_Task.SACTIVITYNAMES AS sActivityNames, SA_Task.SACTUALFINISHTIME AS sActualFinishTime, SA_Task.SACTUALSTARTTIME AS sActualStartTime, SA_Task.SCURL AS sCURL, SA_Task.SCATALOGID AS sCatalogID, SA_Task.SCODE AS sCode, SA_Task.SCONTENT AS sContent, SA_Task.SCREATETIME AS sCreateTime, SA_Task.SCREATORDEPTID AS sCreatorDeptID, SA_Task.SCREATORDEPTNAME AS sCreatorDeptName, SA_Task.SCREATORFID AS sCreatorFID, SA_Task.SCREATORFNAME AS sCreatorFName, SA_Task.SCREATOROGNID AS sCreatorOgnID, SA_Task.SCREATOROGNNAME AS sCreatorOgnName, SA_Task.SCREATORPERSONID AS sCreatorPersonID, SA_Task.SCREATORPERSONNAME AS sCreatorPersonName, SA_Task.SCREATORPOSID AS sCreatorPosID, SA_Task.SCREATORPOSNAME AS sCreatorPosName, SA_Task.SCUSTOMERID AS sCustomerID, SA_Task.SCUSTOMERNAME AS sCustomerName, SA_Task.SDATA1 AS sData1, SA_Task.SDATA2 AS sData2, SA_Task.SDATA3 AS sData3, SA_Task.SDATA4 AS sData4, SA_Task.SDISTRIBUTETIME AS sDistributeTime, SA_Task.SEBFIELD51 AS sEBField51, SA_Task.SEBFIELD52 AS sEBField52, SA_Task.SEBFIELD53 AS sEBField53, SA_Task.SEBFIELD54 AS sEBField54, SA_Task.SEDFIELD21 AS sEDField21, SA_Task.SEDFIELD22 AS sEDField22, SA_Task.SEDFIELD23 AS sEDField23, SA_Task.SEDFIELD24 AS sEDField24, SA_Task.SEIFIELD41 AS sEIField41, SA_Task.SEIFIELD42 AS sEIField42, SA_Task.SEIFIELD43 AS sEIField43, SA_Task.SEIFIELD44 AS sEIField44, SA_Task.SENFIELD11 AS sENField11, SA_Task.SENFIELD12 AS sENField12, SA_Task.SENFIELD13 AS sENField13, SA_Task.SENFIELD14 AS sENField14, SA_Task.SESFIELD01 AS sESField01, SA_Task.SESFIELD02 AS sESField02, SA_Task.SESFIELD03 AS sESField03, SA_Task.SESFIELD04 AS sESField04, SA_Task.SESFIELD05 AS sESField05, SA_Task.SESFIELD06 AS sESField06, SA_Task.SESFIELD07 AS sESField07, SA_Task.SESFIELD08 AS sESField08, SA_Task.SETFIELD31 AS sETField31, SA_Task.SETFIELD32 AS sETField32, SA_Task.SETFIELD33 AS sETField33, SA_Task.SETFIELD34 AS sETField34, SA_Task.SEURL AS sEURL, SA_Task.SEMERGENCYID AS sEmergencyID, SA_Task.SEMERGENCYNAME AS sEmergencyName, SA_Task.SEXECUTEMODE AS sExecuteMode, SA_Task.SEXECUTEMODE2 AS sExecuteMode2, SA_Task.SEXECUTETIME AS sExecuteTime, SA_Task.SEXECUTORDEPTID AS sExecutorDeptID, SA_Task.SEXECUTORDEPTNAME AS sExecutorDeptName, SA_Task.SEXECUTORFID AS sExecutorFID, SA_Task.SEXECUTORFNAME AS sExecutorFName, SA_Task.SEXECUTORNAMES AS sExecutorNames, SA_Task.SEXECUTOROGNID AS sExecutorOgnID, SA_Task.SEXECUTOROGNNAME AS sExecutorOgnName, SA_Task.SEXECUTORPERSONID AS sExecutorPersonID, SA_Task.SEXECUTORPERSONNAME AS sExecutorPersonName, SA_Task.SEXECUTORPOSID AS sExecutorPosID, SA_Task.SEXECUTORPOSNAME AS sExecutorPosName, SA_Task.SEXPECTFINISHTIME AS sExpectFinishTime, SA_Task.SEXPECTSTARTTIME AS sExpectStartTime, SA_Task.SFLOWID AS sFlowID, SA_Task.SFRONTID AS sFrontID, SA_Task.SHINTS AS sHints, SA_Task.SIMPORTANCEID AS sImportanceID, SA_Task.SIMPORTANCENAME AS sImportanceName, SA_Task.SKINDID AS sKindID, SA_Task.SLASTMODIFYTIME AS sLastModifyTime, SA_Task.SLIMITTIME AS sLimitTime, SA_Task.SLOCK AS sLock, SA_Task.SNAME AS sName, SA_Task.sParentID AS sParent, SA_Task.SPLANID AS sPlanID, SA_Task.SPLANNAME AS sPlanName, SA_Task.SPREEMPTMODE AS sPreemptMode, SA_Task.SPROCESS AS sProcess, SA_Task.SPROCESSNAME AS sProcessName, SA_Task.SPROCESSTEMPLATEID AS sProcessTemplateID, SA_Task.SPROCESSTEMPLATEID2 AS sProcessTemplateID2, SA_Task.SPROCESSTEMPLATEITEMSEQUENCE AS sProcessTemplateItemSequence, SA_Task.SPROJECTID AS sProjectID, SA_Task.SPROJECTNAME AS sProjectName, SA_Task.SREMARK AS sRemark, SA_Task.SREMINDMODE AS sRemindMode, SA_Task.SRESPONSIBLE AS sResponsible, SA_Task.SSEQUENCE AS sSequence, SA_Task.SSHORTCUT AS sShortcut, SA_Task.SSOURCEID AS sSourceID, SA_Task.SSTATUSID AS sStatusID, SA_Task.SSTATUSNAME AS sStatusName, SA_Task.SSUMMARY AS sSummary, SA_Task.STEMPPERMISSIONID AS sTempPermissionID, SA_Task.STYPEID AS sTypeID, SA_Task.STYPENAME AS sTypeName, SA_Task.SVARIABLE AS sVariable, SA_Task.SWARNINGTIME AS sWarningTime, SA_Task.SWITHDRAW AS sWithdraw, SA_Task.VERSION AS version FROM SA_Task SA_Task  WHERE  ( (SA_Task.SSTATUSID = ?) OR (SA_Task.SSTATUSID = ?) ) AND ( ?  LIKE concat_ws('',SA_Task.SEXECUTORFID, ?)) AND (SA_Task.SEXECUTORFID LIKE ?)   ORDER BY sCreateTime DESC
--> binds:[tesReady, tesExecuting, [url=]/ORG01.ogn/PSN01@ORG01.psm[/url], %, /%]
2019-12-03 11:49:06 [SQL Time]sql 执行时间:2ms, exec KSQL:
  --> sql:SELECT count(*) FROM SA_Task SA_Task  WHERE  ( (SA_Task.SSTATUSID = ?) OR (SA_Task.SSTATUSID = ?) ) AND ( ?  LIKE concat_ws('',SA_Task.SEXECUTORFID, ?)) AND (SA_Task.SEXECUTORFID LIKE ?)
--> binds:[tesReady, tesExecuting, [url=]/ORG01.ogn/PSN01@ORG01.psm[/url], %, /%]

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2019-12-3 13:23:20 | 显示全部楼层
模块"/Office/ManagementSystem/logic/code"中找不到方法"ManagementSystem.manager"

没有找到java方法,把code设置为源码路径
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

138

主题

364

帖子

1339

积分

金牌会员

Rank: 6Rank: 6

积分
1339
QQ
 楼主| 发表于 2019-12-3 13:43:00 | 显示全部楼层
还是报那样的错,这是自定义函数:
public class ManagementSystem {

        public static String currentdeptmanager(){
                // 读取当前机构的名称和地址
            String currentOgnID = ContextHelper.getPersonMember().getOgn().getID();
                List<OrgUnit> list= com.justep.system.opm.OrgUtils.findManagers (currentOgnID,null,false,null);//获取当前部门的管理者       
                String a=list.toString();
                String b[]=a.split("\\/");
                String c=b[4];
                String manager[]=c.split("\\)");
                return manager[0];
        }
}
回复 支持 反对

使用道具 举报

91

主题

13万

帖子

3万

积分

管理员

Rank: 9Rank: 9Rank: 9

积分
36069
发表于 2019-12-3 14:35:00 | 显示全部楼层
报错找的是manager方法啊,你的java中是currentdeptmanager很明显不一样
远程的联系方法QQ1392416607,添加好友时,需在备注里注明其论坛名字及ID,公司等信息
发远程时同时也发一下帖子地址,方便了解要解决的问题  WeX5教程  WeX5下载



如按照该方法解决,请及时跟帖,便于版主结贴
回复 支持 反对

使用道具 举报

138

主题

364

帖子

1339

积分

金牌会员

Rank: 6Rank: 6

积分
1339
QQ
 楼主| 发表于 2019-12-4 10:59:12 | 显示全部楼层
已解决,谢谢
回复 支持 反对

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-11-28 11:43 , Processed in 0.060746 second(s), 25 queries .

Powered by Discuz! X3.4

© 2001-2013 Comsenz Inc.

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