BIRDMAN0908
1月前来过
全职 · 300/日  ·  6525/月
工作时间: 工作日22:30-24:00、周末10:00-24:00工作地点: 远程
服务企业: 1家累计提交: 0工时
联系方式:
********
********
********
聊一聊

使用APP扫码聊一聊

个人介绍

27岁,中软国际中高级后端开发员,全栈开发,擅长Java,thymeleaf,mysql,mybatis,springboot,Redis等企业级开发,个人作品丰富,涉及网店,博客,图书管理系统,网课排课系统等内容,有丰富的个人开发经验,交付认真准时,客户满意度高


开发流程:线上需求对接设计-》功能开发验证-》需求迭代更新-》需求交付

工作经历 和TA聊聊

APP扫码和程序员直接沟通

  • 该用户选择隐藏工作经历信息,如需查看详细信息,可点击右上角“和TA聊一聊”查看

教育经历 和TA聊聊

APP扫码和程序员直接沟通

  • 该用户选择隐藏教育经历信息,如需查看详细信息,可点击右上角“和TA聊一聊”查看

技能

0
1
2
3
4
5
作品
排课系统

主要使用了springboot技术 thymeleaf模板引擎 mybatis,mysql数据库技术 js, css, sementicui, ajax等技术 回溯法实现了课程自动排课算法 package com.zj.demo.controller; import com.zj.demo.entity.*; import com.zj.demo.mapper.*; import com.zj.demo.utils.IDGenerator; import org.springframework.stereotype.Controller; import org.springframework.transaction.annotation.Transactional; import org.springframework.ui.Model; import org.springframework.web.bind.annotation.ModelAttribute; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.servlet.mvc.support.RedirectAttributes; import javax.annotation.Resource; import java.util.*; @Controller public class MajorController { @Resource private MajorMapper majorMapper; @Resource private MajorSubjectMapper majorSubjectMapper; @Resource private SubjectMapper subjectMapper; @Resource private StudentMapper studentMapper; @Resource private StudentMajorMapper studentMajorMapper; @Resource private TeacherSubjectMapper teacherSubjectMapper; @Resource private TeacherTimeMapper teacherTimeMapper; @Resource private TeacherMapper teacherMapper; @Resource private ClassroomTimeMapper classroomTimeMapper; @Resource private ClassroomMapper classroomMapper; @Resource private PaikeMapper paikeMapper; @RequestMapping("/major_index") public String major_index(@ModelAttribute("msg")String msg, Model model) { List majorList = majorMapper.findAllMajors(); majorList.sort(((o1, o2) -> o2.getName().compareTo(o1.getName()))); model.addAttribute("majorList", majorList); model.addAttribute("msg",msg); return "major_index"; } @RequestMapping("/to_major_add") public String to_major_add(Model model) { List subjects = subjectMapper.findAllSubjects(); model.addAttribute("subjects", subjects); return "major_add"; } @RequestMapping("/major_add") @Transactional public String major_add(Major major, String[] subject) { major.setId("MJ" + IDGenerator.getUniqueID()); major.setState("0"); System.out.println(Arrays.toString(subject)); for (String suid : subject) { majorSubjectMapper.addSubjectsToMajor(new MajorSubject( "MS" + IDGenerator.getUniqueID(), major.getId(), suid )); } majorMapper.addMajor(major); return "redirect:major_index"; } @RequestMapping("/to_major_update") public String to_major_update(@RequestParam("id") String id, Model model) { Major major = majorMapper.findMajorById(id); model.addAttribute("major", major); return "major_update"; } @RequestMapping("/major_update") @Transactional public String major_update(Major major,RedirectAttributes attributes) { majorMapper.updateMajorById(major); attributes.addFlashAttribute("msg","更新成功"); return "redirect:major_index"; } @RequestMapping("/to_major_delete") @Transactional public String to_major_delete(@RequestParam("id") String id,RedirectAttributes attributes) { deleteMajorAndSubjectByMajorId(id); attributes.addFlashAttribute("msg","删除成功"); return "redirect:major_index"; } @RequestMapping("/major_search") public String major_search(@ModelAttribute(value = "keyword", binding = false) String keyword, Model model) { List majorList = majorMapper.findMajorsByKeyword(keyword); model.addAttribute("majorList", majorList); model.addAttribute("keyword", keyword); model.addAttribute("num", majorList.size()); return "major_search"; } @RequestMapping("/to_major_update_search") public String to_major_update_search(@RequestParam("id") String id, @RequestParam("keyword") String keyword, Model model) { Major major = majorMapper.findMajorById(id); model.addAttribute("major", major); model.addAttribute("keyword", keyword); return "major_update_search"; } @RequestMapping("/major_update_search") public String major_update_search(Major major, String keyword, RedirectAttributes attributes) { majorMapper.updateMajorById(major); attributes.addFlashAttribute("keyword", keyword); attributes.addFlashAttribute("msg","更新成功"); return "redirect:major_search"; } @RequestMapping("/to_major_delete_search") @Transactional public String to_major_delete_search(@RequestParam("id") String id, String keyword, RedirectAttributes attributes) { deleteMajorAndSubjectByMajorId(id); attributes.addFlashAttribute("keyword", keyword); attributes.addFlashAttribute("msg","删除成功"); return "redirect:major_search"; } /** * 根据班级id删除班级和课程以及学生之间的关联 * @param id */ private void deleteMajorAndSubjectByMajorId(@RequestParam("id") String id) { majorSubjectMapper.deleteMajorAndSubjectByMajorId(id); studentMajorMapper.deleteMajorAndStudentByMajorId(id); majorMapper.deleteMajorById(id); findPaikes(id); } /** * 根据班级id查找对应的课程和学生 * @param id * @param model * @return */ @RequestMapping("/to_major_detail") public String to_major_detail(String id, Model model) { Major major = majorMapper.findMajorById(id); List subjects = majorSubjectMapper.findSubjectsByMajorID(id); List subjectList = new ArrayList(); int sum =0;// 总课时 for (String sid : subjects) { subjectList.add(subjectMapper.findSubjectById(sid)); sum+=Integer.parseInt(subjectMapper.findSubjectById(sid).getNumOfWeek()); } // 获取班级的学生对象 List students = studentMajorMapper.findStudentsByMajorID(id); List studentList = new ArrayList(); for (String tid : students) { studentList.add(studentMapper.findStudentById(tid)); } model.addAttribute("subjectList", subjectList); model.addAttribute("numOfStu",studentList.size()); model.addAttribute("totalTime",sum); model.addAttribute("numOfSub",subjectList.size()); model.addAttribute("studentList", studentList); model.addAttribute("major", major); return "major_detail"; } /** * 给每个班级排课 * 1.找出班级所有的课程 * 2.遍历每个课程进行排课 * 2.1.找出当前课程的授课老师的可用空间 * 2.2.根据选择的时间找空闲的教室 * 2.3.给当前课程排课,继续直到班级的课程都排好 * 3.结束 * @param id * @param attributes * @return */ @RequestMapping("/to_paike") public String to_paike(@ModelAttribute("id") String id,RedirectAttributes attributes) { /* 根据专业id找专业对应的课程 */ List subjects = majorSubjectMapper.findSubjectsByMajorID(id); /* 存储当前班级所有已安排课程的时间段,通过比较防止后面的课程时间与前面的课程时间重复 */ List timeList = new ArrayList(); /* 遍历该班级的所有课程进行排课 条件:课程分为必修和选修课程,必修课程优先安排在白天,选修课程优先安排在晚上 */ for (String sid : subjects) { // 获取课程一周的课时量 String num = subjectMapper.findSubjectById(sid).getNumOfWeek(); // 获取课程的类别:必修,选修 String type = subjectMapper.findSubjectById(sid).getType(); // 按照每个课程一周的课程量排课 for (int i = 0; i < Integer.parseInt(num); i++) { // 定义变量: 每个课程排好后都有教师,教室,时间 Teacher teacher = null; Classroom classroom = null; String timeNum = null; // 存储待选的授课老师 List teachers = new ArrayList(); // 要求:同一课程同一老师 if (i >= 1) {// 如果这门课之前排过,则找到之前的这门课老师 List teacherId = paikeMapper.findTeacherIdByMajorIdAndSubjectId(id, sid); if (teacherId.size()!=0)teachers.add(teacherId.get(0)); } else {// 如果第一次排这门课,则根据课程id获取所有的授课老师 teachers = teacherSubjectMapper.findTeacherIdBySubjectId(sid); } // 洗牌 Collections.shuffle(teachers); // 循环待选老师找出满足条件的老师 for (String tid : teachers) { // 找到老师的有空时间 List teacherTimes = teacherTimeMapper.findTeacherTimesByTeacherId(tid); // 预处理找出空闲时间(可选) Collections.shuffle(teacherTimes); boolean fa = false; for (TeacherTime tt : teacherTimes) { // 判断必修,如果是必修,但当前老师空闲时间是晚上则继续选老师的下一个时间段 if (type.equals("1") & Integer.parseInt(tt.getTimeNum()) % 5 == 0) { continue; } if (type.equals("0") & Integer.parseInt(tt.getTimeNum()) % 5 != 0) { continue; } // 判断该老师空闲时间上是否与之前的课程重复了 boolean fb = false; for (String tl : timeList) { if (tl.equals(tt.getTimeNum())) { fb = true; break; } } // 如果当前老师空闲时间与之前课程时间冲突则继续 if (fb) { continue; } // 时间不重复继续,判断是否空闲 if (tt.getState().equals("0")) { // 将该时间存储到timeList中 timeList.add(tt.getTimeNum()); // 根据老师时间找教室 List

0
2023-05-01 21:51
井字棋AI

package com.lab8.a1; import java.util.Random; import java.util.Scanner; import java.util.concurrent.CopyOnWriteArrayList; /** * TicTacToe * @author your name * */ public class TicTacToe { // member variables private static final String[][] table=new String[3][3]; private static final CopyOnWriteArrayList success = new CopyOnWriteArrayList(); private static final CopyOnWriteArrayList pStrings=new CopyOnWriteArrayList(); private static final CopyOnWriteArrayList cStrings = new CopyOnWriteArrayList(); private static final CopyOnWriteArrayList losingStrings = new CopyOnWriteArrayList(); // main public static void main(String[] args) { // initial initSuccess(); // loop do { System.out.println("start game!"); test(); } while (true); } @SuppressWarnings("resource") // test public static void test() { Scanner sc = new Scanner(System.in); CopyOnWriteArrayList losingList = new CopyOnWriteArrayList(); int index = 0; do { System.out.println("input anything"); sc.next(); System.out.println("your input position 1: (range 0 from 2)"); int p1 = sc.nextInt(); System.out.println("your input position 2: (range 0 from 2)"); int p2 = sc.nextInt(); table[p1][p2]="p"; pStrings.add(p1+""+p2); index ++; int a1 = 0; int a2=0; if (index==5); else { do { // call computer int[] cs = computerTurn(); table[cs[0]][cs[1]]="c"; boolean fs = false; String temp = print(); for(int i=0;i

0
2023-05-01 21:52
图书馆管理系统

图书馆系统 主要包括系统的登录 图书的管理 借阅功能 个人主页等功能 主要使用了springboot框架,前端使用thymeleaf模板引擎,js,css,Ajax异步技术等技术,mybatis,mysql作为后台数据管理

0
2023-05-01 21:54
更新于: 2022-04-13 浏览: 182