package com.softserveinc.tender.service.impl;

<<<<<<< HEAD
import com.softserveinc.tender.entity.Location;
=======
import com.softserveinc.tender.entity.Category;
>>>>>>> develop
import com.softserveinc.tender.entity.Tender;
import com.softserveinc.tender.entity.Unit;
import com.softserveinc.tender.repo.TenderRepository;
import com.softserveinc.tender.repo.UnitRepository;
import com.softserveinc.tender.service.TenderService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import sun.management.counter.Units;

import java.util.ArrayList;
<<<<<<< HEAD
import java.util.Collections;
=======
>>>>>>> develop
import java.util.List;

@Service
@Transactional
public class TenderServiceImpl implements TenderService {

    @Autowired
    private TenderRepository tenderRepository;

    @Autowired
    private UnitRepository unitRepository;

    public Tender findOne(int id) {
        return tenderRepository.findOne(id);
    }


    @Transactional
    public List<Tender> findAll() {
        return tenderRepository.findAll();
    }

    @Transactional
    public Tender findOneWithUnits(int id) {
        Tender tender = new Tender();


        //дописати

        return tender;
    }

    @Override
<<<<<<< HEAD
    public List<Tender> findByCustomParameters(Double min, Double max, Integer[] status,List<Integer> locations) {
        return tenderRepository.findByCustomParameters(min, max, status,locations);
=======
    public List<Tender> findByCustomParameters(Double min, Double max, List<Integer> status, List<Integer> categories) {
        return tenderRepository.findByCustomParameters(min, max, status, categories);
    }

    @Override
    public List<Tender> findByCategory(List<Integer> categories) {
        return tenderRepository.findByCategory(categories);
>>>>>>> develop
    }
}

@@ -40,29 +40,17 @@
 .impl;%0A%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD
 %0A
+
 import c
@@ -89,24 +89,16 @@
 cation;%0A
-=======%0A
 import c
@@ -137,32 +137,16 @@
 tegory;%0A
-%3E%3E%3E%3E%3E%3E%3E develop%0A
 import c
@@ -632,75 +632,8 @@
 st;%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0Aimport java.util.Collections;%0A=======%0A%3E%3E%3E%3E%3E%3E%3E develop%0A
 impo
@@ -1223,21 +1223,10 @@
 ide%0A
-%3C%3C%3C%3C%3C%3C%3C HEAD%0A
+//
     
@@ -1332,24 +1332,26 @@
 ocations) %7B%0A
+//
         retu
@@ -1426,15 +1426,8 @@
 s);%0A
-=======
 %0A   
@@ -1782,23 +1782,8 @@
 s);%0A
-%3E%3E%3E%3E%3E%3E%3E develop
 %0A   

add Ajax