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

📄 notoverstockaction.java

📁 一个汽车售后服务站的典型的进销管理系统,B/S模式的
💻 JAVA
字号:
/*
 * Generated by MyEclipse Struts
 * Template path: templates/java/JavaClass.vtl
 */
package com.xfaccp.struts.action.stock;

import java.util.List;

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

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

import com.xfaccp.base.BaseAction;
import com.xfaccp.form.StockTable;

/** 
 * MyEclipse Struts
 * Creation date: 11-10-2007
 * 
 * XDoclet definition:
 * @struts.action scope="request"
 */
public class NotOverStockAction extends BaseAction {
	/*
	 * 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) 
	{
		HttpSession session=request.getSession();
		/*
		 * 没有完成的采购单就是那些state=0的
		 * 并且availability=5,表明这些采购单首先要是审批通过状态
		 * 也就是可以拿去采购的单子
		 */
		StockTable stocktbl=new StockTable();
		//设置模型属性值
		stocktbl.setState(0);
		stocktbl.setAvailability(5);
		
		if(session.getAttribute("notoversearchList")!=null)
		{
			session.removeAttribute("notoversearchList");
		}
		if(session.getAttribute("oversearchList")!=null)
		{
			session.removeAttribute("oversearchList");
		}
		
		//标识是当前的采购查询
		session.setAttribute("stock_search","stocksearch");
		try
		{
			List list=this.command.findByExample(stocktbl);
			session.setAttribute("notoversearchList",list);
			if(list.size()<0)
			{
				request.setAttribute("isNull","en");
			}
			
		}
		catch(Exception ex)
		{
			ex.printStackTrace();
		}
		return mapping.findForward("notover_search");
	}
}

⌨️ 快捷键说明

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