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

📄 task_pending_upload.jsp

📁 非常完整的Java开发的网络办公系统
💻 JSP
字号:
<%       
    String root = ConfigParaLoader.getParameter("rootUrl"); 
    if( request.getParameter("type") !=null && Integer.parseInt( request.getParameter("type") ) == 1 ) //上载 
       {              
           String attachURL = ConfigParaLoader.getParameter("workflowAttachmentUrl"); 
           attachURL += SubPathGenerater.getSeperator() + SubPathGenerater.getSubPath( root + SubPathGenerater.getSeperator() + attachURL);
           click = ( SubTaskValueBean )session.getAttribute( "click" );   
        // Initialization 
           mySmartUpload.initialize( pageContext ); 
           mySmartUpload.setTotalMaxFileSize( 100000 ); 

       // Upload        
          mySmartUpload.upload(); 
          mySmartUpload.save( root + SubPathGenerater.getSeperator() + attachURL  ); 
               
	       if( mySmartUpload.getRequest().getParameter("subNote") != null )
	           click.setSubNote( mySmartUpload.getRequest().getParameter("subNote") );           
       Collection c = click.getSubFiles();
       for (int i=0;i<mySmartUpload.getFiles().getCount();i++) 
       { 
           com.vnex.intranet.upload.File myFile = mySmartUpload.getFiles().getFile(i); 
           if (!myFile.isMissing())   
           { 
                WorkflowFileValueBean wf = new WorkflowFileValueBean(); 
                wf.setName( myFile.getFileName() ); 
                wf.setTitle( attachURL + "/" + myFile.getFileName() ); 
                wf.setDescription( myFile.getFileName() ); 
                c.add(wf);             
           }                            
        }     
        SubTaskDao dao = new SubTaskDao();
        SubTaskValueBean sub = dao.getSubTask(subtaskId);
        
        sub.setSubNote(click.getSubNote());
        
        click = sub;
        
        click.setSubFiles(c);    
        
        session.setAttribute("click",click);
  } 



    if( request.getParameter("type") !=null && Integer.parseInt( request.getParameter("type") ) == 2 ) 
      { 

	      if( mySmartUpload.getRequest().getParameter("subNote") != null )
	          click.setSubNote(request.getParameter("subNote") );

          String files[] = request.getParameterValues("attachments");
           	           
          if(files!= null) 
          { 
              for(int i = 0; i<files.length; i++) 
              { 
                  SubPathGenerater.deleteFile( root + SubPathGenerater.getSeperator() + files[i] );  
                  click.removeFile(  files[i] );                 
              }     
              
              SubTaskDao dao = new SubTaskDao();
              SubTaskValueBean sub = dao.getSubTask(subtaskId);
              
              sub.setSubFiles(click.getSubFiles());
              sub.setSubNote(click.getSubNote());              
              
              click = sub;
              session.setAttribute("click",click);
          }     
      }
          
      //proxy.UpdateSubtask(click);
%>

⌨️ 快捷键说明

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