GOTHelper

Got节点处理类

getLabelByForm(String)

根据传入的Form名称 获取Form 标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getLabelByForm(String)

方法入参

  • String formName:form的name

示例代码

String label = GOTHelper.getLabelByForm("SysUser");

getEnumItemLabel(Class<?>, int)

根据传入的Enum 类 和 具体值 获取 值对应的标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEnumItemLabel(Class<?>, int)

方法入参

  • Class<?> enum:Enum 类
  • int value:值

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        //从arg 内 获取当前数据源 选择记录
        SysReportTable currentRecord =(SysReportTable) arg.getCurrentRecord();
        int reportDSType = currentRecord.getReportDSType();
        //getEnumItemLabel 获取到 reportDSType值对应的 标签
        String label = GOTHelper.getEnumItemLabel(PersonClass.class,reportDSType);
        //继续执行业务逻辑

        return result;
    }

getEnumItemLabel(String, int)

根据传入的Enum名 和 具体值 获取 值对应的标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEnumItemLabel(String, int)

方法入参

  • String enum:Enum
  • int value:值

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        //从arg 内 获取当前数据源 选择记录
        SysReportTable currentRecord =(SysReportTable) arg.getCurrentRecord();
        int reportDSType = currentRecord.getReportDSType();
        //getEnumItemLabel 获取到 reportDSType值对应的 标签
        String label = GOTHelper.getEnumItemLabel("PersonClass",reportDSType);
        //继续执行业务逻辑

        return result;
    }

getEnumItemValue(Class<?>, String)

根据传入的Enum名 和 具体值 获取 值对应的标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEnumItemValue(Class<?>, String)

方法入参

  • Class<?> enum:Enum 类
  • int value:值

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        //从arg 内 获取数据
        String type = (String)arg.getEditorValue(__Type);
        //getEnumItemValue 获取到 type 对应的 value
        int val = GOTHelper.getEnumItemValue(PersonClass.class, type)
        //继续执行业务逻辑

        return result;
    }

getEnumItemValue(String, String)

根据传入的Enum名 和 具体值 获取 值对应的标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEnumItemValue(String, String)

方法入参

  • String enum:Enum
  • int value:值

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        //从arg 内 获取数据
        String type = (String)arg.getEditorValue(__Type);
        //getEnumItemValue 获取到 type 对应的 value
        int val = GOTHelper.getEnumItemValue("PersonClass", type)
        //继续执行业务逻辑

        return result;
    }

getEntityType(String)

根据传入String Id 返回 节点类型

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEntityType(String)

方法入参

  • String entityId:实体节点ID

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        //从arg 内 获取数据
        EntityType entityType = GOTHelper.getEntityType(arg.formParam.formId);
        //继续执行业务逻辑

        return result;
    }

getEntityId(Class<?>)

根据传入实体节点类对象 返回 节点ID

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEntityId(Class<?>)

方法入参

  • Class<?> class:实体节点类

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        //构造一个OpenFormArg 用于打开菜单
        OpenFormArg openFormArg = new OpenFormArg();
        //根据 getEntityId 获取到指定菜单Id  传入OpenFormArg 里面
        openFormArg.menuItemId= GOTHelper.getEntityId(MenuItem_SysBusinessMap.class);
        //执行命令 打开一个菜单画面
        result.openForm(openFormArg);
        return result;
    }

getTableLabel(String)

根据传入String 返回 表的 Label

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getTableLabel(String)

方法入参

  • Class<?> class:实体节点类

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        String label = GOTHelper.getTableLabel("Student")
        return result;
    }

getEnumEntity(Class<?>)

根据传入Enum实体节点类 返回 节点对象

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getTableLabel(String)

方法入参

  • Class<?> class:实体节点类

示例代码

    @CommandArgOption(groups="all(fq)")
    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        GOT_Enum enumEntity = GOTHelper.getEnumEntity(PersonClass.class)
        return result;
    }

getTableEntity(Class<? extends GongqiRecord>)

根据传入GongqiForm类 获取Form实体对象

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getTableEntity(Class<? extends GongqiRecord>)

方法入参

  • Class<? extends GongqiRecord> class:table 的 class 对象

示例代码

    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        GOT_Table tableEntity = GOTHelper.getTableEntity(SysUser.class)
        return result;
    }

getFormEntity(Class<? extends GongqiRecord>)

根据传入GongqiForm类 获取Form实体对象

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getFormEntity(Class<? extends GongqiRecord>)

方法入参

  • Class<? extends GongqiRecord> class:form 的 class 对象

示例代码

    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        GOT_Form entity = GOTHelper.getFormEntity(Form_SysUser.class)
        return result;
    }

getTableFieldLabel(String, String)

根据传入Table名和Field名 获取Field标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getTableFieldLabel(String, String)

方法入参

  • String tableName :表
  • String fieldName:字段

示例代码

    public CommandResult buttonOK_Button(CommandArg arg) {
        CommandResult result = new CommandResult();  
        String label = GOTHelper.getTableFieldLabel("SysUser","userId");
        return result;
    }

getBooleanText(String, String)

根据传入Boolean DataTypeId 和 值 返回 标签

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getBooleanText(String, String)

方法入参

  • String tableName :表
  • String fieldName:字段

示例代码



getEntity(String)

根据传入实体Id 获取 实体对象

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEntity(String)

方法入参

  • String tableName :表
  • String fieldName:字段

getEntityByName(EntityType, String)

根据传入实体类型和名 获取实体对象

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEntityByName(EntityType, String)

方法入参

  • EntityType type:EntityType 类型
  • String entityName:实体节点名称

getEntitys(EntityType)

根据传入实体类型和名 获取实体对象

方法签名

gongqi.erp.gotmodel.core.GOTHelper.getEntitys(EntityType)

方法入参

  • EntityType type:EntityType 类型

results matching ""

    No results matching ""