项目介绍
互联网技术已广泛应用于社会生活。针对高校信息管理中存在的混乱、出错率高及安全性差等问题,本系统旨在通过信息化手段实现科学规范的管理。 系统基于 Java 语言开发,采用 MySQL 数据库存储数据,提供信息显示与服务功能。该系统具有保密性强、效率高、成本低等优点,有助于降低信息管理成本,实现计算机化管理。
系统展示

核心代码
package com.controller;
import java.io.File;
import java.math.BigDecimal;
import java.net.URL;
java.text.SimpleDateFormat;
com.alibaba.fastjson.JSONObject;
java.util.*;
org.springframework.beans.BeanUtils;
javax.servlet.http.HttpServletRequest;
org.springframework.web.context.ContextLoader;
javax.servlet.ServletContext;
com.service.TokenService;
com.utils.*;
java.lang.reflect.InvocationTargetException;
com.service.DictionaryService;
org.apache.commons.lang3.StringUtils;
com.annotation.IgnoreAuth;
org.slf4j.Logger;
org.slf4j.LoggerFactory;
org.springframework.beans.factory.annotation.Autowired;
org.springframework.stereotype.Controller;
org.springframework.web.bind.annotation.*;
com.baomidou.mybatisplus.mapper.EntityWrapper;
com.baomidou.mybatisplus.mapper.Wrapper;
com.entity.*;
com.entity.view.*;
com.service.*;
com.utils.PageUtils;
com.utils.R;
com.alibaba.fastjson.*;
{
LoggerFactory.getLogger(ShiwuzhaolingController.class);
;
ShiwuzhaolingService shiwuzhaolingService;
TokenService tokenService;
DictionaryService dictionaryService;
ForumService forumService;
NewsService newsService;
XunwuqishiService xunwuqishiService;
XunwuqishiLiuyanService xunwuqishiLiuyanService;
YonghuService yonghuService;
UsersService usersService;
R {
logger.debug(,.getClass().getName(),JSONObject.toJSONString(params));
String.valueOf(request.getSession().getAttribute());
() R.error(,);
(.equals(role)) params.put(,request.getSession().getAttribute());
CommonUtil.checkMap(params);
shiwuzhaolingService.queryPage(params);
List<ShiwuzhaolingView> list =(List<ShiwuzhaolingView>)page.getList();
(ShiwuzhaolingView c:list){
dictionaryService.dictionaryConvert(c, request);
}
R.ok().put(, page);
}
R {
logger.debug(,.getClass().getName(),id);
shiwuzhaolingService.selectById(id);
(shiwuzhaoling !=){
();
BeanUtils.copyProperties( shiwuzhaoling , view );
(yonghu != ){
BeanUtils.copyProperties( yonghu , view , []{ , , , , });
view.setYonghuId(yonghu.getId());
}
dictionaryService.dictionaryConvert(view, request);
R.ok().put(, view);
} {
R.error(,);
}
}
R {
logger.debug(,.getClass().getName(),shiwuzhaoling.toString());
String.valueOf(request.getSession().getAttribute());
() R.error(,);
(.equals(role)) shiwuzhaoling.setYonghuId(Integer.valueOf(String.valueOf(request.getSession().getAttribute())));
Wrapper<ShiwuzhaolingEntity> queryWrapper = <ShiwuzhaolingEntity>()
.eq(, shiwuzhaoling.getShiwuzhaolingName())
.eq(, shiwuzhaoling.getShiwuzhaolingTypes())
.eq(, shiwuzhaoling.getZhaugntaiTypes())
.eq(, shiwuzhaoling.getYonghuId())
.eq(, shiwuzhaoling.getShiwuzhaolingDizhi());
logger.info(+queryWrapper.getSqlSegment());
shiwuzhaolingService.selectOne(queryWrapper);
(shiwuzhaolingEntity==){
shiwuzhaoling.setCreateTime( ());
shiwuzhaolingService.insert(shiwuzhaoling);
R.ok();
} {
R.error(,);
}
}
R NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug(,.getClass().getName(),shiwuzhaoling.toString());
shiwuzhaolingService.selectById(shiwuzhaoling.getId());
String.valueOf(request.getSession().getAttribute());
(.equals(shiwuzhaoling.getShiwuzhaolingPhoto()) || .equals(shiwuzhaoling.getShiwuzhaolingPhoto())){
shiwuzhaoling.setShiwuzhaolingPhoto();
}
shiwuzhaolingService.updateById(shiwuzhaoling);
R.ok();
}
R {
logger.debug(,.getClass().getName(),ids.toString());
List<ShiwuzhaolingEntity> oldShiwuzhaolingList =shiwuzhaolingService.selectBatchIds(Arrays.asList(ids));
shiwuzhaolingService.deleteBatchIds(Arrays.asList(ids));
R.ok();
}
R {
logger.debug(,.getClass().getName(),fileName);
Integer.valueOf(String.valueOf(request.getSession().getAttribute()));
();
{
List<ShiwuzhaolingEntity> shiwuzhaolingList = <>();
Map<String, List<String>> seachFields= <>();
();
fileName.lastIndexOf();
(lastIndexOf == -){
R.error(,);
}{
fileName.substring(lastIndexOf);
(!.equals(suffix)){
R.error(,);
}{
.getClass().getClassLoader().getResource( + fileName);
(resource.getFile());
(!file.exists()){
R.error(,);
}{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());
dataList.remove();
(List<String> data:dataList){
();
shiwuzhaolingList.add(shiwuzhaolingEntity);
(seachFields.containsKey()){
List<String> shiwuzhaolingUuidNumber = seachFields.get();
shiwuzhaolingUuidNumber.add(data.get());
}{
List<String> shiwuzhaolingUuidNumber = <>();
shiwuzhaolingUuidNumber.add(data.get());
seachFields.put(,shiwuzhaolingUuidNumber);
}
}
List<ShiwuzhaolingEntity> shiwuzhaolingEntities_shiwuzhaolingUuidNumber = shiwuzhaolingService.selectList( <ShiwuzhaolingEntity>().in(, seachFields.get()));
(shiwuzhaolingEntities_shiwuzhaolingUuidNumber.size() > ){
ArrayList<String> repeatFields = <>();
(ShiwuzhaolingEntity s:shiwuzhaolingEntities_shiwuzhaolingUuidNumber){
repeatFields.add(s.getShiwuzhaolingUuidNumber());
}
R.error(,+repeatFields.toString());
}
shiwuzhaolingService.insertBatch(shiwuzhaolingList);
R.ok();
}
}
}
} (Exception e){
e.printStackTrace();
R.error(,);
}
}
R {
logger.debug(,.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
shiwuzhaolingService.queryPage(params);
List<ShiwuzhaolingView> list =(List<ShiwuzhaolingView>)page.getList();
(ShiwuzhaolingView c:list) dictionaryService.dictionaryConvert(c, request);
R.ok().put(, page);
}
R {
logger.debug(,.getClass().getName(),id);
shiwuzhaolingService.selectById(id);
(shiwuzhaoling !=){
();
BeanUtils.copyProperties( shiwuzhaoling , view );
(yonghu != ){
BeanUtils.copyProperties( yonghu , view , []{ , });
view.setYonghuId(yonghu.getId());
}
dictionaryService.dictionaryConvert(view, request);
R.ok().put(, view);
} {
R.error(,);
}
}
R {
logger.debug(,.getClass().getName(),shiwuzhaoling.toString());
Wrapper<ShiwuzhaolingEntity> queryWrapper = <ShiwuzhaolingEntity>()
.eq(, shiwuzhaoling.getShiwuzhaolingUuidNumber())
.eq(, shiwuzhaoling.getShiwuzhaolingName())
.eq(, shiwuzhaoling.getShiwuzhaolingTypes())
.eq(, shiwuzhaoling.getZhaugntaiTypes())
.eq(, shiwuzhaoling.getYonghuId())
.eq(, shiwuzhaoling.getShiwuzhaolingDizhi())
logger.info(+queryWrapper.getSqlSegment());
shiwuzhaolingService.selectOne(queryWrapper);
(shiwuzhaolingEntity==){
shiwuzhaoling.setCreateTime( ());
shiwuzhaolingService.insert(shiwuzhaoling);
R.ok();
} {
R.error(,);
}
}
}


