✨作者主页:IT毕设梦工厂✨
个人简介:曾从事计算机专业培训教学,擅长Java、Python、微信小程序、Golang、安卓Android等项目实战。接项目定制开发、代码讲解、答辩教学、文档编写、降重等。
☑文末获取源码☑
精彩专栏推荐⬇⬇⬇
Java项目
Python项目
安卓项目
微信小程序项目
一、前言
大学生就业管理系统作为教育信息化建设的重要组成部分,对于提高就业管理效率、优化就业服务流程具有重要意义。随着信息技术的发展,尤其是互联网技术的广泛应用,信息化已成为社会发展的趋势。国家政策的支持和教育信息化的推进,为高校毕业生就业管理系统的设计提供了良好的政策环境和技术基础。根据CSDN博客中的描述,传统的就业管理方式存在信息不对称、效率低下等问题,而信息化手段可以有效解决这些问题 。
尽管已有一些就业管理平台,但现有解决方案仍存在不足。例如,信息更新不够及时、数据管理不够集中、用户体验有待提升等问题。这些问题限制了就业管理系统在提升就业服务质量和效率方面的潜力 。
本课题旨在设计并实现一个基于SpringBoot的大学生就业招聘管理系统,该系统将提供用户管理、院系管理、专业管理、岗位类型管理等功能,并通过智能化的数据分析和推荐算法,提高就业匹配的准确度。系统将采用现代化的信息技术,如SpringBoot框架、MySQL数据库等,实现数据的高效管理和处理。
在大学生就业招聘管理系统中,管理员负责系统用户账户的管理、院系和专业的设置、岗位类型的定义、招聘信息的审核与发布、简历投递的查看与处理、面试邀请的发放、就业信息的统计与分析、留言反馈的回复、以及公告信息的管理;企业用户可以发布和管理招聘信息、查看和筛选简历、发送面试邀请、更新录用状态;学生用户能够浏览招聘信息、投递简历、查看面试邀请和录用通知、参与留言反馈、管理个人信息和就业情况。系统通过这些功能模块的整合,旨在提供一个便捷、互动的就业招聘平台,满足不同用户角色的需求,优化就业流程,提高就业服务质量。
本课题的研究具有重要的理论意义和实际意义。从理论角度来看,它为高等教育领域提供了新的研究思路,即如何利用信息技术优化就业管理流程。从实际角度来看,大学生就业招聘管理系统的应用将有助于提高就业管理的效率和质量,降低运营成本,提高学生满意度,推动教育信息化进程,促进教育现代化的发展 。
二、开发环境
- 开发语言:Java/Python
- 数据库:MySQL
- 系统架构:B/S
- 后端:SpringBoot/SSM/Django/Flask
- 前端:Vue
三、系统界面展示
- 大学生就业招聘管理系统界面展示:
企业-招聘信息管理:
管理员-审核招聘信息:
学生-查看招聘信息:
学生-投递简历:
企业-面试邀请:
用户-登记就业信息:
管理员-首页统计:
四、部分代码设计
- 项目实战-代码参考:
@RestController
@Controller
@RequestMapping("/zhaopin")
public class ZhaopinController {
private static final Logger logger = LoggerFactory.getLogger(ZhaopinController.class);
private static final String TABLE_NAME = "zhaopin";
@Autowired
private ZhaopinService zhaopinService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典表
@Autowired
private ForumService forumService;//论坛
@Autowired
private GongsiService gongsiService;//企业
@Autowired
private JianliService jianliService;//简历
@Autowired
private NewsService newsService;//公告信息
@Autowired
private TongzhiService tongzhiService;//企业通知
@Autowired
private ToudiService toudiService;//简历投递
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private ZhaopinCollectionService zhaopinCollectionService;//职位收藏
@Autowired
private ZhaopinLiuyanService zhaopinLiuyanService;//职位留言
@Autowired
private UsersService usersService;//管理员
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("企业".equals(role))
params.put("gongsiId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = zhaopinService.queryPage(params);
//字典表数据转换
List<ZhaopinView> list =(List<ZhaopinView>)page.getList();
for(ZhaopinView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ZhaopinEntity zhaopin = zhaopinService.selectById(id);
if(zhaopin !=null){
//entity转view
ZhaopinView view = new ZhaopinView();
BeanUtils.copyProperties( zhaopin , view );//把实体数据重构到view中
//级联表 企业
//级联表
GongsiEntity gongsi = gongsiService.selectById(zhaopin.getGongsiId());
if(gongsi != null){
BeanUtils.copyProperties( gongsi , view ,new String[]{ "id", "createTime", "insertTime", "updateTime", "gongsiId"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setGongsiId(gongsi.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ZhaopinEntity zhaopin, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,zhaopin:{}",this.getClass().getName(),zhaopin.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
else if("企业".equals(role))
zhaopin.setGongsiId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
Wrapper<ZhaopinEntity> queryWrapper = new EntityWrapper<ZhaopinEntity>()
.eq("gongsi_id", zhaopin.getGongsiId())
.eq("zhaopin_name", zhaopin.getZhaopinName())
.eq("zhaopin_daiyu", zhaopin.getZhaopinDaiyu())
.eq("zhaopin_address", zhaopin.getZhaopinAddress())
.eq("lianxiren_name", zhaopin.getLianxirenName())
.eq("zhaopin_phone", zhaopin.getZhaopinPhone())
.eq("zan_number", zhaopin.getZanNumber())
.eq("cai_number", zhaopin.getCaiNumber())
.eq("zhaopin_types", zhaopin.getZhaopinTypes())
.eq("leixing_types", zhaopin.getLeixingTypes())
.eq("zhaopin_renshu_number", zhaopin.getZhaopinRenshuNumber())
.eq("shangxia_types", zhaopin.getShangxiaTypes())
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ZhaopinEntity zhaopinEntity = zhaopinService.selectOne(queryWrapper);
if(zhaopinEntity==null){
zhaopin.setShangxiaTypes(1);
zhaopin.setCreateTime(new Date());
zhaopinService.insert(zhaopin);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody ZhaopinEntity zhaopin, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,zhaopin:{}",this.getClass().getName(),zhaopin.toString());
ZhaopinEntity oldZhaopinEntity = zhaopinService.selectById(zhaopin.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
// else if("企业".equals(role))
// zhaopin.setGongsiId(Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId"))));
if("".equals(zhaopin.getZhaopinPhoto()) || "null".equals(zhaopin.getZhaopinPhoto())){
zhaopin.setZhaopinPhoto(null);
}
zhaopinService.updateById(zhaopin);//根据id更新
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<ZhaopinEntity> oldZhaopinList =zhaopinService.selectBatchIds(Arrays.asList(ids));//要删除的数据
zhaopinService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 批量上传
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
List<ZhaopinEntity> zhaopinList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
ZhaopinEntity zhaopinEntity = new ZhaopinEntity();
// zhaopinEntity.setGongsiId(Integer.valueOf(data.get(0))); //企业 要改的
// zhaopinEntity.setZhaopinName(data.get(0)); //招聘信息名称 要改的
// zhaopinEntity.setZhaopinPhoto("");//详情和图片
// zhaopinEntity.setZhaopinDaiyu(data.get(0)); //薪资待遇 要改的
// zhaopinEntity.setZhaopinAddress(data.get(0)); //上班地点 要改的
// zhaopinEntity.setLianxirenName(data.get(0)); //联系人 要改的
// zhaopinEntity.setZhaopinPhone(data.get(0)); //招聘电话 要改的
// zhaopinEntity.setZanNumber(Integer.valueOf(data.get(0))); //赞 要改的
// zhaopinEntity.setCaiNumber(Integer.valueOf(data.get(0))); //踩 要改的
// zhaopinEntity.setZhaopinTypes(Integer.valueOf(data.get(0))); //招聘岗位 要改的
// zhaopinEntity.setLeixingTypes(Integer.valueOf(data.get(0))); //招聘类型 要改的
// zhaopinEntity.setZhaopinRenshuNumber(Integer.valueOf(data.get(0))); //招聘人数 要改的
// zhaopinEntity.setShangxiaTypes(Integer.valueOf(data.get(0))); //是否上架 要改的
// zhaopinEntity.setZhaopinContent("");//详情和图片
// zhaopinEntity.setCreateTime(date);//时间
zhaopinList.add(zhaopinEntity);
//把要查询是否重复的字段放入map中
//招聘电话
if(seachFields.containsKey("zhaopinPhone")){
List<String> zhaopinPhone = seachFields.get("zhaopinPhone");
zhaopinPhone.add(data.get(0));//要改的
}else{
List<String> zhaopinPhone = new ArrayList<>();
zhaopinPhone.add(data.get(0));//要改的
seachFields.put("zhaopinPhone",zhaopinPhone);
}
}
//查询是否重复
//招聘电话
List<ZhaopinEntity> zhaopinEntities_zhaopinPhone = zhaopinService.selectList(new EntityWrapper<ZhaopinEntity>().in("zhaopin_phone", seachFields.get("zhaopinPhone")));
if(zhaopinEntities_zhaopinPhone.size() >0 ){
ArrayList<String> repeatFields = new ArrayList<>();
for(ZhaopinEntity s:zhaopinEntities_zhaopinPhone){
repeatFields.add(s.getZhaopinPhone());
}
return R.error(511,"数据库的该表中的 [招聘电话] 字段已经存在 存在数据为:"+repeatFields.toString());
}
zhaopinService.insertBatch(zhaopinList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
* 个性推荐
*/
@IgnoreAuth
@RequestMapping("/gexingtuijian")
public R gexingtuijian(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("gexingtuijian方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
List<ZhaopinView> returnZhaopinViewList = new ArrayList<>();
//查看收藏
Map<String, Object> params1 = new HashMap<>(params);params1.put("sort","id");params1.put("yonghuId",request.getSession().getAttribute("userId"));
PageUtils pageUtils = zhaopinCollectionService.queryPage(params1);
List<ZhaopinCollectionView> collectionViewsList =(List<ZhaopinCollectionView>)pageUtils.getList();
Map<Integer,Integer> typeMap=new HashMap<>();//购买的类型list
for(ZhaopinCollectionView collectionView:collectionViewsList){
Integer zhaopinTypes = collectionView.getZhaopinTypes();
if(typeMap.containsKey(zhaopinTypes)){
typeMap.put(zhaopinTypes,typeMap.get(zhaopinTypes)+1);
}else{
typeMap.put(zhaopinTypes,1);
}
}
List<Integer> typeList = new ArrayList<>();//排序后的有序的类型 按最多到最少
typeMap.entrySet().stream().sorted((o1, o2) -> o2.getValue() - o1.getValue()).forEach(e -> typeList.add(e.getKey()));//排序
Integer limit = Integer.valueOf(String.valueOf(params.get("limit")));
for(Integer type:typeList){
Map<String, Object> params2 = new HashMap<>(params);params2.put("zhaopinTypes",type);
PageUtils pageUtils1 = zhaopinService.queryPage(params2);
List<ZhaopinView> zhaopinViewList =(List<ZhaopinView>)pageUtils1.getList();
returnZhaopinViewList.addAll(zhaopinViewList);
if(returnZhaopinViewList.size()>= limit) break;//返回的推荐数量大于要的数量 跳出循环
}
//正常查询出来商品,用于补全推荐缺少的数据
PageUtils page = zhaopinService.queryPage(params);
if(returnZhaopinViewList.size()<limit){//返回数量还是小于要求数量
int toAddNum = limit - returnZhaopinViewList.size();//要添加的数量
List<ZhaopinView> zhaopinViewList =(List<ZhaopinView>)page.getList();
for(ZhaopinView zhaopinView:zhaopinViewList){
Boolean addFlag = true;
for(ZhaopinView returnZhaopinView:returnZhaopinViewList){
if(returnZhaopinView.getId().intValue() ==zhaopinView.getId().intValue()) addFlag=false;//返回的数据中已存在此商品
}
if(addFlag){
toAddNum=toAddNum-1;
returnZhaopinViewList.add(zhaopinView);
if(toAddNum==0) break;//够数量了
}
}
}else {
returnZhaopinViewList = returnZhaopinViewList.subList(0, limit);
}
for(ZhaopinView c:returnZhaopinViewList)
dictionaryService.dictionaryConvert(c, request);
page.setList(returnZhaopinViewList);
return R.ok().put("data", page);
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = zhaopinService.queryPage(params);
//字典表数据转换
List<ZhaopinView> list =(List<ZhaopinView>)page.getList();
for(ZhaopinView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ZhaopinEntity zhaopin = zhaopinService.selectById(id);
if(zhaopin !=null){
//entity转view
ZhaopinView view = new ZhaopinView();
BeanUtils.copyProperties( zhaopin , view );//把实体数据重构到view中
//级联表
GongsiEntity gongsi = gongsiService.selectById(zhaopin.getGongsiId());
if(gongsi != null){
BeanUtils.copyProperties( gongsi , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setGongsiId(gongsi.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ZhaopinEntity zhaopin, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,zhaopin:{}",this.getClass().getName(),zhaopin.toString());
Wrapper<ZhaopinEntity> queryWrapper = new EntityWrapper<ZhaopinEntity>()
.eq("gongsi_id", zhaopin.getGongsiId())
.eq("zhaopin_name", zhaopin.getZhaopinName())
.eq("zhaopin_daiyu", zhaopin.getZhaopinDaiyu())
.eq("zhaopin_address", zhaopin.getZhaopinAddress())
.eq("lianxiren_name", zhaopin.getLianxirenName())
.eq("zhaopin_phone", zhaopin.getZhaopinPhone())
.eq("zan_number", zhaopin.getZanNumber())
.eq("cai_number", zhaopin.getCaiNumber())
.eq("zhaopin_types", zhaopin.getZhaopinTypes())
.eq("leixing_types", zhaopin.getLeixingTypes())
.eq("zhaopin_renshu_number", zhaopin.getZhaopinRenshuNumber())
.eq("shangxia_types", zhaopin.getShangxiaTypes())
// .notIn("zhaopin_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ZhaopinEntity zhaopinEntity = zhaopinService.selectOne(queryWrapper);
if(zhaopinEntity==null){
zhaopin.setZanNumber(1);
zhaopin.setCaiNumber(1);
zhaopin.setCreateTime(new Date());
zhaopinService.insert(zhaopin);
return R.ok();
}else {
return R.error(511,"表中有相同数据");
}
}
}
@RestController
@Controller
@RequestMapping("/toudi")
public class ToudiController {
private static final Logger logger = LoggerFactory.getLogger(ToudiController.class);
private static final String TABLE_NAME = "toudi";
@Autowired
private ToudiService toudiService;
@Autowired
private TokenService tokenService;
@Autowired
private DictionaryService dictionaryService;//字典表
@Autowired
private ForumService forumService;//论坛
@Autowired
private GongsiService gongsiService;//企业
@Autowired
private JianliService jianliService;//简历
@Autowired
private NewsService newsService;//公告信息
@Autowired
private TongzhiService tongzhiService;//企业通知
@Autowired
private YonghuService yonghuService;//用户
@Autowired
private ZhaopinService zhaopinService;//职位招聘
@Autowired
private ZhaopinCollectionService zhaopinCollectionService;//职位收藏
@Autowired
private ZhaopinLiuyanService zhaopinLiuyanService;//职位留言
@Autowired
private UsersService usersService;//管理员
/**
* 后端列表
*/
@RequestMapping("/page")
public R page(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("page方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永不会进入");
else if("用户".equals(role))
params.put("yonghuId",request.getSession().getAttribute("userId"));
else if("企业".equals(role))
params.put("gongsiId",request.getSession().getAttribute("userId"));
CommonUtil.checkMap(params);
PageUtils page = toudiService.queryPage(params);
//字典表数据转换
List<ToudiView> list =(List<ToudiView>)page.getList();
for(ToudiView c:list){
//修改对应字典表字段
dictionaryService.dictionaryConvert(c, request);
}
return R.ok().put("data", page);
}
/**
* 后端详情
*/
@RequestMapping("/info/{id}")
public R info(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("info方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ToudiEntity toudi = toudiService.selectById(id);
if(toudi !=null){
//entity转view
ToudiView view = new ToudiView();
BeanUtils.copyProperties( toudi , view );//把实体数据重构到view中
//级联表 简历
//级联表
JianliEntity jianli = jianliService.selectById(toudi.getJianliId());
if(jianli != null){
BeanUtils.copyProperties( jianli , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setJianliId(jianli.getId());
}
//级联表 职位招聘
//级联表
ZhaopinEntity zhaopin = zhaopinService.selectById(toudi.getZhaopinId());
if(zhaopin != null){
BeanUtils.copyProperties( zhaopin , view ,new String[]{ "id", "createTime", "insertTime", "updateTime"});//把级联的数据添加到view中,并排除id和创建时间字段,当前表的级联注册表
view.setZhaopinId(zhaopin.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 后端保存
*/
@RequestMapping("/save")
public R save(@RequestBody ToudiEntity toudi, HttpServletRequest request){
logger.debug("save方法:,,Controller:{},,toudi:{}",this.getClass().getName(),toudi.toString());
String role = String.valueOf(request.getSession().getAttribute("role"));
if(false)
return R.error(511,"永远不会进入");
Wrapper<JianliEntity> jianliEntityWrapper = new EntityWrapper<JianliEntity>()
.eq("yonghu_id", request.getSession().getAttribute("userId"));
List<JianliEntity> jianliEntities = jianliService.selectList(jianliEntityWrapper);
toudi.setJianliId(jianliEntities.get(0).getId());
Wrapper<ToudiEntity> queryWrapper = new EntityWrapper<ToudiEntity>()
.eq("jianli_id", toudi.getJianliId())
.eq("zhaopin_id", toudi.getZhaopinId())
.in("toudi_yesno_types", new Integer[]{1,2})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ToudiEntity toudiEntity = toudiService.selectOne(queryWrapper);
if(toudiEntity==null){
toudi.setToudiYesnoTypes(1);
toudi.setInsertTime(new Date());
toudi.setCreateTime(new Date());
toudiService.insert(toudi);
return R.ok();
}else {
if(toudiEntity.getToudiYesnoTypes()==1)
return R.error(511,"有相同的待审核的数据");
else if(toudiEntity.getToudiYesnoTypes()==2)
return R.error(511,"有相同的审核通过的数据");
else
return R.error(511,"表中有相同数据");
}
}
/**
* 后端修改
*/
@RequestMapping("/update")
public R update(@RequestBody ToudiEntity toudi, HttpServletRequest request) throws NoSuchFieldException, ClassNotFoundException, IllegalAccessException, InstantiationException {
logger.debug("update方法:,,Controller:{},,toudi:{}",this.getClass().getName(),toudi.toString());
ToudiEntity oldToudiEntity = toudiService.selectById(toudi.getId());//查询原先数据
String role = String.valueOf(request.getSession().getAttribute("role"));
// if(false)
// return R.error(511,"永远不会进入");
toudiService.updateById(toudi);//根据id更新
return R.ok();
}
/**
* 审核
*/
@RequestMapping("/shenhe")
public R shenhe(@RequestBody ToudiEntity toudiEntity, HttpServletRequest request){
logger.debug("shenhe方法:,,Controller:{},,toudiEntity:{}",this.getClass().getName(),toudiEntity.toString());
ToudiEntity oldToudi = toudiService.selectById(toudiEntity.getId());//查询原先数据
// if(toudiEntity.getToudiYesnoTypes() == 2){//通过
// toudiEntity.setToudiTypes();
// }else if(toudiEntity.getToudiYesnoTypes() == 3){//拒绝
// toudiEntity.setToudiTypes();
// }
toudiService.updateById(toudiEntity);//审核
return R.ok();
}
/**
* 删除
*/
@RequestMapping("/delete")
public R delete(@RequestBody Integer[] ids, HttpServletRequest request){
logger.debug("delete:,,Controller:{},,ids:{}",this.getClass().getName(),ids.toString());
List<ToudiEntity> oldToudiList =toudiService.selectBatchIds(Arrays.asList(ids));//要删除的数据
toudiService.deleteBatchIds(Arrays.asList(ids));
return R.ok();
}
/**
* 批量上传
*/
@RequestMapping("/batchInsert")
public R save( String fileName, HttpServletRequest request){
logger.debug("batchInsert方法:,,Controller:{},,fileName:{}",this.getClass().getName(),fileName);
Integer yonghuId = Integer.valueOf(String.valueOf(request.getSession().getAttribute("userId")));
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
try {
List<ToudiEntity> toudiList = new ArrayList<>();//上传的东西
Map<String, List<String>> seachFields= new HashMap<>();//要查询的字段
Date date = new Date();
int lastIndexOf = fileName.lastIndexOf(".");
if(lastIndexOf == -1){
return R.error(511,"该文件没有后缀");
}else{
String suffix = fileName.substring(lastIndexOf);
if(!".xls".equals(suffix)){
return R.error(511,"只支持后缀为xls的excel文件");
}else{
URL resource = this.getClass().getClassLoader().getResource("static/upload/" + fileName);//获取文件路径
File file = new File(resource.getFile());
if(!file.exists()){
return R.error(511,"找不到上传文件,请联系管理员");
}else{
List<List<String>> dataList = PoiUtil.poiImport(file.getPath());//读取xls文件
dataList.remove(0);//删除第一行,因为第一行是提示
for(List<String> data:dataList){
//循环
ToudiEntity toudiEntity = new ToudiEntity();
// toudiEntity.setJianliId(Integer.valueOf(data.get(0))); //简历 要改的
// toudiEntity.setZhaopinId(Integer.valueOf(data.get(0))); //招聘 要改的
// toudiEntity.setToudiYesnoTypes(Integer.valueOf(data.get(0))); //投递状态 要改的
// toudiEntity.setToudiYesnoText(data.get(0)); //投递回复 要改的
// toudiEntity.setInsertTime(date);//时间
// toudiEntity.setCreateTime(date);//时间
toudiList.add(toudiEntity);
//把要查询是否重复的字段放入map中
}
//查询是否重复
toudiService.insertBatch(toudiList);
return R.ok();
}
}
}
}catch (Exception e){
e.printStackTrace();
return R.error(511,"批量插入数据异常,请联系管理员");
}
}
/**
* 前端列表
*/
@IgnoreAuth
@RequestMapping("/list")
public R list(@RequestParam Map<String, Object> params, HttpServletRequest request){
logger.debug("list方法:,,Controller:{},,params:{}",this.getClass().getName(),JSONObject.toJSONString(params));
CommonUtil.checkMap(params);
PageUtils page = toudiService.queryPage(params);
//字典表数据转换
List<ToudiView> list =(List<ToudiView>)page.getList();
for(ToudiView c:list)
dictionaryService.dictionaryConvert(c, request); //修改对应字典表字段
return R.ok().put("data", page);
}
/**
* 前端详情
*/
@RequestMapping("/detail/{id}")
public R detail(@PathVariable("id") Long id, HttpServletRequest request){
logger.debug("detail方法:,,Controller:{},,id:{}",this.getClass().getName(),id);
ToudiEntity toudi = toudiService.selectById(id);
if(toudi !=null){
//entity转view
ToudiView view = new ToudiView();
BeanUtils.copyProperties( toudi , view );//把实体数据重构到view中
//级联表
JianliEntity jianli = jianliService.selectById(toudi.getJianliId());
if(jianli != null){
BeanUtils.copyProperties( jianli , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setJianliId(jianli.getId());
}
//级联表
ZhaopinEntity zhaopin = zhaopinService.selectById(toudi.getZhaopinId());
if(zhaopin != null){
BeanUtils.copyProperties( zhaopin , view ,new String[]{ "id", "createDate"});//把级联的数据添加到view中,并排除id和创建时间字段
view.setZhaopinId(zhaopin.getId());
}
//修改对应字典表字段
dictionaryService.dictionaryConvert(view, request);
return R.ok().put("data", view);
}else {
return R.error(511,"查不到数据");
}
}
/**
* 前端保存
*/
@RequestMapping("/add")
public R add(@RequestBody ToudiEntity toudi, HttpServletRequest request){
logger.debug("add方法:,,Controller:{},,toudi:{}",this.getClass().getName(),toudi.toString());
Wrapper<ToudiEntity> queryWrapper = new EntityWrapper<ToudiEntity>()
.eq("jianli_id", toudi.getJianliId())
.eq("zhaopin_id", toudi.getZhaopinId())
.in("toudi_yesno_types", new Integer[]{1,2})
.eq("toudi_yesno_text", toudi.getToudiYesnoText())
// .notIn("toudi_types", new Integer[]{102})
;
logger.info("sql语句:"+queryWrapper.getSqlSegment());
ToudiEntity toudiEntity = toudiService.selectOne(queryWrapper);
if(toudiEntity==null){
toudi.setToudiYesnoTypes(1);
toudi.setInsertTime(new Date());
toudi.setCreateTime(new Date());
toudiService.insert(toudi);
return R.ok();
}else {
if(toudiEntity.getToudiYesnoTypes()==1)
return R.error(511,"有相同的待审核的数据");
else if(toudiEntity.getToudiYesnoTypes()==2)
return R.error(511,"有相同的审核通过的数据");
else
return R.error(511,"表中有相同数据");
}
}
}
五、论文参考
- 计算机毕业设计选题推荐-大学生就业招聘管理系统-论文参考:
六、系统视频
- 大学生就业招聘管理系统-项目视频:
计算机毕业设计选题推荐-大学生就业招聘管理系统-项目实战
结语
计算机毕业设计选题推荐-大学生就业招聘管理系统-Java/Python项目实战
大家可以帮忙点赞、收藏、关注、评论啦~
源码获取:⬇⬇⬇