亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? createcustomerhtml.java

?? java阿里巴巴代碼
?? JAVA
?? 第 1 頁 / 共 5 頁
字號:
package com.buildhtml;

import java.util.ArrayList;
import java.util.HashMap;
import tools.util.FileIO;
import tools.util.StrReplace;
import com.saas.biz.JobMgr.JobInfo;
import com.saas.biz.biddingMgr.Biddinginfo;
import com.saas.biz.commen.ParamethodMgr;
import com.saas.biz.creditMgr.CreditInfo;
import com.saas.biz.custMgr.Custinfo;
import com.saas.biz.custlinkMgr.CustlinkInfo;
import com.saas.biz.newsMgr.NewsInfo;
import com.saas.biz.productMgr.ProductInfo;
import com.saas.biz.repositoryMgr.RepositoryInfo;
import com.saas.biz.saleMgr.SaleInfo;
import com.saas.biz.stockorderMgr.Stockorderinfo;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;
import com.saas.biz.commen.config;

/**
 * Created by IntelliJ IDEA. User: caiwch Date: 2008-7-11 Time: 09:25:03 To change this template use File | Settings | File Templates.
 */
public class CreateCustomerHtml 
{
	Logger log;
	FileAndString FileString = new FileAndString();
	public CreateCustomerHtml() 
	{
		log = new Logger(this);
	}
	
	
	
	/*
	 * 生成企業(yè)介紹
	 */
	public int createCustomerIntroduce(String rootpath) throws SaasApplicationException 
	{
		log.LOG_INFO("生成企業(yè)介紹");
		config configFile = new config();
	  configFile.init();
	  String webtitle = configFile.getString("mysqlbase.webtitle");
		int error = 0;
		String str = "", cust_id = "";
		String filepath = rootpath + "enterprise/customer";
		String temppath = filepath;
		String filename = "index.htm";
		String templatePath = rootpath + "templates/enterprise/default/ym_introduce.html";
		String[] tab = { "{#include:bottom#}", "{#cust:name#}", "{#cust:scope#}", "{#company_logo#}", "{#juristic#}", "{#mail#}", "{#telephone#}", "{#fax#}", "{#address#}", "{#postcode#}", "{#website#}", "{#linker#}", "{#product_list#}", "{#cust_id#}" ,"{#WebTitle#}"};
		str = FileIO.LoadFile(templatePath);
		String tempStr = "";
		Custinfo custInfo = new Custinfo(); // ArrayList getAllCust()
		ArrayList custList = custInfo.getAllCust();
		try 
		{
			if (custList != null && custList.size() > 0) 
			{
				for (int i = 0; i < custList.size(); i++) 
				{
					tempStr = str;
					HashMap info = (HashMap) custList.get(i);
					cust_id = info.get("cust_id").toString();
					String cust_name = "";
					String cust_scope = "";
					String email = "";
					String juristic = "";
					String group_contact_phone = "";
					String fax_nbr = "";
					String company_address = "";
					String post_code = "";
					String website = "";
					if (info.get("cust_name") != null) {
						cust_name = info.get("cust_name").toString();
					}
					if (info.get("juristic") != null) {
						juristic = info.get("juristic").toString();
					}
					if (info.get("scope") != null) {
						cust_scope = info.get("scope").toString();
					}
					if (info.get("email") != null) {
						email = info.get("email").toString();
					}
					if (info.get("group_contact_phone") != null) {
						group_contact_phone = info.get("group_contact_phone").toString();
					}
					if (info.get("fax_nbr") != null) {
						fax_nbr = info.get("fax_nbr").toString();
					}
					if (info.get("company_address") != null) {
						company_address = info.get("company_address").toString();
					}
					if (info.get("post_code") != null) {
						post_code = info.get("post_code").toString();
					}
					if (info.get("website") != null) {
						website = info.get("website").toString();
					}
					filepath = temppath + "/" + cust_id + "/";
					String LinkStrTemp = FriendlyLink(cust_id);
					String ProductStrTemp = ProductList(cust_id);
					String file_path = new Custinfo().getCustAttachPath(cust_id, "0");
					if (file_path == null || file_path == "") {
						file_path = "/upload/default.gif";
					}
					// log.LOG_INFO("cust_id = " + cust_id + "file_path = " + file_path );
					tempStr = StrReplace.replace(tempStr, tab[0], FileString.f2s(rootpath + "/footer.jsp"));
					tempStr = StrReplace.replace(tempStr, tab[1], cust_name);
					tempStr = StrReplace.replace(tempStr, tab[2], cust_scope);
					tempStr = StrReplace.replace(tempStr, tab[3], file_path);
					tempStr = StrReplace.replace(tempStr, tab[4], juristic);
					tempStr = StrReplace.replace(tempStr, tab[5], email);
					tempStr = StrReplace.replace(tempStr, tab[6], group_contact_phone);
					tempStr = StrReplace.replace(tempStr, tab[7], fax_nbr);
					tempStr = StrReplace.replace(tempStr, tab[8], company_address);
					tempStr = StrReplace.replace(tempStr, tab[9], post_code);
					tempStr = StrReplace.replace(tempStr, tab[10], website);
					tempStr = StrReplace.replace(tempStr, tab[11], LinkStrTemp);
					tempStr = StrReplace.replace(tempStr, tab[12], ProductStrTemp);
					tempStr = StrReplace.replace(tempStr, tab[13], cust_id);
					tempStr = StrReplace.replace(tempStr, tab[14], webtitle);
					if (FileIO.ExistFloder(filepath)) {
						FileIO.SaveToFile(tempStr, filepath + filename);
					}
					else {
						FileIO.CreateFloder(filepath);
					}
				}
			}
		}
		catch (Exception e) {
			log.LOG_INFO(e.getMessage());
		}
		log.LOG_INFO("生成企業(yè)介紹結(jié)束");
		return error;
	}
	// ///////////////企業(yè)介紹生成結(jié)束///////////////////////
	
	
	
