数据穿透配置

1.基本功能 1.基本功能

数据穿透功能配置,目前支持按钮数据穿透和表格双击数据穿透。

2.配置方法 2.配置方法

2.1.按钮数据穿透 2.1.按钮数据穿透

配置

1.对象建模–基础数据–数据穿透配置:新增一笔数据穿透配置,穿透编码:(非空,唯一)用于按钮或表格配置数据穿透的编码,页面标题:跳转后的Tab标题,未配置则默认为【新tab】,页面地址:(非空)跳转的url地址,页面资源ID:页面跳转时的sysResourceId。
数据穿透1

数据穿透2

2.点击【导出配置数据】或者【同步配置数据】按钮,将对应的数据穿透数据刷到对应的系统库,云平台默认的数据穿透主表为【IPF_DATA_PENETRATION】,主键为【IPF_DATA_PENETRATION_ID】。如果项目组的表结构与云平台不一致,可在视图级配置增加一笔配置,如下图,其中配置内容为导出脚本的表名,对应的主键为【tableName_ID】。
数据穿透3

3.到项目组工程对应的数据穿透配置界面配置穿透条件,填写穿透条件、穿透操作符、穿透常量。
数据穿透5

子表【穿透条件】的【穿透操作符】数据字典为
数据穿透6

4.对象建模–业务对象–业务对象管理:编辑业务对象,点击【方法定义】tab页,新增一笔方法定义,方法类型为【打开到页签】;穿透编码为数据穿透配置界面配置的数据。
数据穿透7

5.点击【可视化布局】按钮,在可视化界面将数据穿透按钮配置出来。
数据穿透8

代码

/**
  * GLPaaS生成
  * 测试数据穿透常用案例NewHot101 TOOLBAR
  */
$scope.testPenetrationTestCaseNewHot101 = function() {
    var penetrationCode = 'TESTWJ';
    var obj = $scope.testCaseNewHot101;
    $scope.baseDataPenetration(penetrationCode, obj);
};

2.2.表格双击数据穿透 2.2.表格双击数据穿透

配置

1.步骤1~3参考【2.1.按钮数据穿透】。
2.对象建模–业务对象–业务对象管理:编辑业务对象,点击【可视化布局按钮】,选中表格,在右侧【事件列表】tab页配置表格双击行事件,执行类型选择【JS函数定义】,执行内容填写对应的穿透编码。
数据穿透9

代码

/**
 * GLPaaS生成
 * 表格双击数据穿透
 */
$scope.dbclickTestCaseNewHot101Row = function(record, grid, $event) {
    var penetrationCode = 'TESTWJ';
    var obj = record;
    $scope.baseDataPenetration(penetrationCode, obj);
}

/**
            * GLPaaS生成
            *
            */
$scope.queryTestCaseNewHot101Params = function() {
    var searchColumns = [];
    if ($scope.searchMode == '1') {
        //$scope.quickSearchF011110 = {};
        if ($scope.quickSearchCurrentGroup == 'F011110') {
            //accountNo
            if ($scope.quickSearchF011110.accountNo) {
                searchColumns.push({
                    propertyName: 'accountNo',
                    columnName: 'ACCOUNT_NO',
                    dataType: 'S',
                    value: $scope.quickSearchF011110.accountNo,
                    operation: 'EQ'
                });
            };
            //active
            if ($scope.quickSearchF011110.active) {
                searchColumns.push({
                    propertyName: 'active',
                    columnName: 'ACTIVE',
                    dataType: 'S',
                    value: $scope.quickSearchF011110.active,
                    operation: 'EQ'
                });
            };
            //settleOfficeCode subRefProperty
            if ($scope.quickSearchF011110.settleOfficeCode) {
                searchColumns.push({
                    propertyName: 'settleOfficeCode',
                    columnName: 'SETTLE_OFFICE_CODE',
                    dataType: 'S',
                    value: $scope.quickSearchF011110.settleOfficeCode,
                    operation: 'EQ'
                });
            }
        }
    }

    //isDeleted_  a X 
    if ($scope.$$isDeleted_) {
        searchColumns.push({
            propertyName: 'isDeleted',
            columnName: 'IS_DELETED',
            dataType: 'B',
            booleanValues: {
                trueValue: 'X',
                falseValue: ''
            },
            value: $scope.$$isDeleted_,
            operation: 'EQ'
        });
    }

    if ($scope.testCaseNewHot101Grid && $scope.testCaseNewHot101Grid.getSelectedColumnIndex && $scope.testCaseNewHot101Grid.getSelectedColumnIndex() != false) $scope.testCaseNewHot101Grid.__selectedColumnIndex = $scope.testCaseNewHot101Grid.getSelectedColumnIndex();
    var orderColumns = []
    var cascadeParam = {
        "name": "TestCaseNewHot101"
    };
    return {
        "searchColumns": searchColumns,
        "queryResultType": "list",
        "sum": false,
        "gridType": "HTR",
        "cascadeParam": cascadeParam,
        "orderColumns": orderColumns
    };
}

/**
            * GLPaaS生成
            * initTestCaseNewHot101Grid
            */
$scope.initTestCaseNewHot101Grid = function(grid, source, validationRequireDisabled) {
    grid.__validationRequireDisabled = validationRequireDisabled;
    grid.__lastSelectIndex = -1; //表格上一次选择行记录
    if (grid.scope.hasCheckboxColumn) {
        grid.__fristAbleColumnIndex = 1; //记录表格第一字段列
        grid.__selectedColumnIndex = 1; //记录表格当前选择在那列
    } else {
        grid.__fristAbleColumnIndex = 0;
        grid.__selectedColumnIndex = 0;
    }
    $scope.testCaseNewHot101Grid = grid;

    $scope.testCaseNewHot101Grid.$$added = false;
    if ($scope._pageState) {
        $scope._pageState.resetDataState();
    }
};

2.3.相关说明 2.3.相关说明

1.公共操作:在云平台的数据穿透配置界面只需维护主表的数据,项目组需自己配置一个数据穿透的维护界面,用于维护子表的数据(穿透条件,穿透参数)。通过【导出配置数据】或【同步配置数据】将数据刷到项目的数据库。触发数据穿透时,会调用BaseController.js(需更新至5.7.X.0以上版本)的方法向后台请求数据(根据配置的穿透编码去查询,分隔符为;),如果项目组需要自己维护查询接口的话,可以在config.properties.js的customDataPenetration.url维护请求路径。

2.数据穿透相关的表结构与云平台一致(表结构详情可见【数据穿透新增表脚本】):如果后台代码要走云平台这边可在pom上引入云平台的【gillion-component-datapenetration】。

--
-- ER/Studio 8.0 SQL Code Generation
-- Company :      Gillion
-- Project :      Implementation Platform
-- Author :       方加来
--
-- Date Created : Thursday, September 12, 2019 15:46:14
-- Target DBMS : Oracle 7.x
--

-- 
-- TABLE: IPF_DATA_PENE_CONDITION 
--

CREATE TABLE IPF_DATA_PENE_CONDITION(
    IPF_DATA_PENE_CONDITION_ID    VARCHAR2(50)     NOT NULL,
    CREATOR                       VARCHAR2(50),
    CREATE_OFFICE                 VARCHAR2(50),
    CREATE_TIME                   VARCHAR2(50),
    CREATE_TIME_ZONE              VARCHAR2(50),
    LAST_MODIFYOR                 VARCHAR2(50),
    LAST_MODIFY_OFFICE            VARCHAR2(50),
    LAST_MODIFY_TIME              VARCHAR2(50),
    LAST_MODIFY_TIME_ZONE         VARCHAR2(50),
    RECORD_VERSION                NUMBER(10, 0),
    PRINCIPAL_GROUP_CODE          VARCHAR2(50),
    CONFIG_ITEM_CODE              VARCHAR2(50),
    REVISION_NUMBER               NUMBER(18, 0),
    BASE_VIEW_ID                  VARCHAR2(50),
    SOURCE_REVISION_NUMBER        NUMBER(18, 0),
    SOURCE_PK_ID                  VARCHAR2(50),
    IPF_DATA_PENETRATION_ID       VARCHAR2(50)     NOT NULL,
    DATA_CONDITION                VARCHAR2(50),
    DATA_OPERATOR                 VARCHAR2(50),
    DATA_CONSTANT                 VARCHAR2(200),
    CONSTRAINT PK_IPF_RULE_UNITCASE_1_1_1 PRIMARY KEY (IPF_DATA_PENE_CONDITION_ID, IPF_DATA_PENETRATION_ID)
)
;



COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.IPF_DATA_PENE_CONDITION_ID IS '数据穿透条件ID'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.CREATOR IS '创建人'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.CREATE_OFFICE IS '创建人所属组织'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.CREATE_TIME IS '时间'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.CREATE_TIME_ZONE IS '创建人时区'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.LAST_MODIFYOR IS '最后修改人'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.LAST_MODIFY_OFFICE IS '最后修改人所属组织'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.LAST_MODIFY_TIME IS '时间'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.LAST_MODIFY_TIME_ZONE IS '最后修改人时区'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.RECORD_VERSION IS '版本号'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.PRINCIPAL_GROUP_CODE IS '云服务分组代码'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.CONFIG_ITEM_CODE IS '配置项代码'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.REVISION_NUMBER IS '修订号'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.BASE_VIEW_ID IS '源视图ID'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.SOURCE_REVISION_NUMBER IS '原修订号'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.SOURCE_PK_ID IS '旧主键'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.IPF_DATA_PENETRATION_ID IS '数据穿透ID'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.DATA_CONDITION IS '穿透条件'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.DATA_OPERATOR IS '穿透操作符'
;
COMMENT ON COLUMN IPF_DATA_PENE_CONDITION.DATA_CONSTANT IS '穿透常量'
;
-- 
-- TABLE: IPF_DATA_PENE_PARAMETER 
--

CREATE TABLE IPF_DATA_PENE_PARAMETER(
    IPF_DATA_PENE_PARAMETER_ID    VARCHAR2(50)     NOT NULL,
    CREATOR                       VARCHAR2(50),
    CREATE_OFFICE                 VARCHAR2(50),
    CREATE_TIME                   VARCHAR2(50),
    CREATE_TIME_ZONE              VARCHAR2(50),
    LAST_MODIFYOR                 VARCHAR2(50),
    LAST_MODIFY_OFFICE            VARCHAR2(50),
    LAST_MODIFY_TIME              VARCHAR2(50),
    LAST_MODIFY_TIME_ZONE         VARCHAR2(50),
    RECORD_VERSION                NUMBER(10, 0),
    PRINCIPAL_GROUP_CODE          VARCHAR2(50),
    CONFIG_ITEM_CODE              VARCHAR2(50),
    REVISION_NUMBER               NUMBER(18, 0),
    BASE_VIEW_ID                  VARCHAR2(50),
    SOURCE_REVISION_NUMBER        NUMBER(18, 0),
    SOURCE_PK_ID                  VARCHAR2(50),
    IPF_DATA_PENETRATION_ID       VARCHAR2(50)     NOT NULL,
    DATA_FIELD                    VARCHAR2(50),
    DATA_OPERATOR                 VARCHAR2(50),
    DATA_PARAMETER                VARCHAR2(200),
    DATA_ATTRIBUTE                VARCHAR2(50),
    CONSTRAINT PK_IPF_RULE_UNITCASE_1_1 PRIMARY KEY (IPF_DATA_PENE_PARAMETER_ID, IPF_DATA_PENETRATION_ID)
)
;



COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.IPF_DATA_PENE_PARAMETER_ID IS '数据穿透条件ID'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.CREATOR IS '创建人'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.CREATE_OFFICE IS '创建人所属组织'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.CREATE_TIME IS '时间'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.CREATE_TIME_ZONE IS '创建人时区'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.LAST_MODIFYOR IS '最后修改人'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.LAST_MODIFY_OFFICE IS '最后修改人所属组织'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.LAST_MODIFY_TIME IS '时间'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.LAST_MODIFY_TIME_ZONE IS '最后修改人时区'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.RECORD_VERSION IS '版本号'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.PRINCIPAL_GROUP_CODE IS '云服务分组代码'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.CONFIG_ITEM_CODE IS '配置项代码'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.REVISION_NUMBER IS '修订号'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.BASE_VIEW_ID IS '源视图ID'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.SOURCE_REVISION_NUMBER IS '原修订号'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.SOURCE_PK_ID IS '旧主键'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.IPF_DATA_PENETRATION_ID IS '数据穿透ID'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.DATA_FIELD IS '字段'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.DATA_OPERATOR IS '操作符'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.DATA_PARAMETER IS '参数值'
;
COMMENT ON COLUMN IPF_DATA_PENE_PARAMETER.DATA_ATTRIBUTE IS '属性'
;
-- 
-- TABLE: IPF_DATA_PENETRATION 
--

