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

📄 gbs_cusprofileactionlogic.java

📁 对日软件外包 为东芝做的一个全球商业管理系统
💻 JAVA
字号:
/** 
 * method GBS_CustomerInquiryActionLogic.java
 * created on 08-12-2004
 * 
 * @author   GXK
 * @version  1.0
 */

package LOGIC;

import javax.sql.DataSource;

import COMMON.ReturnValue;
import COMMON.SystemConstants;
import DB.GBS_MCountry_DB;
import DB.GBS_MCustomer_DB;
import DB.GBS_MWideUse_DB;
import DB.GBS_TRfp_DB;
import DataBean.GBS_Customer_stBean;
import DataBean.GBS_MWideUse_stBean;
import DataBean.GBS_CodeName_stBean;
import java.util.ArrayList;

public class GBS_CusProfileActionLogic implements SystemConstants {
	private DataSource datasource = null;

	/**
	 * trans datasource to db
	 * @param datasource
	 */
	public GBS_CusProfileActionLogic(DataSource datasource) {
		this.datasource = datasource;
	}

	/**
	 * get country name and code list
	 * @return ReturnValue
	 * @throws Exception
	 */
	public ReturnValue getCountryList() throws Exception {
		GBS_MCountry_DB DB = new GBS_MCountry_DB(this.datasource);
		return DB.getCountry();
	}

	/**
	 * get industry name and code list
	 * @return ReturnValue 
	 * @throws Exception
	 */
	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;
	}

	/**
	 * update customer info
	 * @param stBean GBS_Customer_stBean
	 * @return ReturnValue
	 * @throws Exception
	 */
	public ReturnValue updateCustomer(GBS_Customer_stBean stBean) throws Exception {
		GBS_MCustomer_DB DB = new GBS_MCustomer_DB(this.datasource);
		return DB.updateByCustmerID(stBean);
	}

	/**
	 * delete customer info
	 * @param stBean GBS_Customer_stBean
	 * @return ReturnValue
	 * @throws Exception
	 */

	public ReturnValue deleteCustomer(GBS_Customer_stBean stBean) throws Exception {
		GBS_MCustomer_DB DB = new GBS_MCustomer_DB(this.datasource);
		return DB.deleteByCustmerID(stBean);
	}

	/**
	 * insert customer info
	 * @param stBean GBS_Customer_stBean
	 * @return ReturnValue
	 * @throws Exception
	 */
	public ReturnValue insertCustomer(GBS_Customer_stBean stBean) throws Exception {
		GBS_MCustomer_DB DB = new GBS_MCustomer_DB(this.datasource);
		return DB.insertByCustmerID(stBean);
	}

	/**
	 * get customer info 
	 * @param customerId String
	 * @return ReturnValue
	 * @throws Exception
	 */
	public ReturnValue getCustomer(String customerId) throws Exception {
		GBS_MCustomer_DB DB = new GBS_MCustomer_DB(this.datasource);
		return DB.selectAllByCustmerID(customerId);
	}


	/**
	 * get RFP info From DB by CustomerId
	 * @param customerId
	 * @return the Rfp Info List
	 * @throws Exception
	 */
	public ReturnValue getRfpInfo(String customerId,int plusHour) throws Exception {
		GBS_TRfp_DB DB = new GBS_TRfp_DB(this.datasource);
		return DB.getRfpInfo(customerId,plusHour);
	}

}

⌨️ 快捷键说明

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