基于javaweb+jsp的员工绩效考核管理系统(带报告文档)
生活随笔
收集整理的這篇文章主要介紹了
基于javaweb+jsp的员工绩效考核管理系统(带报告文档)
小編覺得挺不錯的,現(xiàn)在分享給大家,幫大家做個參考.
基于javaweb+jsp的員工績效考核管理系統(tǒng)(帶報告文檔)
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax
基礎JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
開發(fā)工具:eclipse/idea/myeclipse/sts等均可配置運行
適用
課程設計,大作業(yè),畢業(yè)設計,項目練習,學習演示等
<result column="id" property="id" /><result column="username" property="username" /><result column="password" property="password" /><result column="real_name" property="realName" /><result column="user_sex" property="userSex" /><result column="user_phone" property="userPhone" /><result column="user_text" property="userText" /><result column="user_type" property="userType" /></resultMap><sql id="Base_Column_List">`id`,`username`,`password`,`real_name`,`user_sex`,`user_phone`,`user_text`,`user_type`</sql><!--新增--><insert id="doCreate" useGeneratedKeys="true" keyColumn="id" keyProperty="id" parameterType="com.demo.vo.User">INSERT INTO `t_user`<trim prefix="(" suffix=")" suffixOverrides=","><if test ='id != null'>`id`,</if><if test ='username != null'>`username`,</if><if test ='password != null'>`password`,</if><if test ='realName != null'>`real_name`,</if><if test ='userSex != null'>`user_sex`,</if><if test ='userPhone != null'>`user_phone`,</if> Serializable id = Util.decode(request, "id");jixiaoService.delete(Arrays.asList(id));this.redirectList(request, response);}/*** 編輯績效** @param response* @param request* @throws IOException*/@RequestMapping("jixiaoEdit")public void edit(HttpServletResponse response, HttpServletRequest request) throws IOException {Jixiao vo = new Jixiao();vo.setId(Long.valueOf(Util.decode(request, "id")));vo.setJixiaoName(Util.decode(request, "jixiaoName"));vo.setJixiaoNo(Util.decode(request, "jixiaoNo"));vo.setJixiaoDate(Util.decode(request, "jixiaoDate"));vo.setJixiaoChidao(Util.decode(request, "jixiaoChidao"));vo.setJixiaoJiaoxiao(Util.decode(request, "jixiaoJiaoxiao"));vo.setJixiaoText(Util.decode(request, "jixiaoText"));jixiaoService.update(vo);this.redirectList(request, response);} ]],});//監(jiān)聽工具條table.on('tool(myTable)', function (obj) { //注:tool 是工具條事件名,myTable 是 table 原始容器的屬性 lay-filter="對應的值"let data = obj.data; //獲得當前行數(shù)據(jù)let layEvent = obj.event; //獲得 lay-event 對應的值(也可以是表頭的 event 參數(shù)對應的值)if (layEvent === 'del') { //刪除// layer.confirm('刪除' + data.jixiaoName + "?", function (index) {$.ajax({type: "GET",dataType: "text",url: "jixiaoDelete?id=" + data.id,success: function () {console.log("已刪除!");}});obj.del(); //刪除對應行(tr)的DOM結構,并更新緩存//parent.location.reload();//刷新父級頁面// layer.close(index);//parent.location.reload();//刷新父級頁面layer.msg(data.jixiaoName + ' 刪除成功!');// });} else if (layEvent === 'edit') { //編輯layer.open({type: 2, for (int i = 0; i < 4; i++) {// 隨機設置當前驗證碼的字符的字體g.setFont(new Font(fontNames[random.nextInt(3)], Font.ITALIC, height));// 隨機獲得當前驗證碼的字符char codeChar = codeChars.charAt(random.nextInt(charsLength));validationCode.append(codeChar);// 隨機設置當前驗證碼字符的顏色g.setColor(getRandomColor(10, 100));// 在圖形上輸出驗證碼字符,x和y都是隨機生成的g.drawString(String.valueOf(codeChar), 16 * i + random.nextInt(7), height - random.nextInt(6));}HttpSession session = request.getSession();session.setMaxInactiveInterval(5 * 60);// 將驗證碼保存在session對象中,key為validation_codesession.setAttribute("validationCode", validationCode.toString());g.dispose();// 關閉Graphics對象OutputStream os = response.getOutputStream();ImageIO.write(image, "JPEG", os);// 以JPEG格式向客戶端發(fā)送圖形驗證碼}@RequestMapping("authResetPassword") vo.setEmpAge(Util.decode(request, "empAge"));vo.setEmpText(Util.decode(request, "empText"));empService.update(vo);this.redirectList(request, response);}/*** 獲取員工的詳細信息(詳情頁面與編輯頁面要顯示該員工的詳情)并跳轉回頁面** @param response* @param request* @throws IOException*/@RequestMapping({"empGet", "empEditPre"})public void get(HttpServletResponse response, HttpServletRequest request) throws IOException {Serializable id = Util.decode(request, "id");//取出主鍵idEmp vo = empService.get(id);request.getSession().setAttribute("vo", vo); title: '備注',},{field: 'userType',title: '類型',templet: vo => vo.userType ? vo.userType : "",},{align: 'center',fixed: 'right',title: '操作',width: 130,templet: vo => {let flag1 = ${loginUser.id} == vo.id;let flag2 = ${loginUser.userType == '管理員'};return ((flag1 || flag2) ? '<a class="layui-btn layui-btn-xs" lay-event="edit">編輯</a>' : '') + ((flag2) ? '<a class="layui-btn layui-btn-danger layui-btn-xs" lay-event="del">刪除</a>' : '');}}]],});//監(jiān)聽工具條table.on('tool(myTable)', function (obj) { //注:tool 是工具條事件名,myTable 是 table 原始容器的屬性 lay-filter="對應的值"let data = obj.data; //獲得當前行數(shù)據(jù)let layEvent = obj.event; //獲得 lay-event 對應的值(也可以是表頭的 event 參數(shù)對應的值)if (layEvent === 'del') { //刪除// layer.confirm('刪除' + data.realName + "?", function (index) { </c:if></div><div class="layui-side layui-bg-black"><div class="layui-side-scroll"><ul class="layui-nav layui-nav-tree" lay-filter="test"><!-- 側邊欄 --><jsp:include page="menu.jsp"><jsp:param value="active" name="Xin_active"/></jsp:include></ul></div></div><div class="layui-body"> }response.sendRedirect("login.jsp");}@RequestMapping("authValidationCode")public void validationCode(HttpServletResponse response, HttpServletRequest request) throws IOException {String codeChars = "0123456789";// 圖形驗證碼的字符集合,系統(tǒng)將隨機從這個字符串中選擇一些字符作為驗證碼// 獲得驗證碼集合的長度int charsLength = codeChars.length();// 下面三條記錄是關閉客戶端瀏覽器的緩沖區(qū)// 這三條語句都可以關閉瀏覽器的緩沖區(qū),但是由于瀏覽器的版本不同,對這三條語句的支持也不同// 因此,為了保險起見,建議同時使用這三條語句來關閉瀏覽器的緩沖區(qū)response.setHeader("ragma", "No-cache");response.setHeader("Cache-Control", "no-cache");response.setDateHeader("Expires", 0);// 設置圖形驗證碼的長和寬(圖形的大小)int width = 90, height = 20; java.util.regex.Matcher m = p.matcher(strName);String after = m.replaceAll("");String temp = after.replaceAll("\\p{P}", "");char[] ch = temp.trim().toCharArray();float chLength = 0;float count = 0;for (int i = 0; i < ch.length; i++) {char c = ch[i];if (!Character.isLetterOrDigit(c)) {if (!isChinese(c)) {count = count + 1;}chLength++;}}return count / chLength > 0.4;}/*** 為防止頁面?zhèn)鬟M來的內容因為編碼不同等原因造成亂碼,這里作統(tǒng)一的轉換** @param parameterName* @return*/public static String decode(javax.servlet.http.HttpServletRequest request, String parameterName) { ]],});//監(jiān)聽工具條table.on('tool(myTable)', function (obj) { //注:tool 是工具條事件名,myTable 是 table 原始容器的屬性 lay-filter="對應的值"let data = obj.data; //獲得當前行數(shù)據(jù)let layEvent = obj.event; //獲得 lay-event 對應的值(也可以是表頭的 event 參數(shù)對應的值)if (layEvent === 'del') { //刪除// layer.confirm('刪除' + data.noticeName + "?", function (index) {$.ajax({type: "GET",dataType: "text",url: "noticeDelete?id=" + data.id,success: function () {console.log("已刪除!");}運行環(huán)境
Java≥6、Tomcat≥7.0、MySQL≥5.5
開發(fā)工具
eclipse/idea/myeclipse/sts等均可配置運行
技術框架
JavaWeb JavaBean JSP MVC MySQL Tomcat JavaScript Layui Ajax
基礎JSP+Servlet或JSP+SSM(Spring、SpringMVC、MyBatis)框架或JSP+SSM+Maven(pom.xml)框架或SpringBoot…均可修改
適用
課程設計,大作業(yè),畢業(yè)設計,項目練習,學習演示等
功能說明
登錄、注冊、退出、用戶模塊、公告模塊、績效模塊、員工模塊、薪酬模塊的增刪改查管理
總結
以上是生活随笔為你收集整理的基于javaweb+jsp的员工绩效考核管理系统(带报告文档)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: 液压伺服控制系统设计
- 下一篇: 思科模拟器5506防火墙配置_企业办公网