springboot药品管理系统药材批发网站药材购物网站javaweb+ssm

此系统分为前台管理和后台管理。前台管理是友好的操作界面,供用户浏览、查询使用。包括:浏览药品、查询药品、订购药品、购物车、用户信息修改、订单查询等功能;后台管理是提供给管理员的,其中包括:药品管理、用户管理、订单管理、权限管理等。采用不同管理员分类别管理及分层管理模式,使管理员从繁琐的手工操作中解脱出来,并提高了办公效率。

表7 订单药品信息

字段名称

字段大小

字段类型

说明

orderId

4

长整型(3)

订单编号

goodsId

4

长整型(3)

药品编号

status

4

长整型(3)

状态0未确认,1已确认,100收货,101退货

 

表8 订单信息

字段名称

字段大小

字段类型

说明

orderId

4

长整型(3)

编号

customerId

4

长整型(3)

客户编号

status

4

长整型(3)

状态

orderTime

50

文本(202)

时间

 

 

 

package com.control.third;

import java.io.IOException;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;
import com.dao.ThirdInfoDAO;
import com.util.PublicToolCheckParam;
import com.util.PublicToolShowThirdInfoList;

public class ManageThirdInfo extends HttpServlet {

	/**
	 * 
	 */
	private static final long serialVersionUID = 3099608914702213565L;
	static ThirdInfoDAO cdao = new ThirdInfoDAO();

	public  static void coolThirdInfo(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
			String thirdId = request.getParameter("thirdId");
			String isCooled = request.getParameter("isCooled");
			if(PublicToolCheckParam.checkNullAndEmpty(thirdId) && PublicToolCheckParam.checkNullAndEmpty(isCooled)){
					cdao.coolThird(Integer.parseInt(thirdId),Integer.parseInt(isCooled));
					String isSearching = request.getParameter("isSearching");
					String currentPage = request.getParameter("currentPage");
					if(PublicToolCheckParam.checkNullAndEmpty(isSearching)){
						String key = request.getParameter("key");
						PublicToolShowThirdInfoList.searchThirdInfo(request, response, currentPage, key);
						request.setAttribute("key", key);
						request.setAttribute("isSearching", "yes");
					}
					else{
						PublicToolShowThirdInfoList.showThirdInfoList(request, response, currentPage);
					}
			}
			request.getRequestDispatcher("../third/manageThirdInfo.jsp").forward(request, response);
			
	}

	public static void coolMoreThirdInfo(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
			String currentPage = request.getParameter("currentPage");
			String[] ckb = request.getParameterValues("ckb");
			if(ckb != null){
				for(int i=0;i<ckb.length;i++){
	//				cdao.coolThird(Integer.parseInt(ckb[i]));
				}
			}
			PublicToolShowThirdInfoList.showThirdInfoList(request, response, currentPage);
			request.getRequestDispatcher("../third/manageThirdInfo.jsp").forward(request, response);
		
	}

	public static void searchThirdInfo(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
			String currentPage = request.getParameter("currentPage");
			String key = request.getParameter("key");
			PublicToolShowThirdInfoList.searchThirdInfo(request, response, currentPage, key);
			request.setAttribute("isSearching", "yes");
			request.setAttribute("key", key);
			request.getRequestDispatcher("../third/manageThirdInfo.jsp").forward(request, response);
		
	}

	public static void showManageThirdInfoPage(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {
		
			String currentPage = request.getParameter("currentPage");
			PublicToolShowThirdInfoList.showThirdInfoList(request, response, currentPage);
			request.getRequestDispatcher("../third/manageThirdInfo.jsp").forward(request, response);
	
	}


/**
 * Constructor of the object.
 */
public ManageThirdInfo() {
	super();
}


/**
 * Destruction of the servlet. <br>
 */
public void destroy() {
	super.destroy(); // Just puts "destroy" string in log
	// Put your code here
}

/**
 * The doGet method of the servlet. <br>
 *
 * This method is called when a form has its tag value method equals to get.
 * 
 * @param request the request send by the client to the server
 * @param response the response send by the server to the client
 * @throws ServletException if an error occurred
 * @throws IOException if an error occurred
 */
public void doGet(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {

	doPost(request, response);
}

/**
 * The doPost method of the servlet. <br>
 *
 * This method is called when a form has its tag value method equals to post.
 * 
 * @param request the request send by the client to the server
 * @param response the response send by the server to the client
 * @throws ServletException if an error occurred
 * @throws IOException if an error occurred
 */
public void doPost(HttpServletRequest request, HttpServletResponse response)
		throws ServletException, IOException {


String method = request.getParameter("method");
if(PublicToolCheckParam.checkNullAndEmpty(method)){
	if(method.equals("showManageThirdInfoPage")){
		showManageThirdInfoPage(request, response);
	}
	else if(method.equals("cool")){
		coolThirdInfo(request, response);
	}
	else if(method.equals("coolMore")){
		coolMoreThirdInfo(request, response);
	}
	else if(method.equals("search")){
		searchThirdInfo(request, response);
	}
}
}

	/**
	 * Initialization of the servlet. <br>
	 *
	 * @throws ServletException if an error occurs
	 */
	public void init() throws ServletException {
		// Put your code here
	}

}

猜你喜欢

转载自blog.csdn.net/a779289061/article/details/113773442
今日推荐