销售退货单审核报错,提示重复键
金蝶云社区-陈达锦
陈达锦
0人赞赏了该文章 800次浏览 未经作者许可,禁止转载编辑于2017年09月18日 10:32:51

销售退货单,有些单据审核报错:

违反了 PRIMARY KEY 约束“PK_CB_PROORDERTYPE”。不能在对象“dbo.T_CB_PROORDERTYPE”中插入重复键。重复键值为 (TSR@274003)。
语句已终止。

发生时间: 2017-09-18 10:29:36
错误编号: BOS_ExecuteNonQuery
错误信息: 违反了 PRIMARY KEY 约束“PK_CB_PROORDERTYPE”。不能在对象“dbo.T_CB_PROORDERTYPE”中插入重复键。重复键值为 (TSR@274003)。
语句已终止。
Sql语句: INSERT INTO T_CB_PROORDERTYPE (FENTRYID, FPROORDERENTRYID, FPROORDERTYPE, FFORMID, FNUMBER, FCREATEORGID, FUSEORGID, FDOCUMENTSTATUS, FFORBIDSTATUS, FDATE, FMATERIALID, FBOMID, FAUXPROPID, FLOT, FSEQ, FUNITID, FPRODUCTID, FWORKSHOPID, FCOSTCENTERID, FMTONO, FENTRUSTORGID, FTRUSTEEORGID, FPROCESSTRACK) SELECT ('TSR@' + CONVERT(VARCHAR(36), B.FENTRYID)) fentryid, B.FENTRYID fproorderentryid, 'TSR' fproordertype, 'SAL_RETURNSTOCK' fformid, A.FBILLNO fnumber, A.FSALEORGID fcreateorgid, C.FSETTLEORGID fuseorgid, 'C' fdocumentstatus, 'A' fforbidstatus, A.FDATE, B.FMATERIALID, B.FBOMID, B.FAUXPROPID, B.FLOT, B.FSEQ, B.FUNITID, B.FMATERIALID fproduc3tid, 0 fworkshopid, 0 fcostcenterid, B.FMTONO, 0 fentrustorgid, 0 ftrusteeorgid, '0' fprocesstrack FROM T_SAL_RETURNSTOCK A INNER JOIN T_SAL_RETURNSTOCKENTRY B ON A.FID = B.FID INNER JOIN T_SAL_RETURNSTOCKFIN C ON A.FID = C.FID WHERE (1 = 1 AND EXISTS (SELECT 1 FROM @FID_udt1 tmp WHERE A.FID = tmp.FID))
===================================================
调用堆栈:
Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.ExecuteWithTime(Context ctx, String strSQL, IEnumerable`1 paramList, Int32 commandTimeout)
在 Kingdee.K3.FIN.App.Core.AppBusinessService.CostBusinessObjectGenerated.GeneratedBySalReturn(List`1 ids, String strFormId)
在 Kingdee.K3.FIN.App.Core.AppBusinessService.CostBusinessObjectGenerated.DoActionBatch(AppBusinessServiceArgs e)
在 Kingdee.BOS.App.Core.AbstractOprerationService.ExecuteFormBusinessService(IAppFormBusinessService iBusiness, ExtendedDataEntity[] dataEntities, FormBusinessService service)
在 Kingdee.BOS.App.Core.AbstractOprerationService.InvokeFormBusiness(DynamicObject[] objs, Int32 iActionPoint)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperatinTransaction(DynamicObject[] objs)
在 Kingdee.BOS.App.Core.SetStatus.CallOperatinTransaction(DynamicObject[] objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(Object[] ids)
在 Kingdee.BOS.App.Core.AbstractSetStatus.Excute(Object[] ids)
在 Kingdee.BOS.App.Core.SetStatusService.SetBillStatus(Context ctx, BusinessInfo businessInfo, List`1 pkEntryIds, List`1 paras, String operationNumber, OperateOption option)
Exception rethrown at [0]:
在 Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.SetBillStatus(Context ctx, BusinessInfo businessInfo, List`1 pkEntryIds, List`1 paras, String operationNumber, OperateOption option)
在 Kingdee.BOS.Business.Bill.Operation.AbstractStatusConvert.BatStatusConvert(Int32 loopTimes, Int32 iBat, Object[] ids, List`1 paras)
在 Kingdee.BOS.Business.Bill.Operation.AbstractStatusConvert.ExecuteStatusConvert(List`1 paras)
在 Kingdee.BOS.Business.Bill.Operation.Audit.AuditIdeaPrompt()
在 Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Operation(CallBackWfAfterOperation callbackwf, IOperationResult result)