批号捡货二次开发插件示例(此例为无源单批号捡货示例代码,单据转换捡货的代码需要切换派生的基类并实现新的基类方法)
工程需引用:
Kingdee.BOS.dll
Kingdee.BOS.DataEntity.dll
Kingdee.k3.SCM.App.Core
using Kingdee.K3.SCM.App.Core.ConvertBusinessService;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ClassLibrary1
{
public class Class1 : AbstractSinglePickPlugIn
{
public override void AfterSinglePicking(Kingdee.K3.SCM.App.Core.ConvertBusinessService.LotPickArgs.AfterSinglePickingArgs arg)
{
base.AfterSinglePicking(arg);
}
public override bool BeforePicking(Kingdee.K3.SCM.App.Core.ConvertBusinessService.LotPickArgs.BeforePickingArgs e)
{
return base.BeforePicking(e);
}
public override bool DoPickWhenNoSysSet()
{
return base.DoPickWhenNoSysSet();
}
public override string RegexGetInvDataSql(string sql, List
{
return base.RegexGetInvDataSql(sql, paras);
}
public override System.Data.DataRow[] RegexSelectResultByCurRowData(Kingdee.K3.SCM.App.Core.ConvertBusinessService.LotPickArgs.RegexSelectResultByCurRowDataArgs e)
{
return base.RegexSelectResultByCurRowData(e);
}
public override string RegexSinglePickFilterString(Kingdee.K3.SCM.App.Core.ConvertBusinessService.LotPickArgs.RegexSinglePickFilterStringArgs e)
{
return base.RegexSinglePickFilterString(e);
}
public override string RegexSinglePickSortString(Kingdee.K3.SCM.App.Core.ConvertBusinessService.LotPickArgs.RegexCurRowPickSortStringArgs e)
{
return base.RegexSinglePickSortString(e);
}
public override void RegexUseableInvData(System.Data.DataTable invDatas)
{
base.RegexUseableInvData(invDatas);
}
}
}
代码编译后需要在批号捡货配置界面注册插件,插件注册字符串为二次开发插件的类全名,如:ClassLibrary1.Class,ClassLibrary1
编写插件可以在插件方法中对捡货过程进行干预,也可以用于监视调试捡货过程,在这些方法中打上断点,跟踪调试可以看一下捡货的流程,以及执行过程中参数值,如果捡货没有完成也可以看一下是执行到哪一步之后出现问题不再继续执行
推荐阅读