Java毕业设计实战之平行志愿管理系统的实现
程序员文章站
2022-06-22 10:19:01
一、项目简述本系统功能包括: 系统管理,招生计划,学生管理,录取结果,自动分配,调剂管理等等。二、项目运行环境配置:jdk1.8 + tomcat8.5 + mysql + hbuilderx(web...
一、项目简述
本系统功能包括: 系统管理,招生计划,学生管理,录取结果,自动分配,调剂管理等等。
二、项目运行
环境配置:
jdk1.8 + tomcat8.5 + mysql + hbuilderx(webstorm也行)+ eclispe(intellij idea,eclispe,myeclispe,sts都支持)。
项目技术:
springboot + maven + mybatis+ vue 等等组成,b/s模式 + maven管理等等。
学生管理控制层:
@restcontroller @requestmapping("/student") public class studentcontroller { @autowired istudentservice studentservice; @requestmapping("/getstudentraw") public jsonresponse getstudentraw(@requestparam(required = false, defaultvalue = "1") integer currentpage){ if(currentpage == null || currentpage<=0) return new jsonresponse(jsonresponse.invalid_request,null, null); return new jsonresponse(jsonresponse.ok, studentservice.getstudentraw(currentpage), null); } @requestmapping("/getadjuststudentraw") public jsonresponse getadjuststudentraw(@requestparam(required = false, defaultvalue = "1") int currentpage){ return new jsonresponse(jsonresponse.ok, studentservice.getadjuststudentraw(currentpage), null); } @requestmapping("/getexitstudentraw") public jsonresponse getexitstudentraw(@requestparam(required = false, defaultvalue = "1") int currentpage){ return new jsonresponse(jsonresponse.ok, studentservice.getexitstudentraw(currentpage), null); } @requestmapping("/doenroll") public jsonresponse doenroll(){ studentservice.doenroll(); return new jsonresponse(jsonresponse.ok, null, null); } @requestmapping("/doadjust") public jsonresponse doadjust(){ studentservice.doadjust(); return new jsonresponse(jsonresponse.ok, null, null); } // statisticsresult getresult(int currentpage, boolean desc); @requestmapping("/getresult") public jsonresponse getresult(@requestparam(required = false, defaultvalue = "1") int currentpage, @requestparam(required = false, defaultvalue = "false") boolean desc, queryresultoption option){ return new jsonresponse(jsonresponse.ok, studentservice.getresult(currentpage, desc, option), null); } // statisticsresult getresultbydepartment( int departmentid, int currentpage, boolean desc); /** * @description t通过学院、专业、排名查询已弃用,请使用上面的getresult * @author 李宏鑫 * @param null * @return * @updatetime 2021/1/7 20:53 * @throws */ @requestmapping("/getresultbydepartment") @deprecated public jsonresponse getresultbydepartment(int departmentid, @requestparam(required = false, defaultvalue = "1") int currentpage, @requestparam(required = false, defaultvalue = "false") boolean desc){ return new jsonresponse(jsonresponse.ok, studentservice.getresultbydepartment(departmentid, currentpage, desc), null); } // statisticsresult getresultbymajor( string majorid, int currentpage, boolean desc); @requestmapping("/getresultbymajor") @deprecated public jsonresponse getresultbymajor(string majorid, @requestparam(required = false, defaultvalue = "1") int currentpage, @requestparam(required = false, defaultvalue = "false") boolean desc){ return new jsonresponse(jsonresponse.ok, studentservice.getresultbymajor(majorid, currentpage, desc), null); } @requestmapping("/searchstudent") @deprecated public jsonresponse searchstudent(@requestparam(required = false, defaultvalue = "1") int currentpage,string keyword){ return new jsonresponse(jsonresponse.ok, studentservice.searchstudent(currentpage,keyword), null); } @requestmapping("/searchstudentbycandidate") public jsonresponse searchstudentbycandidate(@requestparam(required = false, defaultvalue = "1") int currentpage,string keyword){ return new jsonresponse(jsonresponse.ok, studentservice.searchstudentbycandidate(currentpage,keyword), null); } @requestmapping("/getstudentbeforerank") public jsonresponse getstudentbeforerank(@requestparam(required = false, defaultvalue = "1") int currentpage, int rank){ return new jsonresponse(jsonresponse.ok, studentservice.getstudentbeforerank(currentpage, rank), null); } @requestmapping("/getstatisticsresult") public jsonresponse getstatisticsresult(){ return new jsonresponse(jsonresponse.ok, studentservice.getstatisticsresult(), null); } // list<map<string, object>> getresultindepartment(int departmentid); @requestmapping("/getstatisticsresultindepartment") public jsonresponse getstatisticsresultindepartment(){ return new jsonresponse(jsonresponse.ok, studentservice.getstatisticsresultindepartment(), null); } // list<map<string, object>> getresultinmajor(string majorid); @requestmapping("/getstatisticsresultinmajor") public jsonresponse getstatisticsresultinmajor(){ return new jsonresponse(jsonresponse.ok, studentservice.getstatisticsresultinmajor(), null); } // map<string, integer> getdistribute(); @requestmapping("/getdistribute") public jsonresponse getdistribute(){ return new jsonresponse(jsonresponse.ok, studentservice.getdistribute(), null); } // map<string, integer> getdistributeinprovince(string province); @requestmapping("/getdistributeinprovince") public jsonresponse getdistributeinprovince(string province){ return new jsonresponse(jsonresponse.ok, studentservice.getdistributeinprovince(province), null); } // map<string, integer> getgradedistribute(); @requestmapping("/getgradedistribute") public jsonresponse getgradedistribute(){ return new jsonresponse(jsonresponse.ok, studentservice.getgradedistribute(), null); } // map<string, integer> getgradedistributebydepartment( int departmentid); @requestmapping("/getgradedistributebydepartment") public jsonresponse getgradedistributebydepartment(int departmentid){ return new jsonresponse(jsonresponse.ok, studentservice.getgradedistributebydepartment(departmentid), null); } // map<string, integer> getgradedistributebymajor(string majorid); @requestmapping("/getgradedistributebymajor") public jsonresponse getgradedistributebymajor(string majorid){ return new jsonresponse(jsonresponse.ok, studentservice.getgradedistributebymajor(majorid), null); } // map<string, integer> getcountdistributeindepartment(); @requestmapping("/getcountdistributeindepartment") public jsonresponse getcountdistributeindepartment(){ return new jsonresponse(jsonresponse.ok, studentservice.getcountdistributeindepartment(), null); } // map<string, integer> getcountdistributeinmajor(); @requestmapping("/getcountdistributeinmajor") public jsonresponse getcountdistributeinmajor(){ return new jsonresponse(jsonresponse.ok, studentservice.getcountdistributeinmajor(), null); } // map<string, integer> getcountdistributeinmajorbydepartment(int departmentid); @requestmapping("/getcountdistributeinmajorbydepartment") public jsonresponse getcountdistributeinmajorbydepartment(int departmentid){ return new jsonresponse(jsonresponse.ok, studentservice.getcountdistributeinmajorbydepartment(departmentid), null); } @requestmapping("/reset") @deprecated public jsonresponse reset(){ studentservice.reset(); return new jsonresponse(jsonresponse.ok, null, null); } @requestmapping("/formalready") @deprecated public jsonresponse formalready(){ studentservice.formallyready(); return new jsonresponse(jsonresponse.ok, null, null); } }
登录管理控制层:
@restcontroller @requestmapping("/login") public class logincontroller { @autowired loginproperties properties; @resource(name = "globalstorage") map<string, object> storage; @requestmapping("/dologin") public jsonresponse dologin(string name, string pass, httpsession session){ if(properties.getadminname().equals(name) && properties.getadminpass().equals(pass)){ storage.put("authsession", session); return new jsonresponse(jsonresponse.ok, null, null); } else { return new jsonresponse(jsonresponse.auth_err, null, "登陆失败"); } } @requestmapping("/checklogin") public jsonresponse checklogin(httpsession session){ // if (session.equals(storage.get("authsession"))){ return new jsonresponse(jsonresponse.ok, null, "已登录"); // } else { // return new jsonresponse(jsonresponse.auth_err, null, "未登录"); // } } @requestmapping("/logout") public jsonresponse logout(){ storage.remove("authsession"); return new jsonresponse(jsonresponse.ok, null, "注销成功"); } }
文件管理控制层:
@controller @requestmapping("/file") public class filecontroller { @autowired iexcelservice excelservice; @responsebody @requestmapping("/uploadmajor") public jsonresponse uploadmajorexcel(multipartfile file) throws ioexception { excelservice.readmajorexcel(file); return new jsonresponse(jsonresponse.ok,null,null); } @responsebody @requestmapping("/uploadstudent") public jsonresponse uploadstudentexcel(multipartfile file) throws ioexception { excelservice.readstudentexcel(file); return new jsonresponse(jsonresponse.ok,null,null); } @requestmapping("/exportresult") public void export(httpservletresponse response) throws ioexception { response.setcontenttype("application/vnd.ms-excel"); response.setcharacterencoding("utf-8"); string filename = urlencoder.encode("录取结果", "utf-8").replaceall("\\+", "%20"); response.setheader("content-disposition", "attachment;filename*=utf-8''" + filename + ".xlsx"); excelservice.doexport(response.getoutputstream()); } @requestmapping("/exportexit") public void exportexit(httpservletresponse response) throws ioexception { response.setcontenttype("application/vnd.ms-excel"); response.setcharacterencoding("utf-8"); string filename = urlencoder.encode("退档结果", "utf-8").replaceall("\\+", "%20"); response.setheader("content-disposition", "attachment;filename*=utf-8''" + filename + ".xlsx"); excelservice.exportexitstudent(response.getoutputstream()); } }
到此这篇关于java毕业设计实战之平行志愿管理系统的实现的文章就介绍到这了,更多相关java 平行志愿管理内容请搜索以前的文章或继续浏览下面的相关文章希望大家以后多多支持!
上一篇: JDK14发布了,快来看看有什么新特性吧