提示词优化,迟到,请假

This commit is contained in:
yujj128
2025-11-01 10:16:06 +08:00
parent e72b24e7f7
commit 78fb9f4d54
7 changed files with 498 additions and 111 deletions

View File

@@ -10,6 +10,7 @@ train_document='''
根据部门名称查询部门时除了全称name简称shortname也重要信息
internal_dept和internal_unit是部门编号不是名称注意区分
查询部门信息时尽量使用internal_dept而非internal_unit<UNK>
数信部不是数信中心,两者不能等价
'''
person_database_ddl = """
@@ -102,7 +103,7 @@ person_database_ddl = """
"type": "VARCHAR(600)",
"comment": "外部部门",
"role": "dimension",
"tags": ["组织信息", "外部部门"]
"tags": ["组织信息", "外部部门","外部部门名称"]
},
{
"name": "pass_type",
@@ -132,14 +133,14 @@ person_database_ddl = """
"type": "VARCHAR(108)",
"comment": "内部部门ID",
"role": "dimension",
"tags": ["组织信息", "内部架构"]
"tags": ["组织信息", "内部架构","部门ID"]
},
{
"name": "input_dept",
"type": "VARCHAR(108)",
"comment": "录入部门ID",
"role": "dimension",
"tags": ["操作部门", "组织信息"]
"tags": ["操作部门", "组织信息","录入部门ID"]
},
{
"name": "name",
@@ -153,7 +154,7 @@ person_database_ddl = """
"type": "VARCHAR(108)",
"comment": "内部单位ID",
"role": "dimension",
"tags": ["组织信息", "内部架构ID"]
"tags": ["组织信息", "内部单位ID"]
},
{
"name": "person_type",
@@ -192,9 +193,9 @@ person_database_ddl = """
{
"name": "code",
"type": "VARCHAR(600)",
"comment": "编码",
"comment": "用户ID彪马",
"role": "dimension",
"tags": ["编码信息", "工号"]
"tags": ["用户ID", "工号"]
},
{
"name": "ytenant_id",
@@ -372,8 +373,12 @@ person_database_ddl = """
"name": "is_subcontractor",
"type": "VARCHAR(108)",
"comment": "是否分包商",
"value":{
"1":"",
"0":"",
},
"role": "dimension",
"tags": ["供应商类型", "合作模式"]
"tags": ["供应商类型", "合作模式","枚举信息"]
},
{
"name": "general_contractor_unit",
@@ -443,14 +448,14 @@ person_database_ddl = """
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
"to_field": ["id","parentid"],
"type": "foreign_key",
"comment": "关联部门表"
"comment": "关联部门表,部门ID或父部门ID"
},
{
"from": "internal_dept",
"to_table": "IUAP_APDOC_BASEDOC.org_orgs",
"to_field": ["id","parentid"],
"type": "foreign_key",
"comment": "关联部门表"
"comment": "关联部门表,部门ID或父部门ID"
},
],
@@ -459,18 +464,16 @@ person_database_ddl = """
"""
person_attendance_rule_ddl='''
{
"db_name":"YJOA_APPSERVICE_DB",
"table_name": "t_yj_person_attendance_rules",
"table_comment": "人员考勤规则表,定义考勤时间规则,考勤地点设置",
"table_comment": "考勤规则表,定义不同地点考勤时间规则,考勤地点设置",
"columns": [
{
"name": "id",
"type": "VARCHAR(50)",
"comment": "主键ID",
"comment": "规则ID",
"role": "dimension",
"tags": ["主键", "ID标识"]
},
@@ -491,14 +494,14 @@ person_attendance_rule_ddl='''
{
"name": "before_lunch_time",
"type": "VARCHAR(50)",
"comment": "前时间",
"comment": "前时间",
"role": "dimension",
"tags": ["时间规则", "考勤分段"]
},
{
"name": "after_lunch_time",
"type": "VARCHAR(50)",
"comment": "后时间",
"comment": "后时间",
"role": "dimension",
"tags": ["时间规则", "考勤分段"]
},
@@ -511,10 +514,13 @@ person_attendance_rule_ddl='''
"2":"成都",
"3":"秭归",
"4":"拉萨",
"5": "林芝"
"5":"林芝",
"6":"米林",
"7":"派镇",
"8":"墨脱"
},
"role": "dimension",
"tags": [ "考勤的地区位置","非办公区域,不要混淆","枚举"]
"tags": [ "考勤的地区位置","非办公区域,不要混淆","枚举","考勤规则"]
},
],
"relationships": [
@@ -558,10 +564,13 @@ person_status_ddl='''
"value":{
"1001":"在岗",
"1002":"出差",
"1003":"休假,请假",
"1003":"休假",
"1004":"缺勤",
"1005":"旷工",
"1006":"迟到,早退",
"1006":"迟到早退",
"1007":"休息日",
"1008":"加班",
"1009":"迟到",
"4001":"am在岗pm缺勤",
"4002":"am缺勤pm在岗",
"6001":"am在岗pm早退",
@@ -570,7 +579,7 @@ person_status_ddl='''
"4006":"am缺勤pm早退"
},
"role": "dimension",
"tags": ["状态信息", "人员状态","枚举","迟到早退都是:1006"]
"tags": ["状态信息", "人员状态","枚举","考勤状态","迟到包含(1006,1009,6002,6004)","早退包含(1006,6001,4006)","缺勤包含(1004,4001,4002,4006,6004)"]
},
{
"name": "date_value",
@@ -579,6 +588,42 @@ person_status_ddl='''
"role": "dimension",
"tags": ["时间信息", "日期记录"]
},
{
"name": "practical_attendance",
"type": "Int",
"comment": "实际出勤",
"value":{
"1":"已出勤",
"0":"未出勤",
},
"role": "dimension",
"tags": ["出勤信息", "状态记录","枚举信息"]
},
{
"name": "is_ought_attendance",
"type": "Int",
"comment": "是否应出勤",
"value":{
"1":"",
"0":"",
},
"role": "dimension",
"tags": ["是否应出勤", "枚举信息"]
},
{
"name": "work_area",
"type": "VARCHAR(50)",
"comment": "工作地区",
"role": "dimension",
"tags": ["工作地区", "地域信息"]
},
{
"name": "work_time",
"type": "Int",
"comment": "工作时间,单位-分钟",
"role": "dimension",
"tags": ["工作时间", "时长"]
},
{
"name": "dr",
"type": "INT",
@@ -593,12 +638,60 @@ person_status_ddl='''
"role": "dimension",
"tags": ["时间信息", "系统记录"]
},
{
"name": "vacation_type",
"type": "VARCHAR(50)",
"comment": "休假类型",
"value": {
"1": "年休假",
"2": "补休假",
"3": "探亲假",
"4": "离岗",
"5": "婚假",
"6": "丧假",
"7": "病假",
"8": "事假",
"9": "产假",
"10": "其他",
"11": "轮休假",
"12": "家属探亲"
},
"role": "dimension",
"tags": ["休假信息", "请假类型", "枚举", "考勤管理"]
},
{
"name": "is_in_tibet",
"type": "INT",
"comment": "是否在西藏地区",
"role": "dimension",
"tags": ["地区标识", "地理位置"]
},
{
"name": "business_trip_destination",
"type": "VARCHAR(50)",
"comment": "出差目的地",
"role": "dimension",
"tags": ["出差信息", "地理位置", "目的地"]
},
{
"name": "year",
"type": "VARCHAR(5)",
"comment": "",
"value": {
"example": "2025"
},
"role": "dimension",
"tags": ["时间信息", "年度", "时间维度"]
},
{
"name": "month",
"type": "VARCHAR(10)",
"comment": "",
"value": {
"example": "2025-08"
},
"role": "dimension",
"tags": ["时间信息", "月度", "时间维度"]
}
],
"relationships": [
@@ -687,12 +780,10 @@ person_attendance_ddl = '''
"type": "VARCHAR(50)",
"comment": "数据来源",
"value": {
"APP": "手机应用",
"DEVICE": "考勤设备",
"SYSTEM": "系统导入"
"example":"大华门禁"
},
"role": "dimension",
"tags": ["来源系统", "数据渠道"]
"tags": ["来源系统", "数据渠道","门禁系统源"]
},
{
"name": "dr",
@@ -724,13 +815,6 @@ person_attendance_ddl = '''
"role": "dimension",
"tags": ["门禁位置", "打卡设备点"]
},
{
"name": "by_go_type",
"type": "VARCHAR(8)",
"comment": "打卡类型",
"role": "dimension",
"tags": ["类型标识", "打卡类型"]
}
],
"relationships": [
{
@@ -756,7 +840,7 @@ person_rules_ddl = '''
{
"db_name": "YJOA_APPSERVICE_DB",
"table_name": "t_yj_person_rules",
"table_comment": "人员考勤规则关表,关联人员与考勤规则",
"table_comment": "人员考勤规则关表,关联人员与考勤规则",
"columns": [
{
"name": "id",
@@ -802,7 +886,7 @@ person_rules_ddl = '''
{
"from": "person_id",
"to_table": "t_yj_person_database",
"to_field": "id",
"to_field": "code",
"type": "foreign_key",
"comment": "关联人员基本信息表"
},
@@ -847,13 +931,6 @@ person_ac_position = '''
"type": "foreign_key",
"comment": "关联门禁区域关系表"
},
{
"from": "position",
"to_table": "t_yj_person_ac_area",
"to_field": "area",
"type": "foreign_key",
"comment": "关联门禁区域关系表"
},
"tags": ["门禁控制点","门禁位置"]
}
'''
@@ -862,7 +939,7 @@ person_ac_area = '''
{
"db_name":"YJOA_APPSERVICE_DB",
"table_name": "t_yj_person_ac_area",
"table_comment": "门禁区域关系表",
"table_comment": "门禁区域关系表",
"columns": [
{
"name": "ac_point",
@@ -901,7 +978,7 @@ person_ac_area = '''
},
],
"tags": ["门禁详情","门禁区域位置","门禁地区信息","枚举"]
"tags": ["门禁详情","门禁区域位置关联信息","门禁地区信息","枚举"]
}
'''
@@ -914,9 +991,9 @@ org_orgs_ddl = '''
{
"name": "id",
"type": "VARCHAR(36)",
"comment": "主键ID",
"comment": "部门ID",
"role": "dimension",
"tags": ["主键", "id标识"]
"tags": ["主键", "id标识","部门ID"]
},
{
"name": "parentid",