/**
  * 使用另外一个 SearchRecordSchema 对象给 Schema 赋值
  *
  * @param: aSearchRecordSchema SearchRecordSchema
  */
 public void setSchema(SearchRecordSchema aSearchRecordSchema) {
   this.tradeNo = aSearchRecordSchema.getTradeNo();
   this.contNo = aSearchRecordSchema.getContNo();
   this.userCode = aSearchRecordSchema.getUserCode();
   this.name = aSearchRecordSchema.getName();
   this.gender = aSearchRecordSchema.getGender();
   this.birthday = fDate.getDate(aSearchRecordSchema.getBirthday());
   this.province = aSearchRecordSchema.getProvince();
   this.city = aSearchRecordSchema.getCity();
   this.mobile = aSearchRecordSchema.getMobile();
   this.userIDType = aSearchRecordSchema.getUserIDType();
   this.userIDNo = aSearchRecordSchema.getUserIDNo();
   this.riskname = aSearchRecordSchema.getRiskname();
   this.riskcode = aSearchRecordSchema.getRiskcode();
   this.userState = aSearchRecordSchema.getUserState();
   this.userSource = aSearchRecordSchema.getUserSource();
   this.field1 = aSearchRecordSchema.getField1();
   this.field2 = aSearchRecordSchema.getField2();
   this.field3 = aSearchRecordSchema.getField3();
   this.field4 = aSearchRecordSchema.getField4();
   this.field5 = aSearchRecordSchema.getField5();
   this.field6 = aSearchRecordSchema.getField6();
   this.searchDate = fDate.getDate(aSearchRecordSchema.getSearchDate());
   this.searchTime = aSearchRecordSchema.getSearchTime();
   this.makedate = fDate.getDate(aSearchRecordSchema.getMakedate());
   this.maketime = aSearchRecordSchema.getMaketime();
 }
  /**
   * 数据解包,解包顺序参见<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;
  }
  /**
   * 设置对应传入参数的String形式的字段值
   *
   * @param: FCode String 需要赋值的对象
   * @param: FValue String 要赋的值
   * @return: boolean
   */
  public boolean setV(String FCode, String FValue) {
    if (StrTool.cTrim(FCode).equals("")) return false;

    if (FCode.equalsIgnoreCase("tradeNo")) {
      if (FValue != null && !FValue.equals("")) {
        tradeNo = FValue.trim();
      } else tradeNo = null;
    }
    if (FCode.equalsIgnoreCase("contNo")) {
      if (FValue != null && !FValue.equals("")) {
        contNo = FValue.trim();
      } else contNo = null;
    }
    if (FCode.equalsIgnoreCase("userCode")) {
      if (FValue != null && !FValue.equals("")) {
        userCode = FValue.trim();
      } else userCode = null;
    }
    if (FCode.equalsIgnoreCase("name")) {
      if (FValue != null && !FValue.equals("")) {
        name = FValue.trim();
      } else name = null;
    }
    if (FCode.equalsIgnoreCase("gender")) {
      if (FValue != null && !FValue.equals("")) {
        gender = FValue.trim();
      } else gender = null;
    }
    if (FCode.equalsIgnoreCase("birthday")) {
      if (FValue != null && !FValue.equals("")) {
        birthday = fDate.getDate(FValue);
      } else birthday = null;
    }
    if (FCode.equalsIgnoreCase("province")) {
      if (FValue != null && !FValue.equals("")) {
        province = FValue.trim();
      } else province = null;
    }
    if (FCode.equalsIgnoreCase("city")) {
      if (FValue != null && !FValue.equals("")) {
        city = FValue.trim();
      } else city = null;
    }
    if (FCode.equalsIgnoreCase("mobile")) {
      if (FValue != null && !FValue.equals("")) {
        mobile = FValue.trim();
      } else mobile = null;
    }
    if (FCode.equalsIgnoreCase("userIDType")) {
      if (FValue != null && !FValue.equals("")) {
        userIDType = FValue.trim();
      } else userIDType = null;
    }
    if (FCode.equalsIgnoreCase("userIDNo")) {
      if (FValue != null && !FValue.equals("")) {
        userIDNo = FValue.trim();
      } else userIDNo = null;
    }
    if (FCode.equalsIgnoreCase("riskname")) {
      if (FValue != null && !FValue.equals("")) {
        riskname = FValue.trim();
      } else riskname = null;
    }
    if (FCode.equalsIgnoreCase("riskcode")) {
      if (FValue != null && !FValue.equals("")) {
        riskcode = FValue.trim();
      } else riskcode = null;
    }
    if (FCode.equalsIgnoreCase("userState")) {
      if (FValue != null && !FValue.equals("")) {
        userState = FValue.trim();
      } else userState = null;
    }
    if (FCode.equalsIgnoreCase("userSource")) {
      if (FValue != null && !FValue.equals("")) {
        userSource = FValue.trim();
      } else userSource = null;
    }
    if (FCode.equalsIgnoreCase("field1")) {
      if (FValue != null && !FValue.equals("")) {
        field1 = FValue.trim();
      } else field1 = null;
    }
    if (FCode.equalsIgnoreCase("field2")) {
      if (FValue != null && !FValue.equals("")) {
        field2 = FValue.trim();
      } else field2 = null;
    }
    if (FCode.equalsIgnoreCase("field3")) {
      if (FValue != null && !FValue.equals("")) {
        field3 = FValue.trim();
      } else field3 = null;
    }
    if (FCode.equalsIgnoreCase("field4")) {
      if (FValue != null && !FValue.equals("")) {
        field4 = FValue.trim();
      } else field4 = null;
    }
    if (FCode.equalsIgnoreCase("field5")) {
      if (FValue != null && !FValue.equals("")) {
        field5 = FValue.trim();
      } else field5 = null;
    }
    if (FCode.equalsIgnoreCase("field6")) {
      if (FValue != null && !FValue.equals("")) {
        field6 = FValue.trim();
      } else field6 = null;
    }
    if (FCode.equalsIgnoreCase("searchDate")) {
      if (FValue != null && !FValue.equals("")) {
        searchDate = fDate.getDate(FValue);
      } else searchDate = null;
    }
    if (FCode.equalsIgnoreCase("searchTime")) {
      if (FValue != null && !FValue.equals("")) {
        searchTime = FValue.trim();
      } else searchTime = null;
    }
    if (FCode.equalsIgnoreCase("makedate")) {
      if (FValue != null && !FValue.equals("")) {
        makedate = fDate.getDate(FValue);
      } else makedate = null;
    }
    if (FCode.equalsIgnoreCase("maketime")) {
      if (FValue != null && !FValue.equals("")) {
        maketime = FValue.trim();
      } else maketime = null;
    }
    return true;
  }
 public void setMakedate(String aMakedate) {
   if (aMakedate != null && !aMakedate.equals("")) {
     makedate = fDate.getDate(aMakedate);
   } else makedate = null;
 }
 public void setSearchDate(String aSearchDate) {
   if (aSearchDate != null && !aSearchDate.equals("")) {
     searchDate = fDate.getDate(aSearchDate);
   } else searchDate = null;
 }
 public void setBirthday(String aBirthday) {
   if (aBirthday != null && !aBirthday.equals("")) {
     birthday = fDate.getDate(aBirthday);
   } else birthday = null;
 }