	/*
	 * 替換友情鏈接函數(shù)
	 */
	public String FriendlyLink(String cust_id) throws SaasApplicationException {

		String linkTemp = "";
		String initStr = "<li><a href={#link:url#} target=_self>{#link:name#}</a></li>";
		CustlinkInfo link = new CustlinkInfo();
		ArrayList linkList = link.genCustCustlink(cust_id);
		if (linkList != null && linkList.size() > 0) {
			for (int i = 0; i < linkList.size(); i++) {
				HashMap linkInfo = (HashMap) linkList.get(i);
				String link_name = "";
				String link_url = "";
				if (linkInfo.get("link_name") != null) {
					link_name = linkInfo.get("link_name").toString();
				}
				if (linkInfo.get("link_url") != null) {
					link_url = linkInfo.get("link_url").toString();
				}
				
				linkTemp = linkTemp + initStr;
				linkTemp = StrReplace.replace(linkTemp, "{#link:name#}", link_name);
				linkTemp = StrReplace.replace(linkTemp, "{#link:url#}", link_url);
			}
		}
		return linkTemp;
	}
	
	
	
	/*
	 * 替換產(chǎn)品展示方法
	 */
	public String ProductList(String cust_id) throws SaasApplicationException {

		String prodTemp = "";
		String initStr = "<td width=\"25%\"><div class=\"new-ym-right52\"><a href={#pic:link#}>{#prod:pict#}</a></div><div class=\"new-ym-right51\"><a href={#prod:link#}>{#prod:title#}</a></div></td>";
		ProductInfo product = new ProductInfo();
		ArrayList prodList = product.getproductListByLimit(cust_id, 4);
		if (prodList != null && prodList.size() > 0) {
			for (int i = 0; i < prodList.size(); i++) {
				HashMap prodInfo = (HashMap) prodList.get(i);
				String product_id = prodInfo.get("product_id").toString();
				String product_name = "";
				if (prodInfo.get("product_name") != null) {
					product_name = prodInfo.get("product_name").toString();
				}
				
				prodTemp = prodTemp + initStr;
				prodTemp = StrReplace.replace(prodTemp, "{#prod:title#}", product_name);
				prodTemp = StrReplace.replace(prodTemp, "{#prod:link#}", "/zone_b2b/enterprise/productInfo.jsp?product_id=" + product_id+"&cust_id=" + cust_id);
				String pict_path = new ProductInfo().getCustAttachPath(product_id, "0");
				if (pict_path == null) {
					pict_path = "/upload/default.gif";
				}
				prodTemp = StrReplace.replace(prodTemp, "{#pic:link#}", "/zone_b2b/enterprise/productInfo.jsp?product_id=" + product_id+"&cust_id=" + cust_id);
				prodTemp = StrReplace.replace(prodTemp, "{#prod:pict#}", "<img src=" + pict_path + " width=\"140\" height=\"110\" border=\"0\"/>");
			}
		}
		return prodTemp;
	}
	
	
	
