【小程序】师范生实习管理小程序 uni-app|微信小程序|安卓 计算机毕业设计项目 微信小程序开发工具部署 附源码+文档

31 阅读3分钟

一、个人简介

  • 💖💖作者:计算机编程果茶熊
  • 💙💙个人简介:曾长期从事计算机专业培训教学,担任过编程老师,同时本人也热爱上课教学,擅长Java、微信小程序、Python、Golang、安卓Android等多个IT方向。会做一些项目定制化开发、代码讲解、答辩教学、文档编写、也懂一些降重方面的技巧。平常喜欢分享一些自己开发中遇到的问题的解决办法,也喜欢交流技术,大家有技术代码这一块的问题可以问我!
  • 💛💛想说的话:感谢大家的关注与支持!
  • 💜💜
  • 网站实战项目
  • 安卓/小程序实战项目
  • 大数据实战项目
  • 计算机毕业设计选题
  • 💕💕文末获取源码联系计算机编程果茶熊

二、系统介绍

  • 后端开发语言:Java
  • 后端框架:Spring Boot(Spring+SpringMVC+Mybatis)
  • 前端:微信小程序
  • 数据库:MySQL
  • 系统架构:C/S
  • 开发工具:微信小程序开发工具

三、视频解说

师范生实习管理小程序

四、部分功能展示

在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述 在这里插入图片描述

五、部分代码展示

