Index: src/main/java/com/example/cookbook/controller/VrabotenController.java
===================================================================
--- src/main/java/com/example/cookbook/controller/VrabotenController.java	(revision ee276857e882c951c22c0041683ace305d6d6de6)
+++ src/main/java/com/example/cookbook/controller/VrabotenController.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
@@ -2,4 +2,5 @@
 
 
+import com.example.cookbook.model.DostavaDTO;
 import com.example.cookbook.model.Naracka;
 import com.example.cookbook.model.Recept;
@@ -43,8 +44,9 @@
                                  @RequestParam LocalDateTime vreme,
                                  Model model){
-
+        List<DostavaDTO> podatoci = null;
         List<Stavka> stavkiVoNaracka = null;
         try {
             stavkiVoNaracka = narcakiService.findByTelAndVreme(telefon, vreme);
+            podatoci = narcakiService.findDataForDostava(telefon, vreme);
         } catch (SQLException e) {
             return "redirect:/error-page/SQL%20Exception";
@@ -52,4 +54,5 @@
 
         model.addAttribute("stavki", stavkiVoNaracka);
+        model.addAttribute("podatoci", podatoci);
 
         return "stavka";
Index: src/main/java/com/example/cookbook/model/DostavaDTO.java
===================================================================
--- src/main/java/com/example/cookbook/model/DostavaDTO.java	(revision ee276857e882c951c22c0041683ace305d6d6de6)
+++ src/main/java/com/example/cookbook/model/DostavaDTO.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
@@ -3,11 +3,9 @@
 import java.time.LocalDateTime;
 
-public record DostavaDTO (String recIme, String adresa, String sostojka, LocalDateTime vreme, String telefon){
-    public DostavaDTO(String recIme, String adresa, String sostojka, LocalDateTime vreme, String telefon) {
+public record DostavaDTO (String recIme, String adresa, String sostojka){
+    public DostavaDTO(String recIme, String adresa, String sostojka) {
         this.recIme = recIme;
         this.adresa = adresa;
         this.sostojka = sostojka;
-        this.vreme = vreme;
-        this.telefon = telefon;
     }
 }
Index: src/main/java/com/example/cookbook/repository/NarackiRepository.java
===================================================================
--- src/main/java/com/example/cookbook/repository/NarackiRepository.java	(revision ee276857e882c951c22c0041683ace305d6d6de6)
+++ src/main/java/com/example/cookbook/repository/NarackiRepository.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
@@ -3,4 +3,5 @@
 
 import com.example.cookbook.dbConfig.DB;
+import com.example.cookbook.model.DostavaDTO;
 import com.example.cookbook.model.Naracka;
 import com.example.cookbook.model.Recept;
@@ -65,3 +66,59 @@
         return stavki;
     }
+
+    public List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException {
+        Connection connection = DB.getConnection();
+        String query = "select r.rec_ime, l.adresa, 'Готово' sostojka from so_koi sk\n" +
+                "            left join recepti r on\n" +
+                "                        r.rec_id = sk.rec_id\n" +
+                "                left join opsluzuva o on\n" +
+                "                        o.rec_id = r.rec_id\n" +
+                "                left join restorani r2 on\n" +
+                "                        r2.res_id = o.res_id\n" +
+                "                left join se_naogja1 sn on\n" +
+                "                        sn.res_id = r2.res_id\n" +
+                "                left join lokacii l on\n" +
+                "                        l.l_id = sn.l_id\n" +
+                "        where vreme = ? and telefon = ? and sk.nacin = 'Готово'\n" +
+                "union\n" +
+                "select r.rec_ime, l.adresa, s2.s_naziv sostojka  from so_koi sk\n" +
+                "        left join recepti r on\n" +
+                "                        r.rec_id = sk.rec_id\n" +
+                "                left join sodrzi s on\n" +
+                "                        r.rec_id = s.rec_id\n" +
+                "                left join sostojki s2 on\n" +
+                "                        s2.s_id = s.s_id\n" +
+                "                left join ja_ima ji on\n" +
+                "                        ji.s_id = s2.s_id\n" +
+                "                left join prodavnici p on\n" +
+                "                        p.pro_id = ji.pro_id\n" +
+                "                left join se_naogja2 sn on\n" +
+                "                        sn.pro_id = p.pro_id\n" +
+                "                left join lokacii l on\n" +
+                "                        l.l_id = sn.l_id\n" +
+                "        where vreme = ? and telefon = ? and sk.nacin = 'Состојки'";
+        PreparedStatement prepStm = connection.prepareStatement(query);
+
+        prepStm.setObject(1, vreme);
+        prepStm.setString(2, telefon);
+        prepStm.setObject(3, vreme);
+        prepStm.setString(4, telefon);
+
+        ResultSet result = prepStm.executeQuery();
+
+        List<DostavaDTO> dostavaDTOS = new ArrayList<>();
+        while (result.next()){
+            DostavaDTO stavka = new DostavaDTO(
+                    result.getString("rec_ime"),
+                    result.getString("adresa"),
+                    result.getString("sostojka")
+            );
+
+            dostavaDTOS.add(stavka);
+        }
+        DB.closeConnection();
+        result.close();
+        prepStm.close();
+        return dostavaDTOS;
+    }
 }
Index: src/main/java/com/example/cookbook/service/NarackiService.java
===================================================================
--- src/main/java/com/example/cookbook/service/NarackiService.java	(revision ee276857e882c951c22c0041683ace305d6d6de6)
+++ src/main/java/com/example/cookbook/service/NarackiService.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
@@ -1,4 +1,5 @@
 package com.example.cookbook.service;
 
+import com.example.cookbook.model.DostavaDTO;
 import com.example.cookbook.model.Naracka;
 import com.example.cookbook.model.Recept;
@@ -14,3 +15,5 @@
 
     List<Stavka> findByTelAndVreme(String telefon, LocalDateTime vreme) throws SQLException;
+
+    List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException;
 }
Index: src/main/java/com/example/cookbook/service/impl/NarackiServiceImpl.java
===================================================================
--- src/main/java/com/example/cookbook/service/impl/NarackiServiceImpl.java	(revision ee276857e882c951c22c0041683ace305d6d6de6)
+++ src/main/java/com/example/cookbook/service/impl/NarackiServiceImpl.java	(revision a226bc376d8feeec1829bfe9374cdf27b2cf935b)
@@ -2,4 +2,5 @@
 
 
+import com.example.cookbook.model.DostavaDTO;
 import com.example.cookbook.model.Naracka;
 import com.example.cookbook.model.Recept;
@@ -31,3 +32,8 @@
         return narackiRepository.findByTelAndVreme(telefon, vreme);
     }
+
+    @Override
+    public List<DostavaDTO> findDataForDostava(String telefon, LocalDateTime vreme) throws SQLException {
+        return narackiRepository.findDataForDostava(telefon, vreme);
+    }
 }
