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

📄 year_purpose_jsp.java

📁 tomcat最新安装程序
💻 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.YearAimRecordSet;
import cn.com.aheadsoft.recordset.PlanRecordSet;
import cn.com.aheadsoft.recordset.ProjectRecordSet;
import java.util.GregorianCalendar;
import java.util.Calendar;
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 java.util.Properties;
import cn.com.aheadsoft.business.PersonInfoBusiness;
import cn.com.aheadsoft.recordset.PersonInfoRecordSet;

public class year_purpose_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");
 
	GregorianCalendar cal = new GregorianCalendar();
	int nowyear = cal.get(Calendar.YEAR);
	int[] year = new int[11];
	for(int i = 0; i < 11; i++){
	  year[i] = nowyear - 5 + i;
	   }
    String yyear = (String)request.getAttribute("year");
    int yeartask=0;
	 YearAimRecordSet dset = (YearAimRecordSet)request.getAttribute("dset");
     DetailRecordSet[] detailt = (DetailRecordSet[])request.getAttribute("detailt");
     DetailRecordSet[] detailf = (DetailRecordSet[])request.getAttribute("detailf");
     dset.beforefirst();
     yeartask =  dset.size();
	 UserInfo userinfo = (UserInfo)session.getAttribute("userinfo");
     UserPurviewManage priority = new UserPurviewManage();
     int i31 = priority.getUserPopInt(userinfo, "3", "1", "i");
     int u31 = priority.getUserPopInt(userinfo, "3", "1", "u");
     int d31 = priority.getUserPopInt(userinfo, "3", "1", "d");
     int q31 = priority.getUserPopInt(userinfo, "3", "1", "q");

      out.write("\r\n");
      out.write("<html>\r\n");
      out.write("<head>\r\n");
      out.write("<meta http-equiv=\"Content-Type\" content=\"text/html; charset=gb2312\"/>\r\n");
      out.write("<link rel=\"stylesheet\" type=\"text/css\" href=\"/krm/jsp/css/css.css\">\r\n");
      out.write("<title>年度目标页");
      out.write("</title>\r\n");
      out.write("</head>\r\n");
      out.write("<SCRIPT language=JavaScript>\t\r\n\tfunction change()\r\n\t{\r\n\t\tif(document.all.select.value == \"all\")\r\n\t\t{\r\n\t\t\turl=\"/krm/servlet/TotalItemServlet?module=aim&&status=q&&queryterm=\"+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/TotalItemServlet?module=aim&&status=q&&year=\"+document.all.select.value;\r\n\t\t\twindow.location = url;\r\n\t\t}\r\n\t\t\r\n        }\r\n");
      out.write("</SCRIPT>\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\">&nbsp;您的位置:任务管理 >>");
      out.write("<font class=\"fontcolor\"> 年度目标");
      out.write("</font>\r\n\t");
      out.write("</td>\r\n");
      out.write("</tr>\r\n ");
      out.write("<tr>\r\n    ");
      out.write("<td align=\"center\" >\r\n       ");
      out.write("<table border=\"0\" width=\"98%\" align=\"center\"  class=\"collapse\">\r\n   ");
      out.write("<tr class=\"common\">\r\n   ");
      out.write("<td  colspan=\"7\" 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   ");
