采购订单下推门店收货单审核时报错
296次浏览
编辑于2018年01月15日 18:21:38
请问:采购订单下推门店收货单审核时报错,经过测试发现是一个物料有问题,但是不清楚具体问题是什么
发生时间: 2018-01-15 06:19:09
错误编号: BOS_ExecuteNonQuery
错误信息: 不能在具有唯一索引“IDX_STK_INVENTORY_CLUST”的对象“dbo.T_STK_INVENTORY”中插入重复键的行。重复键值为 (106411_100024_102071BD_KeeperOrg100024BD_OwnerOrg100024_0_0_10000_0_0,, , , )。
语句已终止。
Sql语句: INSERT INTO T_STK_INVENTORY (FID, FSTOCKORGID, FKEEPERTYPEID, FKEEPERID, FOWNERTYPEID, FOWNERID, FSTOCKID, FSTOCKLOCID, FAUXPROPID, FSTOCKSTATUSID, FLOT, FBOMID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE, FBASEUNITID, FSTOCKUNITID, FMATERIALID, FSECUNITID, FOBJECTTYPEID, FISEFFECTIVED) SELECT IT.FINVENTORYID, IT.FSTOCKORGID, IT.FKEEPERTYPEID, IT.FKEEPERID, IT.FOWNERTYPEID, IT.FOWNERID, IT.FSTOCKID, IT.FSTOCKLOCID, IT.FAUXPROPID, IT.FSTOCKSTATUSID, IT.FLOT, IT.FBOMID, IT.FMTONO, IT.FPROJECTNO, IT.FPRODUCEDATE, IT.FEXPIRYDATE, IT.FBASEUNITID, IT.FSTOCKUNITID, IT.FMATERIALID, IT.FSECUNITID, 'STK_Inventory', '0' FROM (SELECT MIN(FINVENTORYID) finventoryid, FSTOCKORGID, FKEEPERTYPEID, FKEEPERID, FOWNERTYPEID, FOWNERID, FSTOCKID, FSTOCKLOCID, FAUXPROPID, FSTOCKSTATUSID, FLOT, FBOMID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE, FBASEUNITID, FSTOCKUNITID, FMATERIALID, FSECUNITID, FCOMBINEID FROM T_STK_PREINVDIMENSION GROUP BY FMATERIALID, FSTOCKORGID, FKEEPERTYPEID, FKEEPERID, FOWNERTYPEID, FOWNERID, FSTOCKID, FSTOCKLOCID, FAUXPROPID, FSTOCKSTATUSID, FLOT, FBOMID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE, FBASEUNITID, FSTOCKUNITID, FSECUNITID, FCOMBINEID) it INNER JOIN (SELECT DISTINCT FCOMBINEID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE FROM T_STK_PREINVDIMENSION WHERE FTRANID = @TranId) it2 ON ((((IT.FCOMBINEID = IT2.FCOMBINEID AND IT.FMTONO = IT2.FMTONO) AND IT.FPROJECTNO = IT2.FPROJECTNO) AND (IT.FPRODUCEDATE = IT2.FPRODUCEDATE OR ((IT.FPRODUCEDATE IS NULL) AND (IT2.FPRODUCEDATE IS NULL)))) AND (IT.FEXPIRYDATE = IT2.FEXPIRYDATE OR ((IT.FEXPIRYDATE IS NULL) AND (IT2.FEXPIRYDATE IS NULL)))) WHERE NOT EXISTS (SELECT 1 FROM T_STK_INVENTORY IT3 WHERE (((((((IT.FCOMBINEID = IT3.FCOMBINEID AND IT.FMTONO = IT3.FMTONO) AND IT.FPROJECTNO = IT3.FPROJECTNO) AND (IT.FPRODUCEDATE = IT3.FPRODUCEDATE OR ((IT.FPRODUCEDATE IS NULL) AND (IT3.FPRODUCEDATE IS NULL)))) AND (IT.FEXPIRYDATE = IT3.FEXPIRYDATE OR ((IT.FEXPIRYDATE IS NULL) AND (IT3.FEXPIRYDATE IS NULL)))) AND IT.FBASEUNITID = IT3.FBASEUNITID) AND IT.FSTOCKUNITID = IT3.FSTOCKUNITID) AND IT.FSECUNITID = IT3.FSECUNITID))
===================================================
调用堆栈:
Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.ExecuteBatch(Context ctx, List`1 lstSqlObj)
在 Kingdee.K3.SCM.App.Core.AppBusinessService.UpdateStockService.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.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(DynamicObject[] dataEntities)
在 Kingdee.BOS.App.Core.SaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataEntities, OperateOption option, String operationNumber)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataObject, OperateOption option, String operationNumber)
在 CMK.K3.RI.STORE.App.Core.StoreAutoPushService.ConvertPushSaveBill(Context ctx, Dictionary`2 pushParams)
在 CMK.K3.RI.STORE.App.Service.PlugIn.Catalog.CMK_StoreAutoPushService.EndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.PlugInProxy.OperationServicePlugInProxy.FireEndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.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 [1]:
在 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.ExecuteBillOperation(List`1 paras, OperateOption option)
在 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)
发生时间: 2018-01-15 06:19:09
错误编号: BOS_ExecuteNonQuery
错误信息: 不能在具有唯一索引“IDX_STK_INVENTORY_CLUST”的对象“dbo.T_STK_INVENTORY”中插入重复键的行。重复键值为 (106411_100024_102071BD_KeeperOrg100024BD_OwnerOrg100024_0_0_10000_0_0,
语句已终止。
Sql语句: INSERT INTO T_STK_INVENTORY (FID, FSTOCKORGID, FKEEPERTYPEID, FKEEPERID, FOWNERTYPEID, FOWNERID, FSTOCKID, FSTOCKLOCID, FAUXPROPID, FSTOCKSTATUSID, FLOT, FBOMID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE, FBASEUNITID, FSTOCKUNITID, FMATERIALID, FSECUNITID, FOBJECTTYPEID, FISEFFECTIVED) SELECT IT.FINVENTORYID, IT.FSTOCKORGID, IT.FKEEPERTYPEID, IT.FKEEPERID, IT.FOWNERTYPEID, IT.FOWNERID, IT.FSTOCKID, IT.FSTOCKLOCID, IT.FAUXPROPID, IT.FSTOCKSTATUSID, IT.FLOT, IT.FBOMID, IT.FMTONO, IT.FPROJECTNO, IT.FPRODUCEDATE, IT.FEXPIRYDATE, IT.FBASEUNITID, IT.FSTOCKUNITID, IT.FMATERIALID, IT.FSECUNITID, 'STK_Inventory', '0' FROM (SELECT MIN(FINVENTORYID) finventoryid, FSTOCKORGID, FKEEPERTYPEID, FKEEPERID, FOWNERTYPEID, FOWNERID, FSTOCKID, FSTOCKLOCID, FAUXPROPID, FSTOCKSTATUSID, FLOT, FBOMID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE, FBASEUNITID, FSTOCKUNITID, FMATERIALID, FSECUNITID, FCOMBINEID FROM T_STK_PREINVDIMENSION GROUP BY FMATERIALID, FSTOCKORGID, FKEEPERTYPEID, FKEEPERID, FOWNERTYPEID, FOWNERID, FSTOCKID, FSTOCKLOCID, FAUXPROPID, FSTOCKSTATUSID, FLOT, FBOMID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE, FBASEUNITID, FSTOCKUNITID, FSECUNITID, FCOMBINEID) it INNER JOIN (SELECT DISTINCT FCOMBINEID, FMTONO, FPROJECTNO, FPRODUCEDATE, FEXPIRYDATE FROM T_STK_PREINVDIMENSION WHERE FTRANID = @TranId) it2 ON ((((IT.FCOMBINEID = IT2.FCOMBINEID AND IT.FMTONO = IT2.FMTONO) AND IT.FPROJECTNO = IT2.FPROJECTNO) AND (IT.FPRODUCEDATE = IT2.FPRODUCEDATE OR ((IT.FPRODUCEDATE IS NULL) AND (IT2.FPRODUCEDATE IS NULL)))) AND (IT.FEXPIRYDATE = IT2.FEXPIRYDATE OR ((IT.FEXPIRYDATE IS NULL) AND (IT2.FEXPIRYDATE IS NULL)))) WHERE NOT EXISTS (SELECT 1 FROM T_STK_INVENTORY IT3 WHERE (((((((IT.FCOMBINEID = IT3.FCOMBINEID AND IT.FMTONO = IT3.FMTONO) AND IT.FPROJECTNO = IT3.FPROJECTNO) AND (IT.FPRODUCEDATE = IT3.FPRODUCEDATE OR ((IT.FPRODUCEDATE IS NULL) AND (IT3.FPRODUCEDATE IS NULL)))) AND (IT.FEXPIRYDATE = IT3.FEXPIRYDATE OR ((IT.FEXPIRYDATE IS NULL) AND (IT3.FEXPIRYDATE IS NULL)))) AND IT.FBASEUNITID = IT3.FBASEUNITID) AND IT.FSTOCKUNITID = IT3.FSTOCKUNITID) AND IT.FSECUNITID = IT3.FSECUNITID))
===================================================
调用堆栈:
Server stack trace:
在 Kingdee.BOS.App.Data.AbstractDatabase.ExecuteNonQuery(DbCommand command, IEnumerable`1 listParam)
在 Kingdee.BOS.App.Data.DBUtils.ExecuteBatch(Context ctx, List`1 lstSqlObj)
在 Kingdee.K3.SCM.App.Core.AppBusinessService.UpdateStockService.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.AbstractOprerationService.DoExcete()
在 Kingdee.BOS.App.Core.AbstractOprerationService.Excute(DynamicObject[] dataEntities)
在 Kingdee.BOS.App.Core.SaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataEntities, OperateOption option, String operationNumber)
Exception rethrown at [0]:
在 System.Runtime.Remoting.Proxies.RealProxy.HandleReturnMessage(IMessage reqMsg, IMessage retMsg)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 Kingdee.BOS.Contracts.ISaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataObject, OperateOption option, String operationNumber)
在 CMK.K3.RI.STORE.App.Core.StoreAutoPushService.ConvertPushSaveBill(Context ctx, Dictionary`2 pushParams)
在 CMK.K3.RI.STORE.App.Service.PlugIn.Catalog.CMK_StoreAutoPushService.EndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.PlugInProxy.OperationServicePlugInProxy.FireEndOperationTransaction(EndOperationTransactionArgs e)
在 Kingdee.BOS.App.Core.AbstractOprerationService.CallOperation(DynamicObject[]& objs)
在 Kingdee.BOS.App.Core.AbstractOprerationService.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 [1]:
在 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.ExecuteBillOperation(List`1 paras, OperateOption option)
在 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)