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

📄 xsquotationlistaction.java

📁 关于网上汽车销售系统的详细编程项目实战实例
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.company.struts.action.quotation;

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

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

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.company.hib.dao.IDAO;
import com.company.manager.tool.PageUtil;

/**
 * MyEclipse Struts Creation date: 01-24-2008
 * 
 * XDoclet definition:
 * 
 * @struts.action validate="true"
 */
public class XsQuotationListAction extends Action {
	/*
	 * Generated Methods
	 */

	/**
	 * Method execute
	 * 
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	// 报价单
	private IDAO quoDao;
	// 客户
	private IDAO customer;
    // 部门
	private IDAO department;
	// 货物
	private IDAO goods;
	// 销售员
	private IDAO person;
    //销售类型
	private IDAO sellType;

	public IDAO getSellType() {
		return sellType;
	}

	public void setSellType(IDAO sellType) {
		this.sellType = sellType;
	}

	public IDAO getCustomer() {
		return customer;
	}

	public void setCustomer(IDAO customer) {
		this.customer = customer;
	}

	public IDAO getDepartment() {
		return department;
	}

	public void setDepartment(IDAO department) {
		this.department = department;
	}

	public IDAO getGoods() {
		return goods;
	}

	public void setGoods(IDAO goods) {
		this.goods = goods;
	}

	public IDAO getPerson() {
		return person;
	}

	public void setPerson(IDAO person) {
		this.person = person;
	}

	public IDAO getQuoDao() {
		return quoDao;
	}

	public void setQuoDao(IDAO quoDao) {
		this.quoDao = quoDao;
	}

	/*
	 * private IDAO sellType;
	 * 
	 * public void setSellType(IDAO sellType) { this.sellType = sellType; }
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		// TODO Auto-generated method stub
		System.out.println("报价单");
		//		
		// XsQuotationMain quoMain=(XsQuotationMain)form;
		// System.out.println("1");
		// String startTime=request.getParameter("startTime");
		// System.out.println("2");
		// // int pCode=Integer.parseInt(request.getParameter("sellType"));
		// System.out.println("3");
		// List result=this.getQuoDao().findByCondition(startTime);
		// System.out.println("4");
		// List lr=new ArrayList();
		// System.out.println("5");
		// for(int i=0;i<result.size();i++)
		// {
		// XsQuotationMain qm= new XsQuotationMain();
		// Object[] s=(Object[])result.get(i);
		// System.out.println("6");
		//			
		// // qm.setQuotationDate(s[0]);
		//			
		// qm.setPersonCode(Integer.parseInt(s[1].toString()));
		// System.out.println("7");
		// lr.add(qm);
		// }
		// System.out.println("报价单8");
		// request.setAttribute("quoMain", lr);
		// System.out.println("9");
		//		
		String pageNo = request.getParameter("pageNo");
		Map map = quoDao.findAll(pageNo, "XsQuotationSub");
		PageUtil page = (PageUtil) map.get("page");
		String url = request.getContextPath();
		page.setUrlstr(url+"/quoList.do");
		List list = (List) map.get("list");
		request.setAttribute("page", page);
		request.setAttribute("quotationlist", list);

		List quoList = quoDao.findAll();
		if (quoList != null) {
			System.out.println("not null !!!");

		} else {
			System.out.println("no data !!!");
		}
		HttpSession session = request.getSession();
		session.setAttribute("quotation", list);
		System.out.println("quotation");

		/** ------------销售类型---------* */
		/*
		 * System.out.println("销售类型11111111"); List type=sellType.findAll();
		 * session.setAttribute("type", type);
		 * 
		 * System.out.println("22");
		 */

		List kehu = customer.findAll();
		session.setAttribute("kehu", kehu);

		System.out.println("customer");

		List bumen = department.findAll();
		session.setAttribute("bumen", bumen);

		System.out.println("department");

		List huowu = goods.findAll();
		session.setAttribute("huowu", huowu);

		System.out.println("goods");

		List persons = person.findAll();
		session.setAttribute("persons", persons);
		System.out.println("persons");
		
		List type=sellType.findAll();
		session.setAttribute("type",type);
		System.out.println("sellType");

		return mapping.findForward("success");

	}

}

⌨️ 快捷键说明

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