版本比较

标识

  • 该行被添加。
  • 该行被删除。
  • 格式已经改变。

举例:人员信息管理list层关联出 教育经历子集是全日制教育那条数据的的学历字段信息


查看此子集的参数返回值(即教育经历是全日制教育这条)

Image Added

1.配置relations

代码块
{
"relations":[ {
"filter": {
"education_new.employee_id": ":id",             #关联模型下employee_id等于当前表下id字段 其中:代表当前表
"education_new.education_form": "全日制教育"     #关联过滤条件在filter中定义
},
"model": "EmployeeEducation",                 #关联模型
"type": "outer",                              #关联方式内连接、外链接
"key": "education_new"                        #关联模型别名、相当于关联模型的唯一标识
}]

2、配置fields显示此字段

代码块
"fields":[{

"label": "学历",
"sequence": 240,
"width": "col-6",
"field": ["education_new","education"],     #定位信息、定位到关联模型education_new下的education字段
"key": "education_name",
"hide": false
}]
}


常用的标准关联:


根据人员关联当前任职以及单位部门和岗位、序列、职级、政治面貌、最高教育经历等等


代码块
{ "relations": [
        {
            "filter": {
                "job_info.position_type": [
                    1,
                    2
                ],
                "job_info.end_date": {
                    "gt": "=date_"
                },
                "job_info.employee_id": ":id",
                "job_info.begin_date": {
                    "lte": "=date_"
                }
            },
            "model": "JobInformation",
            "name": "任职信息",
            "key": "job_info"
        },
        {
            "filter": {
                "job_info.position_id": ":position.origin_id",
                "position.begin_date": {
                    "lte": "=date_"
                },
                "position.end_date": {
                    "gt": "=date_"
                }
            },
            "model": "OrgPositionHistory",
            "type": "outer",
            "name": "岗位信息",
            "key": "position",
            "blur": [
                "name"
            ]
        },
        {
            "filter": {
                "position.parent_id": ":department.origin_id",
                "department.begin_date": {
                    "lte": "=date_"
                },
                "department.end_date": {
                    "gt": "=date_"
                }
            },
            "model": "OrgDepartmentHistory",
            "type": "outer",
            "name": "部门信息",
            "key": "department"
        },
        {
            "filter": {
                "department.subordinate_unit_id": ":unit.origin_id",
                "unit.begin_date": {
                    "lte": "=date_"
                },
                "unit.end_date": {
                    "gt": "=date_"
                }
            },
            "model": "OrgUnitHistory",
            "type": "outer",
            "name": "单位信息",
            "key": "unit"
        },
        {
            "filter": {
                "job_info.job_step_id": ":job_step.id"
            },
            "model": "JobStep",
            "type": "outer",
            "name": "职级",
            "key": "job_step"
        },
        {
            "filter": {
                "job_step.step_type_id": ":position_sequence.id"
            },
            "model": "JobStepType",
            "type": "outer",
            "name": "序列",
            "key": "position_sequence"
        },
        {
            "filter": {
                "latest_political_landscape.employee_id": ":id",
                "latest_political_landscape.is_latest": "1"
            },
            "model": "EmployeePoliticalLandscape",
            "type": "outer",
            "name": "最新政治面貌",
            "key": "latest_political_landscape"
        },
        {
            "filter": {
                "highest_education.employee_id": ":id",
                "highest_education.is_highest": "1"
            },
            "model": "EmployeeEducation",
            "type": "outer",
            "name": "最高学历",
            "key": "highest_education"
        }
    ]

此处以人员任职子集关联出岗位岗位类别,岗位类别关联出岗位类别父类为例

1.找到此子集需要关联的模型以及关联关系-配置relation

   任职子集默认会有此关联

   Image Removed

 2.到相关模型对应的功能查看模型字段显示

Image Removed

Image Removed

3.配置到任职列表

Image Removed

4.如果还想关联岗位对应的其他信息,比如岗位父类id - 先找到对应的模型与岗位关联关系,做关联配置

Image Removed

Image Removed

5.查看岗位父id名称如何关联出,再配置字段,同上

Image Removed

注:

...

此外:再举一个小的例子:

将人员子集教育经历中的全日制教育经历中的学历关联到人员信息主集:

我们需要做的步骤 1:  看此子集的参数返回值(即教育经历是全日制教育这条)

Image Removed

2.配置relations和field显示字段:

...

}