| Line 7... |
Line 7... |
| 7 |
import java.util.HashMap;
|
7 |
import java.util.HashMap;
|
| 8 |
import java.util.List;
|
8 |
import java.util.List;
|
| 9 |
import java.util.Map;
|
9 |
import java.util.Map;
|
| 10 |
import java.util.stream.Collectors;
|
10 |
import java.util.stream.Collectors;
|
| 11 |
|
11 |
|
| - |
|
12 |
import org.apache.commons.lang.StringUtils;
|
| 12 |
import org.springframework.beans.factory.annotation.Autowired;
|
13 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 13 |
import org.springframework.stereotype.Component;
|
14 |
import org.springframework.stereotype.Component;
|
| 14 |
|
15 |
|
| - |
|
16 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 15 |
import com.spice.profitmandi.dao.entity.logistics.Provider;
|
17 |
import com.spice.profitmandi.dao.entity.logistics.Provider;
|
| 16 |
import com.spice.profitmandi.dao.entity.logistics.ProviderTat;
|
18 |
import com.spice.profitmandi.dao.entity.logistics.ProviderTat;
|
| 17 |
import com.spice.profitmandi.dao.entity.logistics.PublicHolidays;
|
19 |
import com.spice.profitmandi.dao.entity.logistics.PublicHolidays;
|
| 18 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
20 |
import com.spice.profitmandi.dao.entity.transaction.Order;
|
| 19 |
import com.spice.profitmandi.dao.model.DispatchNotificationModel;
|
21 |
import com.spice.profitmandi.dao.model.DispatchNotificationModel;
|
| Line 52... |
Line 54... |
| 52 |
return currDate;
|
54 |
return currDate;
|
| 53 |
}
|
55 |
}
|
| 54 |
|
56 |
|
| 55 |
@Override
|
57 |
@Override
|
| 56 |
public Map<String, DispatchNotificationModel> markedOrderShippedDetail(List<Order> orders, Provider provider,
|
58 |
public Map<String, DispatchNotificationModel> markedOrderShippedDetail(List<Order> orders, Provider provider,
|
| 57 |
Map<String, DispatchNotificationModel> dispatchNotication, String airwaybillNo) {
|
59 |
Map<String, DispatchNotificationModel> dispatchNotication, String airwaybillNo)
|
| - |
|
60 |
throws ProfitMandiBusinessException {
|
| 58 |
|
61 |
|
| 59 |
for (Order order : orders) {
|
62 |
for (Order order : orders) {
|
| 60 |
if (order.getStatus().equals(OrderStatus.BILLED)) {
|
63 |
if (order.getStatus().equals(OrderStatus.BILLED)) {
|
| - |
|
64 |
|
| - |
|
65 |
if (StringUtils.isEmpty(airwaybillNo)) {
|
| - |
|
66 |
throw new ProfitMandiBusinessException("Uploaded File", "",
|
| - |
|
67 |
"Invoice Number " + order.getInvoiceNumber() + " airwaybill_no is empty");
|
| - |
|
68 |
|
| - |
|
69 |
}
|
| 61 |
order.setLogisticsProviderId(provider.getId());
|
70 |
order.setLogisticsProviderId(provider.getId());
|
| 62 |
order.setAirwayBillNumber(airwaybillNo);
|
71 |
order.setAirwayBillNumber(airwaybillNo);
|
| 63 |
order.setStatus(OrderStatus.SHIPPED_FROM_WH);
|
72 |
order.setStatus(OrderStatus.SHIPPED_FROM_WH);
|
| 64 |
order.setStatusDescription("Order shipped from warehouses");
|
73 |
order.setStatusDescription("Order shipped from warehouses");
|
| 65 |
|
74 |
|