-- ============================================================
-- 湛江市智慧人社运营运维项目 - 职业指导服务 真实测试数据脚本
-- 说明：
-- 1. 关联 ID 严格遵循 PERSONAL_INFO 表中已存在的真实测试数据
-- 2. 主键 ID 采用与系统一致的规范化长位编码
-- 3. 达梦数据库兼容格式
-- ============================================================

-- 清理旧数据 (确保幂等性)
DELETE FROM CAREER_GUIDANCE_RECORD;
DELETE FROM CAREER_GUIDANCE_SERVICE;
DELETE FROM CAREER_GUIDANCE_EXPERT;

-- 1. 职业指导专家库
-- 专家 1: 王明
INSERT INTO CAREER_GUIDANCE_EXPERT (ID, NAME, CONTACT_PHONE, EXPERTISE_AREA, CREATE_BY, CREATE_TIME, SYS_ORG_CODE) 
VALUES ('178060200000001', '王明', '13800138000', '职场生涯规划、简历深度优化、面试模拟辅导', 'admin', CURRENT_TIMESTAMP, 'A01');
-- 专家 2: 李红
INSERT INTO CAREER_GUIDANCE_EXPERT (ID, NAME, CONTACT_PHONE, EXPERTISE_AREA, CREATE_BY, CREATE_TIME, SYS_ORG_CODE) 
VALUES ('178060200000002', '李红', '13900139000', '大学生创业政策咨询、职业心理调适、转型技能提升', 'admin', CURRENT_TIMESTAMP, 'A01');

-- 2. 职业指导服务申请
-- 申请 1: 关联张三 (ID: 178060100000200)
INSERT INTO CAREER_GUIDANCE_SERVICE (ID, PERSONAL_ID, APPLICATION_REASON, APPLICATION_DATE, IS_FOLLOWED_UP, CREATE_BY, CREATE_TIME, SYS_ORG_CODE) 
VALUES ('178060210000001', '178060100000200', '应届生求职方向迷茫，需要针对互联网行业的简历优化建议', '2026-06-08', '是', 'admin', CURRENT_TIMESTAMP, 'A01');
-- 申请 2: 关联李四 (ID: 178060100000201)
INSERT INTO CAREER_GUIDANCE_SERVICE (ID, PERSONAL_ID, APPLICATION_REASON, APPLICATION_DATE, IS_FOLLOWED_UP, CREATE_BY, CREATE_TIME, SYS_ORG_CODE) 
VALUES ('178060210000002', '178060100000201', '城镇失业人员，寻求职业技能培训推荐及转型指导', '2026-06-09', '否', 'admin', CURRENT_TIMESTAMP, 'A01');

-- 3. 职业指导服务记录 (关联申请 1: 178060210000001)
-- 记录 1: 电话回访记录
INSERT INTO CAREER_GUIDANCE_RECORD (ID, SERVICE_ID, RECORD_TYPE, TITLE, CONTENT, RECORD_TIME, OPERATOR, CREATE_BY, CREATE_TIME, SYS_ORG_CODE) 
VALUES ('178060220000001', '178060210000001', 1, NULL, '已通过电话进行初步沟通。建议人员突出在校项目经历中的技术栈细节，并针对目标岗位调整关键词。', '2026-06-09 10:00:00', '王明（专家）', 'admin', CURRENT_TIMESTAMP, 'A01');
-- 记录 2: 系统处理状态反馈
INSERT INTO CAREER_GUIDANCE_RECORD (ID, SERVICE_ID, RECORD_TYPE, TITLE, CONTENT, RECORD_TIME, OPERATOR, CREATE_BY, CREATE_TIME, SYS_ORG_CODE) 
VALUES ('178060220000002', '178060210000001', 2, '职业指导申请进度更新', '您的职业指导申请已由专家王明受理，第一阶段建议已发送，请查收。', '2026-06-09 10:30:00', '系统管理员', 'admin', CURRENT_TIMESTAMP, 'A01');
