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

📄 createindexhtml.java

📁 java阿里巴巴代码
💻 JAVA
📖 第 1 页 / 共 4 页
字号:
				String []classtitle1 = { "{#first:picture:name:1#}", "{#second:picture:name:1#}", "{#third:picture:name:1#}" };
				String []classtitle2 = { "{#first:title:2#}", "{#second:title:2#}", "{#third:title:2#}" };
				String []classtitle3 = { "{#first:title:8#}", "{#second:title:8#}", "{#third:title:8#}" }; 
				initStr = "<tr><td align=\"center\"><img src={#src_news#} width=\"100\" height=\"100\" /></td></tr><tr><td align=\"center\"><a href=\"{#link#}\" title=\"{#detail:title_long#}\" >{#title#}</a></td></tr>";
        initStr1 = "<li>·<a href=\"{#href#}\" title=\"{#news:title_long#}\" class=\"news\">{#news_title#}</a></li>";
				initStr2 =" <tr><td width=\"5%\"><img src=\"/zone_b2b/images/lujian.gif\" width=\"5\" height=\"9\" /></td>"+
							"<td width=\"79%\" class=\"btlanse\">{#big_title#}</td>"+
							"<td width=\"16%\"><a href=\"{#href#}\" class=\"lanse\">更多&gt;&gt;</a></td></tr>";
							
				ArrayList classList = new Productclass().genClassByRsrv_str1( "1", 3 );
				if( classList != null && classList.size() > 0 )
				{
			  		for( int i = 0; i < classList.size(); i++ )
			  		{  
			  			  String temp ="";
			  				HashMap map = ( HashMap )classList.get( i );
        				String class_id ="";
        				String class_name ="";
        				if( map.get( "class_id" ) != null )
        				{
        					 class_id = map.get( "class_id" ).toString();
        				}
        				
        				if( map.get( "class_name" ) != null )
        				{
        						class_name = map.get( "class_name" ).toString();
        				}
        				temp = temp + initStr2;
        				temp = StrReplace.replace( temp, "{#href#}", "/zone_b2b/news/zixun_list.jsp?news_type="+class_id );    //////////////////////////////////////////////////////////////////////////////////
				        temp = StrReplace.replace( temp, "{#big_title#}", class_name ); 
        				
        				strTemp ="";
        				strTemp1 = "";
        				strTemp2 = "";
        				ArrayList newsList = new NewsInfo().genNewsByNewsType( class_id,11 );
        				if( newsList != null && newsList.size() > 0 )
        				{
        					 for( int j = 0; j < newsList.size(); j++ )
		        			 {
		        			 		 HashMap newsmap = ( HashMap )newsList.get( j );
		        					 String news_id = "";
		        					 String cust_id ="";
		        					 String title = "",sub_title="";
		        					 if( newsmap.get( "news_id" ) != null )
				        			 {
				        						news_id = newsmap.get( "news_id" ).toString();
				        			 } 
				        			 if( newsmap.get( "cust_id" ) != null )
				        			 {
				        						cust_id = newsmap.get( "cust_id" ).toString();
				        			 } 
				        			 if( newsmap.get( "title" ) != null )
				        			 {
				        						title = newsmap.get( "title" ).toString();
				        						if( title.length() > 10 )
				        						{
				        								sub_title = StringUtil.getLimitLengthString( title, "", 18 );
				        						}
				        						else
				        						{
				        								sub_title = title;	
				        						}
				        			 } 
				        			 if( j == 0)
				        			 {
				        			 		String filePath = new NewsInfo().getCustAttachPath( news_id, "0");
						     					if( filePath == "" || filePath == null )
						     					{
						     						filePath = "/upload/default.gif";
						     					}
						     					strTemp = strTemp + initStr;
				         					strTemp = StrReplace.replace( strTemp, "{#src_news#}", filePath );
				         					strTemp = StrReplace.replace( strTemp, "{#link#}",  "/zone_b2b/news/zixun_list_content.jsp?news_id="+news_id  );    //////////////////////////////////////////////////////////////////////////////////
				         					strTemp = StrReplace.replace( strTemp, "{#news:title_long#}", title );
				         					strTemp = StrReplace.replace( strTemp, "{#title#}", sub_title );
				        			 }
				        			 else if( j > 0 && j < 3 )
				         			 {
				         					strTemp1 = strTemp1 + initStr1;
				         					strTemp1 = StrReplace.replace( strTemp1, "{#href#}",  "/zone_b2b/news/zixun_list_content.jsp?news_id="+news_id  );   ///////////////////////////////////////////////////////////////////////////////////
				         					strTemp1 = StrReplace.replace( strTemp1, "{#news:title_long#}", title );
				         					strTemp1 = StrReplace.replace( strTemp1, "{#news_title#}", sub_title );
				         			 }
				         			 else if( j >= 3 && j < newsList.size() )
				         			 {
				         					strTemp2 = strTemp2 + initStr1;
				         					strTemp2 = StrReplace.replace( strTemp2, "{#href#}",  "/zone_b2b/news/zixun_list_content.jsp?news_id="+news_id  );   ///////////////////////////////////////////////////////////////////////////////////
				         					strTemp2 = StrReplace.replace( strTemp2, "{#news:title_long#}", title );	
				         					strTemp2 = StrReplace.replace( strTemp2, "{#news_title#}", sub_title );
				         			 }
								     }
        				}
        				str = StrReplace.replace( str, className[i], temp );
        				str = StrReplace.replace(str,classtitle1[i], strTemp ); 
          			str = StrReplace.replace(str,classtitle2[i], strTemp1 );
          			str = StrReplace.replace(str,classtitle3[i], strTemp2 );
        				
			  		}
			  }
				
				/*
				*人才招聘和求职信息
				*/
				log.LOG_INFO( "人才招聘" );
				initStr = "<tr><td><img src=\"/zone_b2b/images/bj.gif\" width=\"14\" height=\"12\" align=\"absmiddle\" /></td><td><a href=\"{#link#}\" class=\"news\"> {#job_title#}</a></td><td> ({#cust_name#})</td></tr>"+
									"<tr><td height=\"1\" class=\"xian\"></td><td height=\"1\" class=\"xian\"></td><td height=\"1\" class=\"xian\"></td></tr>";
				strTemp = "";
				//PropertyuInfo propertyinfo = new PropertyuInfo();
				//boolean flag = propertyinfo.getValidityInfo( "106", "6");
				JobInfo jobinfo = new JobInfo();
				ArrayList jobList = jobinfo.genLatestJobList( 0,7 );
				if( jobList != null && jobList.size() > 0 )
				{
					 for( int i = 0; i < jobList.size(); i++ )
					 {
					 		HashMap jobmap = ( HashMap )jobList.get( i );
					 		String job_id = "";
					 		String job_title = "";
					 		String cust_id = "";
					 		String cust_name = "";
					 		if( jobmap.get( "job_id" ) != null )
					 		{
					 			job_id = jobmap.get( "job_id" ).toString();
					 		}
					 		if( jobmap.get( "title" ) != null )
					 		{
					 			job_title = jobmap.get( "title" ).toString();
					 			if( job_title.length() > 10 )
					 			{
										job_title = StringUtil.getLimitLengthString( job_title, "", 18 ) + "...";
								}
					 		}
					 		/*if( !flag )
					 		{
					 			if( jobmap.get( "cust_id" ) != null )
						 		{
						 			cust_id = jobmap.get( "cust_id" ).toString();
						 		}
						 		if( jobmap.get( "cust_name" ) != null )
						 		{
						 			cust_name = jobmap.get( "cust_name" ).toString();
						 			if( cust_name.length() > 10 )
						 			{
											cust_name = StringUtil.getLimitLengthString( cust_name, "", 18 ) + "...";
									}
						 		}
						 	}
						 	else
						 	{*/
						 		 cust_id = jobmap.get( "job_unit" ).toString();
						 		 cust_name = new Custinfo().getCustCompany( cust_id );
						 //	}
					 		strTemp = strTemp + initStr;
					 		strTemp = StrReplace.replace( strTemp, "{#link#}", "/zone_b2b/job/jobinfo.jsp?cust_id=" + cust_id );////////////////////////////////////
							strTemp = StrReplace.replace( strTemp, "{#job_title#}", job_title );
							strTemp = StrReplace.replace( strTemp, "{#cust_name#}", cust_name );
					 }
				} 
				str = StrReplace.replace( str, "{#Recruitment#}", strTemp );
				
				
				/*
				*求职信息
				*
				*/
				log.LOG_INFO( "求职信息" );
				initStr = "<tr>                                                                                        "+
  				"<td width=\"35%\" height=\"25\" class=\"rencei_table_xian\"><a href=\"{#link#}\">{#name#}</a> </td>         "+
				  "<td width=\"15%\" class=\"rencei_table_xian\" align=\"center\">{#age#}</td>																					 "+
				  "<td width=\"15%\" class=\"rencei_table_xian\" align=\"center\"><span class=\"lanse_renceitop\">{#degree#}</span></td> "+ 
				  "<td width=\"35%\" class=\"rencei_table_xian\" align=\"center\"><span class=\"zi\">{#job_age#}</span></td>             "+ 
				  "</tr>";
				strTemp = "";
				ResumeInfo resumeinfo = new ResumeInfo();
				ArrayList resumeList = resumeinfo.getMainPageResumeList();
				if( resumeList != null && resumeList.size() > 0 )
				{
					for( int i = 0; i < resumeList.size(); i++ )
					{
							HashMap resmap = ( HashMap )resumeList.get( i );
							String resume_id = "";
							String name = "";
							String age = "";
							String degree = "";
							String job_age ="";
							if( resmap.get( "resume_id" ) != null )
							{
								 resume_id = resmap.get( "resume_id" ).toString();
							}
							if( resmap.get( "name" ) != null )
							{
								 name = resmap.get( "name" ).toString();
							}
							if( resmap.get( "age" ) != null )
							{
								 age = resmap.get( "age" ).toString();
							}
							if( resmap.get( "degree" ) != null )
							{
								 degree = resmap.get( "degree" ).toString();
							}
							if( resmap.get( "job_age" ) != null )
							{
								 job_age = resmap.get( "job_age" ).toString();
							}
							strTemp = strTemp + initStr;
							strTemp = StrReplace.replace( strTemp, "{#link#}", "/zone_b2b/resume/resume_content.jsp?resume_id=" + resume_id);/////////////////////////
							strTemp = StrReplace.replace( strTemp, "{#name#}", name );
							strTemp = StrReplace.replace( strTemp, "{#age#}", age );
							strTemp = StrReplace.replace( strTemp, "{#degree#}", degree );
							strTemp = StrReplace.replace( strTemp, "{#job_age#}", job_age );
					}	
				}
				str = StrReplace.replace( str, "{#Employment#}", strTemp );
				
				
				/*
				*玻璃学院
				*/
				log.LOG_INFO( "玻璃学院" );
				String []schoolTitle = { "{#ScientificPapers#}", "{#Glass knowledge#}" };
				String []schoolcontent = { "{#ScientificPapers:8#}" ,"{#Glassknowledge:8#}" };
				initStr = "<tr><td height=\"22\">·<a href=\"{#link#}\">{#title#}</a> </td></tr><tr><td height=\"1\" class=\"xian\"></td></tr>";
				initStr1 = "	<tr>		"+
									 "  <td width=\"5%\"><img src=\"/zone_b2b/images/lujian.gif\" width=\"5\" height=\"9\" /></td>  "+
									 "  <td width=\"78%\" class=\"btlanse\">{#repository_type#}</td>		"+
									 "  <td width=\"17%\"><a href=\"{#more#}\" class=\"lanse\">更多&gt;&gt;</a></td>		"+
									 "</tr> ";
				strTemp ="";
				ParamethodMgr paramObj=new ParamethodMgr();
				ArrayList typeList = paramObj.getCompareInfo( "B2B", "repository_type" );
				if( typeList != null && typeList.size() > 0 )
				{
					for( int i = 0; i < typeList.size() && i < 2; i++ )
					{  
						 String temp ="";
						 HashMap typeMap = ( HashMap )typeList.get( i );
						 String type = "",value = "";
						 if( typeMap.get( "para_code1" ) != null) 
						 {
						 		type = typeMap.get( "para_code1" ).toString();
						 }
						 if( typeMap.get( "para_code2" ) != null )
						 {
						 		value = typeMap.get( "para_code2" ).toString();
						 }
						temp = temp + initStr1;
    				temp = StrReplace.replace( temp, "{#more#}", "/zone_b2b/school/sch_knowlist.jsp?repository_type=" + type );    //////////////////////////////////////////////////////////////////////////////////
		        temp = StrReplace.replace( temp, "{#repository_type#}", value ); 
        		
        		strTemp ="";
    				ArrayList schoolList = new RepositoryInfo().getRepositoryByType( type,0,8 );		
    				if( schoolList != null && schoolList.size() > 0 )
						{
								for( int j = 0; j < schoolList.size(); j++ )
								{
										HashMap map = ( HashMap )schoolList.get( j );
										String repository_id = "";
										String repository_type = "";
										String title = "";
										if( map.get( "repository_id") != null )
										{
												repository_id = map.get( "repository_id").toString();
										}
										if( map.get( "title") != null )
										{
												title = map.get( "title").toString();
												if( title.length() > 20 )
												{
														title = StringUtil.getLimitLengthString( title, "", 40 ) + "...";
												}
										}
										
										strTemp = strTemp + initStr;
										strTemp = StrReplace.replace( strTemp, "{#repository_type#}", repository_type );
										strTemp = StrReplace.replace( strTemp, "{#link#}", "/zone_b2b/school/sch_knowlist_con.jsp?repository_id=" + repository_id );///////////////////////////////////////
										strTemp = StrReplace.replace( strTemp, "{#title#}", title );
								}
						}
						str = StrReplace.replace( str, schoolTitle[i], temp );
						str = StrReplace.replace( str,schoolcontent[i], strTemp );
						 
					}
				}
				
        FileIO.SaveToFile(str,filepath);
        
    }
		
		public String replaceHtml( int num, String name )throws SaasApplicationException
		{
				String temp ="<tr>"+
					 "<td height=\"25\" align=\"center\" id=\"d"+num +"\" class=c3 onClick=\"javascript:cBoard(" + num + ")\">"+
					   	name +
					 "</td>"+
					 "</tr>";
			  return temp;
		}
  
}

⌨️ 快捷键说明

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