项目描述
基于springboot智慧校园后勤管理系统,
包括管理员端,业务员端。
管理员主要功能:用户管理,角色管理,学生管理;职工管理;案件管理 等;
业务员主要功能:学生管理;职工管理;案件管理的录入修改 等;
运行环境
jdk8+mysql+IntelliJ IDEA+maven+Vscode+redis
项目技术
springboot+vue+ElementUi
项目截图
登录页
职工管理
案件管理
学生管理
用户管理
部分代码(3段)
事件Controller
**
* 事件Controller
*/
@RestController
@RequestMapping("/system/event")
public class EventController extends BaseController
{
@Autowired
private IEventService eventService;
/**
* 查询事件列表
*/
@PreAuthorize("@ss.hasPermi('system:event:list')")
@GetMapping("/list")
public TableDataInfo list(Event event)
{
startPage();
List<Event> list = eventService.selectEventList(event);
return getDataTable(list);
}
/**
* 导出事件列表
*/
@PreAuthorize("@ss.hasPermi('system:event:export')")
@Log(title = "事件", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Event event)
{
List<Event> list = eventService.selectEventList(event);
ExcelUtil<Event> util = new ExcelUtil<Event>(Event.class);
util.exportExcel(response, list, "事件数据");
}
/**
* 获取事件详细信息
*/
@PreAuthorize("@ss.hasPermi('system:event:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(eventService.selectEventById(id));
}
/**
* 新增事件
*/
@PreAuthorize("@ss.hasPermi('system:event:add')")
@Log(title = "事件", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Event event)
{
return toAjax(eventService.insertEvent(event));
}
/**
* 修改事件
*/
@PreAuthorize("@ss.hasPermi('system:event:edit')")
@Log(title = "事件", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Event event)
{
return toAjax(eventService.updateEvent(event));
}
/**
* 删除事件
*/
@PreAuthorize("@ss.hasPermi('system:event:remove')")
@Log(title = "事件", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(eventService.deleteEventByIds(ids));
}
}
学生Controller
/**
* 学生Controller
*
*/
@RestController
@RequestMapping("/system/student")
public class StudentController extends BaseController
{
@Autowired
private IStudentService studentService;
/**
* 查询学生列表
*/
@PreAuthorize("@ss.hasPermi('system:student:list')")
@GetMapping("/list")
public TableDataInfo list(Student student)
{
startPage();
List<Student> list = studentService.selectStudentList(student);
return getDataTable(list);
}
/**
* 导出学生列表
*/
@PreAuthorize("@ss.hasPermi('system:student:export')")
@Log(title = "学生", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Student student)
{
List<Student> list = studentService.selectStudentList(student);
ExcelUtil<Student> util = new ExcelUtil<Student>(Student.class);
util.exportExcel(response, list, "学生数据");
}
/**
* 获取学生详细信息
*/
@PreAuthorize("@ss.hasPermi('system:student:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(studentService.selectStudentById(id));
}
/**
* 新增学生
*/
@PreAuthorize("@ss.hasPermi('system:student:add')")
@Log(title = "学生", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Student student)
{
return toAjax(studentService.insertStudent(student));
}
/**
* 修改学生
*/
@PreAuthorize("@ss.hasPermi('system:student:edit')")
@Log(title = "学生", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Student student)
{
return toAjax(studentService.updateStudent(student));
}
/**
* 删除学生
*/
@PreAuthorize("@ss.hasPermi('system:student:remove')")
@Log(title = "学生", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(studentService.deleteStudentByIds(ids));
}
}
职工Controller
/**
* 职工Controller
*/
@RestController
@RequestMapping("/system/worker")
public class WorkerController extends BaseController
{
@Autowired
private IWorkerService workerService;
/**
* 查询职工列表
*/
@PreAuthorize("@ss.hasPermi('system:worker:list')")
@GetMapping("/list")
public TableDataInfo list(Worker worker)
{
startPage();
List<Worker> list = workerService.selectWorkerList(worker);
return getDataTable(list);
}
/**
* 导出职工列表
*/
@PreAuthorize("@ss.hasPermi('system:worker:export')")
@Log(title = "职工", businessType = BusinessType.EXPORT)
@PostMapping("/export")
public void export(HttpServletResponse response, Worker worker)
{
List<Worker> list = workerService.selectWorkerList(worker);
ExcelUtil<Worker> util = new ExcelUtil<Worker>(Worker.class);
util.exportExcel(response, list, "职工数据");
}
/**
* 获取职工详细信息
*/
@PreAuthorize("@ss.hasPermi('system:worker:query')")
@GetMapping(value = "/{id}")
public AjaxResult getInfo(@PathVariable("id") Long id)
{
return AjaxResult.success(workerService.selectWorkerById(id));
}
/**
* 新增职工
*/
@PreAuthorize("@ss.hasPermi('system:worker:add')")
@Log(title = "职工", businessType = BusinessType.INSERT)
@PostMapping
public AjaxResult add(@RequestBody Worker worker)
{
return toAjax(workerService.insertWorker(worker));
}
/**
* 修改职工
*/
@PreAuthorize("@ss.hasPermi('system:worker:edit')")
@Log(title = "职工", businessType = BusinessType.UPDATE)
@PutMapping
public AjaxResult edit(@RequestBody Worker worker)
{
return toAjax(workerService.updateWorker(worker));
}
/**
* 删除职工
*/
@PreAuthorize("@ss.hasPermi('system:worker:remove')")
@Log(title = "职工", businessType = BusinessType.DELETE)
@DeleteMapping("/{ids}")
public AjaxResult remove(@PathVariable Long[] ids)
{
return toAjax(workerService.deleteWorkerByIds(ids));
}
}
源码地址
添加博客名QQ获取