MRP运算常会出现错误
金蝶云社区-Sailor
Sailor
0人赞赏了该文章 1,690次浏览 未经作者许可,禁止转载编辑于2015年01月14日 22:52:57

下边附的两个错误原因似乎不同。
关于这个问题经过一段时间使用似乎有点总结,请研发帮忙验证一下。
如果数据库中BOM有指定了子项BOM版本号。但这个版本的BOM刚好又被删除了。那么在
T_Eng_BomChild表中FBomid还是存有原来的内码的。这时候MRP就会出错。到数据库中把这个错误的BOMID清为0。MRP就可以顺利执行。

MRP运算时常会出错如:
source:System.Core
message:Thread was being aborted.
stacktrace: at System.Collections.Generic.HashSet`1.Contains(T item)
at Kingdee.BOS.Cache.ECache.ECacheManager.<>c__DisplayClass9.b__2(KeyValuePair`2 tk)
at System.Linq.Enumerable.WhereSelectEnumerableIterator`2.MoveNext()
at System.Linq.Buffer`1..ctor(IEnumerable`1 source)
at System.Linq.Enumerable.ToArray[TSource](IEnumerable`1 source)
at Kingdee.BOS.Cache.ECache.ECacheManager.GetKeysByTags(HashSet`1 tags, GetBy by)
at Kingdee.BOS.Cache.ECache.ECacheManager.RemoveByTags(List`1 tags, GetBy by)
at Kingdee.BOS.Cache.KCacheManager.RemoveByTags(List`1 tags, GetBy by)
at Kingdee.K3.MFG.App.MFGDataManagerUtil.ClearCache(Context ctx, DynamicObjectType dt, IEnumerable`1 oids)
at Kingdee.K3.MFG.App.MFGDataManagerUtil.SaveData(Context ctx, IEnumerable items, DynamicObjectType dt, Boolean isClearCache, Boolean bCacheMetadata)
at Kingdee.K3.MFG.PLN.App.MrpModel.PolicyImpl.NetCalc.TransferDSDataPolicy.OnExecuteDataPolicy()
at Kingdee.K3.MFG.PLN.App.MrpModel.AbstractMrpDataPolicy.Execute()
at Kingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.NetCalcLogicUnit.DoLastSingleDataPolicy(MrpDemandDimContext mrpDemandDimContext)
at Kingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.NetCalcLogicUnit.DoComputeLogicByLLC(Decimal dLevelProgress, AbstractDSQueueBuilder demandQueueBuilder, Int64 i)
at Kingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.NetCalcLogicUnit.OnExecuteLogicUnit()
at Kingdee.K3.MFG.PLN.App.MrpModel.AbstractMrpLogicUnit.Execute()
at Kingdee.K3.MFG.PLN.App.Core.MrpComputeService.RunMrp(Context ctx, DynamicObject mrpDataObject, OperateOption option)
或是
source:Kingdee.K3.MFG.PLN.App.MrpModel
message:Object reference not set to an instance of an object.
stacktrace: at Kingdee.K3.MFG.PLN.App.MrpModel.PolicyImpl.NetCalc.CreateNetDemandPolicy.GetBomMasterId(DemandData demandRowView, String& bomNumber)
at Kingdee.K3.MFG.PLN.App.MrpModel.PolicyImpl.NetCalc.CreateNetDemandPolicy.FillSupplyInfoForNetDemand(MrpPlanOrderBillView planOrderDataView, DemandData demandRowView, MaterialData materialRowView, SUPPLYMANAGEENTRY supplyInfoRowView)
at Kingdee.K3.MFG.PLN.App.MrpModel.PolicyImpl.NetCalc.CreateNetDemandPolicy.CreateNetDemandData(MrpDemandContext demandContextRow, SUPPLYMANAGEENTRY supplyInfoRow, Decimal dBaseDemandQty, Enu_ReleaseType releaseType)
at Kingdee.K3.MFG.PLN.App.MrpModel.PolicyImpl.NetCalc.CreateNetDemandPolicy.SplitDemandInfoBySupplyRule(MrpDemandContext demandContextRow, Decimal dShortQty)
at Kingdee.K3.MFG.PLN.App.MrpModel.PolicyImpl.NetCalc.CreateNetDemandPolicy.OnExecuteDataPolicy()
at Kingdee.K3.MFG.PLN.App.MrpModel.AbstractMrpDataPolicy.Execute()
at Kingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.NetCalcLogicUnit.DoFirstSingleDataPolicy(MrpDemandDimContext mrpDemandDimContext)
at Kingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.NetCalcLogicUnit.DoComputeLogicByLLC(Decimal dLevelProgress, AbstractDSQueueBuilder demandQueueBuilder, Int64 i)
at Kingdee.K3.MFG.PLN.App.MrpModel.LogicUnitImpl.Mrp.NetCalcLogicUnit.OnExecuteLogicUnit()
at Kingdee.K3.MFG.PLN.App.MrpModel.AbstractMrpLogicUnit.Execute()
at Kingdee.K3.MFG.PLN.App.Core.MrpComputeService.RunMrp(Context ctx, DynamicObject mrpDataObject, OperateOption option)