Implement Warehouse.... #47

Merged
Seil0 merged 6 commits from feature/intern_warehouse into master 2020-06-08 13:40:11 +02:00
3 changed files with 7 additions and 3 deletions
Showing only changes of commit a192f0ac51 - Show all commits

View File

@ -1,5 +1,6 @@
package org.hso.ecommerce.controller.intern.warehouse;
import org.hso.ecommerce.action.shop.EnableTrackingAction;
import org.hso.ecommerce.entities.warehouse.WarehouseBooking;
import org.hso.ecommerce.repos.warehouse.WarehouseBookingRepository;
import org.springframework.beans.factory.annotation.Autowired;
@ -69,6 +70,11 @@ public class TodoController {
booking.get().isInProgress = true;
booking.get().isDone = true;
// Update Delivery Date
if (booking.get().reason.customerOrder != null) {
EnableTrackingAction.addTrackingInfo(booking.get().reason.customerOrder);
}
warehouseBookingRepository.save(booking.get());
return "redirect:/intern/warehouse/todo";

View File

@ -1,7 +1,6 @@
package org.hso.ecommerce.controller.shop;
import org.hso.ecommerce.action.shop.CreateOrderAction;
import org.hso.ecommerce.action.shop.EnableTrackingAction;
import org.hso.ecommerce.entities.booking.BookingAccountEntry;
import org.hso.ecommerce.entities.booking.PaymentMethod;
import org.hso.ecommerce.entities.shop.Address;
@ -136,7 +135,6 @@ public class ShopCheckoutController {
CreateOrderAction.Result result = null;
try {
result = action.finish();
EnableTrackingAction.addTrackingInfo(result.customerOrder);
customerOderRepository.save(result.customerOrder);
bookingRepository.saveAll(result.bookings);

View File

@ -31,7 +31,7 @@ public class CustomerOrder {
@NotNull
public java.sql.Timestamp created;
@NotNull
@Column(nullable = true)
public String trackingId;
@Column(nullable = true)