?? read.jsp
字號:
<%@page language="java" contentType="text/html;charset=GBK"%>
<%@page import="java.util.*,java.text.*,oa.main.DealString,oa.main.DealTime"%>
<jsp:useBean id="pb" class="oa.main.ParentBean" scope="page"/>
<jsp:useBean id="psbean" class="oa.bean.PersonBean" scope="page"/>
<%
String uid = (String)session.getAttribute("zgbh");
if(uid==null)
{
response.sendRedirect("../../session_oa.htm");
return;
}
oa.bean.PersonBean personBean =null;
try{
//修改是否閱讀過
oa.main.DealString ds = new oa.main.DealString();
DealTime dt = new DealTime();
int errcode = -1;
String time = dt.getDateandTime();
String cur = ds.toString(request.getParameter("cur"));
//通知編號
String id = ds.toString(request.getParameter("id"));
//取出當前人的職工編號
String person_ID = ds.toString((String)session.getAttribute("zgbh"));
String sql = "";
Vector vect = new Vector();
//第一次閱讀時間
sql = "select ID from HG2_MEET_NOTICEMEN where ISREAD=0 and NOTICEID='"+id+"' and RECEIVER='"+person_ID+"'";
vect = pb.getDataBySql(sql);
if(vect.size()!=0)
{
sql = "update HG2_MEET_NOTICEMEN set READTIME='"+time+"',ISREAD=1 where NOTICEID='"+id+"' and RECEIVER='"+person_ID+"'";
errcode = pb.executeUpdate(sql);
} //---------------轉到查看內容中處理
//查詢數據
String []str = new String[11];
// 設置查詢的 SQL 語句
sql = "select * from HG2_MEET_NOTICE where id='"+id+"'";
vect = pb.getDataBySql(sql);
str[0] = (String)((Hashtable)vect.get(0)).get("TITLE");
str[1] = (String)((Hashtable)vect.get(0)).get("KEYWORD");
str[2] = (String)((Hashtable)vect.get(0)).get("LEVEL1");
if(str[2].equals("1"))str[2]="一級";
if(str[2].equals("2"))str[2]="二級";
if(str[2].equals("3"))str[2]="三級";
str[3] = (String)((Hashtable)vect.get(0)).get("TIME");
str[4] = (String)((Hashtable)vect.get(0)).get("TIMESTART");
str[5] = (String)((Hashtable)vect.get(0)).get("TIMEEND");
str[6] = "";
str[7] = "";
str[8] = (String)((Hashtable)vect.get(0)).get("WORD");
String sender=(String)((Hashtable)vect.get(0)).get("SENDER");
str[9] = (String)((Hashtable)vect.get(0)).get("OLDORGID");
str[10] = (String)((Hashtable)vect.get(0)).get("ORGID");
//分割改過名的文件名串
String[] newname=str[10].split(",");
//分割未改過名的文件名串
String[] newfile=str[9].split(",");
int k=0;
if(newname!=null)k=newname.length;
int m=0;
if(newfile!=null)m=newfile.length;
int ifhave = 0;
String strhave = "";
//if(m<k) ifhave=m;
//out.println("ifhave========="+ifhave);
for (int i=0;i<k&&i<m;i++){
strhave +=newfile[i];
}
strhave = ds.toString(strhave);
if(!strhave.equals("")) ifhave = 1;
%>
<HTML>
<head><title>會議通知</title>
<link href="../../css/person.css" type=text/css rel=stylesheet>
<script language="javascript" src="../scripts/department.js"></script>
<script src="Popup.js"></script>
</head>
<BODY leftMargin=0 topMargin=0 >
<br> <font color="#505050" size=2>當前位置:會議管理>><a href="list.jsp">會議通知</a></font>
<br>
<div align=center>
<font color="#666666" size=3><b>會議通知<b></font>
</div>
<br>
<form name=form1 action="list.jsp?cur=<%=cur%>" method=post>
<table border="1" width="95%" align=center cellspacing="0" cellpadding="0" style="border-collapse: collapse" bordercolor="#A5BEE0" >
<tr bgcolor="#E0E0E0" height=25>
<td width="15%" align=right>通知標題:</td>
<td width="85%" > <%=str[0]%></td>
</tr>
<tr bgcolor="#ffffff" height=25>
<td width="15%" align=right>關鍵字:</td>
<td width="85%" > <%=str[1]%></td>
</tr>
<tr bgcolor="#E0E0E0" height=25>
<td width="15%" align=right>發布時間:</td>
<td width="85%" > <%=str[3]%></td>
</tr>
<tr bgcolor="#ffffff" height=25>
<td width="15%" align=right>會議開始時間:</td>
<td width="85%" > <%=str[4]%></td>
</tr>
<tr bgcolor="#E0E0E0" height=25>
<td width="15%" align=right>會議結束時間:</td>
<td width="85%" > <%=str[5]%></td>
</tr>
<tr bgcolor="#ffffff" height=25>
<td width="15%" align=right>通知內容:</td>
<td width="85%" > <%=str[8]%></td>
</tr>
<%if(ifhave==1){%>
<tr bgcolor="#ffffff" height=25>
<td width="15%" align=right>相關附件:</td>
<td width="85%" >
<%
for (int i=0;i<k&&i<m;i++){
%>
<a href="../../../articledownloadservlet?cominfo=meet&newname=<%=newname[i]%>&newfile=<%=newfile[i]%>"><font style="font-size:13px;"><%=newfile[i]%></font></a><%if(i<k-1&&i<m-1){%>,<%}%>
<%
}
%>
</td>
</tr>
<%}%>
</table>
<br>
<span style="font-size:10pt;">反饋意見:</span>
<table border=0 width="95%" align=center valign=top cellspacing=1 cellpadding=2 bgcolor="#A5BEE0" >
<tr bgcolor="#666666" >
<td bgcolor=#666666 width="30" align=center><font color=white>序號</font></td>
<td bgcolor=#666666 width="120" align=center><font color=white>接收人</font></td>
<td bgcolor=#666666 width="50" align=center><font color=white>是否閱讀</font></td>
<td bgcolor=#666666 width="130" align=center><font color=white>閱讀時間</font></td>
<td bgcolor=#666666 align=center><font color=white>反饋意見</font></td>
<td bgcolor=#666666 width="80" align=center><font color=white>操作</font></td>
</tr>
<%
personBean=new oa.bean.PersonBean();
String zgbh = "";
String zgxm = "";
String strREADTIME = "";
String strISREAD = "";
String strREBACK = "";
String strID = "";
sql = "select ID,RECEIVER,READTIME,ISREAD,REBACK from HG2_MEET_NOTICEMEN where NOTICEID="+id+"";
//System.out.println("===========sql============="+sql);
if((!uid.equals("1")) && (!uid.equals(sender)) ) sql+=" and RECEIVER='"+uid+"'";
sql += " order by RECEIVER ";
vect = pb.getDataBySql(sql);
for(int j=0;j<vect.size();j++)
{
zgbh = (String)((Hashtable)vect.get(j)).get("RECEIVER");//職工編號
zgxm = psbean.getZgName(zgbh);//職工姓名
strISREAD = (String)((Hashtable)vect.get(j)).get("ISREAD");
if(strISREAD!=null && strISREAD.equals("1"))strISREAD = "是";
else strISREAD = "<font color='#FF0000'>否</font>";
strREADTIME = (String)((Hashtable)vect.get(j)).get("READTIME");
strREBACK = (String)((Hashtable)vect.get(j)).get("REBACK");
strREBACK = strREBACK.replaceAll("\r\n","<br>").replaceAll(" "," ");
strID = (String)((Hashtable)vect.get(j)).get("ID");
String bmbh=personBean.toName("ZZ_ZGB","ZGBH","BMBH",zgbh);
String bm=ds.toString(personBean.getFatherName(bmbh))+ds.toString(personBean.getApartName(bmbh));
%>
<tr>
<td bgcolor=white align=center><%=j+1%></td>
<td bgcolor=white align=center title="<%=zgxm%>:<%=bm%>"><%=zgxm%></td>
<td bgcolor=white align=center><%=strISREAD%></td>
<td bgcolor=white align=center><%=strREADTIME%></td>
<td bgcolor=white><%=strREBACK%></td>
<td bgcolor=white align=center><%if(zgbh.equals(person_ID)){%><a href="editback.jsp?noticeId=<%=id%>¬iceMen_Id=<%=strID%>">[填寫反饋]</a><%}%></td>
</tr>
<%
}
%>
<tr>
<td colspan="6" bgcolor=white align="center"><input type="submit" value="返回" name="fanhui" onclick="" style="background-color: #ffffff;cursor:hand;" style="color: #000000; background-color: #FFFFFF;font-family:宋體; font-size: 12px;BORDER-RIGHT: 1px solid #A5BEE0; BORDER-TOP: 1px solid #A5BEE0; BORDER-LEFT: 1px solid #A5BEE0; BORDER-BOTTOM: 1px solid #A5BEE0"></td>
</tr>
</table>
</form>
</BODY>
</HTML>
<script language=javascript>
function muban()
{
var windoc = "view/preview.jsp?id=<%=str[8]%>&readonly=true¬iceid=<%=id%>";
var winword = window.open(windoc,"editDOC","height=500,width=750,top=0,left=0,toolbar=no,menubar=no,location=no,resizable=yes,directories=no,status=no,scrollbars=yes,dependent=no");
winword.focus();
}
</script>
<%}finally{
if(pb!=null)
pb.closeConn();
if(psbean!=null)
psbean.closeConn();
if(personBean!=null)personBean.closeConn();
}%>
?? 快捷鍵說明
復制代碼
Ctrl + C
搜索代碼
Ctrl + F
全屏模式
F11
切換主題
Ctrl + Shift + D
顯示快捷鍵
?
增大字號
Ctrl + =
減小字號
Ctrl + -