⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 orgservlet.java

📁 本书主要介绍了从基础开始建立Portal的快速应用开发过程(RAD)的方法。通过本书你可以了解到关于Oracle 9iAS Portal产品的主要特性、入口的开发和组织、网络开发和管理、实际的关系型数
💻 JAVA
📖 第 1 页 / 共 2 页
字号:
				String zzmm = ds.toGBK(request.getParameter("txt_zzmm"));
				String xli = ds.toGBK(request.getParameter("txt_xl"));
				String zhich = ds.toGBK(request.getParameter("txt_zc"));
				String bgphone = ds.toGBK(request.getParameter("txt_bgdh"));
				String fjphone = ds.toGBK(request.getParameter("txt_fjdh"));
				String jtphone = ds.toGBK(request.getParameter("txt_jtdh"));
				String mobile = ds.toGBK(request.getParameter("txt_mobile"));
				String address = ds.toGBK(request.getParameter("txt_address"));
				String code = ds.toGBK(request.getParameter("txt_yzbm"));
				String qqNo = ds.toGBK(request.getParameter("txt_qq"));
				String email = ds.toGBK(request.getParameter("txt_email"));
				String username = ds.toGBK(request.getParameter("txt_username")).toLowerCase();
				String regdate = ds.toGBK(request.getParameter("txt_regdate"));
				String grjj = ds.toGBK(request.getParameter("txt_grjj"));
				String confPara = ds.toString(request.getParameter("txt_confpara"));

				String znyh = ds.toString(request.getParameter("txt_znyh"));


				if(confPara == null) confPara = "";

				Hashtable ht = new Hashtable();
				ht.put("BMBH",bmNo);
				ht.put("ZGBH",zgNo);
				ht.put("XM",zgName);
				ht.put("GH",zgGH);
				ht.put("PZCS",confPara);
				ht.put("MMWT",pswQuestion);
				ht.put("MMDA",pswKey);
				ht.put("MM",psWord);
				ht.put("XB",Sex);
				ht.put("CSNY",birthDay);
				ht.put("MZ",mz);
				ht.put("ZZMM",zzmm);
				ht.put("XL",xli);
				ht.put("ZC",zhich);
				ht.put("QQ",qqNo);
				ht.put("BGDH",bgphone);
				ht.put("FJDH",fjphone);
				ht.put("YZBM",code);
				ht.put("JTDZ",address);
				ht.put("JTDH",jtphone);
				ht.put("YDDH",mobile);
				ht.put("EMAIL",email);
				ht.put("ZZZT",zzZt);
				ht.put("YHM",username);
				ht.put("ZCRQ",regdate);
				ht.put("GRJJ",grjj);
				ht.put("ZNYH",znyh);
				//System.out.println(ht);

				errcode = psbean.addPerson(ht);
				//给新增人员分配一般员工的职务
				String zwNo = "";dutybn.getOrdinaryZWBH(bmNo,"一般员工");
				if(zwNo.equals("")){
					Hashtable dutyhash = new Hashtable();
					dutyhash.put("BMBH",bmNo);
					dutyhash.put("ZWMC","一般员工");
					dutyhash.put("CZQX","");
					dutyhash.put("LCQX","");
					dutyhash.put("PZCS","");
					dutyhash.put("JBXH","");
					dutyhash.put("ZWZT","0");
					dutybn.addDuty(dutyhash);
					zwNo = dutybn.getOrdinaryZWBH(bmNo,"一般员工");
				}
				//psdbn.addRec(zgNo,bmNo,zwNo,"","");
				response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_edit="+strEdit+"&txt_page=2&txt_personno="+zgNo+"&txt_orgno="+strOrgNO+"&errcode="+errcode);
			}

			//修改人员信息
			if(strType!=null && strType.equals("3") && strEdit.equals("2"))
			{
				strOrgNO=ds.toString((String)request.getParameter("txt_bmno"));
				psbean.setOrgNO(strOrgNO);
				psbean.setPersonNO(strPersonNO);
				String zzZt = ds.toGBK(request.getParameter("txt_zzzt"));
				if(zzZt.equals("正常"))zzZt = "0";
				if(zzZt.equals("离职"))zzZt = "1";
				if(zzZt.equals("退休"))zzZt = "2";
				if(zzZt.equals("挂起"))zzZt = "3";
				String zgName = ds.toGBK(request.getParameter("txt_xm"));
				String zgGH = ds.toGBK(request.getParameter("txt_gh"));
				String psWord = ds.toGBK(request.getParameter("password_check"));
				String pswQuestion = ds.toGBK(request.getParameter("txt_mmwt"));
				String pswKey = ds.toGBK(request.getParameter("txt_mmda"));
				String Sex = ds.toGBK(request.getParameter("txt_xb"));
				String birthDay = ds.toGBK(request.getParameter("txt_csny"));
				String mz = ds.toGBK(request.getParameter("txt_mz"));
				String zzmm = ds.toGBK(request.getParameter("txt_zzmm"));
				String xli = ds.toGBK(request.getParameter("txt_xl"));
				String zhich = ds.toGBK(request.getParameter("txt_zc"));
				String bgphone = ds.toGBK(request.getParameter("txt_bgdh"));
				String fjphone = ds.toGBK(request.getParameter("txt_fjdh"));
				String jtphone = ds.toGBK(request.getParameter("txt_jtdh"));
				String mobile = ds.toGBK(request.getParameter("txt_mobile"));
				String address = ds.toGBK(request.getParameter("txt_address"));
				String code = ds.toGBK(request.getParameter("txt_yzbm"));
				String qqNo = ds.toGBK(request.getParameter("txt_qq"));
				String email = ds.toGBK(request.getParameter("txt_email"));
				String username = ds.toGBK(request.getParameter("txt_username")).toLowerCase();
				String regdate = ds.toGBK(request.getParameter("txt_regdate"));
				String grjj = ds.toGBK(request.getParameter("txt_grjj"));
				String jbxh = ds.toGBK(request.getParameter("txt_jbxh"));
				String znyh = ds.toGBK(request.getParameter("txt_znyh"));

				String confPara = ds.toGBK(request.getParameter("txt_confpara"));

				if(confPara == null) confPara = "";

				Hashtable ht = new Hashtable();
				ht.put("XM",zgName);
				ht.put("GH",zgGH);
				ht.put("PZCS",confPara);
				ht.put("MMWT",pswQuestion);
				ht.put("MMDA",pswKey);
				ht.put("MM",psWord);
				ht.put("XB",Sex);
				ht.put("CSNY",birthDay);
				ht.put("MZ",mz);
				ht.put("ZZMM",zzmm);
				ht.put("XL",xli);
				ht.put("ZC",zhich);
				ht.put("QQ",qqNo);
				ht.put("BGDH",bgphone);
				ht.put("FJDH",fjphone);
				ht.put("YZBM",code);
				ht.put("JTDZ",address);
				ht.put("JTDH",jtphone);
				ht.put("YDDH",mobile);
				ht.put("EMAIL",email);
				ht.put("ZZZT",zzZt);
				ht.put("YHM",username);
				ht.put("ZCRQ",regdate);
				ht.put("GRJJ",grjj);
				ht.put("JBXH",jbxh);
				ht.put("ZNYH",znyh);
				//System.out.println(ht);
				errcode = psbean.modPerson(ht);


				if(strPage.equals("2")||strPage.equals("4")||strPage.equals("5")) response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_edit=1&txt_page="+strPage+"&txt_personno="+strPersonNO+"&txt_orgno="+strOrgNO+"&errcode="+errcode);

				else	response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_page="+strPage+"&txt_personno="+strPersonNO+"&txt_orgno="+strOrgNO+"&errcode="+errcode);
			}

