s-HR V8.8及以下版本升级至V9.0版本时,重复执行SQL脚本报错问题的处理方法

栏目:s-hr cloud知识作者:金蝶来源:金蝶云社区发布:2024-09-22浏览:3

s-HR V8.8及以下版本升级至V9.0版本时,重复执行SQL脚本报错问题的处理方法

适用版本

s-HR Cloud V9.0及以上



【问题描述/原因分析

        因s-HR V9.0版本绩效模块调整了组织考核申述单据权限的URL,在s-HR V8.8及以下版本升级V9.0版本时,如果重复执行s-HR V9.0 PTM包(PTM176002)的脚本时,会出现V8.8到8.8SP1版本脚本执行异常报错。

报错日志中错误信息如下:

com.kingdee.eas.tools.admin.framework.database.exception.DBSQLProviderException: Execute provider[sql/8_8_0_0to8_8_0_1/s_HR/shr_perfweb/perm/PT171586_051_T_PM_PermItemURL.sql], sql[DO $$

BEGIN

IF NOT EXISTS (SELECT * FROM t_pm_permitemurl WHERE furl = '/dynamic.do?method=initalize#uri=com.kingdee.shr.perfweb.app.base.evalplan.EvaResultAppealBill.form&shruicode=OF_PERF_ORG')

THEN

INSERT INTO T_PM_PermItemURL (FUrl, FParentID, FUipk, FAction, FID, FName) VALUES ('/dynamic.do?method=initalize#uri=com.kingdee.shr.perfweb.app.base.evalplan.EvaResultAppealBill.form&shruicode=OF_PERF_ORG', 'fffffff0-ffff-efff-e22e-0000000fdf19PERMITEM', NULL, NULL, '51WgjidmTb+pm8vevAlARor64xg=', N'组织考核计划执行_考核结果管理_结果申诉单据');

END IF;

END$$] failed, sqlcode[0] sqlstat[23505],Causedby[ERROR: duplicate key value violates unique constraint "pk_pm_permitemurl"

  详细:Key (fid)=(51WgjidmTb+pm8vevAlARor64xg=) already exists.

  在位置:SQL statement "INSERT INTO T_PM_PermItemURL (FUrl, FParentID, FUipk, FAction, FID, FName) VALUES ('/dynamic.do?method=initalize#uri=com.kingdee.shr.perfweb.app.base.evalplan.EvaResultAppealBill.form&shruicode=OF_PERF_ORG', 'fffffff0-ffff-efff-e22e-0000000fdf19PERMITEM', NULL, NULL, '51WgjidmTb+pm8vevAlARor64xg=', N'组织考核计划执行_考核结果管理_结果申诉单据')"

PL/pgSQL function inline_code_block line 5 at SQL statement],DBType=[PostgreSQL]

 

         at com.kingdee.eas.tools.admin.domain.impl.PatchManagerServiceImpl.upgradeEASDatacenter(PatchManagerServiceImpl.java:3668)

         at com.kingdee.eas.tools.admin.domain.impl.PatchManagerServiceImpl.recursionInstallPatch(PatchManagerServiceImpl.java:5351)

         at com.kingdee.eas.tools.admin.domain.impl.PatchManagerServiceImpl.recursionInstallPatchT(PatchManagerServiceImpl.java:5011)

         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:498)

         at com.kingdee.eas.tools.admin.framework.ssap.dualrpc.SSAPServerRPCHandler.invokeService(SSAPServerRPCHandler.java:46)

         at sun.reflect.GeneratedMethodAccessor4.invoke(Unknown Source)

         at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)

         at java.lang.reflect.Method.invoke(Method.java:498)

         at com.kingdee.eas.tools.admin.framework.dualrpc.core.common.RpcWorker.processRpcCallMessage(RpcWorker.java:237)

         at com.kingdee.eas.tools.admin.framework.dualrpc.core.common.RpcWorker.run(RpcWorker.java:81)

解决方法

    重复执行脚本报以上错误时, 需要先执行以下SQL语句:

         delete FROM t_pm_permitemurl where fid ='51WgjidmTb+pm8vevAlARor64xg=';


    然后重新执行SQL脚本


s-HR V8.8及以下版本升级至V9.0版本时,重复执行SQL脚本报错问题的处理方法

【适用版本】s-HR Cloud V9.0及以上【问题描述/原因分析】 因s-HR V9.0版本绩效模块调整了组织考核申述单据权限的URL,在s-HR V...
点击下载文档
确认删除?
回到顶部
客服QQ
  • 客服QQ点击这里给我发消息