基于javaweb+springboot的校园人力人事资源管理系统(java+Springboot+ssm+mysql+jsp+maven)
校园人力资源管理系统:学校部门管理,教室管理,学历信息管理,职务,教师职称,奖励,学历,社会关系,工作经历,培训管理,公告等信息功能等等。
适用
课程设计,大作业,毕业设计,项目练习,学习演示等
@GetMapping("/loginYesOrNo")
@ResponseBody
public Result loginYesOrNo(){
employeeServiceImpl.getEmployeeLoginInfo();
return new Result(0,"已登录",null);
}
@GetMapping("/getEmployeeByEmployeeNumber")
@ResponseBody
public Result getEmployeeByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber)throws ParseException {
Employee employee = new Employee();
community.setAge(age);
community.setPolitical(political);
community.setNation(nation);
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
return communityService.addCommunity(community);
}
@GetMapping("/getAllCommunitys")
public ModelAndView getAllCommunitys(){
communityService.getAllCommunitys();
// System.out.println("就是Community:"+request.getSession().getAttribute("communityPage"));
return new ModelAndView("community");
}
@PostMapping("/deleteCommunity")
public Result deleteCommunity(@RequestParam("ids") String ids){
return communityService.deleteCommunity(ids);
}
@PostMapping("/modifyCommunity")
public Result modifyCommunity(@RequestParam("relation") String relation,
}
@GetMapping("/getEmployeeByEmployeeNumber")
@ResponseBody
public Result getEmployeeByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber)throws ParseException {
Employee employee = new Employee();
employee.setEmployeeNumber(employeeNumber);
return employeeService.getEmployeeByEmployeeNumber(employee);
}
@PostMapping("/getEmployeeByName")
@ResponseBody
public Result getEmployeeByName(Employee employee)throws ParseException{
return employeeService.getEmployeeByName(employee.getEmployeeName());
}
@GetMapping("/getPersonByEmployeeNumber")
@ResponseBody
public ModelAndView getPersonByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber){
Employee employee = new Employee();
employee.setEmployeeNumber(employeeNumber);
employeeServiceImpl.getPersonByEmployeeNumber(employee);
return new ModelAndView("employeeInfo");
}
}
社区管理控制层:
@RequestMapping("/Community")
@RestController
public class CommunityController {
@Autowired
ICommunityService communityService;
@Autowired
private HttpServletRequest request;
@PostMapping("/addCommunity")
public Result addCommunity(@RequestParam("relation") String relation,
@RequestParam("name") String name,
}
@PostMapping("/getEmployeeNumberByEmployeeName")
public Result getEmployeeNumberByEmployeeName(@RequestParam("employeeName") String employeeName)throws ParseException{
return communityService.getEmployeeNumberByEmployeeName(employeeName);
}
部门控制层:
@RequestMapping("/Department")
@RestController
public class DepartmentController {
@Autowired
IDepartmentService departmentService;
@RequestParam("departmentTel") String departmentTel, @RequestParam("departmentFax") String departmentFax,
@RequestParam("id") long id)throws ParseException{
Department department = new Department();
department.setDepartmentName(departmentName);
department.setDepartmentNumber(departmentNumber);
department.setDepartmentAddress(departmentAddress);
department.setDepartmentHead(departmentHead);
department.setDepartmentTel(departmentTel);
department.setDepartmentFax(departmentFax);
department.setId(id);
// System.out.println("department修改: "+ department);
return departmentService.modifyDepartment(department);
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
departmentService.getPageDatas(currentPage);
// System.out.println("currentPage: "+currentPage);
return new ModelAndView("department");
}
}
@PostMapping("/uploadMyImage")
@ResponseBody
public Result upLoadMyImage(){
return employeeService.upLoadMyImage();
}
@GetMapping("/clearLogin")
@ResponseBody
public Result clearLogin(){
return employeeServiceImpl.clearLogin();
}
@PostMapping("/modifyPwd")
@ResponseBody
public Result modifyPwd(@RequestParam("oldPwd") String oldPwd,@RequestParam("newPwd") String newPwd){
return employeeService.modifyPwd(oldPwd,newPwd);
}
@RequestParam("political") String political,
@RequestParam("nation") String nation,
@RequestParam("work") String work,
@RequestParam("post") String post,
@RequestParam("phenomenon") String phenomenon,
@RequestParam("employeeNumber")String employeeNumber)throws ParseException {
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Community community = new Community();
community.setRelation(relation);
community.setName(name);
community.setAge(age);
community.setPolitical(political);
community.setNation(nation);
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
return communityService.addCommunity(community);
}
@GetMapping("/getAllCommunitys")
public ModelAndView getAllCommunitys(){
communityService.getAllCommunitys();
// System.out.println("就是Community:"+request.getSession().getAttribute("communityPage"));
employeeServiceImpl.getEmployeeLoginInfo();
return new Result(0,"已登录",null);
}
@GetMapping("/getEmployeeByEmployeeNumber")
@ResponseBody
public Result getEmployeeByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber)throws ParseException {
Employee employee = new Employee();
employee.setEmployeeNumber(employeeNumber);
return employeeService.getEmployeeByEmployeeNumber(employee);
}
@PostMapping("/getEmployeeByName")
@ResponseBody
public Result getEmployeeByName(Employee employee)throws ParseException{
return employeeService.getEmployeeByName(employee.getEmployeeName());
}
@GetMapping("/getPersonByEmployeeNumber")
@ResponseBody
public ModelAndView getPersonByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber){
Employee employee = new Employee();
employee.setEmployeeNumber(employeeNumber);
employeeServiceImpl.getPersonByEmployeeNumber(employee);
return new ModelAndView("employeeInfo");
}
}
@PostMapping("/login")
public ModelAndView login(Employee employee, HttpServletRequest request){
Result result = employeeService.login(employee);
if (result.getCode()==0){
return new ModelAndView("redirect:/page/index");
}
request.setAttribute("pageMsg",result.getMsg());
return new ModelAndView("forward:/page/login");
}
@PostMapping("/del_employees")
@ResponseBody
public ModelAndView deleteEmployees(@RequestParam("ids") String ids){
employeeService.deleteEmployees(ids);
return new ModelAndView("employeeInfo");
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
community.setId(id);
return communityService.modifyCommunity(community);
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
communityService.getPageDatas(currentPage);
// System.out.println("currentPage: "+currentPage);
return new ModelAndView("community");
}
@GetMapping("/getCommunityById")
public Result getCommunityById(@RequestParam("id") long id){
return communityService.getCommunityById(id);
}
@GetMapping("/getCommunityByEmployeeNumber")
public ModelAndView getCommunityByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber)throws ParseException{
communityService.getCommunityByEmployeeNumber(employeeNumber);
return new ModelAndView("community");
}
@PostMapping("/getEmployeeNumberByEmployeeName")
@GetMapping("/getDepartmentByDepartmentNumber")
public ModelAndView getDepartmentByDepartmentNumber(@RequestParam("departmentNumber") String departmentNumber)throws ParseException{
departmentService.getDepartmentByDepartmentNumber(departmentNumber);
return new ModelAndView("department");
}
@PostMapping("/getDepartmentNumberByDepartmentName")
public Result getDepartmentNumberByDepartmentName(@RequestParam("departmentName") String departmentName)throws ParseException{
return departmentService.getDepartmentNumberByDepartmentName(departmentName);
}
}
员工管理控制层:
@Controller
@RequestMapping("/employee")
public class EmployeeController {
@Autowired
private IEmployeeService employeeService;
@Autowired
private EmployeeServiceImpl employeeServiceImpl;
@PostMapping("/login")
public ModelAndView login(Employee employee, HttpServletRequest request){
Result result = employeeService.login(employee);
}
@PostMapping("/del_employees")
@ResponseBody
public ModelAndView deleteEmployees(@RequestParam("ids") String ids){
employeeService.deleteEmployees(ids);
return new ModelAndView("employeeInfo");
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
employeeService.getPageDatas(currentPage);
return new ModelAndView("employeeInfo");
}
@PostMapping("/addEmployee")
@ResponseBody
public Result addEmployee(Employee employee){
return employeeService.addEmployee(employee);
}
@GetMapping("/getUpdateEmployeeInfo")
public ModelAndView getUpdateEmployeeInfo(){
employeeServiceImpl.updateAllEmployeeToSession();
@RequestParam("employeeNumber") String employeeNumber,
@RequestParam("id") long id)throws ParseException{
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Community community = new Community();
community.setRelation(relation);
community.setName(name);
community.setAge(age);
community.setPolitical(political);
community.setNation(nation);
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
community.setId(id);
return communityService.modifyCommunity(community);
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
return communityService.addCommunity(community);
}
@GetMapping("/getAllCommunitys")
public ModelAndView getAllCommunitys(){
communityService.getAllCommunitys();
// System.out.println("就是Community:"+request.getSession().getAttribute("communityPage"));
return new ModelAndView("community");
}
@PostMapping("/deleteCommunity")
public Result deleteCommunity(@RequestParam("ids") String ids){
return communityService.deleteCommunity(ids);
}
@PostMapping("/modifyCommunity")
public Result modifyCommunity(@RequestParam("relation") String relation,
@RequestParam("name") String name,
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
return communityService.addCommunity(community);
}
@GetMapping("/getAllCommunitys")
public ModelAndView getAllCommunitys(){
communityService.getAllCommunitys();
// System.out.println("就是Community:"+request.getSession().getAttribute("communityPage"));
return new ModelAndView("community");
}
@PostMapping("/deleteCommunity")
public Result deleteCommunity(@RequestParam("ids") String ids){
return communityService.deleteCommunity(ids);
}
@PostMapping("/modifyCommunity")
public Result modifyCommunity(@RequestParam("relation") String relation,
@RequestParam("name") String name,
@RequestParam("age") String age,
@RequestParam("political") String political,
@ResponseBody
public Result getEmployeeByName(Employee employee)throws ParseException{
return employeeService.getEmployeeByName(employee.getEmployeeName());
}
@GetMapping("/getPersonByEmployeeNumber")
@ResponseBody
public ModelAndView getPersonByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber){
Employee employee = new Employee();
employee.setEmployeeNumber(employeeNumber);
employeeServiceImpl.getPersonByEmployeeNumber(employee);
return new ModelAndView("employeeInfo");
}
}
社区管理控制层:
@RequestMapping("/Community")
@RestController
public class CommunityController {
@Autowired
public Result addEmployee(Employee employee){
return employeeService.addEmployee(employee);
}
@GetMapping("/getUpdateEmployeeInfo")
public ModelAndView getUpdateEmployeeInfo(){
employeeServiceImpl.updateAllEmployeeToSession();
return new ModelAndView("employeeInfo");
}
@GetMapping("/getMyAccount")
public ModelAndView getMyAccount(){
return new ModelAndView("myAccount");
}
@Autowired
IDepartmentService departmentService;
@Autowired
private HttpServletRequest request;
@PostMapping("/addDepartment")
public Result addDepartment(@RequestParam("departmentNumber") String departmentNumber, @RequestParam("departmentName") String departmentName,
@RequestParam("departmentHead") String departmentHead, @RequestParam("departmentAddress") String departmentAddress,
@RequestParam("departmentTel") String departmentTel, @RequestParam("departmentFax") String departmentFax)throws ParseException {
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Department department = new Department();
department.setDepartmentName(departmentName);
department.setDepartmentNumber(departmentNumber);
@ResponseBody
public Result addEmployee(Employee employee){
return employeeService.addEmployee(employee);
}
@GetMapping("/getUpdateEmployeeInfo")
public ModelAndView getUpdateEmployeeInfo(){
employeeServiceImpl.updateAllEmployeeToSession();
return new ModelAndView("employeeInfo");
}
@GetMapping("/getMyAccount")
public ModelAndView getMyAccount(){
return new ModelAndView("myAccount");
}
@GetMapping("/getEmployee")
@ResponseBody
employeeService.deleteEmployees(ids);
return new ModelAndView("employeeInfo");
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
employeeService.getPageDatas(currentPage);
return new ModelAndView("employeeInfo");
}
@PostMapping("/addEmployee")
@ResponseBody
public Result addEmployee(Employee employee){
return employeeService.addEmployee(employee);
}
public ModelAndView getMyAccount(){
return new ModelAndView("myAccount");
}
@GetMapping("/getEmployee")
@ResponseBody
public Result getEmployee(@RequestParam("id") long id){
Employee employee = new Employee();
employee.setId(id);
return employeeService.getEmployee(employee);
}
@PostMapping("/updateEmployeeById")
@ResponseBody
public Result updateEmployeeById(Employee employee){
@RequestParam("phenomenon") String phenomenon,
@RequestParam("employeeNumber") String employeeNumber,
@RequestParam("id") long id)throws ParseException{
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Community community = new Community();
community.setRelation(relation);
community.setName(name);
community.setAge(age);
community.setPolitical(political);
community.setNation(nation);
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
community.setId(id);
return communityService.modifyCommunity(community);
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
communityService.getPageDatas(currentPage);
// System.out.println("currentPage: "+currentPage);
return new ModelAndView("community");
}
@GetMapping("/getCommunityById")
@RequestParam("id") long id)throws ParseException{
SimpleDateFormat formatter=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss");
Community community = new Community();
community.setRelation(relation);
community.setName(name);
community.setAge(age);
community.setPolitical(political);
community.setNation(nation);
community.setWork(work);
community.setPost(post);
community.setPhenomenon(phenomenon);
community.setEmployeeNumber(employeeNumber);
community.setId(id);
return communityService.modifyCommunity(community);
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
communityService.getPageDatas(currentPage);
// System.out.println("currentPage: "+currentPage);
return new ModelAndView("community");
}
@ResponseBody
public ModelAndView deleteEmployees(@RequestParam("ids") String ids){
employeeService.deleteEmployees(ids);
return new ModelAndView("employeeInfo");
}
@GetMapping("/getPage")
public ModelAndView getPage(@RequestParam("currentPage") Integer currentPage){
employeeService.getPageDatas(currentPage);
return new ModelAndView("employeeInfo");
}
@PostMapping("/addEmployee")
@ResponseBody
public Result addEmployee(Employee employee){
return employeeService.addEmployee(employee);
}
@GetMapping("/getUpdateEmployeeInfo")
public ModelAndView getUpdateEmployeeInfo(){
employeeServiceImpl.updateAllEmployeeToSession();
return new ModelAndView("employeeInfo");
}
@GetMapping("/getMyAccount")
public ModelAndView getMyAccount(){
return employeeService.modifyPwd(oldPwd,newPwd);
}
@GetMapping("/loginYesOrNo")
@ResponseBody
public Result loginYesOrNo(){
employeeServiceImpl.getEmployeeLoginInfo();
return new Result(0,"已登录",null);
}
@GetMapping("/getEmployeeByEmployeeNumber")
@ResponseBody
public Result getEmployeeByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber)throws ParseException {
Employee employee = new Employee();
employee.setEmployeeNumber(employeeNumber);
return employeeService.getEmployeeByEmployeeNumber(employee);
}
@PostMapping("/getEmployeeByName")
@ResponseBody
public Result getEmployeeByName(Employee employee)throws ParseException{
return employeeService.getEmployeeByName(employee.getEmployeeName());
}
@GetMapping("/getPersonByEmployeeNumber")
@ResponseBody
public ModelAndView getPersonByEmployeeNumber(@RequestParam("employeeNumber") String employeeNumber){