//登陆者修改个人的基本信息
			if(strType!=null && strType.equals("3") && strEdit.equals("6"))
			{
				strOrgNO=ds.toString((String)request.getParameter("txt_bmno"));
				psbean.setOrgNO(strOrgNO);
				psbean.setPersonNO(strPersonNO);

				String oldPsw = ds.toGBK(request.getParameter("old_psw"));
				boolean bool = psbean.verifyPwd(oldPsw);
				if(!bool)
				{
					errcode = 7;
					response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_edit=6&txt_personno="+strPersonNO+"&txt_orgno="+strOrgNO+"&errcode="+errcode);
				}
				else{
					String newPSWord = ds.toGBK(request.getParameter("password_check"));
					String surePSWord = ds.toGBK(request.getParameter("pass_checkagain"));
					String pswQuestion = ds.toGBK(request.getParameter("txt_mmwt"));
					String pswKey = ds.toGBK(request.getParameter("txt_mmda"));
					String Sex = ds.toGBK(request.getParameter("txt_xb"));
					String birthDay = ds.toGBK(request.getParameter("txt_csny"));
					String mz = ds.toGBK(request.getParameter("txt_mz"));
					String zzmm = ds.toGBK(request.getParameter("txt_zzmm"));
					String xli = ds.toGBK(request.getParameter("txt_xl"));
					String zhich = ds.toGBK(request.getParameter("txt_zc"));
					String bgphone = ds.toGBK(request.getParameter("txt_bgdh"));
					String fjphone = ds.toGBK(request.getParameter("txt_fjdh"));
					String jtphone = ds.toGBK(request.getParameter("txt_jtdh"));
					String mobile = ds.toGBK(request.getParameter("txt_mobile"));
					String address = ds.toGBK(request.getParameter("txt_address"));
					String code = ds.toGBK(request.getParameter("txt_yzbm"));
					String qqNo = ds.toGBK(request.getParameter("txt_qq"));
					String email = ds.toGBK(request.getParameter("txt_email"));
					String username = ds.toGBK(request.getParameter("txt_username")).toLowerCase();
					String photo = ds.toGBK(request.getParameter("txt_pic"));
					String znyh = ds.toGBK(request.getParameter("txt_znyh"));
					if(photo==null || photo.equals(""))photo="0";
					String grjj = ds.toGBK(request.getParameter("txt_grjj"));

					Hashtable ht = new Hashtable();
					if(newPSWord==null || newPSWord.equals(""))
						ht.put("MM",oldPsw);
					else
						ht.put("MM",newPSWord);
					ht.put("MMWT",pswQuestion);
					ht.put("MMDA",pswKey);
					ht.put("XB",Sex);
					ht.put("CSNY",birthDay);
					ht.put("MZ",mz);
					ht.put("ZZMM",zzmm);
					ht.put("XL",xli);
					ht.put("ZC",zhich);
					ht.put("BGDH",bgphone);
					ht.put("FJDH",fjphone);
					ht.put("JTDH",jtphone);
					ht.put("YDDH",mobile);
					ht.put("JTDZ",address);
					ht.put("YZBM",code);
					ht.put("QQ",qqNo);
					ht.put("EMAIL",email);
					ht.put("YHM",username);
					ht.put("PHOTO",photo);
					ht.put("GRJJ",grjj);
					ht.put("ZNYH","0");
					errcode = psbean.modBasisPsInf(ht);

					//System.out.println(ht);

					//返回到查看某人基本信息的界面
					String go = "oa/organization/index.jsp?txt_type=3&txt_edit=3&txt_personno="+strPersonNO+"&txt_orgno="+strOrgNO+"&errcode="+errcode;
					//System.out.println(go);
					response.sendRedirect(go);
				}
			}