	/*
	 * 生成企業(yè)供應(yīng)
	 *
	 */
	public int createCustomerSupply(String rootpath) throws SaasApplicationException {

		log.LOG_INFO("生成企業(yè)供應(yīng)");
		int err = 0;
		config configFile = new config();
	  configFile.init();
	  String webtitle = configFile.getString("mysqlbase.webtitle");
		String str = "", cust_id = "";
		String filepath = rootpath + "enterprise/customer";
		String temppath = filepath;
		String filename = "supply.htm";
		String templatePath = rootpath + "templates/enterprise/default/ym_sale.html";
		String[] tab = { "{#include:bottom#}", "{#cust:name#}", "{#cust:scope#}", "{#company_logo#}", "{#juristic#}", "{#mail#}", "{#telephone#}", "{#fax#}", "{#address#}", "{#postcode#}", "{#website#}", "{#linker#}", "{#product_list#}", "{#sale_list#}", "{#cust_id#}","{#WebTitle#}" };
		str = FileIO.LoadFile(templatePath);
		Custinfo custInfo = new Custinfo();
		String tempStr = "";
		ArrayList custList = custInfo.getAllCust();
		try {
			if (custList != null && custList.size() > 0) {
				for (int i = 0; i < custList.size(); i++) {
					tempStr = str;
					HashMap info = (HashMap) custList.get(i);
					cust_id = info.get("cust_id").toString();
					String cust_name = "";
					String cust_scope = "";
					String email = "";
					String juristic = "";
					String group_contact_phone = "";
					String fax_nbr = "";
					String company_address = "";
					String post_code = "";
					String website = "";
					if (info.get("cust_name") != null) {
						cust_name = info.get("cust_name").toString();
					}
					if (info.get("juristic") != null) {
						juristic = info.get("juristic").toString();
					}
					if (info.get("scope") != null) {
						cust_scope = info.get("scope").toString();
					}
					if (info.get("email") != null) {
						email = info.get("email").toString();
					}
					if (info.get("group_contact_phone") != null) {
						group_contact_phone = info.get("group_contact_phone").toString();
					}
					if (info.get("fax_nbr") != null) {
						fax_nbr = info.get("fax_nbr").toString();
					}
					if (info.get("company_address") != null) {
						company_address = info.get("company_address").toString();
					}
					if (info.get("post_code") != null) {
						post_code = info.get("post_code").toString();
					}
					if (info.get("website") != null) {
						website = info.get("website").toString();
					}
					filepath = temppath + "/" + cust_id + "/";
					String LinkStrTemp = FriendlyLink(cust_id);
					String ProductStrTemp = ProductList(cust_id);
					String saleStrTemp = SaleList(cust_id);
					String file_path = new Custinfo().getCustAttachPath(cust_id, "0");
					if (file_path == null || file_path == "") {
						file_path = "/upload/default.gif";
					}
					tempStr = StrReplace.replace(tempStr, tab[0], FileString.f2s(rootpath + "/footer.jsp"));
					tempStr = StrReplace.replace(tempStr, tab[1], cust_name);
					tempStr = StrReplace.replace(tempStr, tab[2], cust_scope);
					tempStr = StrReplace.replace(tempStr, tab[3], file_path);
					tempStr = StrReplace.replace(tempStr, tab[4], juristic);
					tempStr = StrReplace.replace(tempStr, tab[5], email);
					tempStr = StrReplace.replace(tempStr, tab[6], group_contact_phone);
					tempStr = StrReplace.replace(tempStr, tab[7], fax_nbr);
					tempStr = StrReplace.replace(tempStr, tab[8], company_address);
					tempStr = StrReplace.replace(tempStr, tab[9], post_code);
					tempStr = StrReplace.replace(tempStr, tab[10], website);
					tempStr = StrReplace.replace(tempStr, tab[11], LinkStrTemp);
					tempStr = StrReplace.replace(tempStr, tab[12], ProductStrTemp);
					tempStr = StrReplace.replace(tempStr, tab[13], saleStrTemp);
					tempStr = StrReplace.replace(tempStr, tab[14], cust_id);
					tempStr = StrReplace.replace(tempStr, tab[15], webtitle);
					if (FileIO.ExistFloder(filepath)) 
					{
						FileIO.SaveToFile(tempStr, filepath + filename);
					}
					else 
					{
						FileIO.CreateFloder(filepath);
						FileIO.SaveToFile(tempStr, filepath + filename);
					}
				}
			}
		}
		catch (Exception e) {
			log.LOG_INFO(e.getMessage());
		}
		log.LOG_INFO("生成企業(yè)供應(yīng)結(jié)束");
		return err;
	}
	
	
	
