package kd.bos.billzh.plugin;
import kd.bos.entity.BillEntityType;
import kd.bos.entity.botp.ConvertOpType;
import kd.bos.entity.botp.ConvertRuleElement;
import kd.bos.entity.botp.plugin.AbstractConvertPlugIn;
import kd.bos.entity.botp.plugin.args.AfterBuildQueryParemeterEventArgs;
import kd.bos.entity.botp.plugin.args.AfterConvertEventArgs;
import kd.bos.entity.botp.plugin.args.AfterCreateLinkEventArgs;
import kd.bos.entity.botp.plugin.args.AfterCreateTargetEventArgs;
import kd.bos.entity.botp.plugin.args.AfterFieldMappingEventArgs;
import kd.bos.entity.botp.plugin.args.AfterGetSourceDataEventArgs;
import kd.bos.entity.botp.plugin.args.BeforeBuildGroupModeEventArgs;
import kd.bos.entity.botp.plugin.args.BeforeBuildRowConditionEventArgs;
import kd.bos.entity.botp.plugin.args.BeforeCreateLinkEventArgs;
import kd.bos.entity.botp.plugin.args.BeforeCreateTargetEventArgs;
import kd.bos.entity.botp.plugin.args.BeforeGetSourceDataEventArgs;
import kd.bos.entity.botp.plugin.args.InitVariableEventArgs;
/**
* <p>Title: </p>
* <p>
* Description:
* 演示单据转换插件事件的触发时机
* 试验成功
* </p>
* <p>Copyright: Copyright (c) 2020</p>
* @author xx
* @date 2020年3月18日
* @version 1.0
*/
public class BillConvertEventSample extends AbstractConvertPlugIn {
/**
* void</br>
*
* <p>Title: </p>
* <p>
* Description:
* 演示如何获取上下文信息
* </p>
* <p>Copyright: Copyright (c) 2020</p>
* @author xx
* @date 2020年3月18日
* @param param the bare_field_name
* @return the bare_field_name
* see_to_overridden
* @version 1.0
*/
private void getContext(){
// 源单主实体
BillEntityType srcMainType = this.getSrcMainType();
// 目标单主实体
BillEntityType tgtMainType = this.getTgtMainType();
// 转换规则
ConvertRuleElement rule = this.getRule();
// 转换方式:下推、选单
ConvertOpType opType = this.getOpType();
}
/**
* <p>Title: </p>
* <p>
* Description:
* 初始化变量事件
* 获取上下文信息,构建一些必须的变量
* </p>
* <p>Copyright: Copyright (c) 2020</p>
* @author xx
* @date 2020年3月18日
* @param param the bare_field_name
* @param e
* @see kd.bos.entity.botp.plugin.IConvertPlugIn#
单据转换插件常用代码(自用)
于 2021-09-08 16:06:18 首次发布
本文档展示了BillConvertEventSample插件如何在不同转换阶段获取上下文信息并定制操作,包括初始化变量、构建查询参数、数据筛选等关键步骤。

最低0.47元/天 解锁文章
1143

被折叠的 条评论
为什么被折叠?



