-- ============================================================
-- 就业一湛通服务平台 - 就业援助模块 测试数据
-- 包含：初步符合条件人员 + 就业援助管理
-- 数据库：达梦数据库 (DM8) / MySQL 8.0 兼容
-- 创建日期：2026-06-09
-- ============================================================

-- 先清理旧数据
DELETE FROM employment_assistance;
DELETE FROM preliminary_eligible;

-- ============================================================
-- 初步符合条件人员（PRELIMINARY_ELIGIBLE）
-- 引用已存在的 personal_info 记录
-- ============================================================

-- 张三 - 新成长失业青年，已申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000310', '178060100000200', '是', '2026-06-08 14:30:00', '省系统');

-- 李四 - 城镇登记失业人员，已申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000311', '178060100000201', '是', '2026-06-07 10:00:00', '省系统');

-- 王五 - 农村转移就业劳动者，未申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000312', '178060100000202', '否', NULL, '省系统');

-- 赵六 - 应届高校毕业生，未申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000313', '178060100000203', '否', NULL, '市系统');

-- 钱七 - 退役军人，已申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000314', '178060100000204', '是', '2026-06-06 09:15:00', '省系统');

-- 孙八 - 在业人员，未申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000315', '178060100000205', '否', NULL, '市系统');

-- 陈十二 - 应届高校毕业生，未申请援助
INSERT INTO preliminary_eligible (ID, PERSONAL_ID, APPLIED_AID, LAST_NOTICE_TIME, DATA_SOURCE)
VALUES ('178060100000316', '178060100000209', '否', NULL, '省系统');

-- ============================================================
-- 就业援助管理（EMPLOYMENT_ASSISTANCE）
-- 引用已存在的 personal_info 记录
-- ============================================================

-- 张三 - 就业困难人员，已认定
INSERT INTO employment_assistance (ID, PERSONAL_ID, PROVINCE_RECORD_ID, APPLY_NUMBER, AID_TYPE, AID_STATUS, LAST_NOTICE_TIME)
VALUES ('178060100000320', '178060100000200', 'PROV-2026-00001', 'ZJ-AID-2026-001', '就业困难人员认定', '已通过', '2026-06-08 14:30:00');

-- 李四 - 就业困难人员，待审核
INSERT INTO employment_assistance (ID, PERSONAL_ID, PROVINCE_RECORD_ID, APPLY_NUMBER, AID_TYPE, AID_STATUS, LAST_NOTICE_TIME)
VALUES ('178060100000321', '178060100000201', 'PROV-2026-00002', 'ZJ-AID-2026-002', '就业困难人员认定', '待审核', NULL);

-- 钱七 - 退役军人援助，已通过
INSERT INTO employment_assistance (ID, PERSONAL_ID, PROVINCE_RECORD_ID, APPLY_NUMBER, AID_TYPE, AID_STATUS, LAST_NOTICE_TIME)
VALUES ('178060100000322', '178060100000204', 'PROV-2026-00005', 'ZJ-AID-2026-003', '退役军人就业援助', '已通过', '2026-06-06 09:15:00');

-- 孙八 - 零就业家庭援助，已驳回
INSERT INTO employment_assistance (ID, PERSONAL_ID, PROVINCE_RECORD_ID, APPLY_NUMBER, AID_TYPE, AID_STATUS, LAST_NOTICE_TIME)
VALUES ('178060100000323', '178060100000205', 'PROV-2026-00006', 'ZJ-AID-2026-004', '零就业家庭援助', '已驳回', '2026-06-05 16:00:00');

-- 赵六 - 脱贫人口援助，待审核
INSERT INTO employment_assistance (ID, PERSONAL_ID, PROVINCE_RECORD_ID, APPLY_NUMBER, AID_TYPE, AID_STATUS, LAST_NOTICE_TIME)
VALUES ('178060100000324', '178060100000203', 'PROV-2026-00003', 'ZJ-AID-2026-005', '脱贫人口就业援助', '待审核', NULL);

-- 王五 - 脱贫人口援助，已通过
INSERT INTO employment_assistance (ID, PERSONAL_ID, PROVINCE_RECORD_ID, APPLY_NUMBER, AID_TYPE, AID_STATUS, LAST_NOTICE_TIME)
VALUES ('178060100000325', '178060100000202', 'PROV-2026-00004', 'ZJ-AID-2026-006', '脱贫人口就业援助', '已通过', '2026-06-07 10:00:00');
