📄 specialdetail_jsp.java
字号:
package org.apache.jsp;
import javax.servlet.*;
import javax.servlet.http.*;
import javax.servlet.jsp.*;
import org.apache.jasper.runtime.*;
import cn.com.aheadsoft.recordset.DetailRecordSet;
import cn.com.aheadsoft.recordset.YearAimRecordSet;
import cn.com.aheadsoft.recordset.PersonInfoRecordSet;
import cn.com.aheadsoft.recordset.DeptInfoRecordSet;
import java.util.StringTokenizer;
import java.util.ArrayList;
import cn.com.aheadsoft.util.StringFormat;
import cn.com.aheadsoft.util.UserInfo;
import cn.com.aheadsoft.manage.UserPurviewManage;
import cn.com.aheadsoft.recordset.DetailRecordSet;
import cn.com.aheadsoft.recordset.DeptInfoRecordSet;
import cn.com.aheadsoft.recordset.TaskLevelRecordSet;
import java.util.HashMap;
import java.util.GregorianCalendar;
import java.util.Calendar;
public class specialdetail_jsp extends HttpJspBase {
private static java.util.Vector _jspx_includes;
public java.util.List getIncludes() {
return _jspx_includes;
}
public void _jspService(HttpServletRequest request, HttpServletResponse response)
throws java.io.IOException, ServletException {
JspFactory _jspxFactory = null;
javax.servlet.jsp.PageContext pageContext = null;
HttpSession session = null;
ServletContext application = null;
ServletConfig config = null;
JspWriter out = null;
Object page = this;
JspWriter _jspx_out = null;
try {
_jspxFactory = JspFactory.getDefaultFactory();
response.setContentType("text/html;charset=GB2312");
pageContext = _jspxFactory.getPageContext(this, request, response,
null, true, 8192, true);
application = pageContext.getServletContext();
config = pageContext.getServletConfig();
session = pageContext.getSession();
out = pageContext.getOut();
_jspx_out = out;
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
out.write("\r\n");
cn.com.aheadsoft.util.UserInfo userinfo = null;
synchronized (session) {
userinfo = (cn.com.aheadsoft.util.UserInfo) pageContext.getAttribute("userinfo", PageContext.SESSION_SCOPE);
if (userinfo == null){
try {
userinfo = (cn.com.aheadsoft.util.UserInfo) java.beans.Beans.instantiate(this.getClass().getClassLoader(), "cn.com.aheadsoft.util.UserInfo");
} catch (ClassNotFoundException exc) {
throw new InstantiationException(exc.getMessage());
} catch (Exception exc) {
throw new ServletException("Cannot create bean of class " + "cn.com.aheadsoft.util.UserInfo", exc);
}
pageContext.setAttribute("userinfo", userinfo, PageContext.SESSION_SCOPE);
}
}
out.write("\r\n");
TaskLevelRecordSet tlset = (TaskLevelRecordSet)request.getAttribute("tlset");
//DetailRecordSet drset = (DetailRecordSet)request.getAttribute("drset");
ArrayList rdList = (ArrayList)request.getAttribute("rdList");
session.setAttribute("rdList", rdList);
GregorianCalendar cal = new GregorianCalendar();
int nowyear = cal.get(Calendar.YEAR);
int nowmonth = cal.get(Calendar.MONTH) + 1;
int[] year = new int[11];
for(int i = 0; i < 11; i++){
year[i] = nowyear - 5 + i;
}
String yyear = (String)request.getAttribute("year");
//add by tang 增加按年度查循2004.07.12 11:03 end
out.write("\r\n");
out.write("<html>\r\n");
out.write("<head>\r\n");
out.write("<SCRIPT language=JavaScript>\t\r\nfunction change()\r\n\t{\r\n\t\tif(document.all.select.value == \"all\")\r\n\t\t{\r\n\t\t\turl=\"/krm/servlet/DetailServlet?module=total&&status=q&&queryterm=total&&year=\"+document.all.select.value;\r\n\t\t\twindow.location = url;\r\n\t\t}else\r\n\t\t{\r\n\t\t\turl=\"/krm/servlet/DetailServlet?module=total&&status=q&&queryterm=total&&year=\"+document.all.select.value;\r\n\t\t\twindow.location = url;\r\n\t\t}\t\t\r\n }\r\n");
out.write("</SCRIPT>\r\n");
out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/krm/jsp/css/css.css\">\r\n");
out.write("<title>对应计划具体任务页");
out.write("</title>");
out.write("</head>\r\n");
out.write("<body leftmargin=\"0\" topmargin=\"0\" marginwidth=\"0\" marginheight=\"0\" >\r\n");
out.write("<form method=\"post\" name=\"all\">\r\n");
out.write("<table width=\"100%\" align=\"center\" border=\"0\" cellpadding=\"0\" cellspacing=\"0\" >\r\n ");
out.write("<tr height=\"8\">\r\n ");
out.write("<td class=\"trA\"> 您的位置:任务管理 >>");
out.write("<font class=\"fontcolor\"> 任务统计列表");
out.write("</font>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr height=\"8\">\r\n ");
out.write("<td>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr>\r\n ");
out.write("<td align=\"center\" >\r\n \r\n ");
out.write("<table border=\"0\" width=\"98%\" align=\"center\" height=\"30%\" class=\"collapse\">\r\n ");
out.write("<tr > \r\n ");
out.write("<td class=\"tdA\" colspan=\"13\" >\r\n 任务统计列表");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
out.write("<tr class=\"common\">\r\n ");
out.write("<td colspan=\"24\" align=\"center\" >\r\n ");
out.write("<select name=\"select\" style=\"font-size:9pt;font-color:#FFFFFF\" onchange=\"change();\">\r\n ");
if(null != yyear)
{
out.write("\r\n ");
out.write("<option value=\"");
out.print(yyear);
out.write("\">");
out.print(yyear);
out.write("</option>\r\n ");
}else{
out.write("\r\n ");
out.write("<option>请选择年份");
out.write("</option>\r\n ");
}
out.write("\r\n ");
for(int j = 0; j < year.length; j++){
if(!(String.valueOf(year[j])).equals(yyear)){
out.write("\r\n ");
out.write("<option value=\"");
out.print(year[j]);
out.write("\">");
out.print(year[j]);
out.write("</option>\r\n ");
}
}
out.write("\r\n ");
out.write("</select>\r\n ");
out.write("</td>\r\n ");
out.write("</tr>\t\t \r\n ");
out.write("<tr> \r\n ");
out.write("<td align=\"center\" class=\"tdB\" width=\"5%\" height=\"20\" > \r\n 编号");
out.write("</td>\r\n ");
out.write("<td align=\"center\" class=\"tdB\" width=\"9%\" > 分管");
out.write("</td>\r\n ");
tlset.beforefirst();
while(tlset.next()) {
out.write("\r\n ");
out.write("<td align=\"center\" class=\"tdB\" width=\"10%\" >");
out.print(tlset.getO_Name());
out.write("</td>\r\n ");
}
out.write("\r\n ");
out.write("<td width=\"10%\" align=\"center\" class=\"tdB\" >合计");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
int[] totalCount=new int[tlset.size()];
for (int i=0; i<rdList.size(); i++) {
HashMap resMap = (HashMap)rdList.get(i);
out.write("\r\n ");
out.write("<tr ");
if((i+1)%2==0){
out.write(" class=\"bgcolor\"");
}
out.write("> \r\n ");
out.write("<td align=\"center\" class=\"common\" width=\"5%\" height=\"20\" >");
out.print(i+1);
out.write("</td>\r\n ");
out.write("<td align=\"center\" class=\"common\" width=\"9%\" >");
out.print((String)resMap.get("I_Name"));
out.write("</td>\r\n ");
tlset.beforefirst();
int count=0;
int j=0;
while(tlset.next()) {
out.write("\r\n ");
out.write("<td align=\"center\" class=\"common\" width=\"10%\" >");
out.write("<a href=\"/krm/servlet/DetailServlet?module=detail&&status=q&&queryterm=level&&tasklevel=");
out.print(tlset.getO_Name());
out.write("&&usernum=");
out.print(i);
out.write("&&userid=");
out.print(resMap.get("userid"));
out.write("&&count=");
out.print((String)resMap.get(tlset.getO_Name()));
out.write("&&year=");
out.print(yyear);
out.write("\">");
if((Integer.parseInt(resMap.get(tlset.getO_Name()).toString()))!=0){out.print((String)resMap.get(tlset.getO_Name()));}
out.write("</a>");
out.write("</td>\r\n ");
totalCount[j]+=Integer.parseInt(resMap.get(tlset.getO_Name()).toString());
j++;
count+=Integer.parseInt(resMap.get(tlset.getO_Name()).toString());
}
out.write("\r\n ");
out.write("<td width=\"10%\" align=\"center\" class=\"common\" >");
out.write("<a href=\"/krm/servlet/DetailServlet?module=detail&&status=q&&queryterm=user&&usernum=");
out.print(i);
out.write("&&userid=");
out.print(resMap.get("userid"));
out.write("&&count=");
out.print(count);
out.write("&&year=");
out.print(yyear);
out.write("\">");
if(count!=0){out.println(count);}
out.write("</a>");
out.write("</td>\r\n ");
out.write("</tr>\r\n ");
}
out.write("\r\n ");
out.write("<tr> \r\n ");
out.write("<td height=\"20\" colspan=\"2\" align=\"center\" class=\"tdB\">合计:");
out.write("</td>\r\n ");
int count=0;
//for(int i=0;i<tlset.size();i++){
tlset.beforefirst();
int i = 0;
while(tlset.next() && i<tlset.size()){
count+=totalCount[i];
out.write("\r\n\t\t\t");
out.write("<td align=\"center\" class=\"tdB\" >");
out.write("<a href=\"/krm/servlet/DetailServlet?module=detail&&status=q&&queryterm=little&&tasklevel=");
out.print(tlset.getO_Name());
out.write("&&count=");
out.print(totalCount[i]);
out.write("&&year=");
out.print(yyear);
out.write("\">");
if(totalCount[i]!=0){ out.println(totalCount[i]);}
out.write("</a>");
out.write("</td>\r\n ");
i++;}
out.write("\r\n\t\t\t");
out.write("<td align=\"center\" class=\"tdB\" >");
out.write("<a href=\"/krm/servlet/DetailServlet?module=detail&status=q&queryterm=sum&count=");
out.print(count);
out.write("&&year=");
out.print(yyear);
out.write("\">");
out.print(count);
out.write("</a>");
out.write("</td>\r\n ");
out.write("</tr>\t\t \r\n ");
out.write("</table>\r\n\t\r\n ");
out.write("</td>\r\n");
out.write("</tr>\t\r\n");
out.write("</table>\r\n");
out.write("</form>\r\n");
out.write("</body>\r\n");
out.write("</html>\t\t");
} catch (Throwable t) {
out = _jspx_out;
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 + -