コード例 #1
0
ファイル: RyglDao.java プロジェクト: gdky/restfull
 // 执业转非执业通过列表
 public Map<String, Object> fzyzzytg(int pn, int ps, Map<String, Object> qury) {
   Condition condition = new Condition();
   condition.add("c.XMING", Condition.FUZZY, qury.get("XMING"));
   condition.add("b.ZYZGZSBH", Condition.EQUAL, qury.get("ZYZGZSBH"));
   StringBuffer sb = new StringBuffer();
   sb.append("		SELECT sql_calc_found_rows @rownum:=@rownum+1 as 'key', c.XMING,d.MC AS XB,");
   sb.append(
       "	b.ZYZGZSBH,b.FZYZCZSBH,b.ZZDW,date_format(a.TBRQ,'%Y-%m-%d') as TBRQ,date_format(a.SGLZXYJRQ,'%Y-%m-%d') as SGLZXYJRQ");
   sb.append("		FROM zs_zyswszfzy a,zs_fzysws b,zs_ryjbxx c,dm_xb d,(select @rownum:=?) zs_ry");
   sb.append("		 " + condition.getSql() + " ");
   sb.append("		and a.FZYSWS_ID=b.ID AND b.RY_ID=c.ID AND a.SPZT_DM='2' and d.ID=c.XB_DM");
   sb.append("		    LIMIT ?, ? ");
   ArrayList<Object> params = condition.getParams();
   params.add(0, (pn - 1) * ps);
   params.add((pn - 1) * ps);
   params.add(ps);
   List<Map<String, Object>> ls = this.jdbcTemplate.queryForList(sb.toString(), params.toArray());
   int total = this.jdbcTemplate.queryForObject("SELECT FOUND_ROWS()", int.class);
   Map<String, Object> ob = new HashMap<>();
   ob.put("data", ls);
   Map<String, Object> meta = new HashMap<>();
   meta.put("pageNum", pn);
   meta.put("pageSize", ps);
   meta.put("pageTotal", total);
   meta.put("pageAll", (total + ps - 1) / ps);
   ob.put("page", meta);
   return ob;
 }
コード例 #2
0
ファイル: RyglDao.java プロジェクト: gdky/restfull
 // 非执业备案通过列表
 public Map<String, Object> fzybatg(int pn, int ps, Map<String, Object> qury) {
   Condition condition = new Condition();
   condition.add("c.XMING", Condition.FUZZY, qury.get("XMING"));
   condition.add("b.ZYZGZSBH", Condition.EQUAL, qury.get("ZYZGZSBH"));
   StringBuffer sb = new StringBuffer();
   sb.append(
       "		SELECT sql_calc_found_rows	 @rownum:=@rownum+1 'key', c.XMING,f.mc as XB,b.ZYZGZSBH,b.ZZDW,b.FZYZCZSBH,");
   sb.append(" DATE_FORMAT(d.TJSJ,'%Y-%m-%d') as TJSJ, ");
   sb.append(" DATE_FORMAT(e.SPSJ,'%Y-%m-%d') as SPSJ ");
   sb.append(
       "		FROM zs_fzybasp a,zs_fzysws b,zs_ryjbxx c,zs_spzx d,zs_spxx e,dm_xb f,(SELECT @rownum:=?) tmp");
   sb.append("		 " + condition.getSql() + " ");
   sb.append(
       "		and a.FZYSWS_ID=b.ID AND b.RY_ID=c.ID AND a.ID=d.SJID AND d.ID=e.SPID AND a.SPZT_DM=2 and e.ISPASS='******' and b.FZYZT_DM=1");
   sb.append("		and f.ID=c.XB_DM order by e.SPSJ desc");
   sb.append("		    LIMIT ?, ? ");
   ArrayList<Object> params = condition.getParams();
   params.add(0, (pn - 1) * ps);
   params.add((pn - 1) * ps);
   params.add(ps);
   List<Map<String, Object>> ls = this.jdbcTemplate.queryForList(sb.toString(), params.toArray());
   int total = this.jdbcTemplate.queryForObject("SELECT FOUND_ROWS()", int.class);
   Map<String, Object> ob = new HashMap<>();
   ob.put("data", ls);
   Map<String, Object> meta = new HashMap<>();
   meta.put("pageNum", pn);
   meta.put("pageSize", ps);
   meta.put("pageTotal", total);
   meta.put("pageAll", (total + ps - 1) / ps);
   ob.put("page", meta);
   return ob;
 }