if(yyear.equals("all")){
      out.write("\r\n   ");
      out.write("<option value=\"all\">全部");
      out.write("</option>\r\n   ");
}else
   {
      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   ");
if((null != yyear) && (!yyear.equals("all"))){
      out.write("\r\n   ");
      out.write("<option value=\"all\">全部");
      out.write("</option>\r\n   ");
}
      out.write("\r\n   ");
      out.write("</select>\r\n              ");
if((null != yyear) && (!yyear.equals("all")))
	{
      out.write("\r\n              年的年度目标有 ");
      out.write("<font color=\"#FF0000\">");
      out.write("<strong>");
      out.print(yeartask);
      out.write("</strong>");
      out.write("</font>&nbsp;项 \r\n              ");
}else
	{
      out.write("\r\n              年度目标如下 \r\n              ");
}
      out.write("\r\n              ");
if(i31 > 0)
      {
      out.write("\r\n            ");
      out.write("</td>\r\n            ");
      out.write("<td align=\"right\">\r\n\t\t ");
      out.write("<input type=\"button\" value=\"添 加\" onmouseover=\"this.className='button2'\" onmouseout=\"this.className='button1'\"  class=\"button1\" onClick=\"javascript:document.location.href='../jsp/tskmanage/task/insert_year_purpose.jsp?year=");
      out.print(yyear);
      out.write("'\">\r\n     ");
}
      out.write("\r\n ");
      out.write("</td> ");
      out.write("</tr>\r\n   ");
      out.write("<tr  >\r\n   ");
      out.write("<td align=\"center\" class=\"tdB\" width=\"6%\" height=\"20\" nowrap>编号");
      out.write("</td>\r\n   ");
      out.write("<td align=\"center\" class=\"tdB\" width=\"42%\">目标主题");
      out.write("</td>\t\t\t\t\t\t\t\t\t\r\n");
      out.write("<!--replace by tang begin 2004.03.05-->\r\n");
      out.write("<!-- ");
      out.write("<td align=\"center\" class=\"tdB\" width=\"8%\"> 所属年度");
      out.write("</td>-->\r\n    ");
      out.write("<td align=\"left\" class=\"tdB\" width=\"8%\"> 负责人");
      out.write("</td>\r\n");
      out.write("<!--replace by tang end 2004.03.05-->\r\n\t");
      out.write("<td align=\"center\" class=\"tdB\" width=\"8%\">\t已分配");
      out.write("<br>任务数");
      out.write("</td>\r\n\t");
      out.write("<td align=\"center\" class=\"tdB\" width=\"8%\">\t已完成");
      out.write("<br>任务数");
      out.write("</td>\r\n    ");
      out.write("<td align=\"center\" class=\"tdB\" width=\"9%\"> 目标划");
      out.write("<br>分情况 ");
      out.write("</td>\r\n\t");
      out.write("<td align=\"center\" class=\"tdB\" width=\"8%\"> ");
      out.write("<a>修改");
      out.write("</a> ");
      out.write("</td>\r\n    ");
      out.write("<td align=\"center\" class=\"tdB\" width=\"8%\"> 作废 ");
      out.write("</td>\r\n\t");
      out.write("</tr>\r\n");
      out.write("<!--tang begin 2004.02.15任务栏显示-->\t\r\n ");
 	
    int i = 0,j=0,k=0;
	int num=1;
	 while(dset.next()){
      out.write("\r\n\t");
      out.write("<tr ");

		if(num%2==0){
		
      out.write(" class=\"bgcolor\"");
}
      out.write(" >\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<td align=\"center\" class=\"common\" width=\"6%\" height=\"20\">");
      out.print(k+1);
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<td align=\"left\" class=\"common\" width=\"46%\">\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<a href=\"/krm/servlet/TotalItemServlet?module=aim&&status=q&&queryterm=primarykey&&id=");
      out.print(dset.getA_Serial());
      out.write("\">");
      out.print(StringFormat.changeHTMLTags(dset.getA_Topic()));
      out.write("</a>\r\n\t\t\t\t\t\t\t\t\t");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<td align=\"left\" class=\"common\" width=\"8%\">\r\n\t\t\t\t\t\t\t\t\t");

									String aidpersonid = dset.getA_Person();								
		                            if(dset.getA_Person().equals(""))  
		                            { out.println("");
		                              }else
									  {
									//System.out.print(aidpersonid);
		  							PersonInfoBusiness bibu = new PersonInfoBusiness();
		                            bibu.setQueryWhere(aidpersonid);
                            	    bibu.execute("query");
                                    PersonInfoRecordSet PiRdSet = bibu.getRecordSet();
                                    PiRdSet.next();
		                            out.println(StringFormat.changeHTMLTags(PiRdSet.getI_Name()));
									}
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<td align=\"center\" class=\"common\" width=\"8%\">\t");
if(detailt[k] == null){
									out.println("0");}else{out.println(""+detailt[k].size());}
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<td align=\"center\" class=\"common\" width=\"8%\">\t");
if(detailf[k] == null){
									out.println("0");}else{out.println(""+detailf[k].size());}
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t\r\n            ");
      out.write("<td align=\"center\" class=\"common\" width=\"8%\"> \r\n              ");
