public Date calClearDate() {
   Date localDate1 = this.serverDAO.getCurDbDate();
   SystemStatus localSystemStatus = this.serverDAO.getSystemStatus();
   if ((DateUtil.formatDate(localSystemStatus.getTradeDate(), "yyyy-MM-dd")
               .compareTo(DateUtil.formatDate(localDate1, "yyyy-MM-dd"))
           > 0)
       || ((DateUtil.formatDate(localSystemStatus.getTradeDate(), "yyyy-MM-dd")
                   .compareTo(DateUtil.formatDate(localDate1, "yyyy-MM-dd"))
               == 0)
           && (localSystemStatus.getStatus() != 3))) {
     return localSystemStatus.getTradeDate();
   }
   String str1 = DateUtil.formatDate(localDate1, "HH:mm:ss");
   Date localDate2;
   if (str1.compareTo(getLastSectionEndTime()) < 0) {
     Date localDate3 = this.serverDAO.getLastClearDate();
     String str2 = DateUtil.formatDate(localDate3, "yyyy-MM-dd");
     if (DateUtil.formatDate(localDate1, "yyyy-MM-dd").compareTo(str2) == 0) {
       localDate2 = DateUtil.GoDate(localDate1, 1);
     } else {
       localDate2 = localDate1;
     }
   } else {
     localDate2 = DateUtil.GoDate(localDate1, 1);
   }
   return calValidClearDate(localDate2, 1);
 }
 public Date getRecoverDateByTime(String paramString) throws ParseException {
   Object localObject = null;
   SystemStatus localSystemStatus = this.serverDAO.getSystemStatus();
   Date localDate1 = localSystemStatus.getTradeDate();
   String str1 = DateUtil.formatDate(localDate1, "yyyy-MM-dd");
   Date localDate2 = calValidClearDate(DateUtil.GoDate(localDate1, -1), -1);
   String str2 = DateUtil.formatDate(localDate2, "yyyy-MM-dd");
   String str3 = DateUtil.formatDate(DateUtil.GoDate(localDate2, 1), "yyyy-MM-dd");
   int i = 0;
   String str4 = null;
   List localList = this.serverDAO.getTradeTimes();
   for (int j = 0; j < localList.size(); j++) {
     TradeTime localTradeTime = (TradeTime) localList.get(j);
     if (localTradeTime.getEndTime().compareTo(localTradeTime.getStartTime()) < 0) {
       i = 1;
       if (paramString.compareTo(localTradeTime.getStartTime()) >= 0) {
         localObject = str2;
         break;
       }
       if (paramString.compareTo(localTradeTime.getEndTime()) < 0) {
         localObject = str3;
         break;
       }
     } else {
       if ((str4 != null) && (localTradeTime.getStartTime().compareTo(str4) < 0)) {
         i = 1;
       }
       if (i != 0) {
         localObject = str1;
         break;
       }
       if (paramString.compareTo(localTradeTime.getStartTime()) >= 0) {
         localObject = str2;
         break;
       }
     }
     str4 = localTradeTime.getEndTime();
   }
   if (localObject == null) {
     localObject = str1;
   }
   return DateUtil.convertStringToDate("yyyy-MM-dd HH:mm:ss", localObject + " " + paramString);
 }