/**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("RiskCode") == null) this.riskCode = null;
      else this.riskCode = rs.getString("RiskCode").trim();

      if (rs.getString("RiskVer") == null) this.riskVer = null;
      else this.riskVer = rs.getString("RiskVer").trim();

      if (rs.getString("DutyCode") == null) this.dutyCode = null;
      else this.dutyCode = rs.getString("DutyCode").trim();

      if (rs.getString("ChoFlag") == null) this.choFlag = null;
      else this.choFlag = rs.getString("ChoFlag").trim();

      if (rs.getString("SpecFlag") == null) this.specFlag = null;
      else this.specFlag = rs.getString("SpecFlag").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的LEPRiskDuty表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LEPRiskDutySchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }
  /**
   * 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLECRecommendation>历史记账凭证主表信息</A>表字段
   *
   * @param: strMessage String 包含一条纪录数据的字符串
   * @return: boolean
   */
  public boolean decode(String strMessage) {
    try {
      recommend = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER);
      recommended = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER);
      sendtimes =
          new Integer(ChgData.chgNumericStr(StrTool.getStr(strMessage, 3, SysConst.PACKAGESPILTER)))
              .intValue();
      success = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 4, SysConst.PACKAGESPILTER);
      registered = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 5, SysConst.PACKAGESPILTER);
      field1 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 6, SysConst.PACKAGESPILTER);
      field2 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 7, SysConst.PACKAGESPILTER);
      field3 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 8, SysConst.PACKAGESPILTER);
      makedate = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 9, SysConst.PACKAGESPILTER);
      maketime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 10, SysConst.PACKAGESPILTER);
      modifydate = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 11, SysConst.PACKAGESPILTER);
      modifytime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 12, SysConst.PACKAGESPILTER);
    } catch (NumberFormatException ex) {
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LECRecommendationSchema";
      tError.functionName = "decode";
      tError.errorMessage = ex.toString();
      this.mErrors.addOneError(tError);

      return false;
    }
    return true;
  }
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("CalCode") == null) this.calCode = null;
      else this.calCode = rs.getString("CalCode").trim();

      if (rs.getString("RiskCode") == null) this.riskCode = null;
      else this.riskCode = rs.getString("RiskCode").trim();

      if (rs.getString("Type") == null) this.type = null;
      else this.type = rs.getString("Type").trim();

      if (rs.getString("CalSQL") == null) this.calSQL = null;
      else this.calSQL = rs.getString("CalSQL").trim();

      if (rs.getString("Remark") == null) this.remark = null;
      else this.remark = rs.getString("Remark").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的LEPCalMode表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LEPCalModeSchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("recommend") == null) this.recommend = null;
      else this.recommend = rs.getString("recommend").trim();

      if (rs.getString("recommended") == null) this.recommended = null;
      else this.recommended = rs.getString("recommended").trim();

      this.sendtimes = rs.getInt("sendtimes");
      if (rs.getString("success") == null) this.success = null;
      else this.success = rs.getString("success").trim();

      if (rs.getString("registered") == null) this.registered = null;
      else this.registered = rs.getString("registered").trim();

      if (rs.getString("field1") == null) this.field1 = null;
      else this.field1 = rs.getString("field1").trim();

      if (rs.getString("field2") == null) this.field2 = null;
      else this.field2 = rs.getString("field2").trim();

      if (rs.getString("field3") == null) this.field3 = null;
      else this.field3 = rs.getString("field3").trim();

      if (rs.getString("makedate") == null) this.makedate = null;
      else this.makedate = rs.getString("makedate").trim();

      if (rs.getString("maketime") == null) this.maketime = null;
      else this.maketime = rs.getString("maketime").trim();

      if (rs.getString("modifydate") == null) this.modifydate = null;
      else this.modifydate = rs.getString("modifydate").trim();

      if (rs.getString("modifytime") == null) this.modifytime = null;
      else this.modifytime = rs.getString("modifytime").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的LECRecommendation表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LECRecommendationSchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }
  /**
   * 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpSearchRecord>历史记账凭证主表信息</A>表字段
   *
   * @param: strMessage String 包含一条纪录数据的字符串
   * @return: boolean
   */
  public boolean decode(String strMessage) {
    try {
      tradeNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER);
      contNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER);
      userCode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 3, SysConst.PACKAGESPILTER);
      name = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 4, SysConst.PACKAGESPILTER);
      gender = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 5, SysConst.PACKAGESPILTER);
      birthday =
          fDate.getDate(
              StrTool.getStr(StrTool.GBKToUnicode(strMessage), 6, SysConst.PACKAGESPILTER));
      province = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 7, SysConst.PACKAGESPILTER);
      city = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 8, SysConst.PACKAGESPILTER);
      mobile = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 9, SysConst.PACKAGESPILTER);
      userIDType = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 10, SysConst.PACKAGESPILTER);
      userIDNo = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 11, SysConst.PACKAGESPILTER);
      riskname = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 12, SysConst.PACKAGESPILTER);
      riskcode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 13, SysConst.PACKAGESPILTER);
      userState = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 14, SysConst.PACKAGESPILTER);
      userSource = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 15, SysConst.PACKAGESPILTER);
      field1 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 16, SysConst.PACKAGESPILTER);
      field2 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 17, SysConst.PACKAGESPILTER);
      field3 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 18, SysConst.PACKAGESPILTER);
      field4 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 19, SysConst.PACKAGESPILTER);
      field5 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 20, SysConst.PACKAGESPILTER);
      field6 = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 21, SysConst.PACKAGESPILTER);
      searchDate =
          fDate.getDate(
              StrTool.getStr(StrTool.GBKToUnicode(strMessage), 22, SysConst.PACKAGESPILTER));
      searchTime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 23, SysConst.PACKAGESPILTER);
      makedate =
          fDate.getDate(
              StrTool.getStr(StrTool.GBKToUnicode(strMessage), 24, SysConst.PACKAGESPILTER));
      maketime = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 25, SysConst.PACKAGESPILTER);
    } catch (NumberFormatException ex) {
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "SearchRecordSchema";
      tError.functionName = "decode";
      tError.errorMessage = ex.toString();
      this.mErrors.addOneError(tError);

      return false;
    }
    return true;
  }
  /**
   * 数据解包,解包顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpLEPRiskDuty>历史记账凭证主表信息</A>表字段
   *
   * @param: strMessage String 包含一条纪录数据的字符串
   * @return: boolean
   */
  public boolean decode(String strMessage) {
    try {
      riskCode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 1, SysConst.PACKAGESPILTER);
      riskVer = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 2, SysConst.PACKAGESPILTER);
      dutyCode = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 3, SysConst.PACKAGESPILTER);
      choFlag = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 4, SysConst.PACKAGESPILTER);
      specFlag = StrTool.getStr(StrTool.GBKToUnicode(strMessage), 5, SysConst.PACKAGESPILTER);
    } catch (NumberFormatException ex) {
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "LEPRiskDutySchema";
      tError.functionName = "decode";
      tError.errorMessage = ex.toString();
      this.mErrors.addOneError(tError);

      return false;
    }
    return true;
  }
  /**
   * 使用 ResultSet 中的第 i 行给 Schema 赋值
   *
   * @param: rs ResultSet
   * @param: i int
   * @return: boolean
   */
  public boolean setSchema(ResultSet rs, int i) {
    try {
      // rs.absolute(i);		// 非滚动游标
      if (rs.getString("tradeNo") == null) this.tradeNo = null;
      else this.tradeNo = rs.getString("tradeNo").trim();

      if (rs.getString("contNo") == null) this.contNo = null;
      else this.contNo = rs.getString("contNo").trim();

      if (rs.getString("UserCode") == null) this.userCode = null;
      else this.userCode = rs.getString("UserCode").trim();

      if (rs.getString("Name") == null) this.name = null;
      else this.name = rs.getString("Name").trim();

      if (rs.getString("Gender") == null) this.gender = null;
      else this.gender = rs.getString("Gender").trim();

      this.birthday = rs.getDate("Birthday");
      if (rs.getString("Province") == null) this.province = null;
      else this.province = rs.getString("Province").trim();

      if (rs.getString("City") == null) this.city = null;
      else this.city = rs.getString("City").trim();

      if (rs.getString("Mobile") == null) this.mobile = null;
      else this.mobile = rs.getString("Mobile").trim();

      if (rs.getString("UserIDType") == null) this.userIDType = null;
      else this.userIDType = rs.getString("UserIDType").trim();

      if (rs.getString("UserIDNo") == null) this.userIDNo = null;
      else this.userIDNo = rs.getString("UserIDNo").trim();

      if (rs.getString("riskname") == null) this.riskname = null;
      else this.riskname = rs.getString("riskname").trim();

      if (rs.getString("riskcode") == null) this.riskcode = null;
      else this.riskcode = rs.getString("riskcode").trim();

      if (rs.getString("UserState") == null) this.userState = null;
      else this.userState = rs.getString("UserState").trim();

      if (rs.getString("UserSource") == null) this.userSource = null;
      else this.userSource = rs.getString("UserSource").trim();

      if (rs.getString("field1") == null) this.field1 = null;
      else this.field1 = rs.getString("field1").trim();

      if (rs.getString("field2") == null) this.field2 = null;
      else this.field2 = rs.getString("field2").trim();

      if (rs.getString("field3") == null) this.field3 = null;
      else this.field3 = rs.getString("field3").trim();

      if (rs.getString("field4") == null) this.field4 = null;
      else this.field4 = rs.getString("field4").trim();

      if (rs.getString("field5") == null) this.field5 = null;
      else this.field5 = rs.getString("field5").trim();

      if (rs.getString("field6") == null) this.field6 = null;
      else this.field6 = rs.getString("field6").trim();

      this.searchDate = rs.getDate("searchDate");
      if (rs.getString("searchTime") == null) this.searchTime = null;
      else this.searchTime = rs.getString("searchTime").trim();

      this.makedate = rs.getDate("makedate");
      if (rs.getString("maketime") == null) this.maketime = null;
      else this.maketime = rs.getString("maketime").trim();

    } catch (SQLException sqle) {
      System.out.println(
          "数据库中的SearchRecord表字段个数和Schema中的字段个数不一致,或者执行db.executeQuery查询时没有使用select * from tables");
      // @@错误处理
      CError tError = new CError();
      tError.moduleName = "SearchRecordSchema";
      tError.functionName = "setSchema";
      tError.errorMessage = sqle.toString();
      this.mErrors.addOneError(tError);
      return false;
    }
    return true;
  }