我仿照系统(费用申请单审核时同步生成付款申请单)做了一个收款单审核自动下推其他应收单.实在读不懂.改改了也没有效果.帮忙看下.
using Kingdee.BOS.Core.DynamicForm.PlugIn.Args;
using Kingdee.BOS.Orm.DataEntity;
using Kingdee.K3.FIN.ER.App.Core;
using Kingdee.K3.FIN.ER.Contracts;
using System;
using System.Collections.Generic;
using System.ComponentModel;
using System.Linq;
namespace Kingdee.bos.LZH.ExpenseRequest
{
[Description("付款单审核时同步生成其他应付单")]
public class ToPayRefoundAfterAudit : AbstractAutoPushService
{
public override void OnInitTargetBillWithConvertRuleDic()
{
string text = "AR_OtherRecAble";
string id = base.GetDefaultConvertRule(base.Context, base.BusinessInfo.GetForm().Id, text, "").Id;
this.TargetBillWithCoventRuleDic.Clear();
this.TargetBillWithCoventRuleDic.Add(text, id);
}
public override void OnInitSourceIDWithTargetBillFormIdDic(List
{
this.SourceIDWithTargetBillFormIdDic.Clear();
foreach (DynamicObject current in sBIllObjs)
{
long num = Convert.ToInt64(current["ID"]);
if (!this.SourceIDWithTargetBillFormIdDic.Keys.Contains(num))
{
this.SourceIDWithTargetBillFormIdDic.Add(num, "AR_OtherRecAble");
}
}
}
//public override void OnPreparePropertys(PreparePropertysEventArgs e)
//{
// //e.FieldKeys.Add("FCostOrgID");
// //e.FieldKeys.Add("FIsBorrow");
//}
public override bool IsCanSoureBillPush(DynamicObject dataEntity)
{
long orgID = Convert.ToInt64(dataEntity["SETTLEORGID_Id"]);
ICommonService service = Kingdee.K3.FIN.ER.Contracts.ServiceFactory.GetService
DynamicObject systemParameter = service.GetSystemParameter(base.Context, orgID);
return Convert.ToBoolean(systemParameter["IsPayRequest"]);// && Convert.ToBoolean(dataEntity["IsBorrow"]);
}
}
}