Implement Warehouse.... #47
@ -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";
 | 
			
		||||
 | 
			
		||||
@ -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);
 | 
			
		||||
 | 
			
		||||
@ -31,7 +31,7 @@ public class CustomerOrder {
 | 
			
		||||
    @NotNull
 | 
			
		||||
    public java.sql.Timestamp created;
 | 
			
		||||
 | 
			
		||||
    @NotNull
 | 
			
		||||
    @Column(nullable = true)
 | 
			
		||||
    public String trackingId;
 | 
			
		||||
 | 
			
		||||
    @Column(nullable = true)
 | 
			
		||||
 | 
			
		||||
		Reference in New Issue
	
	Block a user