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

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.yuntong.business.vo.J_FareMathVo;
import com.yuntong.service.J_FareMathService;

/** 
 * MyEclipse Struts
 * Creation date: 04-07-2007
 * 
 * XDoclet definition:
 * @struts.action validate="true"
 * @struts.action-forward name="fare" path="/Y_Index.jsp"
 */
public class JfrareMathActionAction extends Action {
	private J_FareMathService fareMathServices; 
	/*
	 * Generated Methods
	 */

	/** 
	 * Method execute
	 * @param mapping
	 * @param form
	 * @param request
	 * @param response
	 * @return ActionForward
	 */
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		J_FareMathVo fareMathVo=(J_FareMathVo) request.getSession().getAttribute("vo");
		int typeid=fareMathVo.getTFreightStyleID();
		int goodsid=fareMathVo.getRegisterGoodsID();
		int rid=fareMathVo.getRegisterId();
	    fareMathServices.faremath(typeid,goodsid);
	    fareMathServices.Richange(rid ,typeid);
	    
	    return mapping.findForward("fare");
	}

	public J_FareMathService getFareMathServices() {
		return fareMathServices;
	}

	public void setFareMathServices(J_FareMathService fareMathServices) {
		this.fareMathServices = fareMathServices;
	}
}