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

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

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

import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory;
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.action.actionform.Y_findR1Form;
import com.yuntong.action.ajaxaction.Y_FindRegisterByIDAction;
import com.yuntong.business.vo.Y_DHQRInfoVO;
import com.yuntong.business.vo.Y_splitInfoVO;
import com.yuntong.service.Y_IRegisterManagerService;
import com.yuntong.service.Y_ISplitRegister;

/** 
 * MyEclipse Struts
 * Creation date: 04-08-2007
 * 未估货票精确查询
 * XDoclet definition:
 * @struts.action path="/y_findR1" name="y_findR1Form" input="/Y_wghp_1.jsp" scope="request" validate="true"
 */
public class Y_findR1Action extends Action {
	private Log log = LogFactory.getLog(Y_FindRegisterByIDAction.class);
	
	private Y_ISplitRegister register;
	public Y_ISplitRegister getRegister() {
		return register;
	}
	public void setRegister(Y_ISplitRegister register) {
		this.register = register;
	}
	
	public ActionForward execute(ActionMapping mapping, ActionForm form,
			HttpServletRequest request, HttpServletResponse response) {
		Y_findR1Form y_findR1Form = (Y_findR1Form) form;
		//查询信息
		String inputID=y_findR1Form.getInputID();
		//查询条件
		String inputType=y_findR1Form.getInputType();
		//查询
		long iid=Long.parseLong(inputID);
		int itype=Integer.parseInt(inputType);
		List list=register.findRegisterByIDAndRunID(iid, itype);
		HttpSession session=request.getSession();
		//保存结果
		session.setAttribute("Y_pageinfo", list);
		//保存页面分页信息
		Y_splitInfoVO spInfo=new Y_splitInfoVO();
		spInfo.setCurPage(1);
		spInfo.setPageNum(2);
		spInfo.setPageSize(1);
		session.setAttribute("Y_spInfo", spInfo);
		return mapping.findForward("gowghp");
	}
}