📄 dms_0002freport_0002freportact007_0002ejsp_jsp.java
字号:
package DMS.report;
import com.jasson.business.report.*;
import java.util.*;
import com.jasson.integration.agentflow.*;
import si.wfinterface.WFCI;
import com.jasson.common.ExtendString;
import com.jasson.business.report.ReportDAO007;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
public class DMS_0002freport_0002fReportAct007_0002ejsp_jsp extends HttpJspBase {
// begin [file="/DMS/report/ReportAct007.jsp";from=(7,0);to=(7,77)]
// end
// begin [file="/DMS/report/ReportAct007.jsp";from=(8,0);to=(8,79)]
// end
// begin [file="/DMS/report/ReportAct007.jsp";from=(9,0);to=(9,72)]
// end
// begin [file="/DMS/report/ReportAct007.jsp";from=(10,3);to=(168,0)]
static int linecount = 10;
///////////////////////
ReportDAO007[] integrateFileInfo(ReportDAO007[] FileInfo )
{
ReportDAO007 NullDAO = ReportDAO007.getNullDA0();
ExtendString ExStr = new ExtendString();
Vector vtrFileInfo = new Vector();
for(int g = 0; g < FileInfo.length; g ++)
{
vtrFileInfo.addElement(FileInfo[g]);
}
int j = 0;
int i = 0;
int count = 0;
//Vector deptDocCount = new Vector();
for( j = 0 ; j < vtrFileInfo.size(); j++)
{
ReportDAO007 iDAO = (ReportDAO007)vtrFileInfo.elementAt(i);
ReportDAO007 jDAO = (ReportDAO007)vtrFileInfo.elementAt(j);
String iUndertakeDeptID = ExStr.nullToSpace(iDAO.getUndertakeDeptID());
String jUndertakeDeptID = ExStr.nullToSpace(jDAO.getUndertakeDeptID());
if(iUndertakeDeptID.equals(jUndertakeDeptID))
{
if(j!=vtrFileInfo.size()-1)
{
count++;
}
else
{
count++;
//deptDocCount.addElement(new Integer(count));
int addcount = linecount - count%linecount;
for(int h = 0; h < addcount; h++)
{
vtrFileInfo.add(i+count+h,NullDAO);
}
j = j+addcount;
}
}
else
{
//deptDocCount.addElement(new Integer(count));
if(count%linecount!=0)
{
int addcount = linecount - count%linecount;
for(int h = 0; h < addcount; h++)
{
vtrFileInfo.add(j+h,NullDAO);
}
j = j+addcount;
}
i = j;
j = j-1;
count = 0;
}
}
ReportDAO007[] newFileInfo = new ReportDAO007[vtrFileInfo.size()];
for(int r= 0; r < vtrFileInfo.size(); r++)
{
newFileInfo[r] = (ReportDAO007)vtrFileInfo.elementAt(r);
}
return newFileInfo;
}//end getIntegratePage
/////////////////////////////////////
int[] getPageNO(ReportDAO007[] FileInfo )
{
ExtendString ExStr = new ExtendString();
int[] pageNO = new int[FileInfo.length];
boolean flag1 = true;
int beforecount = 0;
for(int i = 0; i < FileInfo.length; i++ )
{
if(!ExStr.nullToSpace(FileInfo[i].getFileNO()).equals(""))
{
pageNO[i] = i/linecount-beforecount+1 ;
flag1 = true;
}
else
{
pageNO[i] = pageNO[i-1];
if(flag1 == true)
{
beforecount = pageNO[i-1]+beforecount;
flag1 = false;
}
}
}
return pageNO;
}
int[] getOldFileInfoDocCount(ReportDAO007[] oldFileInfo )
{
ExtendString ExStr = new ExtendString();
int i = 0 ;
int j = 0 ;
Vector vtrDeptDocCount = new Vector();
int count = 0;
for(i = 0; i < oldFileInfo.length; i ++)
{
if(ExStr.nullToSpace(oldFileInfo[j].getUndertakeDeptID()).equals(ExStr.nullToSpace(oldFileInfo[i].getUndertakeDeptID())))
{
count++;
if(i == oldFileInfo.length-1)
{
vtrDeptDocCount.addElement(new Integer(count));
}
}
else
{
vtrDeptDocCount.addElement(new Integer(count));
j = i ;
i = i -1;
count = 0;
}
}
int[] DeptDocCount = new int[vtrDeptDocCount.size()];
for( int h = 0 ; h < vtrDeptDocCount.size() ; h++)
{
DeptDocCount[h] = ((Integer)vtrDeptDocCount.elementAt(h)).intValue();
//System.out.println("DeptDocCount["+h+"] is :" +DeptDocCount[h]);
}
return DeptDocCount;
}
/////////////////////////////////////////////////////////////////
int[] getFileInfoDocCount( ReportDAO007[] FileInfo , ReportDAO007[] oldFileInfo)
{
ExtendString ExStr = new ExtendString();
int oldDocCount[] = getOldFileInfoDocCount(oldFileInfo);
System.out.println("oldDocCount ' length is :" +oldDocCount.length);
int docCount[] = new int[FileInfo.length];
System.out.println("docCount' s length is"+docCount.length);
int i = 0;
int j = 0;
int h = 0 ;
//boolean change = false;
for(i = 0 ; i < FileInfo.length ; i++)
{
String tmp1 = ExStr.nullToSpace(FileInfo[i].getUndertakeDeptID());
String tmp2 = ExStr.nullToSpace(FileInfo[j].getUndertakeDeptID());
//System.out.println("tmp1 is :"+tmp1+"---------tmp2 is:"+tmp2);
docCount[i] = oldDocCount[h];
if(!tmp1.equals(tmp2)&&!tmp1.equals(""))
{
j = i;
h= h+1;
docCount[i] = oldDocCount[h];
}
}
return docCount;
}
// end
static {
}
public DMS_0002freport_0002fReportAct007_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/report/ReportAct007.jsp";from=(0,48);to=(1,0)]
out.write("\r\n");
// end
// HTML // begin [file="/DMS/report/ReportAct007.jsp";from=(1,50);to=(2,0)]
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -