/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.yuntong.action;

import java.util.List;

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.yuntong.service.G_IDriverInfoService;
import com.yuntong.service.G_IMarketInfoService;
import com.yuntong.service.G_ITruckInfoService;

/** 
 * MyEclipse Struts
 * Creation date: 04-11-2007
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="snps" path="/G_snps1.jsp"
 */
public class G_GoSNPSAction extends Action {
	private G_IMarketInfoService marketInfoService;
	private G_ITruckInfoService truckInfoService;
	private G_IDriverInfoService driverInfoService;
	/*
	 * Generated Methods
	 */

	public G_IDriverInfoService getDriverInfoService() {
		return driverInfoService;
	}

	public void setDriverInfoService(G_IDriverInfoService driverInfoService) {
		this.driverInfoService = driverInfoService;
	}

	public G_IMarketInfoService getMarketInfoService() {
		return marketInfoService;
	}

	public void setMarketInfoService(G_IMarketInfoService marketInfoService) {
		this.marketInfoService = marketInfoService;
	}

	public G_ITruckInfoService getTruckInfoService() {
		return truckInfoService;
	}

	public void setTruckInfoService(G_ITruckInfoService truckInfoService) {
		this.truckInfoService = truckInfoService;
	}

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		List driverInfoList=driverInfoService.getDrinerIsLeisure(0);
		List truckInfoList=truckInfoService.getTruckIsLeisure(0);
		List marketInfoList=marketInfoService.findMarketInfo();
		System.out.println(marketInfoList.size());
		HttpSession session=request.getSession();
		session.setAttribute("driverInfoList", driverInfoList);
		session.setAttribute("truckInfoList",truckInfoList);
		session.setAttribute("marketInfoList",marketInfoList);
		return mapping.findForward("scps");
	}
}