• 大小: 43.85MB
    文件类型: .zip
    金币: 1
    下载: 0 次
    发布日期: 2023-08-04
  • 语言: 数据库
  • 标签: 资源  

资源简介

SSM+MySQL实现简单的人力资源管理系统,主要实现的就是增删改查

资源截图

代码片段和文件信息

package com.stSoft.controller;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.UUID;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import com.google.gson.Gson;
import com.stSoft.entity.Depart;
import com.stSoft.service.DepartService;

@Controller
public class DepartController {

@Autowired
private DepartService deptService;
@RequestMapping(value=“/goDept.do“)
public String goDept() {
return “depart“;

}
@RequestMapping(value=“/getAll.do“)
@ResponseBody
public void getAll(Depart deptHttpServletRequest requestHttpServletResponse response) throws IOException {
response.setCharacterEncoding(“utf-8“);
PrintWriter pw=response.getWriter();
System.err.println(“>>>>>>>>>“+deptService.getAll(dept));
pw.write(new Gson().toJson(deptService.getAll(dept)));

pw.flush();
pw.close();

}
@RequestMapping(value=“/addDept.do“)
@ResponseBody
public void addDept(Depart deptHttpServletRequest requestHttpServletResponse response) throws IOException {
response.setCharacterEncoding(“utf-8“);
PrintWriter pw=response.getWriter();
if(null!=dept) {
dept.setId(“1715“+UUID.randomUUID().toString().substring(03));
deptService.addDept(dept);
pw.write(“ok“);

}else {
pw.write(“fail“);
}

pw.flush();
pw.close();

}
@RequestMapping(value=“/getOneDept.do“)
@ResponseBody
public void getOneDept(Depart deptHttpServletRequest requestHttpServletResponse response) throws IOException {
response.setCharacterEncoding(“utf-8“);
PrintWriter pw=response.getWriter();

System.err.println(“<><><><><>“+deptService.getOneDept(dept.getId()));
Depart depart = deptService.getOneDept(dept.getId());
pw.write(new Gson().toJson(depart));



pw.flush();
pw.close();

}
@RequestMapping(value=“/UpdateDept.do“)
@ResponseBody
public void UpdateDept(Depart deptHttpServletRequest requestHttpServletResponse response) throws IOException {
response.setCharacterEncoding(“utf-8“);
PrintWriter pw=response.getWriter();
if(null!=dept) {
deptService.updateDept(dept);
pw.write(“ok“);
}



pw.flush();
pw.close();

}
@RequestMapping(value=“/deleteDept.do“)
@ResponseBody
public void deleteDept(Depart deptHttpServletRequest requestHttpServletResponse response) throws IOException {
response.setCharacterEncoding(“utf-8“);
PrintWriter pw=response.getWriter();
if(null!=dept) {
deptService.deleteDept(dept.getId());
pw.write(“ok“);
}



pw.flush();
pw.close();

}

@RequestMapping(value=“/selectDeptName.do“)
@ResponseBody
public void selectDeptName(H

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2018-11-05 15:31  daRian\
     文件        6020  2018-10-16 09:17  daRian\.classpath
     文件         906  2018-09-28 11:16  daRian\.project
     目录           0  2018-11-05 15:31  daRian\.settings\
     文件         567  2018-09-28 11:16  daRian\.settings\.jsdtscope
     文件          79  2018-10-17 09:55  daRian\.settings\org.eclipse.core.resources.prefs
     文件         364  2018-09-28 11:15  daRian\.settings\org.eclipse.jdt.core.prefs
     文件         470  2018-09-28 11:16  daRian\.settings\org.eclipse.wst.common.component
     文件         345  2018-09-28 11:16  daRian\.settings\org.eclipse.wst.common.project.facet.core.xml
     文件          49  2018-09-28 11:16  daRian\.settings\org.eclipse.wst.jsdt.ui.superType.container
     文件           6  2018-09-28 11:16  daRian\.settings\org.eclipse.wst.jsdt.ui.superType.name
     目录           0  2018-11-05 15:31  daRian\build\
     目录           0  2018-11-05 15:31  daRian\build\classes\
     文件        2443  2018-09-07 14:20  daRian\build\classes\applicationContext.xml
     目录           0  2018-11-05 15:31  daRian\build\classes\com\
     目录           0  2018-11-05 15:31  daRian\build\classes\com\stSoft\
     目录           0  2018-11-05 15:31  daRian\build\classes\com\stSoft\controller\
     文件        4025  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\DepartController.class
     文件        5396  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\EmpController.class
     文件        1694  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\IndexController.class
     文件        3451  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\LoginController.class
     文件        3869  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\NoticeController.class
     文件        5529  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\PayEmpController.class
     文件        2546  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\RoleController.class
     文件         530  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\ShujuController.class
     文件        4361  2018-10-19 15:25  daRian\build\classes\com\stSoft\controller\UserController.class
     目录           0  2018-11-05 15:31  daRian\build\classes\com\stSoft\dao\
     文件         729  2018-10-19 15:25  daRian\build\classes\com\stSoft\dao\DepartMapper.class
     文件         970  2018-10-19 15:25  daRian\build\classes\com\stSoft\dao\EmpMapper.class
     目录           0  2018-11-05 15:31  daRian\build\classes\com\stSoft\dao\mapping\
     文件        2363  2018-09-18 17:01  daRian\build\classes\com\stSoft\dao\mapping\DepartMapper.xml
............此处省略1651个文件信息

评论

共有 条评论