这篇文章发布于 814 天前,部分信息可能已经发生变化。
用户反馈:跑MRP卡在供需对比
在 System.Data.DataTable.NewRecordFromArray(Object[] value)
在 System.Data.DataRowCollection.Add(Object[] values)
在 mrp.internals.DataCollection.LoadData(DataTable fromtable, DataTable totable)
在 mrp.internals.MRPItemCollection.LoadData()
在 mrp.internals.MRPSource.LoadData()
在 mrp.MRP.Run()
在 UFIDA.U9.MRP.MRP.MRPCalcMainImpementStrategy.Netting(PlanVersion planversion)
在 UFIDA.U9.MRP.MRP.MRPCalcMainImpementStrategy.Do(Object obj)
System.ArgumentException: 值对于 Int32 太大或太小。不能在 MultQty 列中存储 <99999999999.000000000>。所需类型是 Int32。 ---> System.OverflowException: 值对于 Int32 太大或太小。
at mscorlib!0x06000d4e!System.Decimal.FCallToInt32(Decimal d)
at mscorlib!0x06000d83!System.Decimal.System.IConvertible.ToInt32(IFormatProvider provider) +0x0
at System.Data!0x060030fb!System.Data.Common.Int32Storage.Set(Int32 record, Object value) +0x1b
at System.Data!0x06000872!System.Data.DataColumn.set_Item(Int32 record, Object value) +0x0
--- End of inner exception stack trace ---
at System.Data!0x06000872!System.Data.DataColumn.set_Item(Int32 record, Object value) +0x16
at System.Data!0x06000d03!System.Data.DataTable.NewRecordFromArray(Object[] value) +0x98
at System.Data!0x06000b5b!System.Data.DataRowCollection.Add(Object[] values) +0x0
at UFIDA.U9.MRP.Netting.Impl!0x0600000d!mrp.internals.DataCollection.LoadData(DataTable fromtable, DataTable totable) +0x30
at UFIDA.U9.MRP.Netting.Impl!0x0600068d!mrp.internals.MRPItemCollection.LoadData() +0xe1
at UFIDA.U9.MRP.Netting.Impl!0x06000700!mrp.internals.MRPSource.LoadData() +0x17
at UFIDA.U9.MRP.Netting.Impl!0x060005a5!mrp.MRP.Run() +0x3d
at UFIDA.U9.MRP.MRPBP!0x06000075!UFIDA.U9.MRP.MRP.MRPCalcMainImpementStrategy.Netting(PlanVersion planversion) +0x9f
at UFIDA.U9.MRP.MRPBP!0x06000065!UFIDA.U9.MRP.MRP.MRPCalcMainImpementStrategy.Do(Object obj) +0x100
==========
MODULE: mscorlib => mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
MODULE: System.Data => System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
MODULE: UFIDA.U9.MRP.MRPBP => UFIDA.U9.MRP.MRPBP, Version=25.5401.40664.0, Culture=neutral, PublicKeyToken=null; G:5a02181a5e99485c94183744faeeb5bb; A:1
MODULE: UFIDA.U9.MRP.Netting.Impl => UFIDA.U9.MRP.Netting.Impl, Version=25.5401.40654.0, Culture=neutral, PublicKeyToken=null; G:4421d3143a244e0290ed9bdcf2a74d9f; A:1
[70][ ][08:16:01][ERROR][MRP.MRPCalcMainStub]-System.ArgumentException: 值对于 Int32 太大或太小。不能在 MultQty 列中存储 <99999999999.000000000>。所需类型是 Int32。 ---> System.OverflowException: 值对于 Int32 太大或太小。
at mscorlib!0x06000d4e!System.Decimal.FCallToInt32(Decimal d)
at mscorlib!0x06000d83!System.Decimal.System.IConvertible.ToInt32(IFormatProvider provider) +0x0
at System.Data!0x060030fb!System.Data.Common.Int32Storage.Set(Int32 record, Object value) +0x1b
at System.Data!0x06000872!System.Data.DataColumn.set_Item(Int32 record, Object value) +0x0
--- End of inner exception stack trace ---
at UFIDA.U9.MRP.MRPBP!0x06000065!UFIDA.U9.MRP.MRP.MRPCalcMainImpementStrategy.Do(Object obj) +0x1db
at UFSoft.UBF.AopFrame!0x06000089!UFSoft.UBF.AopFrame.BaseStrategy.Execute(Object obj) +0xd3
at UFIDA.U9.MRP.MRPBP!0x06000062!UFIDA.U9.MRP.MRP.MRPCalcMain.Do() +0x8
at UFIDA.U9.MRP.MRPBP!0x06000087!UFIDA.U9.MRP.MRP.MRPCalcMainStub.DoEx(ICommonDataContract commonData, EntityKey planVersion, Int32 type, Int32 partition, Boolean isRunMRPImmediately) +0x73
==========
MODULE: mscorlib => mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
MODULE: System.Data => System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
MODULE: UFIDA.U9.MRP.MRPBP => UFIDA.U9.MRP.MRPBP, Version=25.5401.40664.0, Culture=neutral, PublicKeyToken=null; G:5a02181a5e99485c94183744faeeb5bb; A:1
MODULE: UFSoft.UBF.AopFrame => UFSoft.UBF.AopFrame, Version=25.5401.28703.0, Culture=neutral, PublicKeyToken=null; G:0809f490fd724f81a1691244438967e5; A:1
[70][ ][08:16:02][ERROR][Service.ServerDynamicProxy]-System.ArgumentException: 值对于 Int32 太大或太小。不能在 MultQty 列中存储 <99999999999.000000000>。所需类型是 Int32。 ---> System.OverflowException: 值对于 Int32 太大或太小。
at mscorlib!0x06000d4e!System.Decimal.FCallToInt32(Decimal d)
at mscorlib!0x06000d83!System.Decimal.System.IConvertible.ToInt32(IFormatProvider provider) +0x0
at System.Data!0x060030fb!System.Data.Common.Int32Storage.Set(Int32 record, Object value) +0x1b
at System.Data!0x06000872!System.Data.DataColumn.set_Item(Int32 record, Object value) +0x0
--- End of inner exception stack trace ---
at UFIDA.U9.MRP.MRPBP!0x06000065!UFIDA.U9.MRP.MRP.MRPCalcMainImpementStrategy.Do(Object obj) +0x1db
at UFSoft.UBF.AopFrame!0x06000089!UFSoft.UBF.AopFrame.BaseStrategy.Execute(Object obj) +0xd3
at UFIDA.U9.MRP.MRPBP!0x06000062!UFIDA.U9.MRP.MRP.MRPCalcMain.Do() +0x8
at UFIDA.U9.MRP.MRPBP!0x06000087!UFIDA.U9.MRP.MRP.MRPCalcMainStub.DoEx(ICommonDataContract commonData, EntityKey planVersion, Int32 type, Int32 partition, Boolean isRunMRPImmediately) +0x73
==========
MODULE: mscorlib => mscorlib, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
MODULE: System.Data => System.Data, Version=4.0.0.0, Culture=neutral, PublicKeyToken=b77a5c561934e089;
MODULE: UFIDA.U9.MRP.MRPBP => UFIDA.U9.MRP.MRPBP, Version=25.5401.40664.0, Culture=neutral, PublicKeyToken=null; G:5a02181a5e99485c94183744faeeb5bb; A:1
MODULE: UFSoft.UBF.AopFrame => UFSoft.UBF.AopFrame, Version=25.5401.28703.0, Culture=neutral, PublicKeyToken=null; G:0809f490fd724f81a1691244438967e5; A:1
[70][ ][08:16:02][ERROR][Executable.JobExecutable]-ent:01,Job Execute Error1:值对于 Int32 太大或太小。不能在 MultQty 列中存储 <99999999999.000000000>。所需类型是 Int32。
[70][ ][08:16:02][ERROR][Executable.JobExecutable]- 在 UFSoft.UBF.Service.ServerDynamicProxy.Invoke(IMessage myIMessage)
在 System.Runtime.Remoting.Proxies.RealProxy.PrivateInvoke(MessageData& msgData, Int32 type)
在 UFIDA.U9.MRP.MRP.Proxy.IMRPCalcMain.Do(IContext context, IList`1& outMessages, EntityKey planVersion, Int32 type, Int32 partition, Boolean isRunMRPImmediately)
在 UFIDA.U9.MRP.MRP.Proxy.MRPCalcMainProxy.InvokeImplement[T](T oChannel)
在 UFSoft.UBF.Service.Base.ProxyBase.InvokeAgent[T]()
在 UFIDA.U9.MRP.MRP.Proxy.MRPCalcMainProxy.Do()
根据日志:方法mrp.internals.DataCollection.LoadData 找到对应DLL,反编译:
"值对于 Int32 太大或太小":U9源代码把字段“MultQty”设置为Int32,而且在数据库中对应字段“PurchaseMultiQty”是decimal(24,9),Int32保存数值99999999999.000000000发生异常System.ArgumentException;
“PurchaseMultiQty”就是MRP产生的采购数量,到底哪个料品产生如此大的采购数量呢?通过SQL可以得知
查找到数据来源表:MRP_ExpandItemMapping_Temp
SELECT Item,PurchaseMultiQty, * FROM MRP_ExpandItemMapping_Temp WHERE Org=1002006124586648 AND PurchaseMultiQty>999999
SELECT Code, * FROM CBO_ItemMaster WHERE ID=1002108055991861
发现是料号:30100630 问题,经过沟通是实施工程师为了:不让采购使用这个料号刻意这样设置。取消错误2处料品资料,从新跑MRP成功!💪