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

📄 preparecustomeraction.java

📁 基于SSH (struts+spring+hibernate)框架设计的 CRM客户关系管理系统
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.csu.crm.informationManage.action;

import java.util.List;
import java.util.Map;

import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import org.apache.struts.action.Action;
import org.apache.struts.action.ActionForm;
import org.apache.struts.action.ActionForward;
import org.apache.struts.action.ActionMapping;

import com.csu.crm.informationManage.dao.CrmAreaMapDAO;
import com.csu.crm.informationManage.dao.NameListDAO;
import com.csu.crm.informationManage.dao.NameMapDAO;

/** 
 * MyEclipse Struts
 * Creation date: 09-27-2007
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 */
public class PrepareCustomerAction extends Action {
	private NameListDAO nameListDAO;
	private NameMapDAO nameMapDAO;
	private CrmAreaMapDAO crmAreaMapDAO;

	public NameMapDAO getNameMapDAO() {
		return nameMapDAO;
	}

	public void setNameMapDAO(NameMapDAO nameMapDAO) {
		this.nameMapDAO = nameMapDAO;
	}

	public CrmAreaMapDAO getCrmAreaMapDAO() {
		return crmAreaMapDAO;
	}

	public void setCrmAreaMapDAO(CrmAreaMapDAO crmAreaMapDAO) {
		this.crmAreaMapDAO = crmAreaMapDAO;
	}

	public NameListDAO getNameListDAO() {
		return nameListDAO;
	}
	
	public void setNameListDAO(NameListDAO nameListDAO) {
		this.nameListDAO = nameListDAO;
	}

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		List listAllIndustry = nameListDAO.getCrmEntIndustryNameList();
		List listAllProperty = nameListDAO.getCrmEntPropertyNameList();
		List listAllCredit = nameListDAO.getCrmEntCreditNameList();
		List listAllBank = nameListDAO.getCrmBankNameList();
		List listAllCuLev = nameListDAO.getCrmCuLevNameList();
		List listAllCuState = nameListDAO.getCrmCuStateNameList();

		Map mapAllIndustry = nameMapDAO.getCrmEntIndustryNameMap();
		Map mapAllProperty = nameMapDAO.getCrmEntPropertyNameMap();
		Map mapAllCredit = nameMapDAO.getCrmEntCreditNameMap();
		Map mapAllBank = nameMapDAO.getCrmBankNameMap();
		Map mapAllCuLev = nameMapDAO.getCrmCuLevNameMap();
		
		Map mapAllCuState = nameMapDAO.getCrmCuStateNameMap();
		/**
		 * 把areaId - ProvinceId 映射保存起来
		 * 便于初始化时 用areaId 找到provinceId
		 */
		Map mapAreaProvince = nameMapDAO.getAreaProvinceNameMap();
		
		
		List listAllProvinceId = crmAreaMapDAO.getCrmProvinceIdList();
		List listAllAreaId = crmAreaMapDAO.getCrmAreaIdList();
		Map mapAllProvince = crmAreaMapDAO.getCrmProvinceMap();
		Map mapAllArea = crmAreaMapDAO.getCrmAreaMap();
		
		
		request.setAttribute("listAllIndustry", listAllIndustry);
		request.setAttribute("listAllProperty", listAllProperty);
		request.setAttribute("listAllCredit", listAllCredit);
		request.setAttribute("listAllBank", listAllBank);
		request.setAttribute("listAllCuLev", listAllCuLev);
		request.setAttribute("listAllCuState", listAllCuState);
		
		request.setAttribute("mapAllIndustry", mapAllIndustry);
		request.setAttribute("mapAllProperty", mapAllProperty);
		request.setAttribute("mapAllCredit", mapAllCredit);
		request.setAttribute("mapAllBank", mapAllBank);
		request.setAttribute("mapAllCuLev", mapAllCuLev);
		request.setAttribute("mapAllCuState", mapAllCuState);
		
		request.setAttribute("listAllProvinceId", listAllProvinceId);
		request.setAttribute("listAllAreaId", listAllAreaId);
		request.getSession().setAttribute("mapAllProvince", mapAllProvince);
		request.setAttribute("mapAllArea", mapAllArea);
		
		request.setAttribute("mapAreaProvince", mapAreaProvince);
		
		
		return mapping.findForward("success");
	}
}

⌨️ 快捷键说明

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