// 取得纳税信息
  public List<Map<Object, Object>> getRKMX(
      TaxPayQueryReqInfo taxPayQueryReqInfo, String sql, String falg) {
    List<Map<Object, Object>> list_map = new ArrayList<Map<Object, Object>>();
    PreparedStatement pre = null;
    ResultSet rs = null;
    Connection conn = null;
    Map<Object, Object> map = null;
    try {
      conn = DBConnPool.getConnection();
      pre = conn.prepareStatement(sql);
      if ("1".equals(falg)) {
        pre.setString(1, taxPayQueryReqInfo.getVehicleInfo().getVIN());
        pre.setString(2, taxPayQueryReqInfo.getVehicleInfo().getLicensePlateNo());
        pre.setString(3, taxPayQueryReqInfo.getVehicleInfo().getEngineNo());
      } else if ("2".equals(falg)) {
        pre.setString(1, taxPayQueryReqInfo.getVehicleInfo().getVIN());
        pre.setString(2, taxPayQueryReqInfo.getVehicleInfo().getLicensePlateNo());
        pre.setString(3, taxPayQueryReqInfo.getVehicleInfo().getLicensePlateType());

      } else if ("3".equals(falg)) {
        pre.setString(1, taxPayQueryReqInfo.getVehicleInfo().getVIN());
        pre.setString(2, taxPayQueryReqInfo.getVehicleInfo().getEngineNo());
      } else {
        pre.setString(1, taxPayQueryReqInfo.getVehicleInfo().getVIN());
      }

      rs = pre.executeQuery();
      while (rs.next()) {
        map = new HashMap<Object, Object>();
        map.put("DECLAREDSTATUS", rs.getString("PLATFORMSTATE")); // 纳税状态/ 0=代收// 1=申报(完税)4=拒缴
        map.put("CALCTAXFLAG", rs.getString("COUNTTAXTYPE")); // 算税标志
        map.put("TaxTermTypeCode", "08"); // 税种类型代码
        map.put("TAXCONDITIONCODE", rs.getString("TAXCONDITIONCODE")); // 纳税类型代码
        map.put("TAXREGISTRYNUMBER", rs.getString("TAXREGISTRYNUMBER")); // 税务登记证号
        map.put("TAXPAYERNAME", rs.getString("TAXPAYERNAME")); // 纳税人名称
        map.put("TAXPAYERIDENTIFICATIONCODE", rs.getString("TAXPAYERIDENTIFICATIONCODE")); // 纳税人识别号
        map.put(
            "SJCJRQ",
            rs.getDate("SJCJRQ")); // 代收日期     mili 2014-12-23 16:11:16  代收日期 给 数据采集日期 中科软 截取时不正确
        map.put("PAYCOMPANYCODE", rs.getString("PAYCOMPANYCODE")); // 代收公司
        map.put("TAXLOCATIONCODE", rs.getString("TAXLOCATIONCODE")); // 纳税地区代码
        map.put("TAXSTARTDATE", rs.getString("TAXSTARTDATE").substring(0, 10)); // 税款所属始期
        map.put("TAXENDDATE", rs.getString("TAXENDDATE").substring(0, 10)); // 税款所属止期
        map.put("TAXUNITTYPECODE", rs.getString("TAXUNITTYPECODE")); // 计税单位代码
        map.put("UNITRATE", rs.getDouble("UNITRATE")); // 单位计税金额
        map.put("ANNUALTAXAMOUNT", rs.getDouble("ANNUALTAXAMOUNT")); // 当期年单位税额
        map.put("TAXDUE", rs.getDouble("TAXDUE")); // 当期应纳税额
        map.put("EXCEEDDATE", rs.getString("EXCEEDDATE")); // 逾期时间
        map.put("EXCEEDDAYSCOUNT", rs.getInt("EXCEEDDAYSCOUNT")); // 逾期天数
        map.put("OVERDUE", rs.getDouble("OVERDUE")); // 滞纳金
        map.put("TOTALAMOUNT", rs.getDouble("TOTALAMOUNT")); // 合计金额
        map.put("SPECIALCARTYPE", rs.getString("SPECIALCARTYPE")); // 特殊车标志
        // 适用完税对象 Paid
        if ("P".equals(rs.getString("TAXCONDITIONCODE")) == true) {
          map.put("TAXDEPARTMENT", rs.getString("TAXDEPARTMENT")); // 开具减免(完)税凭证的税务机关名称,Y
          map.put("TAXDEPARTMENTCODE", rs.getString("TAXDEPARTMENTCODE")); // 开具减免(完)税凭证的税务机关代码,Y
          map.put("TAXDOCUMENTNUMBER", rs.getString("TAXDOCUMENTNUMBER")); // 完税凭证号码
        } else {
          map.put("TAXDEPARTMENT", ""); // 开具减免(完)税凭证的税务机关名称,Y
          map.put("TAXDEPARTMENTCODE", ""); // 开具减免(完)税凭证的税务机关代码,Y
          map.put("TAXDOCUMENTNUMBER", ""); // 完税凭证号码
        }
        // ***************适用减免税对像*****************

        map.put("DEDUCTION", rs.getDouble("DEDUCTION")); // 减免金额
        map.put("DEDUCTIONDUEPROPORTION", rs.getDouble("DEDUCTIONDUEPROPORTION")); // 减免比例
        if ("C".equals(rs.getString("TAXCONDITIONCODE"))
            || "E".equals(rs.getString("TAXCONDITIONCODE"))) {
          map.put("DEDUCTIONDUECODE", rs.getString("DEDUCTIONDUECODE")); // 减免税原因代码,Y
          map.put("DEDUCTIONDUETYPE", rs.getString("DEDUCTIONDUETYPE")); // 减免税方案代码,Y
          map.put("DEDUCTIONDOCUMENTNUMBER", rs.getString("DEDUCTIONDOCUMENTNUMBER")); // 减免税凭证号
          map.put(
              "DEDUCTIONDEPARTMENT", rs.getString("DEDUCTIONDEPARTMENT")); // 开具减免(完)税凭证的税务机关名称,Y
          map.put(
              "DEDUCTIONDEPARTMENTCODE",
              rs.getString("DEDUCTIONDEPARTMENTCODE")); // 开具减免(完)税凭证的税务机关代码,Y
        } else {
          map.put("DEDUCTIONDOCUMENTNUMBER", ""); // 减免税凭证号
          map.put("DEDUCTIONDEPARTMENT", ""); // 开具减免(完)税凭证的税务机关名称,Y
          map.put("DEDUCTIONDEPARTMENTCODE", ""); // 开具减免(完)税凭证的税务机关代码,Y
        }
        // 车船税合计金额 TaxAmount
        // 车船税交易码,用于对账服务
        map.put("TAXDEALCODE", rs.getString("TAXQUERYNO")); // 交易码
        map.put("TAXCONFIRMNO", rs.getString("TAXCONFIRMNO")); // 确认码
        map.put("TAXAMOUNT_FLAG", rs.getString("TAXAMOUNT_FLAG")); // 合计金额标志
        map.put("ANNUALTAXDUE", rs.getDouble("ANNUALTAXDUE")); // 本年车船税金额
        map.put("SUMTAXDEFAULT", rs.getDouble("SUMTAXDEFAULT")); // 合计欠税
        map.put("SUMOVERDUE", rs.getDouble("SUMOVERDUE")); // 合计滞纳金
        map.put("SumTax", rs.getDouble("SumTax")); // 合计金额
        map.put("PAYDATE", rs.getString("PAYDATE")); // 所属年度
        list_map.add(map);
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } catch (NoFreeConnectionException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } finally {
      try {
        if (rs != null) {
          rs.close();
        }
        if (pre != null) {
          pre.close();
        }
        ConnectDBBean.closeConnection(
            ReadWriteDBPool.readPool, conn); //  因关闭方式有问题  需要原来的关闭方式进行连接的关闭  mili 2015-3-20 16:34:57
        //				if (conn != null) {
        //					conn.close();
        //				}
      } catch (SQLException e) {
        e.printStackTrace();
      } catch (NoFreeConnectionException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }

    return list_map;
  }
  // 根据单一条件到入库明细表中查询纳税信息
  public List<Map<String, String>> getCondition(
      TaxPayQueryReqInfo taxPayQueryReqInfo, String sql, String flag) {
    List<Map<String, String>> listMap = null;
    PreparedStatement pre = null;
    ResultSet rs = null;
    Connection conn = null;
    Map<String, String> map = null;
    try {
      conn = DBConnPool.getConnection();
      pre = conn.prepareStatement(sql);
      pre.setString(1, taxPayQueryReqInfo.getVehicleInfo().getVIN());
      if (flag.equals("2")) {
        pre.setString(2, taxPayQueryReqInfo.getVehicleInfo().getLicensePlateNo());
        pre.setString(3, taxPayQueryReqInfo.getVehicleInfo().getLicensePlateType());
      }
      rs = pre.executeQuery();
      while (rs.next()) {
        if (listMap == null) {
          listMap = new ArrayList<Map<String, String>>();
        }
        map = new HashMap<String, String>();
        map.put("TAXQUERYNO", rs.getString("TAXQUERYNO")); // 车船税交易码
        map.put("TAXCONFIRMNO", rs.getString("TAXCONFIRMNO")); // 确认码
        map.put("DECLAREDSTATUS", rs.getString("PLATFORMSTATE")); // 平台状态/ 0=代收// 1=申报(完税)4=拒缴
        map.put("TAXAMOUNT_FLAG", rs.getString("TAXAMOUNT_FLAG")); // 合计金额标志码
        map.put("ANNUALTAXDUE", String.valueOf(rs.getDouble("ANNUALTAXDUE"))); // 本年车船税金额
        map.put("SUMTAXDEFAULT", String.valueOf(rs.getDouble("SUMTAXDEFAULT"))); // 合计欠税金额
        map.put("SUMOVERDUE", String.valueOf(rs.getDouble("SUMOVERDUE"))); // 合计滞纳金
        map.put("SUMTAX", String.valueOf(rs.getDouble("SUMTAX"))); // 合计金额
        map.put("CALCTAXFLAG", rs.getString("COUNTTAXTYPE")); // 变更类型// 0=确认// 4=退保,2=批改
        map.put("CHANGETYPE", rs.getString("CHANGETYPE")); // 变更类型 0=确认// 4=退保,2=批改
        map.put("TSBZ", rs.getString("TSBZ")); // 退税标志
        listMap.add(map);
      }
    } catch (SQLException e) {
      e.printStackTrace();
    } catch (NoFreeConnectionException e) {
      // TODO Auto-generated catch block
      e.printStackTrace();
    } finally {
      try {
        if (rs != null) {
          rs.close();
        }
        if (pre != null) {
          pre.close();
        }
        ConnectDBBean.closeConnection(
            ReadWriteDBPool.readPool, conn); //  因关闭方式有问题  需要原来的关闭方式进行连接的关闭  mili 2015-3-20 16:34:57
        //				if (conn != null) {
        //					conn.close();
        //				}
      } catch (SQLException e) {
        e.printStackTrace();
      } catch (NoFreeConnectionException e) {
        // TODO Auto-generated catch block
        e.printStackTrace();
      }
    }

    return listMap;
  }