java中的接口是类吗
281
2022-08-30
Java毕业设计实战之平行志愿管理系统的实现
一、项目简述
本系统功能包括: 系统管理,招生计划,学生管理,录取结果,自动分配,调剂管理等等。
二、项目运行
环境配置:
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 JsonResponlsxdWse 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
@RequestMapping("/getStatisticsResultInDepartment")
public JsonResponse getStatisticsResultInDepartment(){
return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInDepartment(), null);
}
// List
@RequestMapping("/getStatisticsResultInMajor")
public JsonResponse getStatisticsResultInMajor(){
return new JsonResponse(JsonResponse.OK, studentService.getStatisticsResultInMajor(), null);
}
// Map
@RequestMapping("/getDistribute")
public JsonResponse getDistribute(){
return new JsonResponse(JsonResponse.OK, studentService.getDistribute(), null);
}
// Map
@RequestMapping("/getDistributeInProvince")
public JsonResponse getDistributeInProvince(String province){
return new JsonResponse(JsonResponse.OK, studentService.getDistributeInProvince(province), null);
}
// Map
@RequestMapping("/getGradeDistribute")
public JsonResponse getGradeDistribute(){
return new JsonResponse(JsonResponse.OK, studentService.getGradeDistribute(), null);
}
// Map
@RequestMapping("/getGradeDistributeByDepartment")
public JsonResponse getGradeDistributeByDepartment(int departmentId){
return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByDepartment(departmentId), null);
}
// Map
@RequestMapping("/getGradeDistributeByMajor")
public JsonResponse getGradeDistributeByMajor(String majorId){
return new JsonResponse(JsonResponse.OK, studentService.getGradeDistributeByMajor(majorId), null);
}
// Map
@RequestMapping("/getCountDistributeInDepartment")
public JsonResponse getCountDistributeInDepartment(){
return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInDepartment(), null);
}
// Map
@RequestMapping("/getCountDistributeInMajor")
public JsonResponse getCountDistributeInMajor(){
return new JsonResponse(JsonResponse.OK, studentService.getCountDistributeInMajor(), null);
}
// Map
@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
@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());
}
}
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~