public boolean equals(Object otherObject) {
   if (otherObject == null) return false;
   if (this == otherObject) return true;
   if (this.getClass() != otherObject.getClass()) return false;
   SearchRecordSchema other = (SearchRecordSchema) otherObject;
   if (tradeNo == null && other.getTradeNo() != null) return false;
   if (tradeNo != null && !tradeNo.equals(other.getTradeNo())) return false;
   if (contNo == null && other.getContNo() != null) return false;
   if (contNo != null && !contNo.equals(other.getContNo())) return false;
   if (userCode == null && other.getUserCode() != null) return false;
   if (userCode != null && !userCode.equals(other.getUserCode())) return false;
   if (name == null && other.getName() != null) return false;
   if (name != null && !name.equals(other.getName())) return false;
   if (gender == null && other.getGender() != null) return false;
   if (gender != null && !gender.equals(other.getGender())) return false;
   if (birthday == null && other.getBirthday() != null) return false;
   if (birthday != null && !fDate.getString(birthday).equals(other.getBirthday())) return false;
   if (province == null && other.getProvince() != null) return false;
   if (province != null && !province.equals(other.getProvince())) return false;
   if (city == null && other.getCity() != null) return false;
   if (city != null && !city.equals(other.getCity())) return false;
   if (mobile == null && other.getMobile() != null) return false;
   if (mobile != null && !mobile.equals(other.getMobile())) return false;
   if (userIDType == null && other.getUserIDType() != null) return false;
   if (userIDType != null && !userIDType.equals(other.getUserIDType())) return false;
   if (userIDNo == null && other.getUserIDNo() != null) return false;
   if (userIDNo != null && !userIDNo.equals(other.getUserIDNo())) return false;
   if (riskname == null && other.getRiskname() != null) return false;
   if (riskname != null && !riskname.equals(other.getRiskname())) return false;
   if (riskcode == null && other.getRiskcode() != null) return false;
   if (riskcode != null && !riskcode.equals(other.getRiskcode())) return false;
   if (userState == null && other.getUserState() != null) return false;
   if (userState != null && !userState.equals(other.getUserState())) return false;
   if (userSource == null && other.getUserSource() != null) return false;
   if (userSource != null && !userSource.equals(other.getUserSource())) return false;
   if (field1 == null && other.getField1() != null) return false;
   if (field1 != null && !field1.equals(other.getField1())) return false;
   if (field2 == null && other.getField2() != null) return false;
   if (field2 != null && !field2.equals(other.getField2())) return false;
   if (field3 == null && other.getField3() != null) return false;
   if (field3 != null && !field3.equals(other.getField3())) return false;
   if (field4 == null && other.getField4() != null) return false;
   if (field4 != null && !field4.equals(other.getField4())) return false;
   if (field5 == null && other.getField5() != null) return false;
   if (field5 != null && !field5.equals(other.getField5())) return false;
   if (field6 == null && other.getField6() != null) return false;
   if (field6 != null && !field6.equals(other.getField6())) return false;
   if (searchDate == null && other.getSearchDate() != null) return false;
   if (searchDate != null && !fDate.getString(searchDate).equals(other.getSearchDate()))
     return false;
   if (searchTime == null && other.getSearchTime() != null) return false;
   if (searchTime != null && !searchTime.equals(other.getSearchTime())) return false;
   if (makedate == null && other.getMakedate() != null) return false;
   if (makedate != null && !fDate.getString(makedate).equals(other.getMakedate())) return false;
   if (maketime == null && other.getMaketime() != null) return false;
   if (maketime != null && !maketime.equals(other.getMaketime())) return false;
   return true;
 }
 /**
  * 数据打包,按 XML 格式打包,顺序参见<A href ={@docRoot}/dataStructure/tb.html#PrpSearchRecord描述/A>表字段
  *
  * @return: String 返回打包后字符串
  */
 public String encode() {
   StringBuffer strReturn = new StringBuffer(256);
   strReturn.append(StrTool.cTrim(tradeNo));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(contNo));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(userCode));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(name));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(gender));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(fDate.getString(birthday)));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(province));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(city));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(mobile));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(userIDType));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(userIDNo));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(riskname));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(riskcode));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(userState));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(userSource));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(field1));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(field2));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(field3));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(field4));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(field5));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(field6));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(fDate.getString(searchDate)));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(searchTime));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(fDate.getString(makedate)));
   strReturn.append(SysConst.PACKAGESPILTER);
   strReturn.append(StrTool.cTrim(maketime));
   return strReturn.toString();
 }
  @SuppressWarnings("deprecation")
  private boolean checkData() {
    // 校验停售日期不能小于当前日期
    boolean flag = true;
    boolean isNum = true;
    for (int i = timeoutDef.length(); --i >= 0; ) {
      int chr = timeoutDef.charAt(i);
      if (chr < 48 || chr > 57) {
        errorMessage.append("超时时间必须是大于0的整数!");
        flag = false;
        isNum = false;
        break;
      }
    }
    /*
    if(!"".equals(timeoutDef)&&isNum&&Integer.parseInt(timeoutDef)<=0){
    	errorMessage.append("超时时间必须是大于0的整数!");
    	flag=false;
    }
    */
    String startdate = "";
    String enddate = "";
    FDate fDate = new FDate();
    if (null != endDate) {
      enddate = fDate.getString(endDate);
    }
    if (null != startDate) {
      startdate = fDate.getString(startDate);
    }
    /*
    if (null!=endDate
    		&& PubFun.calInterval(PubFun.getCurrentDate(), enddate, "D") <= 0) {
    	operateResult = "checkfail";
    	errorMessage.append("销售止期必须大于当前日期!");
    	flag = false;
    }
    if (null!=endDate && null!=startDate
    		&& PubFun.calInterval(startdate, enddate, "D") < 0) {
    	operateResult = "checkfail";
    	errorMessage.append("销售止期不能小于销售起期!");
    	flag = false;
    }
    */
    // 校验险种的相关信息
    int n = risks.length;
    if (n == 0) {
      operateResult = "checkfail";
      errorMessage.append("请选择计划要包含的产品!");
      flag = false;
    } else {
      ExeSQL tExeSql = new ExeSQL();
      int mainRiskCount = 0;
      for (int i = 0; i < n; i++) {
        String sql =
            "select subriskflag,startdate,enddate,riskname from leprisk where riskcode='"
                + risks[i]
                + "'";
        SSRS tSSRS = tExeSql.execSQL(sql);
        // 每个产品组合有且仅有一个主险
        if (tSSRS.GetText(1, 1).equals("M")) {
          planMainRisk = risks[i];
          mainRiskCount++;
        }
        // 销售起期要在产品的销售起期之后,停售日期要在所有产品停售之前
        int s = PubFun.calInterval(tSSRS.GetText(1, 2), startdate, "D");
        if (null != startDate && s < 0) {
          operateResult = "checkfail";
          errorMessage.append(
              tSSRS.GetText(1, 4) + "的销售起期是" + tSSRS.GetText(1, 2) + ",产品组合的销售起期不能早于产品的销售起期!");
          flag = false;
        }
        int e = PubFun.calInterval(tSSRS.GetText(1, 3), enddate, "D");
        if (null != endDate && e > 0) {
          operateResult = "checkfail";
          errorMessage.append(
              tSSRS.GetText(1, 4) + "的销售止期是" + tSSRS.GetText(1, 3) + ",产品组合的销售止期不能晚于产品的销售止期!");
          flag = false;
        }
      }
      if (mainRiskCount < 1) {
        operateResult = "checkfail";
        errorMessage.append("保险计划必须包含一个主险!");
        flag = false;
      } else if (mainRiskCount > 1) {
        operateResult = "checkfail";
        errorMessage.append("保险计划仅可包含一个主险!");
        flag = false;
      }
    }
    /*
    if (!introduce.equals("") && introduce.trim().getBytes().length > 1600) {
    	operateResult = "checkfail";
    	errorMessage.append("产品组合介绍不能多于800个汉字!");
    	flag = false;
    }
    if (!rule.equals("") && rule.trim().getBytes().length > 1600) {
    	operateResult = "checkfail";
    	errorMessage.append("产品组合投保规则不能多于800个汉字!");
    	flag = false;
    }
    */

    if (upfile != null && !("".equals(upfile))) {
      String fileName = new File(upfile.getName()).getName();
      String endwith = fileName.substring(fileName.lastIndexOf(".") + 1, fileName.length());
      endwith = endwith.toUpperCase();
      if (endwith == null
          || (!endwith.equals("JPG") && !endwith.equals("GIF") && !endwith.equals("BMP"))) {
        operateResult = "checkfail";
        errorMessage.append("您上载图片类型" + endwith + "有误,只能上载jpg格式文件");
        System.out.println("上载图片类型错误!");
        flag = false;
      }
    } else {
      operateResult = "checkfail";
      errorMessage.append("请选择要上传的图片");
      flag = false;
    }

    return flag;
  }
 public String getMakedate() {
   if (makedate != null) return fDate.getString(makedate);
   else return null;
 }
 public String getSearchDate() {
   if (searchDate != null) return fDate.getString(searchDate);
   else return null;
 }
 public String getBirthday() {
   if (birthday != null) return fDate.getString(birthday);
   else return null;
 }