<%@ page contentType="text/html; charset=GBK" %>
<%@ page import = "zr.zrpower.common.util.SysPreperty" %>
<%@ page import = "zr.zrpower.common.util.DateWork" %>
<%@ page import = "zr.zrpower.entity.sys.SessionUser" %>
<%@ page import = "zr.zrpower.flowengine.mode.monitor.FLOW_RUNTIME_PROCESS"%>
<%@ page import = "zr.zrpower.ejb.sys.UIService" %>
<%@ page import = "zr.zrpower.flowengine.service.FlowMonitor"%>
<%@ page import = "java.lang.Object"%>
<%@ page import = "java.util.Hashtable"%>

<HTML>
<%
SessionUser user = (SessionUser)session.getAttribute("userinfo");
FLOW_RUNTIME_PROCESS[] flow = null;
UIService userUI =new UIService();
FlowMonitor fm =new FlowMonitor();


%>
<%
 //得到查询的记录集
 flow = fm.GetFlowTransactList(user.getUserID(),"2");

%>
<HTML>
<HEAD>
<TITLE>待办事宜</TITLE>
<meta http-equiv="refresh" content="120">
<META http-equiv="Content-Type" content="text/html; charset=GBK">
<LINK type="text/css" rel="stylesheet" href="../../zrsysmanage/css/<%=user.getUserCSS()%>">
<SCRIPT LANGUAGE="JavaScript" src="../../zrsysmanage/script/Public.js"></SCRIPT>

</HEAD>
<BODY class="BodyMain">
<FORM method="post" name="recordfrm" action="">
<!--HTML Head表单头显示[显示内容,图标文件,用户肤色的图片文件夹]-->
<%=userUI.ShowHeadHtml("待办事宜","IcoTitle.gif",user.getUserImage())%>
<tr><td align="left">

<DIV style='padding-left:0;padding-top:0;width:100%;height:100%;overflow:auto'>
<TABLE border="0" width="100%" cellspacing="0" cellpadding="0">
       <%
        String strPath= "";
        String strName= "";
        String strTime = "";
        String strCAID= "";
        String strSendUserName= "";
        String strRID = "";
        //流程发送人对照表1
        //Hashtable SendHashtable1 = new Hashtable();
        //SendHashtable1 =fm.GetSendUserHashtable1(user.getUserID());
        //流程发送人对照表2
        //Hashtable SendHashtable2 = new Hashtable();
        //SendHashtable2 =fm.GetSendUserHashtable2(user.getUserID());

        if (flow!=null && flow.length>0){
           for(int i=0;i<flow.length;i++){

             strPath=flow[i].getFLOWPATH().toString();
             strName=flow[i].getNAME().toString();
             strCAID= flow[i].getCURRACTIVITY().toString();
             strRID= flow[i].getRID().toString();



             if (strRID.equals("send"))//是分送的情况
             {
             %>
               <tr>
                 <td class="Main_page" align="center"><img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/file_ico.gif" border="0" align="absmiddle"></td>
                 <td class="Main_page"><a href="#" onclick=OpenUrl("../../..<%=strPath%>","1") title=""><%=strName.replaceAll("→分送","→阅")%></a></td>
               </tr>

             <%
             }else
             {
               strSendUserName = "";

               /*
              try {
                 strSendUserName = (String) SendHashtable1.get(flow[i].getID()+strCAID);
                 if (strSendUserName==null)
                 {
                   strSendUserName = (String) SendHashtable2.get(flow[i].getID()+strCAID);
                 }
               }
               catch (Exception ex1) {
                strSendUserName = "";
               }*/

             strTime = String.valueOf(flow[i].getACCEPTDATE());
             if (strTime.length()>10)
             {strTime = strTime.substring(0,10);}
       %>
        <tr>
            <td class="Main_page" align="center"><img src="<%=SysPreperty.getProperty().AppUrl%>zrsysmanage/images/<%=user.getUserImage()%>/file_ico.gif" border="0" align="absmiddle"></td>
            <td class="Main_page"><a href="#" onclick=OpenUrl("../../..<%=strPath%>","1") title="">[<%=strName%>][<%=strTime%>]</a></td>
        </tr>
       <%}}}%>
</TABLE>
</DIV>
<%=userUI.ShowFootHtml()%>
</FORM>
</BODY>
</HTML>
<%
//清空相关对象(强制让java释放资源)
user = null;
userUI = null;
flow = null;
fm = null;
%>