コード例 #3
0
ファイル: RyglDao.java プロジェクト: gdky/restfull
  /**
   * 执业税务师转出统计
   *
   * @param pn
   * @param ps
   * @param qury
   * @return
   */
  public Map<String, Object> zyswszctj(int pn, int ps, Map<String, Object> qury) {
    final String url = Config.URL_PROJECT;
    Condition condition = new Condition();
    condition.add("d.xming", Condition.FUZZY, qury.get("xm"));
    condition.add("c.DWMC", Condition.FUZZY, qury.get("yjg"));
    condition.add("d.sfzh", Condition.FUZZY_LEFT, qury.get("sfzh"));
    condition.add("d.CS_DM", Condition.EQUAL, qury.get("cs"));
    condition.add("d.xb_DM", Condition.EQUAL, qury.get("xb"));
    condition.add("b.ZYZSBH", Condition.EQUAL, qury.get("zczs"));
    StringBuffer sb = new StringBuffer();
    sb.append("	select SQL_CALC_FOUND_ROWS ");
    sb.append("		@rownum:=@rownum+1 as 'key',");
    sb.append("		d.id, d.XMING,b.ZYZSBH,c.DWMC as yjg,e.DWMC as xjg,e.DZHI,e.DHUA");
    sb.append(
        "		FROM zs_zyswssndz a,zs_zysws b,zs_jg c,zs_ryjbxx d,zs_jg e,(select @rownum:=?) zs_ry ");
    sb.append(condition.getSql());
    sb.append("		and a.ry_id=b.ID AND a.YJG_ID=c.ID AND a.SPZT_DM=2 AND b.RY_ID=d.ID");
    sb.append("		and a.XJG_ID=e.ID");
    if (qury.containsKey("sorder")) {
      Boolean asc = qury.get("sorder").toString().equals("ascend");
      switch (qury.get("sfield").toString()) {
        case "XMING":
          if (asc) {
            sb.append("		    order by convert( d.xming USING gbk) COLLATE gbk_chinese_ci ");
          } else {
            sb.append("		    order by convert( d.xming USING gbk) COLLATE gbk_chinese_ci desc");
          }
          break;
        case "yjg":
          if (asc) {
            sb.append("		    order by convert( c.DWMC USING gbk) COLLATE gbk_chinese_ci ");
          } else {
            sb.append("		    order by convert( c.DWMC USING gbk) COLLATE gbk_chinese_ci desc");
          }
          break;
      }
    }
    sb.append("		    LIMIT ?, ? ");
    ArrayList<Object> params = condition.getParams();
    params.add(0, (pn - 1) * ps);
    params.add((pn - 1) * ps);
    params.add(ps);
    List<Map<String, Object>> ls =
        this.jdbcTemplate.query(
            sb.toString(),
            params.toArray(),
            new RowMapper<Map<String, Object>>() {
              public Map<String, Object> mapRow(ResultSet rs, int arg1) throws SQLException {
                Hashids hashids = new Hashids(Config.HASHID_SALT, Config.HASHID_LEN);
                Map<String, Object> map = new HashMap<String, Object>();
                Map<String, Object> link = new HashMap<>();
                String id = hashids.encode(rs.getLong("id"));
                link.put("herf_xxzl", url + "/ryxx/zyryxx/" + id);
                link.put("herf_bgjl", url + "/ryxx/zyrybgjl/" + id);
                link.put("herf_zsjl", url + "/ryxx/zyryzsjl/" + id);
                link.put("herf_zjjl", url + "/ryxx/zyryzjjl/" + id);
                link.put("herf_zzjl", url + "/ryxx/zyryzzjl/" + id);
                link.put("herf_spzt", url + "/ryxx/zyryspzt/" + id);
                link.put("herf_njjl", url + "/ryxx/zyrynjjl/" + id);
                map.put("key", rs.getObject("key"));
                map.put("_links", link);
                map.put("XMING", rs.getObject("XMING"));
                map.put("ZYZSBH", rs.getObject("ZYZSBH"));
                map.put("yjg", rs.getObject("yjg"));
                map.put("xjg", rs.getObject("xjg"));
                map.put("DZHI", rs.getObject("DZHI"));
                map.put("DHUA", rs.getObject("DHUA"));
                return map;
              }
            });
    int total = this.jdbcTemplate.queryForObject("SELECT FOUND_ROWS()", int.class);
    Map<String, Object> ob = new HashMap<>();
    ob.put("data", ls);
    Map<String, Object> meta = new HashMap<>();
    meta.put("pageNum", pn);
    meta.put("pageSize", ps);
    meta.put("pageTotal", total);
    meta.put("pageAll", (total + ps - 1) / ps);
    ob.put("page", meta);

    return ob;
  }