import org.apache.spark.sql.SparkSession;
import org.apache.spark.sql.Dataset;
import org.apache.spark.sql.Row;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class InternshipCoreService {
    
    @Autowired
    private StudentMapper studentMapper;
    @Autowired
    private InternshipRecordMapper recordMapper;
    @Autowired
    private EvaluationMapper evaluationMapper;
    
    private SparkSession spark = SparkSession.builder()
            .appName("InternshipManagement")
            .master("local[*]")
            .getOrCreate();
    
    public Map<String, Object> processInternshipApplication(InternshipApplication application) {
        Map<String, Object> result = new HashMap<>();
        try {
            Student student = studentMapper.findById(application.getStudentId());
            if (student == null) {
                result.put("status", "error");
                result.put("message", "学生信息不存在");
                return result;
            }
            List<InternshipPosition> availablePositions = positionMapper.findAvailablePositions(
                application.getMajor(), application.getPreferredArea());
            if (availablePositions.isEmpty()) {
                result.put("status", "warning");
                result.put("message", "暂无匹配的实习岗位");
                return result;
            }
            InternshipPosition bestMatch = null;
            int maxScore = 0;
            for (InternshipPosition position : availablePositions) {
                int score = calculateMatchScore(student, position, application);
                if (score > maxScore) {
                    maxScore = score;
                    bestMatch = position;
                }
            }
            if (bestMatch != null && maxScore >= 60) {
                InternshipAssignment assignment = new InternshipAssignment();
                assignment.setStudentId(application.getStudentId());
                assignment.setPositionId(bestMatch.getId());
                assignment.setAssignDate(new Date());
                assignment.setStatus("assigned");
                assignmentMapper.insert(assignment);
                positionMapper.updateAvailableCount(bestMatch.getId(), -1);
                result.put("status", "success");
                result.put("assignment", assignment);
                result.put("position", bestMatch);
            } else {
                result.put("status", "pending");
                result.put("message", "申请已提交,等待人工审核");
                applicationMapper.updateStatus(application.getId(), "pending_review");
            }
        } catch (Exception e) {
            result.put("status", "error");
            result.put("message", "系统处理异常:" + e.getMessage());
            logger.error("处理实习申请异常", e);
        }
        return result;
    }
    public Map<String, Object> generateInternshipReport(Long studentId, String reportType) {
        Map<String, Object> reportData = new HashMap<>();
        try {
            Dataset<Row> recordsDF = spark.read()
                    .format("jdbc")
                    .option("url", "jdbc:mysql://localhost:3306/internship")
                    .option("dbtable", "internship_records")
                    .option("user", "root")
                    .option("password", "password")
                    .load();
            recordsDF.createOrReplaceTempView("records");
            String sql = "SELECT DATE(record_date) as date, COUNT(*) as count, " +
                        "AVG(work_hours) as avg_hours, SUM(CASE WHEN status='completed' THEN 1 ELSE 0 END) as completed_tasks " +
                        "FROM records WHERE student_id = " + studentId + " GROUP BY DATE(record_date)";
            Dataset<Row> dailyStats = spark.sql(sql);
            List<Row> dailyData = dailyStats.collectAsList();
            List<Map<String, Object>> chartData = new ArrayList<>();
            int totalDays = 0;
            double totalHours = 0;
            int totalTasks = 0;
            for (Row row : dailyData) {
                Map<String, Object> dayData = new HashMap<>();
                dayData.put("date", row.getString(0));
                dayData.put("hours", row.getDouble(1));
                dayData.put("tasks", row.getInt(2));
                chartData.add(dayData);
                totalDays++;
                totalHours += row.getDouble(1);
                totalTasks += row.getInt(2);
            }
            reportData.put("chartData", chartData);
            reportData.put("summary", Map.of(
                "totalDays", totalDays,
                "avgDailyHours", totalHours / totalDays,
                "totalTasks", totalTasks,
                "completion", (double)totalTasks / (totalDays * 3) * 100
            ));
            List<InternshipRecord> recentRecords = recordMapper.findRecentByStudentId(studentId, 10);
            reportData.put("recentActivities", recentRecords);
            InternshipEvaluation latestEval = evaluationMapper.findLatestByStudentId(studentId);
            if (latestEval != null) {
                reportData.put("currentScore", latestEval.getTotalScore());
                reportData.put("strengths", latestEval.getStrengths());
                reportData.put("improvements", latestEval.getImprovements());
            }
        } catch (Exception e) {
            reportData.put("error", "报告生成失败:" + e.getMessage());
            logger.error("生成实习报告异常", e);
        }
        return reportData;
    }
    public Map<String, Object> processInternshipEvaluation(InternshipEvaluation evaluation) {
        Map<String, Object> result = new HashMap<>();
        try {
            if (evaluation.getEvaluatorType().equals("self")) {
                InternshipEvaluation existing = evaluationMapper.findSelfEvaluationByStudentId(
                    evaluation.getStudentId(), evaluation.getEvaluationPeriod());
                if (existing != null) {
                    result.put("status", "error");
                    result.put("message", "本期自评已提交,不可重复提交");
                    return result;
                }
            }
            double totalScore = 0;
            int itemCount = 0;
            if (evaluation.getWorkAttitude() != null) {
                totalScore += evaluation.getWorkAttitude();
                itemCount++;
            }
            if (evaluation.getProfessionalSkill() != null) {
                totalScore += evaluation.getProfessionalSkill();
                itemCount++;
            }
            if (evaluation.getCommunicationAbility() != null) {
                totalScore += evaluation.getCommunicationAbility();
                itemCount++;
            }
            if (evaluation.getInnovationAbility() != null) {
                totalScore += evaluation.getInnovationAbility();
                itemCount++;
            }
            if (itemCount > 0) {
                evaluation.setTotalScore(totalScore / itemCount);
            }
            String level;
            if (evaluation.getTotalScore() >= 90) {
                level = "优秀";
            } else if (evaluation.getTotalScore() >= 80) {
                level = "良好";
            } else if (evaluation.getTotalScore() >= 70) {
                level = "中等";
            } else if (evaluation.getTotalScore() >= 60) {
                level = "及格";
            } else {
                level = "不及格";
            }
            evaluation.setEvaluationLevel(level);
            evaluation.setEvaluationDate(new Date());
            evaluation.setStatus("submitted");
            evaluationMapper.insert(evaluation);
            if (evaluation.getEvaluatorType().equals("teacher")) {
                studentMapper.updateEvaluationStatus(evaluation.getStudentId(), "evaluated");
                NotificationService.sendEvaluationNotification(evaluation.getStudentId(), evaluation);
            }
            result.put("status", "success");
            result.put("evaluation", evaluation);
            result.put("message", "评价提交成功");
        } catch (Exception e) {
            result.put("status", "error");
            result.put("message", "评价提交失败:" + e.getMessage());
            logger.error("处理实习评价异常", e);
        }
        return result;
    }
}

六、部分文档展示

在这里插入图片描述

七、END

💕💕文末获取源码联系计算机编程果茶熊