资产卡片增加折旧预测功能原创
金蝶云社区-H4
H4
7人赞赏了该文章 120次浏览 未经作者许可,禁止转载编辑于2024年05月23日 10:33:19

按照以下源码,可以实现折旧预测功能

Dictionary<string, object> dct = new Dictionary<string, object>();

dct["FOWNERORGID"] = this.Model.DataObject["OwnerOrgID_Id"];

//传入组织参数

List<Dictionary<string, object>> lst = new List<Dictionary<string, object>>();

lst.Add(dct);

Dictionary<string, object> drParam = new Dictionary<string, object>();

//标记只是预测,不保存折旧信息

drParam["ISSAVE"]= null ; 

drParam["ISSALALL"]= null; 

//变更前后的id,都传入当前卡片内码

drParam["FOLDALTERID"]= this.Model.DataObject["id"] ; 

drParam["FALTERID"]= this.Model.DataObject["id"] ; 

//传入卡片创建方式

drParam["SOURCETYPE"] = this.Model.DataObject["Source"];

//进行折旧预测

DynamicObjectCollection deprInfo = AssetDeprServiceHelper.AssetDepr(Context, lst, drParam);

this.View.ShowMessage(Convert.ToString(deprInfo[0]["FDepr"]));


赞 7