コード例 #4
0
ファイル: RyglDao.java プロジェクト: gdky/restfull
  /**
   * 事务所端从业人员查询
   *
   * @param jgid
   * @return
   */
  public Map<String, Object> swscycx(int pn, int ps, int jgid, Map<String, Object> qury) {
    final String url = Config.URL_PROJECT;
    Condition condition = new Condition();
    condition.add("b.xming", Condition.FUZZY, qury.get("xm"));
    condition.add("b.sfzh", Condition.FUZZY_LEFT, qury.get("sfzh"));
    condition.add("b.CS_DM", Condition.EQUAL, qury.get("cs"));
    condition.add("b.xb_DM", Condition.EQUAL, qury.get("xb"));
    condition.add("b.xl_dm", Condition.EQUAL, qury.get("xl"));
    condition.add("a.zw_dm", Condition.EQUAL, qury.get("zw"));
    StringBuffer sb = new StringBuffer();
    sb.append(
        "		select SQL_CALC_FOUND_ROWS @rownum:=@rownum+1 as 'key', b.id,a.id as cyid,b.xming,d.mc as xb,b.sfzh,e.mc as cs,f.mc as xl,g.mc as zw,a.CYRYZT_DM as ztdm");
    sb.append(
        "		 from zs_cyry a,zs_ryjbxx b,dm_xb d,dm_cs e,dm_xl f,dm_zw g,(select @rownum:=?) zs_ry ");
    sb.append(condition.getSql());
    sb.append("		and  a.JG_ID=? and b.ID=a.ry_id and a.CYRYZT_DM in (1,3,14)");
    sb.append("		and b.XB_DM=d.ID and b.CS_DM=e.ID and f.ID=b.XL_DM and a.ZW_DM=g.ID");
    if (qury.containsKey("sorder")) {
      Boolean asc = qury.get("sorder").toString().equals("ascend");
      switch (qury.get("sfield").toString()) {
        case "xm":
          if (asc) {
            sb.append("		    order by convert( b.xming USING gbk) COLLATE gbk_chinese_ci ");
          } else {
            sb.append("		    order by convert( b.xming USING gbk) COLLATE gbk_chinese_ci desc");
          }
          break;
        case "xl":
          if (asc) {
            sb.append("		    order by b.xl_dm ");
          } else {
            sb.append("		    order by b.xl_dm desc");
          }
          break;
        case "zw":
          if (asc) {
            sb.append("		    order by a.ZW_DM");
          } else {
            sb.append("		    order by a.ZW_DM desc");
          }
          break;
      }
    }
    sb.append("		    LIMIT ?, ? ");
    ArrayList<Object> params = condition.getParams();
    params.add(0, (pn - 1) * ps);
    params.add(jgid);
    params.add((pn - 1) * ps);
    params.add(ps);
    List<Map<String, Object>> ls =
        this.jdbcTemplate.query(
            sb.toString(),
            params.toArray(),
            new RowMapper<Map<String, Object>>() {
              public Map<String, Object> mapRow(ResultSet rs, int arg1) throws SQLException {
                Hashids hashids = new Hashids(Config.HASHID_SALT, Config.HASHID_LEN);
                Map<String, Object> map = new HashMap<String, Object>();
                Map<String, Object> link = new HashMap<>();
                String id = hashids.encode(rs.getLong("id"));
                String cyid = hashids.encode(rs.getLong("cyid"));
                link.put("herf_xxzl", url + "/ryxx/cyryxx/" + id);
                link.put("herf_bgjl", url + "/ryxx/cyrybgjl/" + id);
                map.put("key", rs.getObject("key"));
                map.put("xh", rs.getObject("key"));
                map.put("_links", link);
                map.put("xm", rs.getObject("xming"));
                map.put("xb", rs.getObject("xb"));
                map.put("cs", rs.getObject("cs"));
                map.put("sfzh", rs.getObject("sfzh"));
                map.put("zw", rs.getObject("zw"));
                map.put("xl", rs.getObject("xl"));
                map.put("ryid", cyid);
                return map;
              }
            });
    int total = this.jdbcTemplate.queryForObject("SELECT FOUND_ROWS()", int.class);
    Map<String, Object> ob = new HashMap<>();
    ob.put("data", ls);
    Map<String, Object> meta = new HashMap<>();
    meta.put("pageNum", pn);
    meta.put("pageSize", ps);
    meta.put("pageTotal", total);
    meta.put("pageAll", (total + ps - 1) / ps);
    ob.put("page", meta);

    return ob;
  }
