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

📄 deptmonthpoint.jsp

📁 java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经java高级引用管理综合朝鲜经
💻 JSP
字号:
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%@page import="com.selectpoint.*"%>
<%@page import="com.selectpoint.DeptPointBean"%>
<%@page import="com.selectpoint.PersonPointBean"%>
<%@page import="com.login.UserInforBean"%>
<%@page import="java.text.SimpleDateFormat"%>
<%@page import="com.login.UserDBOperation"%>
<%@page import="com.login.UserInforBean"%>
<%@page import="com.selectpoint.DeptMonthPoint"%>

<%
	request.setCharacterEncoding("UTF-8");
	Collection deptmonthpoints = (Collection) session
			.getAttribute("deptmonthpoints");
	String year = request.getParameter("year");
	String month = request.getParameter("month");
	DeptMonthPoint deptMonth = new DeptMonthPoint();
	if(year!=null||month!=null){
	    session.setAttribute("deptyear",year);
	    //year=(String)session.getAttribute("deptyear");
	    session.setAttribute("deptmonth",month);
	    //month=(String)session.getAttribute("deptmonth");
	}
	if(year==null||month==null){
	    //session.setAttribute("deptyear",year);
	    year=(String)session.getAttribute("deptyear");
	    //session.setAttribute("deptmonth",month);
	    month=(String)session.getAttribute("deptmonth");
	}
	Collection deptPerson=(Collection)session.getAttribute("deptPerson");
	
%>

<%!public static String dateToString(Date time) {
		SimpleDateFormat formatter;
		formatter = new SimpleDateFormat("yyyy-MM-dd");
		String ctime = formatter.format(time);
		return ctime;
	}

	public static int[] getYears() {
		Calendar c = Calendar.getInstance();
		Date date = c.getTime();
		SimpleDateFormat sdf = new SimpleDateFormat("yyyy");
		String startTime = sdf.format(date);
		int year = Integer.parseInt(startTime);
		int[] years = new int[year - 2007];
		int j = 0;
		for (int i = year; i > 2007; i--) {
			years[j] = i;
			j++;
		}
		return years;
	}%>
<style type="text/css">
<!--
.STYLE1 {
	font-size: 12px
}

