委外入库单当明细物料大于等于2行数据时报错,如图
版本:6.1 1-23补丁
报错信息如下:
发生时间: 2017-02-08 12:04:45
错误编号: BOS_ExecuteScalar
错误信息: 违反了 PRIMARY KEY 约束 'PK__#1669FE4__C1BEA5A2175E2280'。不能在对象 'dbo.@FID_udt1' 中插入重复键。
语句已终止。
Sql语句: SELECT COUNT(1) FROM T_SUB_REQORDERENTRY TSRE INNER JOIN T_SUB_REQORDER TSR ON TSR.FID = TSRE.FID INNER JOIN T_PUR_POORDERENTRY_LK TPPELK ON (TPPELK.FSID = TSRE.FENTRYID AND TPPELK.FSTABLENAME = 'T_SUB_REQORDERENTRY') INNER JOIN @FID_udt1 B ON B.FID = TPPELK.FENTRYID WHERE (TSRE.FCONVEYDATE > @FDATE)
===================================================
调用堆栈:
Server stack trace:
at Kingdee.BOS.App.Data.AbstractDatabase.ExecuteScalar(DbCommand command, SqlParam[] paramList)
at Kingdee.BOS.App.Data.DBUtils.ExecuteScalar[T](Context ctx, String strSql, T defaultValue, SqlParam[] paramList)
at Kingdee.K3.SCM.App.Stock.ServicePlugIn.InStock.SaveValidator.ValidatelessConveydate(ExtendedDataEntity[] dataEntities, ValidateContext validateContext, Context ctx)
at Kingdee.K3.SCM.App.Stock.ServicePlugIn.InStock.SaveValidator.Validate(ExtendedDataEntity[] dataEntities, ValidateContext validateContext, Context ctx)
at Kingdee.BOS.App.Core.Validation.ValidationService.Validate(IEnumerable`1 dataEntities, ValidateContext validateContext, AbstractValidator[] validators)
at Kingdee.BOS.App.Core.Validation.ValidationService.TryValidate(IEnumerable`1 dataEntities, ValidateContext validateContext, List`1& errorInfo)
at Kingdee.BOS.App.Core.AbstractOprerationService.TryValidate()
at Kingdee.BOS.App.Core.AbstractOprerationService.Validate()
at Kingdee.BOS.App.Core.AbstractSave.Validate()
at Kingdee.BOS.App.Core.AbstractOprerationService.DoExcete()
at Kingdee.BOS.App.Core.AbstractOprerationService.Excute(DynamicObject[] dataEntities)
at Kingdee.BOS.App.Core.SaveService.Save(Context ctx, BusinessInfo info, DynamicObject[] dataEntities, OperateOption option, String operationNumber)
Exception rethrown at [0]:
at Kingdee.BOS.ServiceHelper.BusinessDataServiceHelper.Save(Context ctx, BusinessInfo businessInfo, DynamicObject dataObject, OperateOption option, String operationNumber)
at Kingdee.BOS.Model.Bill.BillModel.Save(OperateOption option)
at Kingdee.BOS.Business.Bill.Operation.Save.ExecuteBillOperation(OperateOption option)
at Kingdee.BOS.Core.DynamicForm.AbstractDynamicFormOperation.Operation(CallBackWfAfterOperation callbackwf, IOperationResult result)
1.png(51.07KB)
推荐阅读