Esempio n. 1
0
  /**
   * <br>
   * 表示開始時刻と時間帯情報から時間帯終了時刻のインデックスを取得する
   *
   * @param tzMdl 時間帯情報
   * @param admConf 基本設定
   * @return int 開始時刻のインデックス
   */
  private int __getEndIndex(TcdTimezoneMeiModel tzMdl, TcdAdmConfModel admConf) {
    int index = 1;
    UDate dspDate = new UDate();
    dspDate.setZeroHhMmSs();
    Time toTime = tzMdl.getToTime();
    UDate toDate = dspDate.cloneUDate();
    toDate.setHour(TimecardUtil.getTimeHour(toTime));
    toDate.setMinute(TimecardUtil.getTimeMin(toTime));

    if (dspDate.compareDateYMDHM(toDate) == UDate.EQUAL) {
      index = __getMaxRowsCount(admConf.getTacInterval());
    } else {
      int intHour = toDate.getIntHour();
      int min = toDate.getIntMinute();
      int ans1 = intHour * __getHourRowsCount(admConf.getTacInterval());
      int ans2 = __getMinRowsCount(admConf.getTacInterval(), min);
      index = ans1 + ans2;
    }

    return index;
  }