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

📄 gbs_mifactionlogic.java

📁 对日软件外包 为东芝做的一个全球商业管理系统
💻 JAVA
字号:
/*
 * Created on 2004/08/10
 *
 */
package LOGIC;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Map;

import javax.servlet.http.HttpServletResponse;
import javax.sql.DataSource;

import COMMON.ReturnValue;
import COMMON.SystemConstants;
import DB.GBS_MCustomer_DB;
import DB.GBS_MMifDetail_DB;
import DataBean.GBS_Customer_stBean;
import DataBean.GBS_MMif_stBean;

/**
 * <p>Title: MIF </p>
 * <p>Description: process page action<br>
 * </p>
 * <p> Copyright (c) 2004</p>
 * @author xjl
 * @version  1.0
 */

public class GBS_MifActionLogic implements SystemConstants {
	
	private DataSource datasource = null;
	/**
	 * trans datasource to db
	 * @param datasource
	 */
	public GBS_MifActionLogic(DataSource datasource) {
		this.datasource = datasource;
	}
	
	/**
	 * get Mif 
	 * @param		strCustomerId
	 * @return		ReturnValue
	 * @exception	Exception    Exception for information of other errors
	 * @since		2004/08/10
 	*/	
	public ReturnValue getMif( String strCustomerId ) throws Exception {
		ReturnValue returnValue = new ReturnValue();
		Map returnData = new HashMap();
		
		//1.庢摼屭媞柤
		GBS_MCustomer_DB mCustomerDb = new GBS_MCustomer_DB( this.datasource );
		returnValue = mCustomerDb.selectByCustmerID( strCustomerId );
		if ( !returnValue.isError() ){
			GBS_Customer_stBean stBean = 
			 ( GBS_Customer_stBean ) returnValue.getDataValue() ;
			 if ( stBean != null ){
				returnData.put( CUSTOMER_NAME, stBean.getCustomerName() );
			 }
		}
			
		//2.MIF忣曬傪庢摼
		GBS_MMifDetail_DB MifDetail_DB = new GBS_MMifDetail_DB(this.datasource);
		returnValue = (ReturnValue) MifDetail_DB.getMifList( strCustomerId );
		if ( !returnValue.isError() ){
			Map getData = ( Map )returnValue.getDataValue() ;
			//忣曬僨乕僞
			ArrayList lstData = ( ArrayList )getData.get( DETAIL );
			if ( lstData != null ){
				returnData.put( DETAIL, lstData );
			}
			//儗僐乕僪悢
			String recordCount = ( String )getData.get( RECORDCOUNT );
			if ( recordCount != null ){
				returnData.put( RECORDCOUNT, recordCount );
			}
		}
		returnValue.setDataValue( returnData );
		return returnValue;
	}
		
	/**
	 * get  Attachmentfile
	 * @param		GBS_MMif_stBean fIn
	 * @return		ReturnValue
	 * @exception	Exception    Exception for information of other errors
	 * @since		2004/08/10
	 */		
	public ReturnValue getAttachmentFile( GBS_MMif_stBean fIn , HttpServletResponse response) throws Exception{
		ReturnValue returnValue = new ReturnValue();
		GBS_MMifDetail_DB Detail_DB = new GBS_MMifDetail_DB( this.datasource );
		//download
		returnValue = ( ReturnValue ) Detail_DB.getAttachmentFile( fIn , response );
		return returnValue;
	}
}

⌨️ 快捷键说明

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