//登陆者修改个人的密码信息
			if(strType!=null && strType.equals("3") && strEdit.equals("7"))
			{
				psbean.setPersonNO(strPersonNO);
				String oldPsw = ds.toGBK(request.getParameter("old_psw"));
				boolean bool = psbean.verifyPwd(oldPsw);
				if(!bool)
				{
					errcode = 7;
					response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_edit=7&txt_personno="+strPersonNO+"&txt_orgno="+strOrgNO+"&errcode="+errcode);
				}
				else{
					String newPSWord = ds.toGBK(request.getParameter("password_check"));
					String surePSWord = ds.toGBK(request.getParameter("pass_checkagain"));
					String pswQuestion = ds.toGBK(request.getParameter("txt_mmwt"));
					String pswKey = ds.toGBK(request.getParameter("txt_mmda"));
					Hashtable ht = new Hashtable();
					ht.put("MM",newPSWord);
					ht.put("MMWT",pswQuestion);
					ht.put("MMDA",pswKey);
					errcode = psbean.modPswInf(ht);
					//返回到查看某人基本信息的界面
					String go = "oa/organization/index.jsp?txt_type=3&txt_edit=3&txt_personno="+strPersonNO+"&txt_orgno="+strOrgNO+"&errcode="+errcode;
					response.sendRedirect(go);
				}
			}

//删除人员信息
			if(strType!=null && strType.equals("3") && strEdit.equals("3"))
			{
				psbean.setPersonNO(strPersonNO);
				errcode = psbean.delPerson();  //ZZ_ZGB,ZZ_BMB,ZZ_ZGZWB
				//返回到查看某部门人员列表的界面
				response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_orgno="+strOrgNO);
			}
//从数据库中永久删除离退休等人员信息
			if(strType!=null && strType.equals("3") && strEdit.equals("4"))
			{
				psbean.setPersonNO(strPersonNO);
				psbean.delDBPs();
				//返回到查看某部门人员列表的界面
				response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_edit=5&txt_orgno="+strOrgNO);
			}
//从数据库中恢复离退休等人员信息
			if(strType!=null && strType.equals("3") && strEdit.equals("5"))
			{
				psbean.setPersonNO(strPersonNO);
				psbean.resumePs();
				//返回到查看某部门人员列表的界面
				response.sendRedirect("oa/organization/index.jsp?txt_type=3&txt_edit=5&txt_orgno="+strOrgNO);
			}
		}catch (Exception e){System.out.println("OrgServlet处理时出错;错误为:"+e);}
		finally{
			if(dbean != null)	dbean.closeConn();
			if(dutybn != null)	dutybn.closeConn();
			if(psbean != null)	psbean.closeConn();
			if(psdbn != null)	psdbn.closeConn();
			if(dabean != null)	dabean.closeConn();
			if(mnbean != null)	mnbean.closeConn();
		}
	}


	public void doPost(HttpServletRequest request ,HttpServletResponse response)throws IOException, ServletException
	{
		doGet(request,response);
	}
}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -