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

📄 dms_0002fsystem_0002fcodeinfoaction_0002ejsp_jsp.java

📁 dgbas公文管理核心java源码
💻 JAVA
字号:
package DMS.system;

import com.jasson.business.system.DocCopyDAO;
import com.jasson.business.system.DocKindDAO;
import com.jasson.business.system.DocTypeDAO;
import com.jasson.business.system.DocAttributeDAO;
import com.jasson.business.system.DocSecretDAO;
import com.jasson.business.system.DocSpeedDAO;
import com.jasson.common.ExtendString;
import com.jasson.common.ExtendCalendar;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;


public class DMS_0002fsystem_0002fCodeInfoAction_0002ejsp_jsp extends HttpJspBase {


    static {
    }
    public DMS_0002fsystem_0002fCodeInfoAction_0002ejsp_jsp( ) {
    }

    private static boolean _jspx_inited = false;

    public final void _jspx_init() throws org.apache.jasper.runtime.JspException {
    }

    public void _jspService(HttpServletRequest request, HttpServletResponse  response)
        throws java.io.IOException, ServletException {

        JspFactory _jspxFactory = null;
        PageContext pageContext = null;
        HttpSession session = null;
        ServletContext application = null;
        ServletConfig config = null;
        JspWriter out = null;
        Object page = this;
        String  _value = null;
        try {

            if (_jspx_inited == false) {
                synchronized (this) {
                    if (_jspx_inited == false) {
                        _jspx_init();
                        _jspx_inited = true;
                    }
                }
            }
            _jspxFactory = JspFactory.getDefaultFactory();
            response.setContentType("text/html;charset=big5");
            pageContext = _jspxFactory.getPageContext(this, request, response,
            			"", true, 8192, true);

            application = pageContext.getServletContext();
            config = pageContext.getServletConfig();
            session = pageContext.getSession();
            out = pageContext.getOut();

            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(0,26);to=(1,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(1,48);to=(2,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(2,57);to=(3,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(3,57);to=(4,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(4,57);to=(5,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(5,62);to=(6,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(6,59);to=(7,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(7,58);to=(8,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(8,50);to=(9,0)]
                out.write("\r\n");

            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(9,52);to=(10,0)]
                out.write("\r\n");

            // end
            // begin [file="/DMS/system/CodeInfoAction.jsp";from=(10,2);to=(43,9)]
                //讀傳過來的所有參數
                	String codeIDStr = request.getParameter("codeID");
                	String codeTypeStr = request.getParameter("codeType");
                	if (codeIDStr==null)	codeIDStr="0";
                	if (codeTypeStr==null)	codeTypeStr="1";
                	int codeID=0,codeType=0;
                	codeID=Integer.parseInt(codeIDStr);
                	codeType=Integer.parseInt(codeTypeStr);
                        String codeName = request.getParameter("codeName");
                	String codeNo = request.getParameter("codeNo");
                	String mButton = request.getParameter("act");
                	String speedDays=request.getParameter("speedDays");
                	String flow="false";
                	if (codeNo==null) codeNo="";
                	if (codeName==null) codeName="";
                	if (speedDays==null) speedDays="0";
                	if (mButton==null) mButton="";
                        //codeNo=GenFun.Big5Decoding(codeNo);
                	//codeName=GenFun.Big5Decoding(codeName);
                	//speedDays=GenFun.Big5Decoding(speedDays.trim());
                	ExtendString ExStr=new ExtendString();
                        ExtendCalendar ExCal=new ExtendCalendar();
                        codeNo = ExStr.nullToSpace(codeNo);
                        codeName = ExStr.nullToSpace(codeName);
                	speedDays = ExStr.nullToSpace(speedDays.trim());
                	int isAccess=1;
                	if (mButton.equals("add")){
                	if (codeType==1)
                	{
                	DocCopyDAO[] cdocCopyDAO = DocCopyDAO.findAll();
                	for(int i=0;i<cdocCopyDAO.length;i++)
                	{
                		if(codeNo.equals(cdocCopyDAO[i].getCopyNO())|| codeName.equals(cdocCopyDAO[i].getCopyName())){
                	        
            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(43,11);to=(47,9)]
                out.write("\r\n\t        <script>\r\n\t        alert(\"代碼或名稱已存在!\");\r\n\t\t</script>\r\n\t        ");

            // end
            // begin [file="/DMS/system/CodeInfoAction.jsp";from=(47,11);to=(192,0)]
                
                	        flow="true";
                	        }
                	        
                	}
                	if(flow.equals("true"))
                	{
                	DocCopyDAO docCopyDAO = new DocCopyDAO();
                	docCopyDAO.setCopyNO(codeNo);
                	docCopyDAO.setCopyName(codeName);
                	docCopyDAO.setActiveTag("1");
                	long a=docCopyDAO.insert();
                	}
                	}
                	if (codeType==2)
                	{
                	DocKindDAO docKindDAO = new DocKindDAO();
                	docKindDAO.setKindNO(codeNo);
                	docKindDAO.setKindName(codeName);
                	docKindDAO.setActiveTag("1");
                	long a=docKindDAO.insert();
                	}
                	if (codeType==3)
                	{
                	DocTypeDAO docTypeDAO = new DocTypeDAO();
                	docTypeDAO.setTypeNO(codeNo);
                	docTypeDAO.setTypeName(codeName);
                	docTypeDAO.setActiveTag("1");
                	long a=docTypeDAO.insert();
                	}
                	if (codeType==4)
                	{
                	DocAttributeDAO docAttributeDAO = new DocAttributeDAO();
                	docAttributeDAO.setAttributeNO(codeNo);
                	docAttributeDAO.setAttributeName(codeName);
                	docAttributeDAO.setActiveTag("1");
                	long a=docAttributeDAO.insert();
                	}
                	if (codeType==5)
                	{
                	DocSecretDAO docSecretDAO = new DocSecretDAO();
                	docSecretDAO.setSecretNO(codeNo);
                	docSecretDAO.setSecretName(codeName);
                	docSecretDAO.setActiveTag("1");
                	long a=docSecretDAO.insert();
                	}
                	if (codeType==6)
                	{
                	DocSpeedDAO docSpeedDAO = new DocSpeedDAO();
                	docSpeedDAO.setSpeedNO(codeNo);
                	docSpeedDAO.setSpeedName(codeName);
                	docSpeedDAO.setActiveTag("1");
                	long a=docSpeedDAO.insert();
                	}
                	}
                	if (mButton.equals("del")){
                	if (codeType==1)
                	{
                	DocCopyDAO docCopyDAO = new DocCopyDAO();
                	docCopyDAO.delete(codeID);
                	}
                	if (codeType==2)
                	{
                	DocKindDAO docKindDAO = new DocKindDAO();
                	docKindDAO.delete(codeID);
                	}
                	if (codeType==3)
                	{
                	DocTypeDAO docTypeDAO = new DocTypeDAO();
                	docTypeDAO.delete(codeID);
                	}
                	if (codeType==4)
                	{
                	DocAttributeDAO docAttributeDAO = new DocAttributeDAO();
                	docAttributeDAO.delete(codeID);
                	}
                	if (codeType==5)
                	{
                	DocSecretDAO docSecretDAO = new DocSecretDAO();
                	docSecretDAO.delete(codeID);
                	}
                	if (codeType==6)
                	{
                	DocSpeedDAO docSpeedDAO = new DocSpeedDAO();
                	docSpeedDAO.delete(codeID);
                	}
                	}
                
                	if (mButton.equals("mod")){
                	if (codeType==1)
                	{
                	DocCopyDAO docCopyDAO = new DocCopyDAO();
                	docCopyDAO.setCopyID(codeID);
                	docCopyDAO.setCopyNO(codeNo);
                	docCopyDAO.setCopyName(codeName);
                	docCopyDAO.setActiveTag("1");
                	docCopyDAO.update();
                	}
                	if (codeType==2)
                	{
                	DocKindDAO docKindDAO = new DocKindDAO();
                	docKindDAO.setKindID(codeID);
                	docKindDAO.setKindNO(codeNo);
                	docKindDAO.setKindName(codeName);
                	docKindDAO.setActiveTag("1");
                	docKindDAO.update();
                	}
                	if (codeType==3)
                	{
                	DocTypeDAO docTypeDAO = new DocTypeDAO();
                	docTypeDAO.setTypeID(codeID);
                	docTypeDAO.setTypeNO(codeNo);
                	docTypeDAO.setTypeName(codeName);
                	docTypeDAO.setActiveTag("1");
                	docTypeDAO.update();
                	}
                	if (codeType==4)
                	{
                	DocAttributeDAO docAttributeDAO = new DocAttributeDAO();
                	docAttributeDAO.setAttributeID(codeID);
                	docAttributeDAO.setAttributeNO(codeNo);
                	docAttributeDAO.setAttributeName(codeName);
                	docAttributeDAO.setActiveTag("1");
                	docAttributeDAO.update();
                	}
                	if (codeType==5)
                	{
                	DocSecretDAO docSecretDAO = new DocSecretDAO();
                	docSecretDAO.setSecretID(codeID);
                	docSecretDAO.setSecretNO(codeNo);
                	docSecretDAO.setSecretName(codeName);
                	docSecretDAO.setActiveTag("1");
                	docSecretDAO.update();
                	}
                	if (codeType==6)
                	{
                	DocSpeedDAO docSpeedDAO = new DocSpeedDAO();
                	docSpeedDAO.setSpeedID(codeID);
                	docSpeedDAO.setSpeedNO(codeNo);
                	docSpeedDAO.setSpeedName(codeName);
                	docSpeedDAO.setActiveTag("1");
                	docSpeedDAO.update();
                	}
                	}
                
            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(192,2);to=(197,44)]
                out.write("\r\n<html>\r\n<script src=\"../inc/toUpper.js\" content=\"text/javascript\"></script><head><title></title></head>\r\n<BODY LANGUAGE=javascript onload=\"form1.submit();\">\r\n<form name=form1 id=form1 method=\"POST\" action=\"../system/DocCode.jsp\">\r\n  <input type=hidden name=\"codeType\" value=\"");

            // end
            // begin [file="/DMS/system/CodeInfoAction.jsp";from=(197,47);to=(197,55)]
                out.print(codeType);
            // end
            // HTML // begin [file="/DMS/system/CodeInfoAction.jsp";from=(197,57);to=(201,0)]
                out.write("\">\r\n</form>\r\n</BODY>\r\n</HTML>\r\n");

            // end

        } catch (Throwable t) {
            if (out != null && out.getBufferSize() != 0)
                out.clearBuffer();
            if (pageContext != null) pageContext.handlePageException(t);
        } finally {
            if (_jspxFactory != null) _jspxFactory.releasePageContext(pageContext);
        }
    }
}

⌨️ 快捷键说明

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