.STYLE2 {
	font-size: 12px
}
-->
</style>
<link href="/peac/pisoft_wtfk.css" rel="stylesheet" type="text/css" />
<html>
	<head>
		<title>月度部门考核信息查询</title>
	</head>
	<body>
		<br />
		<form name="form1" action="/peac/deptmonthpoint_servlet" method="post">
			<label>
				<span class="STYLE1"> <select name="year"
						class="pisoft_tjcx_selcet">
						<%
							if (year == null) {
                               year="2008";
							}
						%>
						<%
							int[] years = getYears();
							for (int i = 0; i < years.length; i++) {
						%>
						<option value="<%=years[i]%>" <%=(String.valueOf(years[i]).equals(year)? "selected" : "" )%>>
							<%=years[i]%>
						</option>
						<%
							}
						%>
					</select> </span>
			</label>
			<span class="STYLE1"> 年 <label>
					<select name="month" class="pisoft_tjcx_selcet">
						<%
							if (month == null) {
                               month="1";
							}
						%>
						<%
						for(int i=1; i<13;i++){
						%>
						<option value="<%=String.valueOf(i)%>" <%=(String.valueOf(i).equals(month)? "selected" : "" )%>>
							<%=String.valueOf(i)%>
						</option>
						<%
						}
						%>
					</select>
				</label> 月 <label>
					<input type="submit" name="Submit" value="查询">
				</label> </span>
		</form>
		<br />
		<%
			if (deptmonthpoints != null) {
		%>
		<table width="200%" border="1" cellspacing="0" cellpadding="0">
			<tr class="pisoft_tab_tjcx_1">
				<td width="7%">
					&nbsp;
				</td>
				<%
					for (int a = 0; a < deptMonth.assesPersons1.length; a++) {
				%>
				<td colspan="2"><%=deptMonth.assesPersons1[a]%></td>
				<%
					}
				%>
				<td colspan="2">
					小计
				</td>
				<td >
					总计
				</td>
			</tr>
			<tr class="pisoft_tab_tjcx_3">
				<td>
					&nbsp;
				</td>
				<%
					for (int a = 0; a < deptMonth.assesPersons1.length; a++) {
					if(a==0||a==5||a==6||a==7){
					%>
					<td>
					考核
				    </td>
				    <td>
					加减
				    </td>
					<%
					}else{
				     %>
				     <td colspan="2">
					加减
				    </td>
				     <%
					}
				%>
				
				<%
					}
				%>
				<td>
					考核
				</td>
				<td >
					加减
				</td>
				<td >
					&nbsp;
				</td>
			</tr>
			<%
				Iterator it = deptmonthpoints.iterator();
					int i = 0;
					while (it.hasNext()) {
						DeptPointBean deptMonthPoints[] = (DeptPointBean[]) it
								.next();
			%>
			<%
				if (i % 2 == 1) {
			%>
			<tr class="pisoft_tab_tjcx_3">
				<td><%=deptMonth.deptNames[i]%></td>

				<%
					} else {
				%>
			
			<tr class="pisoft_tab_tjcx_2">
				<td><%=deptMonth.deptNames[i]%></td>
				<%
					}
				%>
				<%
					for (int d = 0; d < deptMonthPoints.length; d++) {
								DeptPointBean deptMonthPoint = deptMonthPoints[d];
								if (deptMonthPoint != null) {
				%>
				<%
					if (deptMonthPoint.asses_point == null
											|| "".equals(deptMonthPoint.asses_point)) {
				%>
				<td colspan="2" align="right"><%=deptMonthPoint.ss_point%>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</td>
				<%
					} else {
				%>
				<td><%=deptMonthPoint.asses_point%></td>
				<td><%=deptMonthPoint.ss_point%></td>
				<%
					}
				%>

				<%
					} else {
				%>
				<td colspan="2">
					&nbsp;
				</td>
				<%
					}
				%>
				<%
					}
				%>
				<td>
					<%=deptMonth.getAssesPoints(deptMonthPoints) %>
				</td>
				<td >
					<%=deptMonth.getSsPoints(deptMonthPoints) %>
				</td>
				<td >
					<%=deptMonth.getPoints(deptMonthPoints)%>
				</td>
			</tr>

			<%
				i++;
					}
			%>
		</table>

		<%
			if (deptPerson != null) {
		%>
		<table width="30%" border="1" cellspacing="0" cellpadding="0">
		<tr class="pisoft_tab_tjcx_2">
			    <td>
			        人员
			    </td>
				<td>
					考核分
				</td>
				<td >
					加减分
				</td>
				<td >
					总计
				</td>
			</tr>
		<%
				 it = deptPerson.iterator();
					 i = 0;
					while (it.hasNext()) {
						UserInforBean assesuser = (UserInforBean) it
								.next();
		%>
		<tr class="pisoft_tab_tjcx_3">
			    <td>
			        <%=assesuser.person_name %>
			    </td>
				<td>
					 <%=deptMonth.getPersonAssesPoints(assesuser.asses_dept,(List)deptmonthpoints) %>
				</td>
				<td >
					 <%=deptMonth.getPersonSsPoints(assesuser.asses_dept,(List)deptmonthpoints) %>
				</td>
				<td >
					 <%=deptMonth.getPersonPoints(assesuser.asses_dept,(List)deptmonthpoints) %>
				</td>
			</tr>
		<%
			}
		%>
		</table>
		<%
			}
		%>
		<%
			}
		%>
		<br />

		<%
			if (deptmonthpoints != null && deptmonthpoints.size() > 0) {
		%>
		<p class="STYLE1">
			<a href="/peac/depmonthexl_servlet">导出表格 
		</p>
		<%
			}
		%>
	</body>
</html>

⌨️ 快捷键说明

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