private function addPudToTruckOrder(Entity\TruckOrder $truckOrder, Entity\Pud $pud)
 {
     $weight = $truckOrder->getWeight() + $pud->getSummaryWeight();
     $volume = $truckOrder->getVolume() + $pud->getLength() * $pud->getHeight() * $pud->getWidth();
     $packageCount = $truckOrder->getPackageCount() + $pud->getCountPlaces();
     //необходимо подобрать новый грузовик, метод возвращает Площадь и Максимальную высоту всех Pud входящих в TruckOrder
     list($square, $maxHeight) = $this->getDoctrine()->getRepository('AppTruckingBundle:TruckOrder')->getSquareAndMaxHeightById($truckOrder->getId());
     $square = $square + $pud->getWidth() * $pud->getLength() * $pud->getCountPlaces();
     $repositoryTruck = $this->getDoctrine()->getRepository('AppTruckingBundle:Trucks');
     $trucks = $repositoryTruck->getSuitableTruck($weight, $square, $maxHeight);
     if (is_null($trucks)) {
         throw new \Exception('Suitable truck not found');
     } else {
         $truckOrder->setTruckId($repositoryTruck->find($trucks));
         $truckOrder->setWeight($weight);
         $truckOrder->setVolume($volume);
         $truckOrder->setPackageCount($packageCount);
     }
 }