package com.ycl.controller;
import com.ycl.domain.Enterprise;
import com.ycl.domain.Job;
import com.ycl.domain.User;
import com.ycl.service.EnterpriseService;
import com.ycl.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.servlet.ModelAndView;
import javax.servlet.http.HttpSession;
import java.util.List;
@Controller
@RequestMapping("enterprise")
public class EnterpriseController {
int id=0;
Enterprise enterprise2=null;
@Autowired
private EnterpriseService enterpriseService;
@Autowired
private UserService userService;
/**
* 企业登录
* @param enterprise
* @return
*/
@RequestMapping("login")
public String login(Enterprise enterprise, HttpSession session) {
Enterprise enterprise1 = enterpriseService.login(enterprise);
if (enterprise1 == null) {
return "/enterprise_jsp/enterpriseLogin";
} else {
id= enterprise1.getId();
enterprise2=enterprise1;
session.setAttribute("enterprise",enterprise1);
return "/enterprise";
}
}
/**
* 查询所有公司的信息
* @return
*/
@RequestMapping("enterpriseManagement")
public ModelAndView enterpriseManagement() {
ModelAndView modelAndView = new ModelAndView();
List<Enterprise> enterprises = enterpriseService.enterpriseManagement();
modelAndView.addObject("enterprises",enterprises);
modelAndView.setViewName("/enterprise_jsp/enterpriseManagement");
return modelAndView;
}
/**
* 通过id删除公司信息
* @param id
* @return
*/
@RequestMapping("enterpriseDelete")
public String enterpriseDelete(int id) {
enterpriseService.enterpriseDelete(id);
return "redirect:/enterprise/enterpriseManagement";
}
/**
* 通过id查询公司信息
* @param id
* @return
*/
@RequestMapping("enterpriseFindById")
public ModelAndView enterpriseFindById(int id) {
Enterprise enterprise = enterpriseService.enterpriseFindById(id);
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("/enterprise_jsp/enterpriseUpdate");
modelAndView.addObject("enterprise",enterprise);
return modelAndView;
}
/**
* 通过id更新公司信息
* @param enterprise
* @return
*/
@RequestMapping("enterpriseUpdateById")
public String enterpriseUpdateById(Enterprise enterprise) {
enterpriseService.enterpriseUpdateById(enterprise);
return "redirect:/enterprise/enterpriseManagement";
}
/**
* 添加分公司
* @param enterprise
* @return
*/
@RequestMapping("enterpriseAdd")
public String enterpriseAdd(Enterprise enterprise) {
enterpriseService.enterpriseAdd(enterprise);
return "redirect:/enterprise/enterpriseManagement";
}
/**
* 查询所有岗位的信息
* @return
*/
@RequestMapping("/jobManagement")
public ModelAndView jobManagement() {
ModelAndView modelAndView = new ModelAndView();
List<Job> jobList = userService.findJobList();
modelAndView.addObject("jobList", jobList);
modelAndView.setViewName("/enterprise_jsp/position_query");
return modelAndView;
}
/**
* 通过id删除岗位
* @param id
* @return
*/
@RequestMapping("jobDeleteById")
public String jobDeleteById(int id) {
enterpriseService.jobDeleteById(id);
return "redirect:/enterprise/jobManagement";
}
/**
* 通过id查询岗位
* @param id
* @return
*/
@RequestMapping("findJobById")
public ModelAndView findJobById(int id) {
Job job = enterpriseService.findJobById(id);
ModelAndView modelAndView = new ModelAndView();
modelAndView.addObject("job",job);
modelAndView.setViewName("/enterprise_jsp/jobUpdate");
return modelAndView;
}
/**
* 修改岗位信息
* @param job
* @return
*/
@RequestMapping("jobUpdate")
public String jobUpdate(Job job) {
enterpriseService.jobUpdate(job);
return "redirect:/enterprise/jobManagement";
}
/**
* 添加新岗位
* @param job
* @return
*/
@RequestMapping("jobAdd")
public String jobAdd(Job job) {
enterpriseService.jobAdd(job);
return "redirect:/enterprise/jobManagement";
}
/**
* 查询user表
* @return
*/
@RequestMapping("talentQuery")
public ModelAndView talentQuery() {
List<User> userList = enterpriseService.talentQuery();
ModelAndView modelAndView = new ModelAndView();
modelAndView.addObject("userList",userList);
modelAndView.setViewName("/enterprise_jsp/talentQuery");
return modelAndView;
}
/**
* 条件查询
* @param user
* @return
*/
@RequestMapping("/conditionQueryTalent")
public ModelAndView conditionQueryTalent(User user) {
List<User> userList = enterpriseService.conditionQueryTalent(user);
ModelAndView modelAndView = new ModelAndView();
modelAndView.setViewName("/enterprise_jsp/talentQuery");
modelAndView.addObject("userList",userList);
return modelAndView;
}
/**
* 修改密码前的回显现密码
* @return
*/
@RequestMapping("/passwordUpdateBefore")
public ModelAndView passwordUpdateBefore() {
ModelAndView modelAndView = new ModelAndView();
Enterprise enterprise = enterpriseService.passwordUpdateBefore(id);
modelAndView.addObject("oldPassword", enterprise.getPassword());
modelAndView.setViewName("/enterprise_jsp/passwordUpdate");
return modelAndView;
}
/**
* 企业账号密码修改
* @param password
* @return
*/
@RequestMapping("/passwordUpdate")
public String passwordUpdate(String password) {
enterpriseService.passwordUpdate(id, password);
return "redirect:/enterprise/passwordUpdateBefore";
}
}
没有合适的资源?快使用搜索试试~ 我知道了~
温馨提示
人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+mysql 实现人才管理项目 ssm+jsp+my
资源推荐
资源详情
资源评论
收起资源包目录
talent-management-master.zip (61个子文件)
talent-management-master
pom.xml 4KB
src
test
java
test.java 950B
main
resources
jdbc.properties 140B
spring-mvc.xml 2KB
applicationContext.xml 2KB
log4j.properties 648B
sqlMapConfig.xml 477B
com
ycl
mapper
UserMapper.xml 1KB
EnterpriseMapper.xml 628B
ServiceMapper.xml 757B
java
com
ycl
mapper
UserMapper.java 2KB
ServiceMapper.java 1007B
EnterpriseMapper.java 2KB
controller
ServiceController.java 3KB
EnterpriseController.java 6KB
UserController.java 6KB
service
EnterpriseService.java 758B
UserService.java 799B
ServService.java 414B
impl
UserServiceImpl.java 2KB
ServServiceImpl.java 1KB
EnterpriseServiceImpl.java 2KB
domain
Message.java 338B
Job.java 320B
ResumeManagement.java 299B
Enterprise.java 438B
User.java 441B
ServiceStaff.java 266B
interceptor
ServiceLoginInterceptor.java 816B
EnterpriseLoginInterceptor.java 840B
UserLoginInterceptor.java 829B
webapp
user.jsp 1KB
WEB-INF
web.xml 2KB
index.jsp 2KB
enterprise_jsp
jobUpdate.jsp 2KB
passwordUpdate.jsp 934B
enterpriseUpdate.jsp 2KB
enterpriseAdd.jsp 2KB
talentQuery.jsp 2KB
enterpriseManagement.jsp 2KB
position_query.jsp 2KB
jobAdd.jsp 2KB
enterpriseLogin.jsp 1KB
service_jsp
serviceLogin.jsp 1KB
message.jsp 2KB
vipManagement.jsp 2KB
enterprise.jsp 989B
img
1.jpg 465KB
3.jpg 102KB
2.png 280KB
4.jpg 361KB
user_jsp
messageViewAndSubmit.jsp 2KB
passwordUpdate.jsp 903B
resume.jsp 1KB
writeMessage.jsp 898B
user_management.jsp 2KB
position_management.jsp 2KB
position_query.jsp 2KB
resumeUpdate.jsp 2KB
userLogin.jsp 1KB
services.jsp 792B
共 61 条
- 1
资源评论
开发技术控
- 粉丝: 1856
- 资源: 45
上传资源 快速赚钱
- 我的内容管理 展开
- 我的资源 快来上传第一个资源
- 我的收益 登录查看自己的收益
- 我的积分 登录查看自己的积分
- 我的C币 登录后查看C币余额
- 我的收藏
- 我的下载
- 下载帮助
安全验证
文档复制为VIP权益,开通VIP直接复制
信息提交成功