CREATE TABLE IPF_DATA_PENETRATION(
    IPF_DATA_PENETRATION_ID    VARCHAR2(50)     NOT NULL,
    CREATOR                    VARCHAR2(50),
    CREATE_OFFICE              VARCHAR2(50),
    CREATE_TIME                VARCHAR2(50),
    CREATE_TIME_ZONE           VARCHAR2(50),
    LAST_MODIFYOR              VARCHAR2(50),
    LAST_MODIFY_OFFICE         VARCHAR2(50),
    LAST_MODIFY_TIME           VARCHAR2(50),
    LAST_MODIFY_TIME_ZONE      VARCHAR2(50),
    RECORD_VERSION             NUMBER(10, 0),
    PRINCIPAL_GROUP_CODE       VARCHAR2(50),
    CONFIG_ITEM_CODE           VARCHAR2(50),
    REVISION_NUMBER            NUMBER(18, 0),
    BASE_VIEW_ID               VARCHAR2(50),
    SOURCE_REVISION_NUMBER     NUMBER(18, 0),
    SOURCE_PK_ID               VARCHAR2(50),
    FIELD_ID                   VARCHAR2(200),
    TITLE                      VARCHAR2(50),
    RESOURCE_ID                VARCHAR2(50),
    URL                        VARCHAR2(200),
    EXPR                       VARCHAR2(200),
    COLUMN_NAME                VARCHAR2(50),
    TABLE_NAME                 VARCHAR2(200),
    SYSTEM                     VARCHAR2(50),
    PENETRATION_CODE           VARCHAR2(50),
    CONSTRAINT PK_IPF_RULE_UNITCASE_1 PRIMARY KEY (IPF_DATA_PENETRATION_ID)
)
;



COMMENT ON COLUMN IPF_DATA_PENETRATION.IPF_DATA_PENETRATION_ID IS '数据穿透ID'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.CREATOR IS '创建人'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.CREATE_OFFICE IS '创建人所属组织'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.CREATE_TIME IS '时间'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.CREATE_TIME_ZONE IS '创建人时区'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.LAST_MODIFYOR IS '最后修改人'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.LAST_MODIFY_OFFICE IS '最后修改人所属组织'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.LAST_MODIFY_TIME IS '时间'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.LAST_MODIFY_TIME_ZONE IS '最后修改人时区'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.RECORD_VERSION IS '版本号'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.PRINCIPAL_GROUP_CODE IS '云服务分组代码'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.CONFIG_ITEM_CODE IS '配置项代码'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.REVISION_NUMBER IS '修订号'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.BASE_VIEW_ID IS '源视图ID'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.SOURCE_REVISION_NUMBER IS '原修订号'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.SOURCE_PK_ID IS '旧主键'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.FIELD_ID IS '属性名'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.TITLE IS '页面标题'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.RESOURCE_ID IS '页面资源ID'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.URL IS '页面地址'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.EXPR IS '过滤条件'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.COLUMN_NAME IS '表格列名'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.TABLE_NAME IS '表名'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.SYSTEM IS '来源系统'
;
COMMENT ON COLUMN IPF_DATA_PENETRATION.PENETRATION_CODE IS '穿透编码'
;
-- 
-- TABLE: IPF_DATA_PENE_CONDITION 
--

ALTER TABLE IPF_DATA_PENE_CONDITION ADD CONSTRAINT RefIPF_DATA_PENETRATION2091 
    FOREIGN KEY (IPF_DATA_PENETRATION_ID)
    REFERENCES IPF_DATA_PENETRATION(IPF_DATA_PENETRATION_ID)
;


-- 
-- TABLE: IPF_DATA_PENE_PARAMETER 
--

ALTER TABLE IPF_DATA_PENE_PARAMETER ADD CONSTRAINT RefIPF_DATA_PENETRATION2081 
    FOREIGN KEY (IPF_DATA_PENETRATION_ID)
    REFERENCES IPF_DATA_PENETRATION(IPF_DATA_PENETRATION_ID)
;



3.数据穿透相关的表结构与云平台不一致:需要在项目中维护数据穿透相关的后台代码,并且在config.properties.js配置数据穿透配置数据请求接口路径。

3.常用扩展 3.常用扩展

暂无

4.版本更新 4.版本更新

5.7.X,2019.10.16

新特性

  • 云平台回收象屿项目数据穿透的配置功能