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

📄 extenddocservlet.java

📁 dgbas公文管理核心java源码
💻 JAVA
字号:
package com.jasson.presentation.document;

import com.jasson.integration.agentflow.AgentFlowWrapper;
import com.jasson.integration.agentflow.Task;
import com.flowring.struts.webapp.User;
import com.jasson.business.document.CreateDocDAO;
import com.jasson.business.document.ReceDocDAO;
import com.jasson.business.document.DocExtensionInfo;
import com.jasson.common.*;
import java.io.*;
import javax.servlet.*;
import javax.servlet.http.*;
import si.wfinterface.WFCI;
	/**
	 * <p>Title: ExtendDocServlet</p>
	 * <p>Description: null</p>
	 * <p>Copyright: Copyright (c) 2003</p>
	 * <p>Company: Wingroup Network Software Corporation</p>
	 * @author unascribed
	 * @version 1.0
	 */
	public class ExtendDocServlet extends HttpServlet {
		String strForward = "/workflow/errorpage.jsp";
		WFCI wfci;
		public void service (HttpServletRequest request, HttpServletResponse response) throws IOException, ServletException {
		request.setCharacterEncoding("ISO8859-1"); 
		HttpSession session = (HttpSession)request.getSession();
		boolean  isTask = false;
		ExtendString ExStr=new ExtendString();
        String  ExtensionDays = request.getParameter("ExtensionDays");
        /**
         * firstly entering servlet,if reason or ExtensionDays is null,
         * then forward ExtensionInfo page to input data.
         */
		if (ExtensionDays == null) {
			strForward = "/DMS/document/ExtensionInfo.jsp";
			forward(strForward, request, response); }
		else {
            /**to get taskId value,pathId value*/
            String[] taskId = request.getParameterValues("TaskID");
            String pathId = request.getParameter("PathID");
            /** to get CreateNO or FileNO*/
            String  createNO = "";
            String  fileNO = "";
            WFCI wfci = (WFCI)getServletContext().getAttribute("wfci");
			AgentFlowWrapper wrapper = new AgentFlowWrapper(wfci);
            //for(int i=0;i<taskId.length;i++){
			Task task=wrapper.getTask(taskId[0]);
            createNO=task.getCreateNO();
            fileNO=task.getFileNO();
            //}
            /** once createNO or fileNO is null,then forward errorPage
             *  if createNO unempty ,to update a column of endDate in the table of TCreateDoc
             *  if fileNO is not unempty ,to update a column of endDate in the table of TCreateDoc,
             *  and to set the value of the isTask variable is true;
             */
            if (createNO == null && fileNO == null) {
                  forward(strForward, request, response); }
            else {
         		String reason = ExStr.paraDecode(request.getParameter("reason"));
	            DocExtensionInfo docExtensionInfo = new DocExtensionInfo();
	            int iExtensionDays=Integer.parseInt(ExtensionDays);
	            docExtensionInfo.setExtensionDays(iExtensionDays);
	            Base base = new Base(wfci);
	            ExtendCalendar Exc = new ExtendCalendar();
	            docExtensionInfo.setExtensionDays(iExtensionDays);
	            docExtensionInfo.setReason(reason);
            	if(createNO!=null){
					CreateDocDAO createDocDAO = new CreateDocDAO();
					docExtensionInfo.setCreateNO(createNO);
					//耎甶

⌨️ 快捷键说明

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