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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? createcustomerweb.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.commen.config;
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;

/**
 * @author:B2B
 * @desc:生成個人企業站
 * @2008-7-17
 */
public class CreateCustomerWeb {
	
	
	Logger log;
	
	
	FileAndString FileString;
	
	
	
	
	/**
	 * 默認構造方法
	 */
	public CreateCustomerWeb() {

		log = new Logger(this);
		FileString = new FileAndString();
	}
	
	
	
	/**
	 * @return 生成個人企業站
	 * @throws SaasApplicationException
	 */
	public int createCustomerWeb(String rootpath, String cust_id) throws SaasApplicationException {

		this.createCustomerIntroduce(rootpath, cust_id);
		this.createCustomerSupply(rootpath, cust_id);
		this.createCustomerCredit(rootpath, cust_id);
		this.createCustomerStock(rootpath, cust_id);
		this.createCustomerNews(rootpath, cust_id);
		this.createCustomerBidding(rootpath, cust_id);
		this.createCustomerTech(rootpath, cust_id);
		this.createCustomerProduct(rootpath, cust_id);
		this.createCustomerResume(rootpath, cust_id);
		this.createCustomerLeave(rootpath, cust_id);
		return 0;
	}
	
	
	
	// 生成企業介紹
	public int createCustomerIntroduce(String rootpath, String cust_id) throws SaasApplicationException {

		log.LOG_INFO("生成企業介紹");
		config configFile = new config();
		configFile.init();
		String webtitle = configFile.getString("mysqlbase.webtitle");
		int error = 0;
		String str = "";
		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 custList = custInfo.genSpecCustInfo(cust_id);
		try {
			if (custList != null && custList.size() > 0) {
				for (int i = 0; i < custList.size(); i++) {
					tempStr = str;
					HashMap info = (HashMap) custList.get(i);
					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("生成企業介紹結束");
		return error;
	}
	
	
	
	/*
	 * 替換友情鏈接函數
	 */
	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;
	}
	
	
	
	/*
	 * 替換產品展示方法
	 */
	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;
	}
	
	
	
	/*
	 * 生成企業供應
	 */
	public int createCustomerSupply(String rootpath, String cust_id) throws SaasApplicationException {

		log.LOG_INFO("生成企業供應");
		int err = 0;
		config configFile = new config();
		configFile.init();
		String webtitle = configFile.getString("mysqlbase.webtitle");
		String str = "";
		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.genSpecCustInfo(cust_id);
		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);

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产在线精品视频| 国产成人av资源| 国产午夜一区二区三区| 一本一本久久a久久精品综合麻豆| 三级不卡在线观看| 中文字幕一区二区不卡| 日韩一级精品视频在线观看| 91色porny| 国产91色综合久久免费分享| 日韩av电影一区| 一区二区日韩av| 中文字幕一区二区三区在线观看| 日韩欧美国产精品| 欧美区一区二区三区| 99久久精品国产观看| 国产精品一区专区| 日av在线不卡| 午夜视黄欧洲亚洲| 一区二区在线观看免费| 中文字幕国产一区二区| 26uuu国产在线精品一区二区| 欧美日韩精品三区| 91久久线看在观草草青青| 成人深夜在线观看| 国产精品系列在线播放| 精品一区二区三区免费毛片爱| 亚洲123区在线观看| 亚洲一区二区三区免费视频| 国产精品第一页第二页第三页| 26uuu国产在线精品一区二区| 欧美一区二区三区小说| 欧美区在线观看| 欧美日韩亚洲不卡| 精品婷婷伊人一区三区三| 色域天天综合网| 色先锋aa成人| 91精品1区2区| 色8久久人人97超碰香蕉987| 91亚洲午夜精品久久久久久| 不卡区在线中文字幕| aaa亚洲精品一二三区| 波多野结衣中文一区| 91小视频在线| 色呦呦一区二区三区| 一本久道中文字幕精品亚洲嫩| www.在线成人| 91麻豆精品秘密| 色哟哟欧美精品| 欧美伊人久久大香线蕉综合69| 日本道在线观看一区二区| 欧美三级日本三级少妇99| 91精品在线观看入口| 欧美一级搡bbbb搡bbbb| 欧美v国产在线一区二区三区| 26uuu亚洲综合色欧美| 国产精品久久午夜| 亚洲激情第一区| 琪琪一区二区三区| 国产麻豆成人精品| www.日本不卡| 欧美亚洲综合一区| 日韩免费高清av| 国产日本欧美一区二区| 国产精品国产三级国产aⅴ入口 | 国产精品久久免费看| 伊人夜夜躁av伊人久久| 日韩主播视频在线| 国模冰冰炮一区二区| 不卡一区二区三区四区| 9191成人精品久久| 2019国产精品| 日韩伦理av电影| 午夜伊人狠狠久久| 国产乱人伦偷精品视频不卡| 成人毛片视频在线观看| 欧美视频中文字幕| 久久综合九色综合97婷婷| 国产精品久久久爽爽爽麻豆色哟哟 | 午夜精品福利久久久| 久久99精品网久久| 色丁香久综合在线久综合在线观看| 欧美疯狂性受xxxxx喷水图片| 欧美精品一区二区精品网| 亚洲日本一区二区| 男人操女人的视频在线观看欧美| 国产成人欧美日韩在线电影| 色视频成人在线观看免| 精品国产伦一区二区三区观看方式| 中文字幕日韩一区| 久久国产精品99精品国产 | 成人综合婷婷国产精品久久| 在线免费不卡视频| 国产日韩高清在线| 欧美aaa在线| 在线视频观看一区| 国产精品网站导航| 久久激五月天综合精品| 在线观看亚洲一区| 国产欧美日韩综合| 蜜臀av一区二区| 欧洲精品中文字幕| 久久精品一区二区| 蜜臀av一区二区在线观看| 欧美在线一区二区| 亚洲欧洲国产日韩| 国产一区二区三区美女| 91精品国产免费久久综合| 一区二区三区视频在线观看| 成人高清视频在线| 久久久久久久久岛国免费| 日本麻豆一区二区三区视频| 日本高清不卡aⅴ免费网站| 欧美极品少妇xxxxⅹ高跟鞋| 另类小说视频一区二区| 欧美久久久久久久久中文字幕| 亚洲色图在线看| 成人午夜在线视频| 久久久九九九九| 国产一区二区三区四| 日韩亚洲欧美在线| 日本亚洲一区二区| 欧美日韩精品免费| 亚洲bt欧美bt精品777| 在线视频一区二区三| 亚洲欧洲国产日本综合| av在线一区二区三区| 中文字幕精品一区| av综合在线播放| 中文字幕在线一区| 99久久久久免费精品国产| 欧美韩国日本综合| 成人手机在线视频| 最新热久久免费视频| hitomi一区二区三区精品| 国产精品嫩草影院com| 国产成人精品aa毛片| 欧美国产欧美综合| 波多野结衣亚洲| 国产精品久久久久7777按摩 | 粉嫩av一区二区三区| ww亚洲ww在线观看国产| 国产精品综合网| 国产午夜一区二区三区| 成人午夜免费电影| 国产精品麻豆视频| 色欧美乱欧美15图片| 亚洲一级电影视频| 91精品国产麻豆| 国产一区二区福利视频| 中文字幕在线一区免费| 欧洲视频一区二区| 日韩av中文在线观看| 久久亚洲一区二区三区明星换脸| 国产麻豆午夜三级精品| 国产精品麻豆视频| 欧美又粗又大又爽| 免费一级欧美片在线观看| 久久伊人中文字幕| 97久久精品人人做人人爽50路| 一区二区三区在线观看欧美| 91精品国产91综合久久蜜臀| 国产精选一区二区三区| 亚洲精品日日夜夜| 51久久夜色精品国产麻豆| 国产九色精品成人porny | 国产精品综合一区二区三区| 亚洲欧洲精品成人久久奇米网| 欧美日韩一卡二卡| 国内一区二区视频| 伊人一区二区三区| 精品免费视频.| 色老汉一区二区三区| 老司机午夜精品| 亚洲欧美色图小说| 日韩你懂的电影在线观看| 成人网男人的天堂| 图片区小说区区亚洲影院| 亚洲国产精品国自产拍av| 欧美午夜宅男影院| 国产一区二区精品久久99| 一区二区三区日韩欧美精品| 日韩午夜三级在线| 色诱亚洲精品久久久久久| 精品无人码麻豆乱码1区2区| ●精品国产综合乱码久久久久| 7777精品久久久大香线蕉| 成人精品鲁一区一区二区| 亚洲va欧美va人人爽午夜| 中文字幕av资源一区| 欧美日韩卡一卡二| 99久久久久久| 精品一区二区三区在线观看国产| 亚洲伦理在线精品| 久久精品夜夜夜夜久久| 欧美日韩精品三区| 91丨porny丨蝌蚪视频| 精品一区二区三区在线播放| 亚洲国产乱码最新视频| 国产精品免费视频一区| 欧美va亚洲va国产综合|