<%@ page contentType="text/html;charset=UTF-8" language="java" %>
<%@ page import="com.censoft.common.base.Pub" %>
<%@ page import="com.censoft.common.db.ConnectionFactory" %>
<%@ page import="java.sql.Connection" %>
<%@ page import="java.util.Hashtable" %>
<%@ page import="java.util.Vector" %>
<%
    ConnectionFactory cf = new ConnectionFactory();
    Pub pub = new Pub();
    Connection conn = null;
    Vector v_list = null;
    String year = pub.trimNull(request.getParameter("year"));
    String divId = pub.trimNull(request.getParameter("divId"));
    Hashtable ht = new Hashtable();
    StringBuffer sb = new StringBuffer();
    try {
        conn = com.censoft.db.DBUtil.getConnection();
        sb.append("select t1.zb_user,t1.zb_type from zb_user_gl_bgs t1  where 1=1 ");
        sb.append(" and t1.year=? ");
        sb.append(" order by t1.id asc");
        v_list=cf.doQuery(conn,sb.toString(),null,new Object[]{year});
        if(v_list==null){
            System.out.println("查询该日期值班人员出错"+cf.getMsg());
        }

%>
<div class="">
    <form class="form form-horizontal" method="post" id="form1" name="form1" action="export_query.jsp" >
        <div id="content" class="cl pd-5 divOverflow" style="overflow:hidden;margin-top: 10px;">
            <%
                if(v_list.size()>0){
                    for(int i=0;i<v_list.size();i++){
                        ht = (Hashtable)v_list.get(i);
                        String zb_type= pub.trimNull((String) ht.get("zb_type"));
                        String user_name= pub.trimNull((String) ht.get("zb_user"));
            %>
            <div style="height:110px;float:left;margin-left: 50px;border:0.5px solid #000;">
                <div style="width:120px;height:110px;float:left;border-right:0.5px solid #000;text-align: center;line-height: 80px;">
                    <p style="height:30px;"> <%=zb_type%></p>
                </div>

                <div style="text-align:center;width:180px;height:110px;line-height:30px;float:left;position: relative">
                    <%
                        String[] user_names=user_name.split(",");
                        for(int n=0;n<user_names.length;n++){
                    %>
                    <div style="height:20px;margin:0px;">
                        <input type="radio" name="<%=divId%>_1" value="<%=user_names[n]%>_<%=zb_type%>" />
                        <%=user_names[n]%>
                    </div>
                    <%
                        }
                    %>
                </div>
            </div>
            <%
                    }
                }
            %>
        </div>
    </form>
</div>
<%
    } catch (Exception e) {
        out.println("查询用户信息异常" + e);
        return;
    } finally {
        if (conn != null) {
            try {
                conn.close();
            } catch (Exception e) {
            }
        }
    }
%>