📄 selfmonthpoint.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) request
.getAttribute("selfmonthpoints");
String year = request.getParameter("year");
String month = request.getParameter("month");
DeptMonthPoint deptMonth = new DeptMonthPoint();
UserInforBean user =(UserInforBean) session
.getAttribute("person");
if(year!=null||month!=null){
session.setAttribute("selfyear",year);
//year=(String)session.getAttribute("deptyear");
session.setAttribute("selfmonth",month);
//month=(String)session.getAttribute("deptmonth");
}
if(year==null||month==null){
//session.setAttribute("deptyear",year);
year=(String)session.getAttribute("selfyear");
//session.setAttribute("deptmonth",month);
month=(String)session.getAttribute("selfmonth");
}
%>
<%!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/selfmonthpoint_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="30%" border="1" cellspacing="0" cellpadding="0">
<tr class="pisoft_tab_tjcx_2">
<td>
部门
</td>
<td>
考核分
</td>
<td >
加减分
</td>
<td >
总计
</td>
</tr>
<%
Iterator it = deptmonthpoints.iterator();
int i = 0;
while (it.hasNext()) {
DeptPointBean deptMonthPoints[] = (DeptPointBean[]) it
.next();
if(deptMonth.deptNames[i].equals(user.dept)){
%>
<tr class="pisoft_tab_tjcx_2">
<td>
<%=deptMonth.deptNames[i]%>
</td>
<td>
<%=deptMonth.getAssesPoints(deptMonthPoints) %>
</td>
<td >
<%=deptMonth.getSsPoints(deptMonthPoints) %>
</td>
<td >
<%=deptMonth.getPoints(deptMonthPoints)%>
</td>
</tr>
<%
break;
}
i++;
}
%>
</table>
<%
}
%>
<br />
<%
%>
</body>
</html>
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -