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

📄 addcallservlet.java

📁 oa rar it is the jsp
💻 JAVA
字号:
package com.accp.oa.control.servlet.client;

import java.io.IOException;
import java.io.PrintWriter;
import java.util.ArrayList;

import javax.servlet.ServletException;
import javax.servlet.http.HttpServlet;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse;

import com.accp.oa.dao.imple.CallDAO;
import com.accp.oa.dao.imple.FollwDAO;
import com.accp.oa.dao.imple.commonDAO;
import com.accp.oa.factorydao.FactoryDAO;

/**
 * 此类用于添加回访信息
 * @author Administrator
 *
 */

public class AddCallServlet extends HttpServlet {

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

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

	/**
	 *在doGet方法中进行处理
	 */
	public void doGet(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {
		//获得采购ID
		String StcokaddID = (String) request.getSession().getAttribute(
				"StockItmes");
		//获得回访时间
		String CallDate = request.getParameter("dattime").trim();
		//获得回访内容
		String CallConent = request.getParameter("test").trim();
		//获得回访结果
		String CallResult = request.getParameter("result").trim();
		//获得备注信息
		String ProblemResult = request.getParameter("remark").trim();
		String path = request.getContextPath();
		commonDAO common = commonDAO.GetcomonDAO();
		
		ArrayList list = new ArrayList();//用于存储回访信息
		list.add(StcokaddID);
		list.add(CallDate);
		list.add(CallConent);
		list.add(CallResult);
		list.add(ProblemResult);
		CallDAO calldao = CallDAO.getCallDAO();
		calldao.add(list);
		int page = common.gettatolpage();
		if(page == 0){//控制页数
			page = 1;
		}
		response.sendRedirect(path + "/servlet/SelectCallServlet?topage=" + page);
	}

	/**
	 
	 */
	public void doPost(HttpServletRequest request, HttpServletResponse response)
			throws ServletException, IOException {

		doGet(request, response);
	}

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

}

⌨️ 快捷键说明

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