<%@ page import="com.alibaba.fastjson.JSONObject" %>
<%@ page import="com.time.util.DateUtil" %>
<%@ page import="java.util.*" %>
<%@ page import="weaver.conn.RecordSet" %>
<%@ page import="weaver.general.Util" %>
<%@ page import="com.alibaba.fastjson.JSONArray" %>


<%--
  User: wangj
  Design Ideas：
  铭沣-移动引擎-根据证件号码查询候选人信息
    表名：uf_rzygxxb
    需要：根据证件号码查询候选人信息id

--%>
<%@ page contentType="text/html;charset=UTF-8" %>
<%

    JSONObject res = new JSONObject();
    RecordSet rs = new RecordSet();
    String billid = Util.null2String(request.getParameter("billid"));

    JSONObject data = new JSONObject();
    JSONArray dt1 = new JSONArray();
    String sql = "select xm,hklx,jg,zns,zjhm,yxkhx,yxzh,sfzsmj,xsxwzsmj,byzsmj,dzzjz," +
            "tjbg,lzzm,jtyxk,glzm,wtjzmmb,wbyzsmmb,xzcbd,sbzh,gjjzh,zjlx from uf_rzygxxb where id = '"+billid+"'";
    rs.execute(sql);
    while (rs.next()) {
        String xm = Util.null2String(rs.getString("xm"));
        String hklx = Util.null2String(rs.getString("hklx"));
        String jg = Util.null2String(rs.getString("jg"));
        String zns = Util.null2String(rs.getString("zns"));
        String zjhm = Util.null2String(rs.getString("zjhm"));
        String yxkhx = Util.null2String(rs.getString("yxkhx"));
        String yxzh = Util.null2String(rs.getString("yxzh"));
        String sfzsmj = Util.null2String(rs.getString("sfzsmj"));
        String xsxwzsmj = Util.null2String(rs.getString("xsxwzsmj"));
        String byzsmj = Util.null2String(rs.getString("byzsmj"));
        String dzzjz = Util.null2String(rs.getString("dzzjz"));
        String tjbg = Util.null2String(rs.getString("tjbg"));
        String lzzm = Util.null2String(rs.getString("lzzm"));
        String jtyxk = Util.null2String(rs.getString("jtyxk"));
        String glzm = Util.null2String(rs.getString("glzm"));
        String wtjzmmb = Util.null2String(rs.getString("wtjzmmb"));
        String wbyzsmmb = Util.null2String(rs.getString("wbyzsmmb"));
        String xzcbd = Util.null2String(rs.getString("xzcbd"));

        String sbzh = Util.null2String(rs.getString("sbzh"));
        String gjjzh = Util.null2String(rs.getString("gjjzh"));
        String zjlx = Util.null2String(rs.getString("zjlx"));

        data.put("xm",xm);
        data.put("hklx",hklx);
        data.put("jg",jg);
        data.put("zns",zns);
        data.put("zjhm",zjhm);
        data.put("yxkhx",yxkhx);
        data.put("yxzh",yxzh);

        data.put("sfzsmj",sfzsmj);
        data.put("xsxwzsmj",xsxwzsmj);
        data.put("byzsmj",byzsmj);
        data.put("dzzjz",dzzjz);
        data.put("tjbg",tjbg);
        data.put("lzzm",lzzm);
        data.put("jtyxk",jtyxk);
        data.put("glzm",glzm);
        data.put("wtjzmmb",wtjzmmb);
        data.put("wbyzsmmb",wbyzsmmb);
        data.put("xzcbd",xzcbd);
        data.put("sbzh",sbzh);
        data.put("gjjzh",gjjzh);
        data.put("zjlx",zjlx);

    }

    sql = "select zncsnyr from uf_rzygxxb_dt1 where mainid = '"+billid+"'";
    rs.execute(sql);
    while (rs.next()) {
        JSONObject obj = new JSONObject();
        String zncsnyr = Util.null2String(rs.getString("zncsnyr"));
        obj.put("zncsnyr",zncsnyr);
        dt1.add(obj);
    }


    res.put("data",data);
    res.put("dt1",dt1);
    out.print(res.toJSONString());
%>

