?? gbs_mifactionlogic.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 + -