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

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

?? gbs_priceconditionaction.java

?? 對日軟件外包 為東芝做的一個全球商業(yè)管理系統(tǒng)
?? JAVA
字號:
package ACTION;

import java.util.ArrayList;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import COMMON.BaseCommonCheck;
import COMMON.BaseDispatchAction;
import COMMON.MessageList;
import COMMON.ReturnValue;
import COMMON.SystemConstants;
import DataBean.GBS_LittleCountry_stBean;
import DataBean.GBS_LittlePriceCategory_stBean;
import DataBean.GBS_LittleProductCategory_stBean;
import DataBean.GBS_MCountry_stBean;
import DataBean.GBS_MWideUse_stBean;
import LOGIC.GBS_PriceCPCPriceListActionLogic;
import LOGIC.GBS_PriceConditionActionLogic;
import LOGIC.GBS_PriceHardwarePriceListActionLogic;
/** 
 * public class GBS_PriceConditionAction extends BaseDispatchAction implements SystemConstants 
 * created on 07-30-2004
 * @author   wxf
 * @version  1.0
 */
public class GBS_PriceConditionAction extends BaseDispatchAction implements SystemConstants {

	// --------------------------------------------------------- Instance Variables

	// --------------------------------------------------------- Methods
	/**
	 * init page  
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 * @throws Exception
	 */
	public ActionForward init(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {

		log.info("[location info]GBS_UsermasterAction.init method!");

		GBS_PriceConditionForm thisForm = (GBS_PriceConditionForm) form;

		//get login user info from session
		this.setUserInfoFromSession(request, thisForm);

		//init combox, checkbox, radio
		getComboxValueAndName(thisForm, request);

		return (mapping.findForward(nextview));

	}
	/**
	 * Method search
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 * @throws Exception
	 */
	public ActionForward search(
		ActionMapping mapping,
		ActionForm form,
		HttpServletRequest request,
		HttpServletResponse response)
		throws Exception {

		log.info("[location info]GBS_UsermasterAction.init method!");

		GBS_PriceConditionForm thisForm = (GBS_PriceConditionForm) form;

		//get login user info from session
		this.setUserInfoFromSession(request, thisForm);
		//init combox, checkbox, radio
		getComboxValueAndName(thisForm, request);

		MessageList errorMsg = new MessageList();
		errorMsg = inputCheck(thisForm, request);
		if (errorMsg.size() > 0) {
			//save error to request
			this.setMessage(errorMsg);
			return (mapping.findForward(nextview));
		}

		GBS_PriceConditionActionLogic logic =
			new GBS_PriceConditionActionLogic(this.getDataSource(request));

		String[] price = thisForm.getPrice();
		String[] productCategory = thisForm.getProductCategory();
		String[] country = thisForm.getCountry();

		String productCategoryCode = new String();
		String countryCode = new String();

		if (productCategory != null) {
			for (int i = 0; i < productCategory.length; i++) {
				if (i < productCategory.length - 1) {
					if(productCategory[i].indexOf("'") > -1){
						productCategory[i] = BaseCommonCheck.convertSql(productCategory[i]);
					}
					productCategoryCode += "'" + productCategory[i] + "',";
				} else {
					if(productCategory[i].indexOf("'") > -1){
						productCategory[i] = BaseCommonCheck.convertSql(productCategory[i]);
					}
					productCategoryCode += "'" + productCategory[i] + "'";
				}
			}
		} else {
			ReturnValue ret = logic.getProductCAtegoryInfo(); //get product category information
			ArrayList productCategoryList = (ArrayList) ret.getDataValue();
			for (int i = 0; productCategoryList != null && i < productCategoryList.size(); i++) {
				GBS_MWideUse_stBean mWideUse_st = new GBS_MWideUse_stBean();
				mWideUse_st = (GBS_MWideUse_stBean) productCategoryList.get(i);
				if (i < (productCategoryList.size() - 1)) {
					productCategoryCode += "'" + mWideUse_st.getMainKey() + "',";
				} else {
					productCategoryCode += "'" + mWideUse_st.getMainKey() + "'";
				}
			}
		}

		if (country != null) {
			for (int i = 0; i < country.length; i++) {
				if (i < country.length - 1) {
					if(country[i].indexOf("'") > -1){
						country[i] = BaseCommonCheck.convertSql(country[i]);
					}
					countryCode += "'" + country[i] + "',";
				} else {
					if(country[i].indexOf("'") > -1){
						country[i] = BaseCommonCheck.convertSql(country[i]);
					}
					countryCode += "'" + country[country.length - 1] + "'";
				}
			}
		} else {
			ReturnValue ret = logic.getCountryInfo(); // get Country Information
			ArrayList countryList = (ArrayList) ret.getDataValue();
			for (int i = 0; countryList != null && i < countryList.size(); i++) {
				GBS_MCountry_stBean mCountry_st = new GBS_MCountry_stBean();
				mCountry_st = (GBS_MCountry_stBean) countryList.get(i);
				if (i < countryList.size() - 1) {
					countryCode += "'" + mCountry_st.getCountryCode() + "',";
				} else {
					countryCode += "'" + mCountry_st.getCountryCode() + "'";
				}
			}
		}

		if (price[0].equals("CPC")) {

			GBS_PriceCPCPriceListActionLogic cpcLogic =
				new GBS_PriceCPCPriceListActionLogic(super.getDataSource());

			ReturnValue ret = cpcLogic.getAllCPCPriceInfo(productCategoryCode, countryCode,thisForm.getLoginPlusHour());
			// get all CPC price information

			if (ret.isError()) {
				if (ret.isBussinessError()) {
					this.setMessage(ret.getMessageList());
				}
				//ErrorCode,ErrorMessage proccess
				return (mapping.findForward(nextview));
			} else {
				GBS_PriceCPCPriceListForm priceCPCPriceListForm =
					(GBS_PriceCPCPriceListForm) ret.getDataValue();
				thisForm.setCPCData(priceCPCPriceListForm);
				return (mapping.findForward(SEARCHCPCPRICELIST));
			}

		} else {

			GBS_PriceHardwarePriceListActionLogic hardwareLogic =
				new GBS_PriceHardwarePriceListActionLogic(super.getDataSource());

			ReturnValue ret =
				hardwareLogic.getAllHardwarePriceInfo(productCategoryCode, countryCode,thisForm.getLoginPlusHour());
			// get all hardware price information

			if (ret.isError()) {
				if (ret.isBussinessError()) {
					this.setMessage(ret.getMessageList());
				}
				//ErrorCode,ErrorMessage proccess
				return (mapping.findForward(nextview));
			} else {
				GBS_PriceHardwarePriceListForm priceHardwarePriceListForm =
					(GBS_PriceHardwarePriceListForm) ret.getDataValue();
				thisForm.setHardwareData(priceHardwarePriceListForm);
				return (mapping.findForward(SEARCHHARDWAREPRICELIST));
			}

		}

	}

	/**
	 * inputCheck
	 * @param GBS_PriceConditionForm thisForm
	 * @param HttpServletRequest request
	 * @throws Exception
	 * @return MessageList
	 */
	private MessageList inputCheck(GBS_PriceConditionForm thisForm, HttpServletRequest request)
		throws Exception {

		//create ErrorMessages to display error message
		MessageList messages = new MessageList();
		return messages;
	}
	/**
	 * getComboxValueAndName
	 * @param GBS_PriceConditionForm thisForm
	 * @param HttpServletRequest request
	 * @throws Exception
	 * @return 
	 */
	private void getComboxValueAndName(GBS_PriceConditionForm thisForm, HttpServletRequest request)
		throws Exception {
		//get combox value from database 
		GBS_PriceConditionActionLogic logic =
			new GBS_PriceConditionActionLogic(this.getDataSource(request));

		ReturnValue ret = new ReturnValue();

		//Countries List丂弶婜壔
		ArrayList littlecountry_stList = new ArrayList();
		ret = logic.getCountryInfo();
		if (ret.isError()) {
			if (ret.isBussinessError()) {
				this.setMessage(ret.getMessageList());
			}
		} else {
			ArrayList countryList = (ArrayList) ret.getDataValue();
			for (int i = 0; countryList != null && i < countryList.size(); i++) {
				GBS_MCountry_stBean country_st = (GBS_MCountry_stBean) countryList.get(i);
				GBS_LittleCountry_stBean littleCountry_stList = new GBS_LittleCountry_stBean();
				littleCountry_stList.setCountryCode(country_st.getCountryCode());
				littleCountry_stList.setCountryName(country_st.getCountryName());
				littlecountry_stList.add(littleCountry_stList);
				if(findIt(country_st.getCountryCode(),thisForm.getCountry())){
					ArrayList checked=thisForm.getCountryListChecked();
					checked.add("Y");
					thisForm.setCountryListChecked(checked) ;
				}else{
					ArrayList checked=thisForm.getCountryListChecked();
					checked.add("N");
					thisForm.setCountryListChecked(checked) ;
				}
			}
		}

		//Category List 弶婜壔
		ret = logic.getProductCAtegoryInfo();

		ArrayList categoryList = new ArrayList();
		if (ret.isError()) {
			if (ret.isBussinessError()) {
				this.setMessage(ret.getMessageList());
			}
		} else {
			ArrayList productCAtegoryList = (ArrayList) ret.getDataValue();
			for (int i = 0; productCAtegoryList != null && i < productCAtegoryList.size(); i++) {
				GBS_MWideUse_stBean mWideUse_st = (GBS_MWideUse_stBean) productCAtegoryList.get(i);
				GBS_LittleProductCategory_stBean productCategroy_st =
					new GBS_LittleProductCategory_stBean();
				productCategroy_st.setProductCategory(mWideUse_st.getMainKey());
				productCategroy_st.setProductCategoryName(mWideUse_st.getString1());
				categoryList.add(productCategroy_st);
				if(findIt(mWideUse_st.getMainKey(),thisForm.getProductCategory())){
					ArrayList checked=thisForm.getProductCategoryListChecked();
					checked.add("Y");
					thisForm.setProductCategoryListChecked(checked) ;
				}else{
					ArrayList checked=thisForm.getProductCategoryListChecked();
					checked.add("N");
					thisForm.setProductCategoryListChecked(checked) ;
				}
			}
		}

		//PriceList List 弶婜壔
		ArrayList priceList = new ArrayList();
		GBS_LittlePriceCategory_stBean price_st = new GBS_LittlePriceCategory_stBean();
		price_st.setPriceCategory("Hardware");
		price_st.setPriceCategoryName("Hardware");
		priceList.add(price_st);
		price_st = new GBS_LittlePriceCategory_stBean();
		price_st.setPriceCategory("CPC");
		price_st.setPriceCategoryName("CPC");
		priceList.add(price_st);
		thisForm.setPriceList(priceList);
		boolean allNoChecked = true;
		for(int i = 0;i< thisForm.getPriceList().size();i++){
			price_st=(GBS_LittlePriceCategory_stBean)thisForm.getPriceList().get(i);
			ArrayList checked = thisForm.getPriceListChecked();
			if(findIt(price_st.getPriceCategory(),thisForm.getPrice())){
				checked.add("Y");
				allNoChecked = false;
			}else{
				checked.add("N");
			}
			thisForm.setPriceListChecked(checked);
		}
		if(allNoChecked){
			ArrayList checked = thisForm.getPriceListChecked();
			checked.set(0,"Y");
			thisForm.setPriceListChecked(checked);
		}
		
		thisForm.setCountryList(littlecountry_stList);
		thisForm.setProductCategoryList(categoryList);
	}
	/**
	 * find it in there
	 * @param String it
	 * @param String[] there
	 * @return boolean
	 */
	private boolean findIt(String it,String[] there){
		if(there !=null){
			for(int i = 0;i < there.length;i++){
				if(there[i].equals(it)){
				return true;
				}
			}
		}
		
		return false;
	}
}

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
中文字幕一区二区三| 欧美伊人精品成人久久综合97 | 日韩欧美你懂的| 日韩激情视频网站| 精品免费99久久| 高清不卡一二三区| 亚洲精品伦理在线| 欧美一区二区三区在线看| 狠狠v欧美v日韩v亚洲ⅴ| 国产三级精品三级| 91麻豆文化传媒在线观看| 亚洲电影激情视频网站| 日韩欧美专区在线| 成人小视频免费观看| 亚洲美女视频一区| 91精品免费在线观看| 国产电影精品久久禁18| 亚洲精品v日韩精品| 日韩欧美综合在线| 波多野结衣在线aⅴ中文字幕不卡| 亚洲三级电影全部在线观看高清| 欧美日韩国产小视频| 韩国在线一区二区| 一个色妞综合视频在线观看| 91精品婷婷国产综合久久性色| 国产在线精品免费| 亚洲一区在线看| 国产亚洲一本大道中文在线| 91成人网在线| 国产另类ts人妖一区二区| 亚洲视频一区二区在线观看| 欧美一二三区在线| bt7086福利一区国产| 美女尤物国产一区| 亚洲欧美日韩成人高清在线一区| 日韩午夜电影av| 91论坛在线播放| 国产一区999| 日韩精品成人一区二区在线| 国产精品久久久久永久免费观看| 日韩一区二区精品葵司在线| jlzzjlzz亚洲女人18| 久久精品久久久精品美女| 亚洲码国产岛国毛片在线| 久久久久一区二区三区四区| 欧美精品aⅴ在线视频| 91老司机福利 在线| 精品一区二区三区视频| 午夜精品成人在线| 亚洲视频你懂的| 国产欧美一区二区三区沐欲| 欧美一级夜夜爽| 欧美日韩一区二区三区视频| 99re8在线精品视频免费播放| 国内精品免费**视频| 亚洲成人综合在线| 亚洲免费观看高清完整版在线观看 | 亚洲日本va午夜在线影院| 久久综合av免费| 欧美一二三在线| 欧美日韩情趣电影| 91久久精品一区二区三区| 成人三级伦理片| 国产精品996| 国产福利一区在线观看| 韩日av一区二区| 激情五月婷婷综合| 精品一区二区三区在线视频| 爽爽淫人综合网网站 | 日韩avvvv在线播放| 一区二区三区成人在线视频| 免费观看一级特黄欧美大片| 一级做a爱片久久| 一区二区视频在线看| 亚洲乱码国产乱码精品精小说 | 中文字幕欧美一| 国产拍欧美日韩视频二区| 久久你懂得1024| 国产欧美视频在线观看| 久久精品视频在线看| 久久精品人人做人人爽人人| 国产日韩高清在线| 国产日产精品一区| 国产精品久久久久影视| 亚洲欧美日韩国产中文在线| 亚洲丝袜自拍清纯另类| 亚洲国产综合在线| 免费成人性网站| 精彩视频一区二区| 成人夜色视频网站在线观看| 99久久久久久99| 一本一本久久a久久精品综合麻豆| 99re这里只有精品首页| 欧美午夜精品一区二区蜜桃| 欧美肥妇bbw| 精品国产露脸精彩对白 | 日韩一区二区影院| 欧美精品一区二区久久久| 亚洲国产精华液网站w| 亚洲视频 欧洲视频| 首页亚洲欧美制服丝腿| 国产伦精品一区二区三区免费迷| 国产福利91精品一区二区三区| 91免费观看视频在线| 欧美日韩国产一级| 国产日韩欧美高清在线| 亚洲精品亚洲人成人网| 久久精品国产精品青草| 成人精品一区二区三区四区 | 中文字幕中文字幕一区| 亚洲一区电影777| 黑人巨大精品欧美黑白配亚洲| 高清国产一区二区| 欧美日韩久久不卡| 久久久综合网站| 亚洲国产欧美日韩另类综合| 国模套图日韩精品一区二区 | jizzjizzjizz欧美| 欧美老肥妇做.爰bbww视频| 久久精品视频网| 五月激情丁香一区二区三区| 成人性色生活片免费看爆迷你毛片| 欧美日韩一二三区| 欧美国产日韩亚洲一区| 日本成人在线视频网站| 99精品在线免费| 精品久久人人做人人爰| 一区二区久久久| 粉嫩蜜臀av国产精品网站| 91精品国产综合久久福利| 国产精品国产三级国产aⅴ原创| 日本最新不卡在线| 色天使色偷偷av一区二区| 久久久777精品电影网影网 | 欧洲激情一区二区| 国产午夜精品久久| 美女一区二区三区在线观看| 欧美最新大片在线看| 欧美激情一区二区三区蜜桃视频| 日本网站在线观看一区二区三区| 91同城在线观看| 中文字幕乱码亚洲精品一区| 久久国产夜色精品鲁鲁99| 精品视频免费看| 亚洲精品成人在线| 成人午夜碰碰视频| 久久久精品一品道一区| 精品一区二区在线免费观看| 8v天堂国产在线一区二区| 亚洲黄网站在线观看| 97成人超碰视| 国产精品国产三级国产aⅴ无密码| 国产在线精品一区二区三区不卡 | 精品乱码亚洲一区二区不卡| 亚洲第一福利视频在线| 色婷婷激情综合| 国产最新精品精品你懂的| 国产99精品国产| xnxx国产精品| 久久精品国产精品亚洲精品| 欧美一级一级性生活免费录像| 亚洲国产欧美在线| 欧美色网站导航| 一二三区精品福利视频| 一本久久综合亚洲鲁鲁五月天 | 国产亚洲精品资源在线26u| 精品亚洲免费视频| 精品久久久久久久一区二区蜜臀| 麻豆精品国产91久久久久久| 日韩欧美国产系列| 精品一区二区三区av| 日韩欧美不卡在线观看视频| 麻豆成人av在线| 337p日本欧洲亚洲大胆色噜噜| 免费观看一级欧美片| 精品91自产拍在线观看一区| 国产乱人伦偷精品视频不卡| 中文字幕免费一区| 色噜噜狠狠色综合中国 | 一区二区三区在线视频观看| 91尤物视频在线观看| 亚洲欧美一区二区三区极速播放| 日本高清成人免费播放| 亚洲第一电影网| 欧美mv和日韩mv的网站| 国产.欧美.日韩| 亚洲摸摸操操av| 日韩一级免费一区| 国产精品资源站在线| 综合网在线视频| 欧美日本高清视频在线观看| 看国产成人h片视频| 国产免费观看久久| 欧美少妇xxx| 国产美女在线精品| 亚洲三级视频在线观看| 91.com在线观看| 国产精品影视天天线| 亚洲精品视频在线看| 日韩精品一区二区三区中文不卡 |