wuzhen update

This commit is contained in:
wuzhen committed 2025-08-07 18:40:25 +08:00
1 parent e06d8fca2c
commit 9b7a6e2103
138 files changed
+29581

No files matched your search

+71
View File
@@ -0,0 +1,71 @@
-- =====================================================
-- 奖学金名额分配 - 简单测试数据插入脚本
-- 创建时间: 2025-01-27
-- 说明: 插入基础测试数据
-- =====================================================
-- 设置数据库
USE hzdyjs_xg;
-- =====================================================
-- 1. 插入奖学金批次数据
-- =====================================================
INSERT IGNORE INTO jcbt_scholarship_batch (
id, batch_code, batch_name, academic_year, semester, batch_type,
start_time, end_time, apply_start_time, apply_end_time,
review_start_time, review_end_time, status, description,
create_by, create_time, update_by, update_time, tenant_id, deleted
) VALUES
(1890000000000000001, 'BATCH_2024_1', '2024学年第一学期奖学金评定', '2024-2025', 1, 'REGULAR',
'2024-09-01 00:00:00', '2024-12-31 23:59:59', '2024-10-01 00:00:00', '2024-10-31 23:59:59',
'2024-11-01 00:00:00', '2024-11-30 23:59:59', 'ACTIVE', '2024学年第一学期常规奖学金评定批次',
1, NOW(), 1, NOW(), 1, 0);
-- =====================================================
-- 2. 插入奖学金类型数据
-- =====================================================
INSERT IGNORE INTO jcbt_scholarship_type (
id, type_code, type_name, type_category, level_type, award_amount,
description, application_guide, application_conditions, evaluation_criteria,
compatibility_type, sort_order, status, is_system,
create_by, create_time, update_by, update_time, tenant_id, deleted
) VALUES
(1890000000000000101, 'GJZXJ', '国家奖学金', 'NATIONAL', 'FIRST_CLASS', 8000.00,
'国家奖学金是为了激励普通本科高校、高等职业学校和高等专科学校学生勤奋学习、努力进取。',
'学生本人提出申请,按学校规定程序推荐上报。', '品学兼优,学习成绩排名在评选范围内位于前10%',
'学习成绩、综合测评、道德品质等综合评定', 'EXCLUSIVE', 1, 1, 1,
1, NOW(), 1, NOW(), 1, 0);
-- =====================================================
-- 3. 插入名额分配数据
-- =====================================================
INSERT IGNORE INTO jcbt_scholarship_quota (
id, batch_id, scholarship_type_id, allocation_level, target_dept_id, parent_quota_id,
total_quota, used_quota, reserved_quota, available_quota,
allocation_rule, allocation_basis, allocation_method, is_adjustable, is_locked, status,
remark, create_by, create_time, update_by, update_time, tenant_id, deleted
) VALUES
(1890000000000000201, 1890000000000000001, 1890000000000000101, 'UNIVERSITY', NULL, NULL,
50, 0, 5, 45, '{"type":"university","rule":"total_allocation"}', '根据学校总体规模和历年获奖情况分配',
'MANUAL', 1, 0, 'ACTIVE', '全校国家奖学金总名额', 1, NOW(), 1, NOW(), 1, 0);
-- =====================================================
-- 4. 验证数据
-- =====================================================
SELECT '插入结果验证' as message;
SELECT COUNT(*) as batch_count FROM jcbt_scholarship_batch WHERE deleted = 0;
SELECT COUNT(*) as type_count FROM jcbt_scholarship_type WHERE deleted = 0;
SELECT COUNT(*) as quota_count FROM jcbt_scholarship_quota WHERE deleted = 0;
-- 验证关联查询
SELECT
q.id,
b.batch_name,
st.type_name as scholarship_type_name,
q.allocation_level,
q.total_quota,
q.status
FROM jcbt_scholarship_quota q
LEFT JOIN jcbt_scholarship_batch b ON q.batch_id = b.id
LEFT JOIN jcbt_scholarship_type st ON q.scholarship_type_id = st.id
WHERE q.deleted = 0;