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

📄 dealerinfo.java

📁 java阿里巴巴代码
💻 JAVA
字号:
package com.saas.biz.dealerMgr;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.StringTokenizer;

import net.sf.json.JSONArray;
import com.saas.biz.JavaScriptObject.TreeNode;
import com.saas.biz.JavaScriptObject.TreeObject;
import com.saas.biz.commen.commMethodMgr;
import com.saas.biz.dao.dealerDAO.DealerDAO;
import com.saas.biz.dao.dealerDAO.DealerExt;
import com.saas.biz.dao.relationccDAO.RelationCcExt;
import com.saas.sys.buffer.Buffers;
import com.saas.sys.dbm.Dbtable;
import com.saas.sys.exp.SaasApplicationException;
import com.saas.sys.log.Logger;

public class DealerInfo {
	
	
	Logger log;
	
	
	Buffers inBuffer;
	
	
	Buffers outBuffer;
	
	
	Dbtable tradeQuery;
	
	
	commMethodMgr commen;
	
	
	ArrayList queryResult = new ArrayList();
	
	
	
	public DealerInfo() {

		log = new Logger(this);
		tradeQuery = new Dbtable();
		commen = new commMethodMgr();
	}
	
	
	public void setOutBuffer(Buffers outBuffer) {

		this.outBuffer = outBuffer;
	}
	
	
	public Buffers getOutBuffer() {

		return this.outBuffer;
	}
	
	
	public void setTradeQuery(Dbtable tradeQuery) {

		this.tradeQuery = tradeQuery;
	}
	
	
	public Dbtable getTradeQuery() {

		return this.tradeQuery;
	}
	
	
	public ArrayList getQueryResult() {

		return this.queryResult;
	}
	
	
	public void setQueryResult(ArrayList queryResult) {

		this.queryResult = queryResult;
	}
	
	
	
	
	public void addDealerInfo(Buffers inbuffer) {

		this.outBuffer = inbuffer;
		this.inBuffer = inbuffer;
		log.LOG_INFO("进入addDealerInfo方法...");
		int iResult = -1;
		String cust_id=inbuffer.getString("SESSION_CUST_ID"); 
		String obj_cust_id=inbuffer.getString("OBJ_CUST_ID"); 
		String company_address=inbuffer.getString("COMPANY_ADDRESS"); 
		String field_status=inbuffer.getString("FIELD_STATUS"); 
		String branch_store_number=inbuffer.getString("BRANCH_STORE_NUMBER"); 
		String service_condition=inbuffer.getString("SERVICE_CONDITION"); 
		String m_sales_volume=inbuffer.getString("M_SALES_VOLUME"); 
		String y_sales_volume=inbuffer.getString("Y_SALES_VOLUME"); 
		String act_brand=inbuffer.getString("ACT_BRAND"); 
		String inventory_mgr=inbuffer.getString("INVENTORY_MGR"); 
		String back_condition=inbuffer.getString("BACK_CONDITION"); 
		String financial_mgr=inbuffer.getString("FINANCIAL_MGR"); 
		String cooperate=inbuffer.getString("COOPERATE"); 
		String transport_capacity=inbuffer.getString("TRANSPORT_CAPACITY"); 
		String staff_population=inbuffer.getString("STAFF_POPULATION");          
		String oper_user_id=inbuffer.getString("SESSION_USER_ID"); 
		String in_date=inbuffer.getString("IN_DATE"); 
		String remark=inbuffer.getString("REMARK");
		int i = 0;
		i = checkDealer(cust_id,obj_cust_id);
		try {
			if(i==0){
				iResult = addDealerInfo(cust_id,obj_cust_id,company_address,field_status,branch_store_number,
						service_condition,m_sales_volume,y_sales_volume,act_brand,inventory_mgr,back_condition,
						financial_mgr,cooperate,transport_capacity,staff_population,oper_user_id,in_date,remark);
			}else{
				iResult = updateDealerInfo(cust_id,obj_cust_id,company_address,field_status,branch_store_number,
						service_condition,m_sales_volume,y_sales_volume,act_brand,inventory_mgr,back_condition,
						financial_mgr,cooperate,transport_capacity,staff_population,oper_user_id,in_date,remark);
			}
		}
		catch (Exception e) {
			log.LOG_INFO(e.getMessage());
		}
		if (iResult != 0) {
			this.outBuffer.setInt("RESULT_CODE", -1);
			this.outBuffer.setString("RESULT_INFO", "业务处理失败!");
		}
		else {
			this.outBuffer.setInt("RESULT_CODE", 0);
			this.outBuffer.setString("RESULT_INFO", "业务处理成功!");
		}
		log.LOG_INFO("退出addDealerInfo方法...");
	}
	
	
	public int addDealerInfo(String cust_id,String obj_cust_id,String company_address,String field_status,String branch_store_number,
			String service_condition,String m_sales_volume,String y_sales_volume,String act_brand,String inventory_mgr,String back_condition,
			String financial_mgr,String cooperate,String transport_capacity,String staff_population,String oper_user_id,String in_date,String remark) throws SaasApplicationException {

			DealerExt dealerExt = new DealerExt();
			dealerExt.setParam(":VCUST_ID",cust_id);                          
			dealerExt.setParam(":VOBJ_CUST_ID",obj_cust_id);                          
			dealerExt.setParam(":VCOMPANY_ADDRESS",company_address);                          
			dealerExt.setParam(":VFIELD_STATUS",field_status);                          
			dealerExt.setParam(":VBRANCH_STORE_NUMBER",branch_store_number);                          
			dealerExt.setParam(":VSERVICE_CONDITION",service_condition);                          
			dealerExt.setParam(":VM_SALES_VOLUME",m_sales_volume);                          
			dealerExt.setParam(":VY_SALES_VOLUME",y_sales_volume);                          
			dealerExt.setParam(":VACT_BRAND",act_brand);                          
			dealerExt.setParam(":VINVENTORY_MGR",inventory_mgr);                          
			dealerExt.setParam(":VBACK_CONDITION",back_condition);                          
			dealerExt.setParam(":VFINANCIAL_MGR",financial_mgr);                          
			dealerExt.setParam(":VCOOPERATE",cooperate);                          
			dealerExt.setParam(":VTRANSPORT_CAPACITY",transport_capacity);                          
			dealerExt.setParam(":VSTAFF_POPULATION",staff_population);                          
			dealerExt.setParam(":VOPER_USER_ID",oper_user_id);                          
			dealerExt.setParam(":VIN_DATE",in_date);                          
			dealerExt.setParam(":VREMARK",remark); 
			tradeQuery.executeBy(dealerExt.insBy("INS_ALL_DEALER"));
		    return 0;
	}



