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

📄 personbean.java

📁 本书主要介绍了从基础开始建立Portal的快速应用开发过程(RAD)的方法。通过本书你可以了解到关于Oracle 9iAS Portal产品的主要特性、入口的开发和组织、网络开发和管理、实际的关系型数
💻 JAVA
📖 第 1 页 / 共 5 页
字号:
		return strFlow;
	}
	public String getConf()
	{
		String strConf = "";
		String sql = "";
		String str1 = "<br>";
		String str2 = "@";
		String strBMBH = "";
		String strZWBH = "";
		String strMax = "";
		int i,j,num=0;
		String []xm = new String[10];
		String []unit = new String[10];

		sql = "select PZBH,PZMC,PZSZ,PZSM from CODE_XTPZ order by PZBH ";
		ResultSet rs = selectRecord(sql);
		Statement stmt = null;
		try{
		while(rs.next())
		{
			xm[num] = ds.toString(rs.getString("PZMC"));
			unit[num] = ds.toString(rs.getString("PZSM"));
			num++;
		}

		sql = "select PZCS from ZZ_ZGB where ZGBH = '"+strPersonNO+"'";
		stmt = rs.getStatement(); rs.close(); stmt.close();
		rs = selectRecord(sql);
		if(rs.next())
		{
			strConf = ds.toString(rs.getString("PZCS"));
			if (!strConf.equals(""))
			{
				String sglemt[] = strConf.split(",");
				
				for(i=0;i<sglemt.length;i++)
				{
					if(!strMax.equals(""))
						strMax+=str1+xm[i]+sglemt[i]+unit[i];
					if(strMax.equals(""))
						strMax = xm[i]+sglemt[i]+unit[i];
				}

				strConf = strMax;
				return strConf;			
			}

			if (strConf.equals(""))
			{
				sql = "select BMBH,ZWBH from ZZ_ZGZWB where ZGBH = '"+strPersonNO+"'";
				ResultSet res = selectRecord(sql);
				try{
				while(res.next())
				{
					strBMBH = ds.toString(res.getString("BMBH"));
					strZWBH = ds.toString(res.getString("ZWBH"));
					sql = "select PZCS from ZZ_ZWB where BMBH = '"+strBMBH+"' and ZWBH = '"+strZWBH+"'";
					ResultSet rest = selectRecord(sql);
					try{
					if(rest.next())
					{
						String strX = ds.toString(rest.getString("PZCS"));
						if (!strX.equals(""))
						{						
							strMax+=strX+str2;
						}
					}
					}catch(Exception e){System.out.println("运行时出错:"+e);}
					finally{
						if(rest!=null)try{ stmt = rest.getStatement(); rest.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
						if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
					}
				}
				}catch(Exception e){System.out.println("运行时出错:"+e);}
				finally{
					if(res!=null)try{ stmt = res.getStatement(); res.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
					if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
				}				
				if(strMax.equals(""))
				{
					sql = "select PZBH,PZSZ from CODE_XTPZ order by PZBH ";
					ResultSet r = selectRecord(sql);
					try{
					while(r.next())
					{
						strConf+=ds.toString(r.getString("PZSZ"))+str1;
					}
					}catch(Exception e){System.out.println("运行时出错:"+e);}
					finally{
						if(r!=null)try{ stmt = r.getStatement(); r.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
						if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
					}
					strConf = strConf.substring(0,strConf.length()-1);
					String sglelement[] = strConf.split(",");
					
					for(i=0;i<sglelement.length;i++)
					{
						if(!strMax.equals(""))
							strMax+=str1+xm[i]+sglelement[i]+unit[i];
						if(strMax.equals(""))
							strMax = xm[i]+sglelement[i]+unit[i];
					}

					strConf = strMax;
					return strConf;		
				}
				strMax = strMax.substring(0,strMax.length()-1);

				String strMaxConf[] = strMax.split("@");
				strMax = "";

				for (int k=0;k<num;k++ )
				{
					int singleMax=0;
					for(i=0;i<strMaxConf.length;i++)
					{
						String strEp[] = strMaxConf[i].split(",");
						
						if(singleMax<Integer.parseInt(strEp[k]))
							singleMax = Integer.parseInt(strEp[k]);
					}
					if(!strMax.equals(""))
						strMax+=str1+xm[k]+String.valueOf(singleMax)+unit[k];
					if(strMax.equals(""))
						strMax = xm[k]+String.valueOf(singleMax)+unit[k];
				}
				strConf = strMax;
			}
		}
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return strConf;
	}

	public String toOperNo(String strOper)
	{
		String strOperNo = "";
		String str = ",";

		if(strOper.equals(""))
		{
			return strOperNo;
		}
		String strOpers[] = strOper.split(",");
		for(int i=0;i<strOpers.length;i++)
		{	
			strOperNo+= db.toID("CODE_CZQXB","MKMC","MKBH",strOpers[i])+str;
		}
		strOperNo = strOperNo.substring(0,strOperNo.length()-1);	
		
		return strOperNo;
	}
	public String toFlowNo(String strFlow)
	{
		String strFlowNo = "";
		String str = ",";

		if(strFlow.equals(""))//默认流程权限
		{
			return strFlowNo;
		}
		String strFlows[] = strFlow.split(",");
		for(int i=0;i<strFlows.length;i++)
		{
			if(!strFlows[i].equals(""))
			strFlowNo+= db.toID("CODE_LCQXB","MKMC","MKBH",strFlows[i])+str;
		}
		if(!strFlowNo.equals(""))
		 strFlowNo = strFlowNo.substring(0,strFlowNo.length()-1);		
		return strFlowNo;
	}
	public String getCZQXID(String mkmc,String anmc){
		String sql="select id from code_anczqxb where mkmc='"+mkmc+"' and anmc='"+anmc+"'";
		ResultSet rs=selectRecord(sql);
		Statement stmt = null;
		String CZQXID="0";
		try{
			if(rs.next()){
				CZQXID=rs.getString("id");
			}
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return CZQXID;
	}
	public Vector getOnePage(String sql,int page,int records)
	{
		return db.getOnePage(sql,page,records);
	}
	public boolean verifyPwd(String pwd)
	{
		String sql = "";
		sql = "select MM from ZZ_ZGB where ZGBH = '"+strPersonNO+"'";
		ResultSet rs =selectRecord(sql);
		Statement stmt = null;
		try{
			if(rs.next())
			{
				String strPassword = ds.toString(rs.getString("MM"));
				pwd = (new MD5()).toMD5(pwd);
				if(strPassword.equals(pwd))
				{
					return true;
				}
			}
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return false;
	}
	public String getOrgName(String strOrgNo)
	{
		return toName("ZZ_BMB","BMBH","BMMC",strOrgNo);
	}

	public String getBMBH()
	{
		String sql = "";
		String name = "";
		sql = " select BMBH from ZZ_ZGB where ZGBH = '"+strPersonNO+"'";
		ResultSet rs = selectRecord(sql);
		Statement stmt = null;
		try{
		if(rs.next())
				name = ds.toString(rs.getString("BMBH"));
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return name;
	}

	public String getZGMC()
	{
		String sql = "";
		String name = "";
		sql = " select XM from ZZ_ZGB where ZGBH = '"+strPersonNO+"'";
		ResultSet rs = selectRecord(sql);
		Statement stmt = null;
		try{
		if(rs.next())
				name = ds.toString(rs.getString("XM"));
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return name;
	}
	public boolean isUsed(String gh)
	{
		String sql = "select GH from ZZ_ZGB where GH='"+gh+"'";
		boolean b = false;
		ResultSet rs = selectRecord(sql);
		Statement stmt = null;
		try{
			if(rs.next())
				b = true;
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return b;
	}
	public String getFatherName(String bmno)
	{
		String signsql = "select XMMC from code_zdb where ZDMC='部门显示分隔符'";
		ResultSet rs = selectRecord(signsql);
		String sign = "-";
		Statement stmt = null;
		try{
		if (rs.next())
			sign = ds.toString(rs.getString("XMMC"));
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		
		String sql = "";
		String father = "";
		String fatherName = "";
		Statement stm = null;
		int i = 0;
        while(i<5)
		{
			sql = "select BMFBH from ZZ_BMB where BMBH='" + bmno + "'";
			rs = selectRecord(sql);
			try{
			if (rs.next())
			{
				father = ds.toString(rs.getString("BMFBH"));
				bmno = father;
				if(father.equals("") || father.equals("00000000000000000000")){break;}
				if(fatherName.equals(""))
					fatherName = getApartName(father) + sign;
				else
					fatherName = getApartName(father) + sign + fatherName;
			}
			else{break;}
			}catch(Exception e){System.out.println("运行时出错:"+e);}
			finally{
				if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
				if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
			}
			i++;
		}
		return fatherName;
	}
	public Vector getWastePs(boolean isfather)
	{
		Vector vect = new Vector();
		String sql = "";
		if(isfather)
			sql = " select * from ZZ_ZGB where ZZZT<>0 order by BMBH";
		else 
		{
			int n = -1;
			for (int m=19;m>0 ;m-- )
			{
				char indexchar = strOrgNO.charAt(m);
				if(indexchar!='0')
				{
					n = m;
					break;
				}
			}
			if(n==6 || n==7)
			{
				strOrgNO = strOrgNO.substring(0,8);
			}
			else if(n==4 || n==5)
				strOrgNO = strOrgNO.substring(0,6);
			else if(n==2 || n==3)
				strOrgNO = strOrgNO.substring(0,4);
			sql = " select * from ZZ_ZGB where (bmbh='"+strOrgNO+"' or bmbh like'"+strOrgNO+"%') and ZZZT<>0 order by BMBH";
		}
		Hashtable ht = new Hashtable();
		ht.put("sql",sql);
		vect.add(ht);

		int rowno=0;
		ResultSet rs = selectRecord(sql);
		Statement stmt = null;
		try{
		ResultSetMetaData rsmd = rs.getMetaData();
		int cols = rsmd.getColumnCount();
		while(rs.next())
		{	
			rowno++;
			Hashtable hash = new Hashtable();
			for(int i=1;i<=cols;i++)
			{
				String field = ds.toString(rsmd.getColumnName(i));
				String value = ds.toString(rs.getString(i));
				if(field.equals("ZZZT"))
				{
					if(value.equals("1"))value="离职";
					if(value.equals("2"))value="退休";
					if(value.equals("3"))value="挂起";
				}

				if(value==null)value="";
				hash.put(field,value);
			}
			vect.add(hash);
		}
		vect.add(new Integer(rowno));
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return vect;
	}
	public String getZGGH(String zgno)
	{
		String sql = "";
		String gh = "";
		sql = " select GH from ZZ_ZGB where ZGBH = '"+zgno+"'";
		ResultSet rs = selectRecord(sql);
		Statement stmt = null;
		try{
		if(rs.next())
				gh = ds.toString(rs.getString("GH"));
		}catch(Exception e){System.out.println("运行时出错:"+e);}
		finally{
			if(rs!=null)try{ stmt = rs.getStatement(); rs.close();}catch(Exception e){System.out.println("关闭记录集rs时出错"+e);}
			if(stmt!=null) try{stmt.close();}catch(Exception e){System.out.println("关闭声明时statement出错"+e);}		
		}
		return gh;
	}
	public 

⌨️ 快捷键说明

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