public function num_run_deil($start)
 {
     $query = new Query('NUM_RUN_DEIL', $this->dbh);
     $query->where('NUM_RUNID', '>', $start);
     $query->order('NUM_RUNID');
     $result = $query->get('NUM_RUNID,STARTTIME,ENDTIME,SDAYS,EDAYS,SCHCLASSID');
     foreach ($result as $row) {
         $allowance_id = 0;
         if ($row['SDAYS'] != 6) {
             $end = date_parse($row['ENDTIME']);
             $start = date_parse($row['STARTTIME']);
             $duration = (mktime($end['hour'], $end['minute']) - mktime($start['hour'], $start['minute'])) / 3600;
             if ($duration >= 8) {
                 $allowance_id = 1;
             } else {
                 if ($duration < 7) {
                     $allowance_id = 3;
                 } else {
                     $allowance_id = 2;
                 }
             }
         }
         WeeklySchedule::create(['id' => $row['NUM_RUNID'], 'start_day' => $row['SDAYS'], 'end_day' => $row['EDAYS'], 'daily_schedule_id' => $row['SCHCLASSID'], 'allowance_id' => $allowance_id]);
     }
     $size = count($result);
     $this->num_data += $size;
     return $size > 0 ? $result[$size - 1]['NUM_RUNID'] : $start;
 }