コード例 #5
0
ファイル: RyglDao.java プロジェクト: gdky/restfull
  /**
   * 人员查询
   *
   * @param pn ps
   * @param qury
   * @return
   * @throws Exception
   */
  public Map<String, Object> rycx(int pn, int ps, Map<String, Object> qury) {
    final String url = Config.URL_PROJECT;
    Condition condition = new Condition();
    Condition condition2 = new Condition();
    condition.add("a.xming", Condition.FUZZY, qury.get("xm"));
    condition.add("a.rysf_dm", Condition.EQUAL, qury.get("rysfdm"));
    condition.add("a.sfzh", Condition.FUZZY_LEFT, qury.get("sfzh"));
    condition.add("a.CS_DM", Condition.EQUAL, qury.get("cs"));
    condition.add("a.xb_DM", Condition.EQUAL, qury.get("xb"));
    condition.add("a.xl_dm", Condition.EQUAL, qury.get("xl"));
    condition2.add("a.xl_dm", Condition.EQUAL, qury.get("xl"));
    StringBuffer sb = new StringBuffer();
    sb.append("	select SQL_CALC_FOUND_ROWS ");
    sb.append("		@rownum:=@rownum+1 as 'key',");
    sb.append("				a.id,");
    sb.append("				a.xming,");
    sb.append("				d.mc as xb,");
    sb.append("				date_format(a.SRI,'%Y-%m-%d') as srrq,");
    sb.append("				a.sfzh,");
    sb.append("				b.mc as cs,");
    sb.append("				c.mc as mz,");
    sb.append("				f.mc as xl,");
    sb.append("				e.mc as rysf,a.rysf_dm as rysfdm");
    sb.append(
        "				from zs_ryjbxx a,dm_cs b,dm_mz c,dm_xb d,dm_rysf e,dm_xl f,(select @rownum:=?) zs_ry");
    sb.append("		" + condition.getSql() + " ");
    if (qury.containsKey("dwmc")) {
      Object obj = qury.get("dwmc");
      if (!Objects.equal(obj, "") && !Objects.equal(obj, null)) {
        sb.append("		and a.ID in (");
        sb.append(
            "		select j.RY_ID from zs_cyry j,zs_jg h where j.JG_ID=h.id and h.id='"
                + obj
                + "' union");
        sb.append(
            "		select g.RY_ID from zs_zysws g,zs_jg h where g.jg_id=h.ID and h.id='"
                + obj
                + "' union");
        sb.append(
            "		select i.RY_ID from zs_fzysws i,zs_jg h where i.ZZDW=h.dwmc and h.id='"
                + obj
                + "') ");
      }
    }
    if (qury.containsKey("ZW")) {
      Object obj = qury.get("ZW");
      if (!Objects.equal(obj, "") && !Objects.equal(obj, null)) {
        sb.append("		and a.ID in (");
        sb.append("		select j.RY_ID from zs_cyry j where j.ZW_DM='" + obj + "' union");
        sb.append("		select g.RY_ID from zs_zysws g where g.ZW_DM='" + obj + "' union");
        sb.append("		select i.RY_ID from zs_fzysws i where i.ZW_DM='" + obj + "') ");
      }
    }
    if (qury.containsKey("ZYZGZSBH")) {
      Object obj = qury.get("ZYZGZSBH");
      if (!Objects.equal(obj, "") && !Objects.equal(obj, null)) {
        sb.append("		and a.ID in (");
        sb.append("		select g.RY_ID from zs_zysws g where g.ZYZGZSBH like'" + obj + "%')");
      }
    }
    if (qury.containsKey("ZYZSBH")) {
      Object obj = qury.get("ZYZSBH");
      if (!Objects.equal(obj, "") && !Objects.equal(obj, null)) {
        sb.append("		and a.ID in (");
        sb.append("		select g.RY_ID from zs_zysws g where g.ZYZSBH like'" + obj + "%')");
      }
    }
    if (qury.containsKey("CZE")) {
      Object obj = qury.get("CZE");
      if (!Objects.equal(obj, "") && !Objects.equal(obj, null)) {
        sb.append("		and a.ID in (");
        sb.append("		select g.RY_ID from zs_zysws g where g.CZE like'" + obj + "%')");
      }
    }
    if (qury.containsKey("YDDH")) {
      Object obj = qury.get("YDDH");
      if (!Objects.equal(obj, "") && !Objects.equal(obj, null)) {
        sb.append("		and a.ID in (");
        sb.append("		select k.id from zs_ryjbxx k where k.YDDH like'" + obj + "%')");
      }
    }
    sb.append("				and a.xb_dm= d.id");
    sb.append("				and a.cs_dm=b.id");
    sb.append("				and a.mz_dm=c.id");
    sb.append("				and a.xl_dm=f.id");
    sb.append("				and a.rysf_dm=e.id");
    sb.append("				and a.yxbz='1'");
    if (qury.containsKey("sorder")) {
      Boolean asc = qury.get("sorder").toString().equals("ascend");
      switch (qury.get("sfield").toString()) {
        case "xm":
          if (asc) {
            sb.append("		    order by convert( a.xming USING gbk) COLLATE gbk_chinese_ci ");
          } else {
            sb.append("		    order by convert( a.xming USING gbk) COLLATE gbk_chinese_ci desc");
          }
          break;
        case "xb":
          if (asc) {
            sb.append("		    order by a.xb_dm ");
          } else {
            sb.append("		    order by a.xb_dm desc");
          }
          break;
        case "cs":
          if (asc) {
            sb.append("		    order by convert( b.mc USING gbk) COLLATE gbk_chinese_ci ");
          } else {
            sb.append("		    order by convert( b.mc USING gbk) COLLATE gbk_chinese_ci desc");
          }
          break;
        case "srrq":
          if (asc) {
            sb.append("		    order by a.sri ");
          } else {
            sb.append("		    order by a.sri desc");
          }
          break;
      }
    }
    sb.append("		    LIMIT ?, ? ");
    ArrayList<Object> params = condition.getParams();
    params.add(0, (pn - 1) * ps);
    params.add((pn - 1) * ps);
    params.add(ps);
    List<Map<String, Object>> ls =
        this.jdbcTemplate.query(
            sb.toString(),
            params.toArray(),
            new RowMapper<Map<String, Object>>() {
              public Map<String, Object> mapRow(ResultSet rs, int arg1) throws SQLException {
                Hashids hashids = new Hashids(Config.HASHID_SALT, Config.HASHID_LEN);
                Map<String, Object> map = new HashMap<String, Object>();
                Map<String, Object> link = new HashMap<>();
                String id = hashids.encode(rs.getLong("id"));
                switch (rs.getObject("rysfdm").toString()) {
                  case "1":
                    link.put("herf_xxzl", url + "/ryxx/zyryxx/" + id);
                    link.put("herf_bgjl", url + "/ryxx/zyrybgjl/" + id);
                    link.put("herf_zsjl", url + "/ryxx/zyryzsjl/" + id);
                    link.put("herf_zjjl", url + "/ryxx/zyryzjjl/" + id);
                    link.put("herf_zzjl", url + "/ryxx/zyryzzjl/" + id);
                    link.put("herf_spzt", url + "/ryxx/zyryspzt/" + id);
                    link.put("herf_njjl", url + "/ryxx/zyrynjjl/" + id);
                    break;
                  case "2":
                    link.put("herf_xxzl", url + "/ryxx/fzyryxx/" + id);
                    link.put("herf_bgjl", url + "/ryxx/fzyrybgjl/" + id);
                    link.put("herf_zsjl", url + "/ryxx/fzyryzxjl/" + id);
                    link.put("herf_zjjl", url + "/ryxx/fzyryzjjl/" + id);
                    link.put("herf_zzjl", url + "/ryxx/fzyryzfjl/" + id);
                    break;
                  case "3":
                    link.put("herf_xxzl", url + "/ryxx/cyryxx/" + id);
                    link.put("herf_bgjl", url + "/ryxx/cyrybgjl/" + id);
                    break;
                }
                map.put("key", rs.getObject("key"));
                map.put("xh", rs.getObject("key"));
                map.put("_links", link);
                map.put("xm", rs.getObject("xming"));
                map.put("xb", rs.getObject("xb"));
                map.put("cs", rs.getObject("cs"));
                map.put("srrq", rs.getObject("srrq"));
                map.put("sfzh", rs.getObject("sfzh"));
                map.put("rysfdm", rs.getObject("rysfdm"));
                map.put("rysf", rs.getObject("rysf"));
                map.put("mz", rs.getObject("mz"));
                map.put("xl", rs.getObject("xl"));
                return map;
              }
            });
    int total = this.jdbcTemplate.queryForObject("SELECT FOUND_ROWS()", int.class);
    Map<String, Object> ob = new HashMap<>();
    ob.put("data", ls);
    Map<String, Object> meta = new HashMap<>();
    meta.put("pageNum", pn);
    meta.put("pageSize", ps);
    meta.put("pageTotal", total);
    meta.put("pageAll", (total + ps - 1) / ps);
    ob.put("page", meta);

    return ob;
  }
