1009 lines
25 KiB
Python
1009 lines
25 KiB
Python
train_document='''
|
||
语法为达梦数据库语法;
|
||
查询地址,籍贯,公司,单位时,尽量使用like查询;
|
||
查询人员信息时,由于数据表字段过多。只需要展示人员关键信息字段,id,工号,姓名,单位以及用户问题中需要查询的字段;
|
||
表字段信息以及字段枚举信息在values下,注意相关字段枚举值的转换;
|
||
出生日期字段是varchar类型,计算年龄时需转换成合适的格式
|
||
查询单位时,通过orgs表查询,且需要基于parentID查询递归查询单位下的子单位;
|
||
查询内部单位时,则可以直接查询人员信息表,通过like模糊查询;
|
||
没有明确说明查询外部单位,都默认查询通过orgs查询单位;
|
||
数信中心和数信部并非同一个部门,注意区分,不要混淆
|
||
数信中心下还有多个部门,这些部门里的人员也隶属于数信中心
|
||
根据部门名称查询部门时除了全称name,简称shortname也重要信息
|
||
数信部是简称
|
||
部门表org_orgs中的level字段 {1:公司,2:一级部门,3:二级部门.....}
|
||
'''
|
||
|
||
person_database_ddl = """
|
||
|
||
{
|
||
"db_name":"YJOA_APPSERVICE_DB",
|
||
"table_name": "t_pr3rl2oj_yj_person_database",
|
||
"table_comment": "人员信息主表,记录人员基本信息、工作信息、审批流程信息等",
|
||
"columns": [
|
||
{
|
||
"name": "person_status",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "人员状态",
|
||
"values":{
|
||
"1":"草稿",
|
||
"2":"审批中",
|
||
"3":"制卡中",
|
||
"4":"已入库",
|
||
"5":"停用"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["状态信息","枚举"]
|
||
},
|
||
{
|
||
"name": "gender",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "性别",
|
||
"values": {
|
||
"1": "男",
|
||
"2": "女"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["基本信息", "人口属性","枚举"]
|
||
},
|
||
{
|
||
"name": "id_card",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "身份证号码",
|
||
"role": "dimension",
|
||
"tags": ["证件信息", "身份标识"]
|
||
},
|
||
{
|
||
"name": "input_time",
|
||
"type": "DATETIME(39)",
|
||
"comment": "录入时间",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "操作记录"]
|
||
},
|
||
{
|
||
"name": "external_unit",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "外部单位",
|
||
"role": "dimension",
|
||
"tags": ["组织信息", "外部单位"]
|
||
},
|
||
{
|
||
"name": "photo",
|
||
"type": "TEXT(max)",
|
||
"comment": "照片(二进制文本)",
|
||
"role": "dimension",
|
||
"tags": ["多媒体信息"]
|
||
},
|
||
{
|
||
"name": "input_user",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "录入人",
|
||
"role": "dimension",
|
||
"tags": ["操作人信息"]
|
||
},
|
||
{
|
||
"name": "is_internal",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "是否内部员工",
|
||
"values": {
|
||
"1": "是",
|
||
"0": "否"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["员工类型", "身份标识","枚举"]
|
||
},
|
||
{
|
||
"name": "phone_number",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "手机号",
|
||
"role": "dimension",
|
||
"tags": ["联系方式", "通讯信息"]
|
||
},
|
||
{
|
||
"name": "external_dept",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "外部部门",
|
||
"role": "dimension",
|
||
"tags": ["组织信息", "外部部门"]
|
||
},
|
||
{
|
||
"name": "pass_type",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "通行证类型",
|
||
"value":{
|
||
"1": "集团公司员工",
|
||
"2": "借调人员",
|
||
"3":"借用人员",
|
||
"4":"外部监管人员",
|
||
"5":"外协服务人员",
|
||
"6":"工勤人员",
|
||
"7":"来访人员",
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["证件信息", "通行权限","枚举"]
|
||
},
|
||
{
|
||
"name": "expire_time",
|
||
"type": "DATETIME(39)",
|
||
"comment": "失效时间",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "有效期"]
|
||
},
|
||
{
|
||
"name": "internal_dept",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "内部部门ID",
|
||
"role": "dimension",
|
||
"tags": ["组织信息", "内部架构"]
|
||
},
|
||
{
|
||
"name": "input_dept",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "录入部门ID",
|
||
"role": "dimension",
|
||
"tags": ["操作部门", "组织信息"]
|
||
},
|
||
{
|
||
"name": "name",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "姓名",
|
||
"role": "dimension",
|
||
"tags": ["基本信息", "身份标识"]
|
||
},
|
||
{
|
||
"name": "internal_unit",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "内部单位ID",
|
||
"role": "dimension",
|
||
"tags": ["组织信息", "内部架构ID"]
|
||
},
|
||
{
|
||
"name": "person_type",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "人员类型",
|
||
"value":{
|
||
"YG":"正式员工",
|
||
"PQ":"劳务派遣人员",
|
||
"QT":"其他柔性引进人员",
|
||
"WHZ":"合作单位",
|
||
"WLS":"临时访客",
|
||
"WQT":"其他外部人员"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["分类信息", "人员分类","枚举"]
|
||
},
|
||
{
|
||
"name": "id",
|
||
"type": "VARCHAR(22)",
|
||
"comment": "主键ID",
|
||
"role": "dimension",
|
||
"tags": ["主键", "ID标识"]
|
||
},
|
||
|
||
{
|
||
"name": "dr",
|
||
"type": "INT",
|
||
"comment": "逻辑删除标志",
|
||
"values": {
|
||
"0": "正常",
|
||
"1": "已删除"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["系统状态", "数据状态"]
|
||
},
|
||
{
|
||
"name": "code",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "编码",
|
||
"role": "dimension",
|
||
"tags": ["编码信息", "工号"]
|
||
},
|
||
{
|
||
"name": "ytenant_id",
|
||
"type": "VARCHAR(64)",
|
||
"comment": "租户ID",
|
||
"role": "dimension",
|
||
"tags": ["租户信息", "系统隔离"]
|
||
},
|
||
|
||
{
|
||
"name": "create_time",
|
||
"type": "DATETIME(39)",
|
||
"comment": "创建时间",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "系统记录"]
|
||
},
|
||
{
|
||
"name": "modify_time",
|
||
"type": "DATETIME(39)",
|
||
"comment": "修改时间",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "系统记录"]
|
||
},
|
||
|
||
|
||
{
|
||
"name": "to_dept",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "所属处室",
|
||
"role": "dimension",
|
||
"tags": ["组织信息", "部门架构"]
|
||
},
|
||
{
|
||
"name": "id_card_type",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "身份证件类型",
|
||
"value":{
|
||
"1":"身份证",
|
||
"2":"护照",
|
||
"3":"港澳通行证"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["证件信息", "身份标识"]
|
||
},
|
||
{
|
||
"name": "native_place",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "籍贯",
|
||
"role": "dimension",
|
||
"tags": ["基本信息", "籍贯信息"]
|
||
},
|
||
{
|
||
"name": "nation",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "民族",
|
||
"role": "dimension",
|
||
"tags": ["基本信息", "民族信息"]
|
||
},
|
||
{
|
||
"name": "country",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "国籍",
|
||
"role": "dimension",
|
||
"tags": ["基本信息", "国籍信息"]
|
||
},
|
||
{
|
||
"name": "residence_address",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "户籍地址",
|
||
"role": "dimension",
|
||
"tags": ["地址信息", "户籍信息"]
|
||
},
|
||
{
|
||
"name": "highest_education",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "最高学历",
|
||
"value":{
|
||
"1":"初中",
|
||
"2":"高中",
|
||
"3":"中专",
|
||
"4":"技校",
|
||
"5":"职高",
|
||
"6":"大专",
|
||
"7":"本科",
|
||
"8":"硕士",
|
||
"9":"博士 "
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["教育信息", "学历背景","枚举"]
|
||
},
|
||
{
|
||
"name": "highest_degree",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "最高学位",
|
||
"value":{
|
||
"1":"学士学位",
|
||
"2":"硕士学位",
|
||
"3":"博士学位",
|
||
"4":"无"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["教育信息", "学位背景","枚举"]
|
||
},
|
||
{
|
||
"name": "graduate_school",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "毕业院校",
|
||
"role": "dimension",
|
||
"tags": ["教育信息", "院校背景"]
|
||
},
|
||
{
|
||
"name": "birthday",
|
||
"type": "VARCHAR(30)",
|
||
"comment": "出生日期",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "个人资料"]
|
||
},
|
||
{
|
||
"name": "work_date",
|
||
"type": "VARCHAR(30)",
|
||
"comment": "参加工作日期",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "工作经历"]
|
||
},
|
||
{
|
||
"name": "political_status",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "政治面貌",
|
||
"role": "dimension",
|
||
"tags": ["政治信息", "个人属性"]
|
||
},
|
||
{
|
||
"name": "work_unit",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "工作单位全称",
|
||
"role": "dimension",
|
||
"tags": ["工作信息", "单位信息"]
|
||
},
|
||
{
|
||
"name": "post",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "职务",
|
||
"role": "dimension",
|
||
"tags": ["工作信息", "职务信息"]
|
||
},
|
||
{
|
||
"name": "engage_post",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "现从事岗位",
|
||
"role": "dimension",
|
||
"tags": ["工作信息", "岗位信息"]
|
||
},
|
||
{
|
||
"name": "work_content",
|
||
"type": "TEXT(max)",
|
||
"comment": "工作内容",
|
||
"role": "dimension",
|
||
"tags": ["工作信息", "职责描述"]
|
||
},
|
||
{
|
||
"name": "engage_contract_no",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "从事项目合同编号",
|
||
"role": "dimension",
|
||
"tags": ["合同信息", "项目信息"]
|
||
},
|
||
{
|
||
"name": "engage_contract_name",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "从事项目合同名称",
|
||
"role": "dimension",
|
||
"tags": ["合同信息", "项目信息"]
|
||
},
|
||
{
|
||
"name": "is_subcontractor",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "是否分包商",
|
||
"role": "dimension",
|
||
"tags": ["供应商类型", "合作模式"]
|
||
},
|
||
{
|
||
"name": "general_contractor_unit",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "总包单位全称",
|
||
"role": "dimension",
|
||
"tags": ["合作单位", "总包信息"]
|
||
},
|
||
{
|
||
"name": "entry_date",
|
||
"type": "VARCHAR(30)",
|
||
"comment": "入场日期",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "项目参与"]
|
||
},
|
||
{
|
||
"name": "expected_departure_date",
|
||
"type": "VARCHAR(30)",
|
||
"comment": "预计离场日期",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "项目参与"]
|
||
},
|
||
{
|
||
"name": "office_city",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "办公城市",
|
||
"role": "dimension",
|
||
"tags": ["地址信息", "办公地点"]
|
||
},
|
||
{
|
||
"name": "office_address",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "办公地点",
|
||
"role": "dimension",
|
||
"tags": ["地址信息", "办公地点"]
|
||
},
|
||
{
|
||
"name": "is_sign_confidentiality_agreement",
|
||
"type": "VARCHAR(108)",
|
||
"comment": "是否签署保密协议",
|
||
"values": {
|
||
"1": "是",
|
||
"0": "否"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["协议状态", "合规信息"]
|
||
},
|
||
{
|
||
"name": "email",
|
||
"type": "VARCHAR(600)",
|
||
"comment": "电子邮箱",
|
||
"role": "dimension",
|
||
"tags": ["联系方式", "通讯信息"]
|
||
},
|
||
{
|
||
"name": "DHDATASTA",
|
||
"type": "INT",
|
||
"comment": "推送状态",
|
||
"values": {
|
||
"0": "新增",
|
||
"1": "更新"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["数据同步", "系统状态"]
|
||
},
|
||
{
|
||
"name": "auditor1",
|
||
"type": "VARCHAR(36)",
|
||
"comment": "处室负责人",
|
||
"role": "dimension",
|
||
"tags": ["审批信息", "负责人信息"]
|
||
},
|
||
{
|
||
"name": "person_count",
|
||
"type": "INT",
|
||
"comment": "人员数量",
|
||
"role": "metric",
|
||
"aggregation": "count",
|
||
"tags": ["统计指标", "数量统计"]
|
||
}
|
||
],
|
||
"relationships": [
|
||
{
|
||
"from": "input_dept",
|
||
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
|
||
"to_field": ["id","parentid"],
|
||
"type": "foreign_key",
|
||
"comment": "关联部门表"
|
||
},
|
||
{
|
||
"from": "internal_dept",
|
||
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
|
||
"to_field": ["id","parentid"],
|
||
"type": "foreign_key",
|
||
"comment": "关联部门表"
|
||
},
|
||
{
|
||
"from": "internal_unit",
|
||
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
|
||
"to_field": ["id","parentid"],
|
||
"type": "foreign_key",
|
||
"comment": "关联部门表"
|
||
},
|
||
],
|
||
|
||
"tags": ["人员管理", "人力资源", "审批流程", "基本信息", "工作信息"],
|
||
}
|
||
|
||
"""
|
||
|
||
|
||
|
||
person_attendance_rule_ddl='''
|
||
{
|
||
"db_name":"YJOA_APPSERVICE_DB",
|
||
"table_name": "t_yj_person_attendance_rules",
|
||
"table_comment": "人员考勤规则表,定义考勤时间规则,考勤地点设置",
|
||
"columns": [
|
||
{
|
||
"name": "id",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "主键ID",
|
||
"role": "dimension",
|
||
"tags": ["主键", "ID标识"]
|
||
},
|
||
{
|
||
"name": "morning_check_time",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "上午打卡时间",
|
||
"role": "dimension",
|
||
"tags": ["时间规则", "考勤设置"]
|
||
},
|
||
{
|
||
"name": "afternoon_check_time",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "下午打卡时间",
|
||
"role": "dimension",
|
||
"tags": ["时间规则", "考勤设置"]
|
||
},
|
||
{
|
||
"name": "before_lunch_time",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "午餐前时间",
|
||
"role": "dimension",
|
||
"tags": ["时间规则", "考勤分段"]
|
||
},
|
||
{
|
||
"name": "after_lunch_time",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "午餐后时间",
|
||
"role": "dimension",
|
||
"tags": ["时间规则", "考勤分段"]
|
||
},
|
||
{
|
||
"name": "region",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "地区",
|
||
"value":{
|
||
"1":"北京",
|
||
"2":"成都",
|
||
"3":"秭归",
|
||
"4":"拉萨",
|
||
"5": "林芝"
|
||
},
|
||
"role": "dimension",
|
||
"tags": [ "考勤的地区位置","非办公区域,不要混淆","枚举"]
|
||
},
|
||
],
|
||
"relationships": [
|
||
{
|
||
"from": "region",
|
||
"to_table": "t_yj_person_ac_area",
|
||
"to_field": "region",
|
||
"type": "foreign_key",
|
||
"comment": "关联区域配置信息"
|
||
}
|
||
],
|
||
|
||
"tags": ["考勤规则", "时间设置", "区域配置", "考勤管理", "规则定义"]
|
||
}
|
||
'''
|
||
|
||
person_status_ddl='''
|
||
{
|
||
"db_name":"YJOA_APPSERVICE_DB",
|
||
"table_name": "t_yj_person_status",
|
||
"table_comment": "人员状态记录表,记录人员每日考勤汇总状态信息包括西藏地区标识",
|
||
"columns": [
|
||
{
|
||
"name": "id",
|
||
"type": "BIGINT",
|
||
"comment": "主键ID",
|
||
"role": "dimension",
|
||
"tags": ["主键", "id标识"]
|
||
},
|
||
{
|
||
"name": "person_id",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "人员ID",
|
||
"role": "dimension",
|
||
"tags": ["人员标识", "关联信息"]
|
||
},
|
||
{
|
||
"name": "status",
|
||
"type": "VARCHAR(10)",
|
||
"comment": "人员状态",
|
||
"value":{
|
||
"1001":"在岗",
|
||
"1002":"出差",
|
||
"1003":"休假,请假",
|
||
"1005":"旷工",
|
||
"1006":"迟到,早退",
|
||
"1007":"休息日",
|
||
"4001":"am在岗pm缺勤",
|
||
"4002":"am缺勤pm在岗",
|
||
"6001":"am在岗pm早退",
|
||
"6002":"am迟到pm在岗",
|
||
"6004":"am迟到pm缺勤",
|
||
"4006":"am缺勤pm早退"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["状态信息", "人员状态","枚举","迟到早退都是:1006"]
|
||
},
|
||
{
|
||
"name": "date_value",
|
||
"type": "VARCHAR(20)",
|
||
"comment": "日期值",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "日期记录"]
|
||
},
|
||
{
|
||
"name": "dr",
|
||
"type": "INT",
|
||
"comment": "逻辑删除标志",
|
||
"role": "dimension",
|
||
"tags": ["系统状态", "数据状态"]
|
||
},
|
||
{
|
||
"name": "create_time",
|
||
"type": "DATETIME(39)",
|
||
"comment": "创建时间",
|
||
"role": "dimension",
|
||
"tags": ["时间信息", "系统记录"]
|
||
},
|
||
{
|
||
"name": "is_in_tibet",
|
||
"type": "INT",
|
||
"comment": "是否在西藏地区",
|
||
"role": "dimension",
|
||
"tags": ["地区标识", "地理位置"]
|
||
}
|
||
],
|
||
"relationships": [
|
||
{
|
||
"from": "person_id",
|
||
"to_table": "t_pr3rl2oj_yj_person_database",
|
||
"to_field": "code",
|
||
"type": "foreign_key",
|
||
"comment": "关联人员基本信息表"
|
||
}
|
||
],
|
||
|
||
"tags": ["人员状态", "状态记录", "地区管理", "西藏标识", "每日状态"]
|
||
}
|
||
'''
|
||
|
||
person_attendance_ddl = '''
|
||
{
|
||
"db_name": "YJOA_APPSERVICE_DB",
|
||
"table_name": "t_yj_person_attendance",
|
||
"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": "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_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_rules_ddl = '''
|
||
{
|
||
"db_name": "YJOA_APPSERVICE_DB",
|
||
"table_name": "t_yj_person_rules",
|
||
"table_comment": "人员考勤规则关联表,关联人员与考勤规则",
|
||
"columns": [
|
||
{
|
||
"name": "id",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "主键ID",
|
||
"role": "dimension",
|
||
"tags": ["主键", "ID标识"]
|
||
},
|
||
{
|
||
"name": "person_id",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "人员ID",
|
||
"role": "dimension",
|
||
"tags": ["人员标识", "外键"]
|
||
},
|
||
{
|
||
"name": "person_name",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "人员姓名",
|
||
"role": "dimension",
|
||
"tags": ["人员信息", "姓名"]
|
||
},
|
||
{
|
||
"name": "rules_id",
|
||
"type": "VARCHAR(50)",
|
||
"comment": "考勤规则ID",
|
||
"role": "dimension",
|
||
"tags": ["规则标识", "外键"]
|
||
},
|
||
{
|
||
"name": "dr",
|
||
"type": "CHAR(2)",
|
||
"comment": "删除标志",
|
||
"value": {
|
||
"0": "正常",
|
||
"1": "删除"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["状态标识", "软删除", "枚举"]
|
||
}
|
||
],
|
||
"relationships": [
|
||
{
|
||
"from": "person_id",
|
||
"to_table": "t_yj_person_database",
|
||
"to_field": "id",
|
||
"type": "foreign_key",
|
||
"comment": "关联人员基本信息表"
|
||
},
|
||
{
|
||
"from": "rules_id",
|
||
"to_table": "t_yj_person_attendance_rules",
|
||
"to_field": "id",
|
||
"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": "关联门禁区域关系表"
|
||
},
|
||
{
|
||
"from": "position",
|
||
"to_table": "t_yj_person_ac_area",
|
||
"to_field": "area",
|
||
"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": "区域位置",
|
||
"value": {
|
||
"1":"党校",
|
||
"2":"凯莱"
|
||
}
|
||
"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": "parentid",
|
||
"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": ["部门名称","部门简称","部门缩写"]
|
||
},
|
||
{
|
||
"name": "enable",
|
||
"type": "INT",
|
||
"comment": "启用状态",
|
||
"value":{
|
||
"1":"启用"
|
||
"2":"未启用"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["部门启用","部门状态","是否启用"]
|
||
},
|
||
{
|
||
"name": "level",
|
||
"type": "INT",
|
||
"comment": "部门或单位层级",
|
||
"role": "dimension",
|
||
"tags": ["部门层级","级别"]
|
||
},
|
||
{
|
||
"name": "dr",
|
||
"type": "INT",
|
||
"comment": "删除标志",
|
||
"value": {
|
||
"0": "正常",
|
||
"1": "删除"
|
||
},
|
||
"role": "dimension",
|
||
"tags": ["状态标识", "软删除", "枚举"]
|
||
}
|
||
],
|
||
|
||
"tags": ["部门id","部门信息","部门名称"]
|
||
}
|
||
''' |