Initial commit: 教务系统在线平台
- 包含4个产业方向的前端项目:智能开发、智能制造、大健康、财经商贸 - 已清理node_modules、.yoyo等大文件,项目大小从2.6GB优化至631MB - 配置完善的.gitignore文件 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Sonnet 4.5 <noreply@anthropic.com>
This commit is contained in:
49
frontend_财经商贸/checkDuplicateCourses.cjs
Normal file
49
frontend_财经商贸/checkDuplicateCourses.cjs
Normal file
@@ -0,0 +1,49 @@
|
||||
const fs = require('fs');
|
||||
const data = JSON.parse(fs.readFileSync('src/data/financeCalendar.json'));
|
||||
|
||||
// 查找同一天有多个相同类型课程的日期
|
||||
const dateMap = {};
|
||||
|
||||
data.forEach(course => {
|
||||
const date = course['日期'];
|
||||
const type = course['课程阶段(公共课)'];
|
||||
|
||||
if (type === '终生学习系统' || type === '营销能力课') {
|
||||
if (!dateMap[date]) {
|
||||
dateMap[date] = [];
|
||||
}
|
||||
dateMap[date].push({
|
||||
name: course['公共课'],
|
||||
type: type,
|
||||
time: course['上课时间']
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
// 找出有重复的日期
|
||||
console.log('检查AI课程和营销能力课是否有重复:\n');
|
||||
let hasDuplicate = false;
|
||||
|
||||
Object.keys(dateMap).forEach(date => {
|
||||
const courses = dateMap[date];
|
||||
if (courses.length > 1) {
|
||||
hasDuplicate = true;
|
||||
console.log('日期: ' + date);
|
||||
courses.forEach(c => {
|
||||
console.log(' - ' + c.type + ': ' + c.name + ' (' + c.time + ')');
|
||||
});
|
||||
console.log('');
|
||||
}
|
||||
});
|
||||
|
||||
if (!hasDuplicate) {
|
||||
console.log('没有发现同一天有多个AI课程或营销能力课');
|
||||
}
|
||||
|
||||
// 统计总数
|
||||
const aiCourses = data.filter(c => c['课程阶段(公共课)'] === '终生学习系统');
|
||||
const marketingCourses = data.filter(c => c['课程阶段(公共课)'] === '营销能力课');
|
||||
|
||||
console.log('\n统计信息:');
|
||||
console.log('AI课程(终生学习系统)总数:', aiCourses.length);
|
||||
console.log('营销能力课总数:', marketingCourses.length);
|
||||
Reference in New Issue
Block a user