	public int updateDealerInfo(String cust_id,String obj_cust_id,String company_address,String field_status,String branch_store_number,
			String service_condition,String m_sales_volume,String y_sales_volume,String act_brand,String inventory_mgr,String back_condition,
			String financial_mgr,String cooperate,String transport_capacity,String staff_population,String oper_user_id,String in_date,String remark) throws SaasApplicationException {
	
		DealerExt dealerExt = new DealerExt();
		dealerExt.setParam(":VCUST_ID",cust_id);                          
		dealerExt.setParam(":VOBJ_CUST_ID",obj_cust_id);                          
		dealerExt.setParam(":VCOMPANY_ADDRESS",company_address);                          
		dealerExt.setParam(":VFIELD_STATUS",field_status);                          
		dealerExt.setParam(":VBRANCH_STORE_NUMBER",branch_store_number);                          
		dealerExt.setParam(":VSERVICE_CONDITION",service_condition);                          
		dealerExt.setParam(":VM_SALES_VOLUME",m_sales_volume);                          
		dealerExt.setParam(":VY_SALES_VOLUME",y_sales_volume);                          
		dealerExt.setParam(":VACT_BRAND",act_brand);                          
		dealerExt.setParam(":VINVENTORY_MGR",inventory_mgr);                          
		dealerExt.setParam(":VBACK_CONDITION",back_condition);                          
		dealerExt.setParam(":VFINANCIAL_MGR",financial_mgr);                          
		dealerExt.setParam(":VCOOPERATE",cooperate);                          
		dealerExt.setParam(":VTRANSPORT_CAPACITY",transport_capacity);                          
		dealerExt.setParam(":VSTAFF_POPULATION",staff_population);                          
		dealerExt.setParam(":VOPER_USER_ID",oper_user_id);                          
		dealerExt.setParam(":VIN_DATE",in_date);                          
		dealerExt.setParam(":VREMARK",remark); 
		tradeQuery.executeBy(dealerExt.insBy("UPDATE_ALL_DEALER"));
		return 0;
	}


	
	public int checkDealer(String cust_id,String obj_cust_id){
		ArrayList list = new ArrayList();
		DealerExt dealerExt = new DealerExt();
		dealerExt.setParam(":VCUST_ID", cust_id);
		dealerExt.setParam(":VOBJ_CUST_ID", obj_cust_id);
		list = dealerExt.selByList("SEL_ONE_DEALER_CHECK");
		if(list!=null&&list.size()>0){
			return 1;
		}
			return 0;
	}
	
	public HashMap getOneDealer(String cust_id,String obj_cust_id){
		ArrayList list = new ArrayList();
		DealerExt dealerExt = new DealerExt();
		HashMap map = new HashMap();
		dealerExt.setParam(":VCUST_ID", cust_id);
		dealerExt.setParam(":VOBJ_CUST_ID", obj_cust_id);
		list = dealerExt.selByList("SEL_ONE_DEALER_CHECK");
		if(list!=null&&list.size()>0){
			map = (HashMap)list.get(0);
		}
		return map;
	}
	

}

⌨️ 快捷键说明

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