コード例 #6
0
ファイル: RyglDao.java プロジェクト: gdky/restfull
  /**
   * 执业管理手册打印
   *
   * @param pn
   * @param ps
   * @param qury
   * @return
   */
  public Map<String, Object> zyglscdy(int pn, int ps, Map<String, Object> qury) {
    final String url = Config.URL_PROJECT;
    Condition condition = new Condition();
    condition.add("b.xming", Condition.FUZZY, qury.get("xm"));
    condition.add("c.DWMC", Condition.FUZZY, qury.get("dwmc"));
    condition.add("b.sfzh", Condition.FUZZY_LEFT, qury.get("sfzh"));
    condition.add("b.CS_DM", Condition.EQUAL, qury.get("cs"));
    condition.add("b.xb_DM", Condition.EQUAL, qury.get("xb"));
    condition.add("a.ZYZSBH", Condition.EQUAL, qury.get("zczs"));
    StringBuffer sb = new StringBuffer();
    sb.append("	select SQL_CALC_FOUND_ROWS ");
    sb.append("		@rownum:=@rownum+1 as 'key',");
    sb.append(
        "		b.id,b.XMING,d.MC as xb,b.DHHM,b.SFZH,e.MC as xl,a.ZYZGZSBH,a.ZYZSBH,c.DWMC,a.GRHYBH,date_format(b.SRI,'%Y年%m月%d日') as sri,");
    sb.append("	case a.czr_dm when 1 then \"是\"  when 2 then \"否\" else null end as czr,");
    sb.append("	case a.fqr_dm when 1 then \"是\"  when 2 then \"否\" else null end as fqr");
    sb.append("		FROM zs_zysws a,zs_ryjbxx b,zs_jg c,dm_xb d,dm_xl e,(select @rownum:=?) zs_ry ");
    sb.append(condition.getSql());
    sb.append("		and a.RY_ID=b.ID AND a.JG_ID=c.ID AND a.ZYZT_DM=1");
    sb.append("		and b.XB_DM=d.ID and b.XL_DM=e.ID");
    if (qury.containsKey("sorder")) {
      Boolean asc = qury.get("sorder").toString().equals("ascend");
      switch (qury.get("sfield").toString()) {
        case "XMING":
          if (asc) {
            sb.append("		    order by convert( b.xming USING gbk) COLLATE gbk_chinese_ci ");
          } else {
            sb.append("		    order by convert( b.xming USING gbk) COLLATE gbk_chinese_ci desc");
          }
          break;
        case "xl":
          if (asc) {
            sb.append("		    order by b.XL_DM ");
          } else {
            sb.append("		    order by b.XL_DM desc");
          }
          break;
      }
    }
    sb.append("		    LIMIT ?, ? ");
    ArrayList<Object> params = condition.getParams();
    params.add(0, (pn - 1) * ps);
    params.add((pn - 1) * ps);
    params.add(ps);
    List<Map<String, Object>> ls =
        this.jdbcTemplate.query(
            sb.toString(),
            params.toArray(),
            new RowMapper<Map<String, Object>>() {
              public Map<String, Object> mapRow(ResultSet rs, int arg1) throws SQLException {
                Hashids hashids = new Hashids(Config.HASHID_SALT, Config.HASHID_LEN);
                Map<String, Object> map = new HashMap<String, Object>();
                Map<String, Object> link = new HashMap<>();
                String id = hashids.encode(rs.getLong("id"));
                link.put("herf_xxzl", url + "/ryxx/zyryxx/" + id);
                link.put("herf_bgjl", url + "/ryxx/zyrybgjl/" + id);
                link.put("herf_zsjl", url + "/ryxx/zyryzsjl/" + id);
                link.put("herf_zjjl", url + "/ryxx/zyryzjjl/" + id);
                link.put("herf_zzjl", url + "/ryxx/zyryzzjl/" + id);
                link.put("herf_spzt", url + "/ryxx/zyryspzt/" + id);
                link.put("herf_njjl", url + "/ryxx/zyrynjjl/" + id);
                map.put("key", rs.getObject("key"));
                map.put("_links", link);
                map.put("XMING", rs.getObject("XMING"));
                map.put("ZYZSBH", rs.getObject("ZYZSBH"));
                map.put("xb", rs.getObject("xb"));
                map.put("DHHM", rs.getObject("DHHM"));
                map.put("SFZH", rs.getObject("SFZH"));
                map.put("xl", rs.getObject("xl"));
                map.put("ZYZGZSBH", rs.getObject("ZYZGZSBH"));
                map.put("DWMC", rs.getObject("DWMC"));
                map.put("czr", rs.getObject("czr"));
                map.put("fqr", rs.getObject("fqr"));
                map.put("GRHYBH", rs.getObject("GRHYBH"));
                map.put("SRI", rs.getObject("sri"));
                return map;
              }
            });
    int total = this.jdbcTemplate.queryForObject("SELECT FOUND_ROWS()", int.class);
    Map<String, Object> ob = new HashMap<>();
    ob.put("data", ls);
    Map<String, Object> meta = new HashMap<>();
    meta.put("pageNum", pn);
    meta.put("pageSize", ps);
    meta.put("pageTotal", total);
    meta.put("pageAll", (total + ps - 1) / ps);
    ob.put("page", meta);

    return ob;
  }