= '".$params['checktime_start']." 00:00:00'"; } if ($params['checktime_end'] ?? false){ $sql .= " AND checktime <= '".$params['checktime_end']." 23:59:59'"; } $sql .= "GROUP BY orderno)ACT_ALLOCATION_DETAILS)ACT_ALLOCATION_DETAILS WHERE ACT_ALLOCATION_DETAILS.rn <= ".$page*$pagiante." AND rn >".($page-1)*$pagiante; return DB::connection('oracle')->select(DB::raw($sql)); } public function getOrderno(array $params){ $allocations = $this->paginate($params); $count = count($allocations); $str = "("; foreach ($allocations as $index => $allocation){ if ($index < $count-1){ $str .= "'".$allocation->orderno."',"; }else{ $str .= "'".$allocation->orderno."')"; } } return $str; } }