if(q31 > 0){
      out.write("\r\n              ");
      out.write("<a href=\"/krm/servlet/DetailServlet?module=detail&&status=q&&year=");
      out.print(yyear);
      out.write("&&aserial=");
      out.print(dset.getA_Serial());
if(detailt[k] == null){
      out.write("&&count=\"0\"");
}else{
      out.write("&&count=");
      out.print(String.valueOf(detailt[k].size()));
}
      out.write("\">查看");
      out.write("</a> \r\n              ");
}else{
      out.write("\r\n              查看 \r\n              ");
}
      out.write("\r\n            ");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t\r\n            ");
      out.write("<td align=\"center\" class=\"common\" width=\"8%\"> \r\n              ");
if((u31 > 0) && (dset.getA_Cancellation().equals("n"))){
      out.write("\r\n              ");
      out.write("<a href=\"/krm/servlet/TotalItemServlet?module=aim&&status=u&&queryterm=obtain&&id=");
      out.print(dset.getA_Serial());
      out.write("&&year=");
      out.print(yyear);
      out.write("\">修改");
      out.write("</a> \r\n              ");
}else{
      out.write("\r\n              修改 \r\n              ");
}
      out.write("\r\n            ");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<td align=\"center\" class=\"common\" width=\"8%\">\t\r\n\t\t\t\t\t\t\t\t\t");
if(dset.getA_Cancellation().equals("y")){
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
if(d31 > 0){
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<a href=\"/krm/servlet/TotalItemServlet?module=aim&&status=u&&id=");
      out.print(dset.getA_Serial());
      out.write("&&flag=n&&year=");
      out.print(yyear);
      out.write("\" onclick=\"return(confirm('确定要恢复吗?'))\">恢复");
      out.write("</a>\r\n\t\t\t\t\t\t\t\t\t");
}else{
      out.write("\r\n\t\t\t\t\t\t\t\t\t恢复\r\n\t\t\t\t\t\t\t\t\t");
}
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
}else{
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
if(d31 > 0){
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("<a href=\"/krm/servlet/TotalItemServlet?module=aim&&status=u&&id=");
      out.print(dset.getA_Serial());
      out.write("&&flag=y&&year=");
      out.print(yyear);
      out.write("\" onclick=\"return(confirm('确定要作废吗?'))\">作废");
      out.write("</a>\r\n\t\t\t\t\t\t\t\t\t");
}else{
      out.write("\r\n\t\t\t\t\t\t\t\t\t作废\r\n\t\t\t\t\t\t\t\t\t");
}
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
}
      out.write("\r\n\t\t\t\t\t\t\t\t\t");
      out.write("</td>\r\n\t\t\t\t\t\t\t\t");
      out.write("</tr>\r\n");
k++;num++;
}
      out.write("\r\n");
      out.write("<!--tang end 2004.02.15任务栏显示-->\t\r\n\t");
      out.write("<tr>\r\n\t\t  ");
      out.write("<td align=\"center\" colspan=\"8\" class=\"tdC\">\r\n\t\t  ");
      out.write("<input type=\"button\" value=\"返 回\" onmouseover=\"this.className='button2'\" onmouseout=\"this.className='button1'\"  class=\"button1\" onClick=\"history.back(1);\">      \r\n\t\t\t");
      out.write("</td>\r\n\t  ");
      out.write("</tr>\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>");
    } 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 + -