Acumatica 如何用泛型重写方法?

Acumatica 如何用泛型重写方法?,acumatica,Acumatica,我试图在PIGenerator图中重写UpdateCommand和ByGenerationMethod方法 Acumatica提供如下空白模板: public delegate BqlCommandWithParameters UpdateCommandByGenerationMethodDelegate(BqlCommandWithParameters cmd); [PXOverride] public BqlCommandWithParameters UpdateCommandByGener

我试图在PIGenerator图中重写UpdateCommand和ByGenerationMethod方法

Acumatica提供如下空白模板:

public delegate BqlCommandWithParameters UpdateCommandByGenerationMethodDelegate(BqlCommandWithParameters cmd);
[PXOverride]
public BqlCommandWithParameters UpdateCommandByGenerationMethod(BqlCommandWithParameters cmd, UpdateCommandByGenerationMethodDelegate baseMethod)
{
  /* */
  return baseMethod(cmd);
}
这将发布带有错误的罚款。但当我加载屏幕时。我得到一个错误:

方法PX.Objects.IN.PhysicalInventory.bqlcommand及其参数UpdateCommand和ByGenerationMethodsSiteId字段、TinVentoryId字段、TsBitemId字段、TlocationId字段是通用方法定义

描述:执行当前web请求期间发生未处理的异常。请查看堆栈跟踪以了解有关错误的更多信息以及错误在代码中的起源

异常详细信息:System.ArgumentException:Method PX.Objects.IN.PhysicalInventory.BqlCommandWithParameters UpdateCommand ByGenerationMethodsSiteIDField、TInventoryIdField、TsBitemidField、TLocationIdField是通用方法定义

Acumatica中的实际方法签名如下:

protected virtual BqlCommandWithParameters UpdateCommandByGenerationMethod<TSiteIdField, TInventoryIdField, TSubItemIdField, TLocationIdField>(
BqlCommandWithParameters cmd)
    where TSiteIdField : IBqlOperand
    where TInventoryIdField : IBqlField
    where TSubItemIdField : IBqlField
    where TLocationIdField : IBqlField
{
    ...
}
那么如何修复委托方法的声明呢


提前感谢。

不幸的是,如果使用上次尝试中的仿制药以及与Acumatica公司人员的交谈中的仿制药,则无法覆盖方法。我不相信仍然可以使用仿制药覆盖方法。不过,如果有人找到了解决方案,我会很感兴趣。