Android需求分析
作为一款大学生勤工助学管理系统,面向的是大多数学生,软件的界面设计简洁清晰,用户可轻松掌握使用技巧。在调查之后,获得用户以下需求:
(1)学生注册登录后,可进入系统解锁更多功能,学生将信息加入到后台数据库。
(2)学生不仅可以查看勤工助学,而且还可以自行搜索勤工助学。
(3)管理员具有权限,对企业招聘、已投简历等,进行添加、修改、删除等操作[11]。
(4)学生可以点击勤工助学页进行查看。
(5)管理员在系统管理发布轮播图管理、勤工助学、平台客服。
大学生勤工助学管理系统设计的目的是为用户提供企业招聘、已投简历等方面的平台。
与PC端应用程序相比,大学生勤工助学管理系统的设计主要面向于大学生勤工助学,旨在为管理员和学生、企业提供一个Android的大学生勤工助学管理系统。学生可以通过Android及时查看企业招聘等。
大学生勤工助学管理系统是在Android操作系统下的应用平台。为防止出现兼容性及稳定性问题,框架选择的是springboot,Android与后台服务端之间的数据存储主要通过MySQL。用户在使用应用时产生的数据通过 java等语言传递给数据库。通过此方式促进大学生勤工助学管理系统信息流动和数据传输效率,提供一个内容丰富、功能多样、易于操作的大学生勤工助学管理系统。
关键词:大学生勤工助学管理系统;java语言;MySQL数据库
演示视频:
springboot基于Android的大学生勤工助学管理系统源码和答辩PPT论文
springboot基于Android的大学生勤工助学管理系统源码和答辩PPT论文007
Abstract
The purpose of the design of the work-study management system for college students is to provide users with a platform for enterprise recruitment, resumes and other aspects.
Compared with the PC application, the design of the college student work-study management system is mainly aimed at college students' work-study, and aims to provide an Android college student work-study management system for administrators, students and enterprises. Students can view enterprise recruitment in time through Android.
The work-study management system for college students is an application platform under the Android operating system. To prevent compatibility and stability problems, the framework selects spring boot. The data storage between Android and the background server is mainly through MySQL. The data generated by users when using the application is transferred to the database through java and other languages. In this way, the information flow and data transmission efficiency of the college student work-study management system will be promoted, and a college student work-study management system with rich content, diverse functions and easy operation will be provided.
Key words: Android student work-study management system; Java language; MySQL database
package com.controller;
import java.text.SimpleDateFormat;
import java.util.ArrayList;
import java.util.Arrays;
import java.util.Calendar;
import java.util.Map;
import java.util.HashMap;
import java.util.Iterator;
import java.util.Date;
import java.util.List;
import javax.servlet.http.HttpServletRequest;
import com.utils.ValidatorUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.format.annotation.DateTimeFormat;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import com.baomidou.mybatisplus.mapper.EntityWrapper;
import com.baomidou.mybatisplus.mapper.Wrapper;
import com.annotation.IgnoreAuth;
import com.entity.XueshengkaoheEntity;
import com.entity.view.XueshengkaoheView;
import com.service.XueshengkaoheService;
import com.service.TokenService;
import com.utils.PageUtils;
import com.utils.R;
import com.utils.MD5Util;
import com.utils.MPUtil;
import com.utils.CommonUtil;
import java.io.IOException;
/**
* 学生考核
* 后端接口
* @author
* @email
* @date 2023-01-17 13:31:40
*/
@RestController
@RequestMapping("/xueshengkaohe")
public class XueshengkaoheController {
@Autowired
private XueshengkaoheService xueshengkaoheService;
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params,XueshengkaoheEntity xueshengkaohe,
HttpServletRequest request){
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
xueshengkaohe.setXuehao((String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiye")) {
xueshengkaohe.setQiyezhanghao((String)request.getSession().getAttribute("username"));
}
EntityWrapper<XueshengkaoheEntity> ew = new EntityWrapper<XueshengkaoheEntity>();
PageUtils page = xueshengkaoheService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengkaohe), params), params));
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params,XueshengkaoheEntity xueshengkaohe,
HttpServletRequest request){
EntityWrapper<XueshengkaoheEntity> ew = new EntityWrapper<XueshengkaoheEntity>();
PageUtils page = xueshengkaoheService.queryPage(params, MPUtil.sort(MPUtil.between(MPUtil.likeOrEq(ew, xueshengkaohe), params), params));
return R.ok().put("data", page);
}
/**
* 列表
*/
@RequestMapping("/lists")
public R list( XueshengkaoheEntity xueshengkaohe){
EntityWrapper<XueshengkaoheEntity> ew = new EntityWrapper<XueshengkaoheEntity>();
ew.allEq(MPUtil.allEQMapPre( xueshengkaohe, "xueshengkaohe"));
return R.ok().put("data", xueshengkaoheService.selectListView(ew));
}
/**
* 查询
*/
@RequestMapping("/query")
public R query(XueshengkaoheEntity xueshengkaohe){
EntityWrapper< XueshengkaoheEntity> ew = new EntityWrapper< XueshengkaoheEntity>();
ew.allEq(MPUtil.allEQMapPre( xueshengkaohe, "xueshengkaohe"));
XueshengkaoheView xueshengkaoheView = xueshengkaoheService.selectView(ew);
return R.ok("查询学生考核成功").put("data", xueshengkaoheView);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id){
XueshengkaoheEntity xueshengkaohe = xueshengkaoheService.selectById(id);
return R.ok().put("data", xueshengkaohe);
}
/**
* 前端详情
*/
@IgnoreAuth
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id){
XueshengkaoheEntity xueshengkaohe = xueshengkaoheService.selectById(id);
return R.ok().put("data", xueshengkaohe);
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody XueshengkaoheEntity xueshengkaohe, HttpServletRequest request){
xueshengkaohe.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(xueshengkaohe);
xueshengkaoheService.insert(xueshengkaohe);
return R.ok();
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody XueshengkaoheEntity xueshengkaohe, HttpServletRequest request){
xueshengkaohe.setId(new Date().getTime()+new Double(Math.floor(Math.random()*1000)).longValue());
//ValidatorUtils.validateEntity(xueshengkaohe);
xueshengkaoheService.insert(xueshengkaohe);
return R.ok();
}
/**
* 修改
*/
@RequestMapping("/update")
@Transactional
public R update(@RequestBody XueshengkaoheEntity xueshengkaohe, HttpServletRequest request){
//ValidatorUtils.validateEntity(xueshengkaohe);
xueshengkaoheService.updateById(xueshengkaohe);//全部更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Long[] ids){
xueshengkaoheService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 提醒接口
*/
@RequestMapping("/remind/{columnName}/{type}")
public R remindCount(@PathVariable("columnName") String columnName, HttpServletRequest request,
@PathVariable("type") String type,@RequestParam Map<String, Object> map) {
map.put("column", columnName);
map.put("type", type);
if(type.equals("2")) {
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
Calendar c = Calendar.getInstance();
Date remindStartDate = null;
Date remindEndDate = null;
if(map.get("remindstart")!=null) {
Integer remindStart = Integer.parseInt(map.get("remindstart").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindStart);
remindStartDate = c.getTime();
map.put("remindstart", sdf.format(remindStartDate));
}
if(map.get("remindend")!=null) {
Integer remindEnd = Integer.parseInt(map.get("remindend").toString());
c.setTime(new Date());
c.add(Calendar.DAY_OF_MONTH,remindEnd);
remindEndDate = c.getTime();
map.put("remindend", sdf.format(remindEndDate));
}
}
Wrapper<XueshengkaoheEntity> wrapper = new EntityWrapper<XueshengkaoheEntity>();
if(map.get("remindstart")!=null) {
wrapper.ge(columnName, map.get("remindstart"));
}
if(map.get("remindend")!=null) {
wrapper.le(columnName, map.get("remindend"));
}
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
wrapper.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiye")) {
wrapper.eq("qiyezhanghao", (String)request.getSession().getAttribute("username"));
}
int count = xueshengkaoheService.selectCount(wrapper);
return R.ok().put("count", count);
}
/**
* (按值统计)
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}")
public R value(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
EntityWrapper<XueshengkaoheEntity> ew = new EntityWrapper<XueshengkaoheEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiye")) {
ew.eq("qiyezhanghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = xueshengkaoheService.selectValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
* (按值统计)时间统计类型
*/
@RequestMapping("/value/{xColumnName}/{yColumnName}/{timeStatType}")
public R valueDay(@PathVariable("yColumnName") String yColumnName, @PathVariable("xColumnName") String xColumnName, @PathVariable("timeStatType") String timeStatType,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("xColumn", xColumnName);
params.put("yColumn", yColumnName);
params.put("timeStatType", timeStatType);
EntityWrapper<XueshengkaoheEntity> ew = new EntityWrapper<XueshengkaoheEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiye")) {
ew.eq("qiyezhanghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = xueshengkaoheService.selectTimeStatValue(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
/**
* 分组统计
*/
@RequestMapping("/group/{columnName}")
public R group(@PathVariable("columnName") String columnName,HttpServletRequest request) {
Map<String, Object> params = new HashMap<String, Object>();
params.put("column", columnName);
EntityWrapper<XueshengkaoheEntity> ew = new EntityWrapper<XueshengkaoheEntity>();
String tableName = request.getSession().getAttribute("tableName").toString();
if(tableName.equals("xuesheng")) {
ew.eq("xuehao", (String)request.getSession().getAttribute("username"));
}
if(tableName.equals("qiye")) {
ew.eq("qiyezhanghao", (String)request.getSession().getAttribute("username"));
}
List<Map<String, Object>> result = xueshengkaoheService.selectGroup(params, ew);
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
for(Map<String, Object> m : result) {
for(String k : m.keySet()) {
if(m.get(k) instanceof Date) {
m.put(k, sdf.format((Date)m.get(k)));
}
}
}
return R.ok().put("data", result);
}
}