	// ///////////////企業(yè)供應(yīng)生成結(jié)束///////////////////////
	
	/*
	 * 替換產(chǎn)品詳細信息方法
	 */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
一本色道亚洲精品aⅴ| 国产视频亚洲色图| 欧美在线啊v一区| 91免费国产在线| 99久久久免费精品国产一区二区| 国产精品亚洲а∨天堂免在线| 久久精品二区亚洲w码| 美女一区二区三区| 极品瑜伽女神91| 国产成都精品91一区二区三| 国产不卡视频在线播放| 成人av电影观看| 91麻豆国产精品久久| 色成人在线视频| 欧美亚洲另类激情小说| 欧美日韩一区二区三区在线| 欧美日韩视频一区二区| 91精品国产麻豆国产自产在线| 欧美丰满嫩嫩电影| 久久综合色播五月| 国产精品天干天干在观线| 国产精品色婷婷久久58| 亚洲免费av高清| 亚洲电影中文字幕在线观看| 男女性色大片免费观看一区二区| 国内精品不卡在线| 成人av在线观| 欧美精品aⅴ在线视频| 精品免费视频.| 国产精品久久久久影院| 一区二区日韩av| 久草热8精品视频在线观看| 国产福利一区二区三区| 91美女在线看| 91精品综合久久久久久| 国产亚洲va综合人人澡精品 | 国产精品欧美极品| 亚洲另类中文字| 美腿丝袜亚洲三区| 成人avav在线| 日韩免费高清视频| 中文字幕一区日韩精品欧美| 亚洲丶国产丶欧美一区二区三区| 久久超碰97中文字幕| 粗大黑人巨茎大战欧美成人| 在线视频你懂得一区二区三区| 5858s免费视频成人| 欧美激情艳妇裸体舞| 亚洲一区国产视频| 国产美女一区二区| 欧美午夜电影在线播放| 久久久精品免费免费| 亚洲乱码国产乱码精品精可以看 | 欧美日韩欧美一区二区| 日韩欧美一区二区三区在线| 中文字幕精品综合| 奇米色一区二区| 一本大道久久a久久精二百| 日韩欧美久久久| 亚洲综合久久久| 粉嫩一区二区三区在线看| 911精品产国品一二三产区| 国产精品色噜噜| 精品一区二区三区香蕉蜜桃| 色婷婷综合久久| 日本一区二区免费在线| 日韩精品免费视频人成| 白白色 亚洲乱淫| 精品国产91久久久久久久妲己| 亚洲精品你懂的| 成人黄色小视频| 久久久亚洲精品一区二区三区| 天堂蜜桃91精品| 日本高清免费不卡视频| 欧美激情艳妇裸体舞| 精品一区二区三区的国产在线播放| 在线看日韩精品电影| 欧美国产日韩精品免费观看| 玖玖九九国产精品| 欧美色精品在线视频| 国产精品婷婷午夜在线观看| 国产在线播放一区三区四| 在线播放中文一区| 亚洲与欧洲av电影| av福利精品导航| 欧美激情一区二区三区全黄| 国产在线精品不卡| 欧美一区二区免费| 婷婷夜色潮精品综合在线| 一本大道久久a久久综合| 18成人在线视频| 国产成人av一区二区三区在线观看| 欧美不卡一二三| 久久机这里只有精品| 91精品国产综合久久婷婷香蕉| 亚洲资源中文字幕| 在线观看www91| 亚洲国产aⅴ成人精品无吗| 日本高清成人免费播放| 日韩毛片高清在线播放| 99久久er热在这里只有精品66| 国产精品蜜臀在线观看| 高清在线成人网| 国产精品传媒视频| 91在线国产观看| 亚洲激情在线激情| 欧美影院午夜播放| 亚洲va国产天堂va久久en| 欧美美女一区二区在线观看| 天堂成人免费av电影一区| 欧美巨大另类极品videosbest | 91国产成人在线| 亚洲国产一区在线观看| 欧美日韩你懂得| 日韩成人免费在线| 91精品国产麻豆| 国产剧情一区在线| 国产精品国产三级国产普通话三级| 成人av免费在线播放| 伊人色综合久久天天| 欧美日韩精品欧美日韩精品一| 水蜜桃久久夜色精品一区的特点| 91精品国产综合久久久久久久 | 在线成人免费视频| 麻豆91精品91久久久的内涵| 欧美v亚洲v综合ⅴ国产v| 国产精品一线二线三线| 国产精品污网站| 欧美亚洲国产一卡| 免费欧美高清视频| 国产天堂亚洲国产碰碰| av资源网一区| 天天综合日日夜夜精品| 亚洲精品一区二区在线观看| 成人免费观看男女羞羞视频| 亚洲精品成人在线| 日韩午夜激情av| 成人免费av网站| 亚洲成av人片在线| 久久这里都是精品| 91小视频免费看| 老司机午夜精品| 中文字幕亚洲综合久久菠萝蜜| 欧美日韩精品免费观看视频| 蜜臀精品久久久久久蜜臀| 中文字幕欧美区| 91精品国产一区二区三区蜜臀 | 欧美色图12p| 久久丁香综合五月国产三级网站| 中文字幕成人av| 欧美一区二区三区在线观看| 国产成人午夜高潮毛片| 亚洲成人一区二区在线观看| 久久久久久久电影| 欧美性xxxxxxxx| 国产一区二区三区不卡在线观看| 一区二区三区自拍| 久久久青草青青国产亚洲免观| 欧美亚洲动漫制服丝袜| 国产精品一区二区三区四区| 亚洲国产欧美在线| 国产精品人人做人人爽人人添| 6080yy午夜一二三区久久| yourporn久久国产精品| 毛片一区二区三区| 亚洲国产精品一区二区久久| 国产欧美一区二区精品性色| 777亚洲妇女| 91丨九色丨国产丨porny| 极品尤物av久久免费看| 天天亚洲美女在线视频| 亚洲欧美在线aaa| 久久综合色天天久久综合图片| 欧美日本一区二区| 91丨九色丨尤物| 成人自拍视频在线观看| 久久精品久久久精品美女| 亚洲综合视频在线观看| 中文字幕第一页久久| 久久无码av三级| 91精品国产综合久久久久久久久久| 色偷偷一区二区三区| 国产超碰在线一区| 狠狠色丁香久久婷婷综合_中| 日韩在线观看一区二区| 亚洲精品国产高清久久伦理二区| 国产婷婷精品av在线| 精品国产一二三区| 欧美一区永久视频免费观看| 在线看日本不卡| 一本色道久久综合亚洲91| 国产传媒欧美日韩成人| 久久精品噜噜噜成人av农村| 日韩二区三区在线观看| 亚洲成人1区2区| 亚洲成人在线网站| 日精品一区二区| 日本伊人色综合网| 午夜精品久久久久久久99水蜜桃 | 国产一区91精品张津瑜|