缓存上下文,表结构添加

This commit is contained in:
yujj128
2025-10-13 18:18:58 +08:00
parent 73cbc55d74
commit be0bc661e2
4 changed files with 371 additions and 24 deletions

View File

@@ -443,12 +443,26 @@ person_ddl_sql = """
],
"relationships": [
{
"from": "ytenant_id",
"to_table": "租户表",
"from": "input_dept",
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
"to_field": "id",
"type": "foreign_key",
"comment": "关联租户信息"
}
"comment": "关联部门表"
},
{
"from": "internal_dept",
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
"to_field": "id",
"type": "foreign_key",
"comment": "关联部门表"
},
{
"from": "internal_unit",
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
"to_field": "id",
"type": "foreign_key",
"comment": "关联部门表"
},
],
"tags": ["人员管理", "人力资源", "审批流程", "基本信息", "工作信息"],
@@ -509,7 +523,7 @@ rule_ddl='''
{
"name": "region",
"type": "VARCHAR(50)",
"comment": "",
"comment": "",
"value":{
"1":"北京",
"2":"成都",
@@ -518,14 +532,14 @@ rule_ddl='''
"5": "林芝"
},
"role": "dimension",
"tags": [ "考勤的位置","非办公区域不要混淆","枚举"]
"tags": [ "考勤的地区位置","非办公区域不要混淆","枚举"]
},
],
"relationships": [
{
"from": "region",
"to_table": "区域配置表",
"to_field": "region_code",
"to_table": "t_yj_person_ac_area",
"to_field": "region",
"type": "foreign_key",
"comment": "关联区域配置信息"
}
@@ -617,4 +631,294 @@ user_status_ddl='''
"tags": ["人员状态", "状态记录", "地区管理", "西藏标识", "每日状态"]
}
'''
user_attendance_ddl = '''
{
"db_name": "YJOA_APPSERVICE_DB",
"table_name": "t_person_attendance_records",
"table_comment": "人员考勤记录表,存储员工的打卡记录、考勤状态和位置信息",
"columns": [
{
"name": "id",
"type": "VARCHAR(200)",
"comment": "主键ID",
"role": "dimension",
"tags": ["主键", "ID标识"]
},
{
"name": "person_name",
"type": "VARCHAR(50)",
"comment": "人员姓名",
"role": "dimension",
"tags": ["人员信息", "姓名"]
},
{
"name": "person_id",
"type": "VARCHAR(200)",
"comment": "人员ID",
"role": "dimension",
"tags": ["人员标识", "关联字段"]
},
{
"name": "phone_number",
"type": "VARCHAR(50)",
"comment": "手机号码",
"role": "dimension",
"tags": ["联系方式", "人员信息"]
},
{
"name": "attendance_time",
"type": "DATETIME",
"comment": "考勤时间",
"role": "dimension",
"tags": ["时间戳", "打卡时间", "关键时间"]
},
{
"name": "attendance_address",
"type": "VARCHAR(200)",
"comment": "考勤地址",
"role": "dimension",
"tags": ["位置信息", "打卡地点"]
},
{
"name": "status",
"type": "INT",
"comment": "状态",
"value": {
"0": "在岗",
"1": "出差",
"2": "休假"
},
"role": "dimension",
"tags": ["状态标识", "人员在岗状态"]
},
{
"name": "original_id",
"type": "VARCHAR(200)",
"comment": "原始ID",
"role": "dimension",
"tags": ["原数据ID"]
},
{
"name": "source",
"type": "VARCHAR(50)",
"comment": "数据来源",
"value": {
"APP": "手机应用",
"DEVICE": "考勤设备",
"SYSTEM": "系统导入"
},
"role": "dimension",
"tags": ["来源系统", "数据渠道"]
},
{
"name": "dr",
"type": "INT",
"comment": "删除标志",
"value": {
"0": "正常",
"1": "已删除"
},
"role": "dimension",
"tags": ["软删除", "数据状态"]
},
{
"name": "create_time",
"type": "DATETIME",
"comment": "创建时间",
"role": "dimension",
"tags": ["时间戳", "记录创建时间"]
},
{
"name": "enter_or_exit",
"type": "INT",
"comment": "进出类型",
"value": {
"0": "",
"1": ""
},
"role": "dimension",
"tags": ["进出标识", "打卡方向"]
},
{
"name": "access_control_point",
"type": "VARCHAR(50)",
"comment": "门禁点",
"role": "dimension",
"tags": ["门禁位置", "打卡设备点"]
},
{
"name": "by_st",
"type": "VARCHAR(20)",
"comment": "上午打卡时间",
"role": "dimension",
"tags": ["时间范围", "开始时间"]
},
{
"name": "by_et",
"type": "VARCHAR(20)",
"comment": "下午打卡时间",
"role": "dimension",
"tags": ["时间范围", "结束时间"]
},
{
"name": "by_st_field",
"type": "VARCHAR(50)",
"comment": "午休前打卡时间",
"role": "dimension",
"tags": ["中间打卡","时间配置"]
},
{
"name": "by_et_field",
"type": "VARCHAR(50)",
"comment": "午休后打卡时间",
"role": "dimension",
"tags": ["中间打卡", "时间配置"]
},
{
"name": "by_go_type",
"type": "VARCHAR(8)",
"comment": "打卡类型",
"role": "dimension",
"tags": ["类型标识", "打卡类型"]
}
],
"relationships": [
{
"from": "person_id",
"to_table": "t_pr3rl2oj_yj_person_database",
"to_field": "code",
"type": "foreign_key",
"comment": "关联人员基本信息"
},
{
"from": "access_control_point",
"to_table": "t_yj_person_ac_position",
"to_field": "ac_point",
"type": "foreign_key",
"comment": "关联门禁点配置信息"
}
],
"tags": ["考勤记录", "打卡数据", "人员考勤", "时间记录", "位置信息", "门禁系统"]
}
'''
person_ac_position = '''
{
"db_name":"YJOA_APPSERVICE_DB",
"table_name": "t_yj_person_ac_position",
"table_comment": "门禁控制点位置记录",
"columns": [
{
"name": "ac_point",
"type": "VARCHAR(50)",
"comment": "门禁点",
"role": "dimension",
"tags": ["门禁点", "门禁点标识"]
},
{
"name": "position",
"type": "VARCHAR(50)",
"comment": "位置编号",
"role": "dimension",
"tags": ["门禁位置"]
},
],
"relationships": [
{
"from": "ac_point",
"to_table": "t_yj_person_ac_area",
"to_field": "ac_point",
"type": "foreign_key",
"comment": "关联门禁区域关系表"
},
],
"tags": ["门禁控制点","门禁位置"]
}
'''
person_ac_area = '''
{
"db_name":"YJOA_APPSERVICE_DB",
"table_name": "t_yj_person_ac_area",
"table_comment": "门禁区域关系表",
"columns": [
{
"name": "ac_point",
"type": "VARCHAR(50)",
"comment": "门禁点",
"role": "dimension",
"tags": ["门禁点", "门禁点标识"]
},
{
"name": "area",
"type": "Int",
"comment": "区域位置",
"role": "dimension",
"tags": ["门禁所属区域"]
},
{
"name": "region",
"type": "Int",
"comment": "地区位置",
"value":{
"1":"北京",
"2":"成都",
"3":"秭归",
"4":"林芝市区",
"5":"拉萨",
"6":"米林",
"7":"派镇",
"8":"墨脱",
},
"role": "dimension",
"tags": ["门禁所属地区"]
},
],
"tags": ["门禁详情","门禁区域位置","门禁地区信息"]
}
'''
org_orgs_ddl = '''
{
"db_name":"IUAP_APDOC_BASEDOC",
"table_name": "org_orgs",
"table_comment": "人员状态记录表,记录人员每日考勤状态信息包括西藏地区标识",
"columns": [
{
"name": "id",
"type": "VARCHAR(36)",
"comment": "主键ID",
"role": "dimension",
"tags": ["主键", "id标识"]
},
{
"name": "code",
"type": "VARCHAR(50)",
"comment": "编号",
"role": "dimension",
"tags": ["部门编号"]
},
{
"name": "name",
"type": "VARCHAR(50)",
"comment": "部门名称",
"role": "dimension",
"tags": ["部门名称""单位名称"]
},
{
"name": "shortname",
"type": "VARCHAR(1152)",
"comment": "部门简称",
"role": "dimension",
"tags": ["部门名称","部门简称","部门缩写"]
},
],
"tags": ["部门id","部门信息","部门名称"]
}
'''