?? gbs_customerinquiryactionlogic.java
字號:
/**
* method GBS_CustomerInquiryActionLogic.java
* created on 08-11-2004
*
* @author GXK
* @version 1.0
*/
package LOGIC;
import javax.sql.DataSource;
import java.util.ArrayList;
import COMMON.ReturnValue;
import COMMON.SystemConstants;
import DB.GBS_MCountry_DB;
import DB.GBS_MCustomer_DB;
import DB.GBS_MRegion_DB;
import DB.GBS_MSubsidiary_DB;
import DB.GBS_MWideUse_DB;
import DataBean.GBS_MCountry_stBean;
import DataBean.GBS_LittleCountry_stBean;
import DataBean.GBS_MWideUse_stBean;
import DataBean.GBS_CodeName_stBean;
public class GBS_CustomerInquiryActionLogic implements SystemConstants {
private DataSource datasource = null;
/**
* trans datasource to db
* @param datasource
*/
public GBS_CustomerInquiryActionLogic(DataSource datasource) {
this.datasource = datasource;
}
/**
* get DB.SubsidiaryList
* @return ReturnValue
* @exception Exception Exception for information of other errors
* @since 08-11-2004
*/
public ReturnValue getSubsidiaryList() throws Exception {
GBS_MSubsidiary_DB DB = new GBS_MSubsidiary_DB(this.datasource);
return DB.getSubsidiaryCodeNameList();
}
/**
* get DB.CountryList
* @return ReturnValue
* @exception Exception Exception for information of other errors
* @since 08-11-2004
*/
public ReturnValue getCountryList() throws Exception {
GBS_MCountry_DB countryDB = new GBS_MCountry_DB(datasource);
ArrayList countryList = new ArrayList();
ReturnValue returnValue = countryDB.seletAllCountry();
if (!returnValue.isError()) {
ArrayList list = (ArrayList) returnValue.getDataValue();
for (int i = 0; list != null && i < list.size(); i++) {
GBS_MCountry_stBean mCountry_st = (GBS_MCountry_stBean) list.get(i);
GBS_LittleCountry_stBean littleCountry_st = new GBS_LittleCountry_stBean();
littleCountry_st.setCountryCode(mCountry_st.getCountryCode());
littleCountry_st.setCountryName(mCountry_st.getCountryName());
countryList.add(littleCountry_st);
}
returnValue.setDataValue(countryList);
}
return returnValue;
}
/**
* get DB.RegionList
* @return ReturnValue
* @exception Exception Exception for information of other errors
* @since 08-11-2004
*/
public ReturnValue getRegionList() throws Exception {
GBS_MRegion_DB DB = new GBS_MRegion_DB(this.datasource);
return DB.getRegionCodeNameList();
}
/**
* get DB.IndustryList
* @return ReturnValue
* @exception Exception Exception for information of other errors
* @since 08-11-2004
*/
public ReturnValue getIndustryList() throws Exception {
ReturnValue returnValue = new ReturnValue();
GBS_MWideUse_DB WideUse_DB = new GBS_MWideUse_DB(this.datasource);
ArrayList returnList = new ArrayList();
returnValue = WideUse_DB.selectByTargetUse("INDUSTRY");
if (!returnValue.isError()) {
ArrayList list = (ArrayList) returnValue.getDataValue();
for (int i = 0; list != null && i < list.size(); i++) {
GBS_MWideUse_stBean mWideUse_st = (GBS_MWideUse_stBean) list.get(i);
GBS_CodeName_stBean codeName_st = new GBS_CodeName_stBean();
codeName_st.setCode(mWideUse_st.getMainKey());
codeName_st.setName(mWideUse_st.getString1());
returnList.add(codeName_st);
}
returnValue.setDataValue(returnList);
}
return returnValue;
}
/**
* get customer info from DB
* @param existingMA String
* @param existingGA String
* @param prospectGA String
* @param customerName String
* @param customerAbbr String
* @param statusGA String
* @param resultStatus String
* @param subsidiary String[]
* @param industry String[]
* @param region String[]
* @param countries String[]
* @return ReturnValue
* @throws Exception
* @since 08-11-2004
*/
public ReturnValue getCustomer(
String existingMA,
String existingGA,
String prospectGA,
String customerName,
String customerAbbr,
String statusGA,
String resultStatus,
String[] subsidiary,
String[] industry,
String[] region,
String[] countries,
int plusHour,
String admins)
throws Exception {
GBS_MCustomer_DB DB = new GBS_MCustomer_DB(this.datasource);
return DB.getCustomer(
existingMA,
existingGA,
prospectGA,
customerName,
customerAbbr,
statusGA,
resultStatus,
subsidiary,
industry,
region,
countries,
plusHour,
admins);
}
}
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -