| Line 114... |
Line 114... |
| 114 |
List<in.shop2020.model.v1.order.Order> t_orders = new ArrayList<in.shop2020.model.v1.order.Order>();
|
114 |
List<in.shop2020.model.v1.order.Order> t_orders = new ArrayList<in.shop2020.model.v1.order.Order>();
|
| 115 |
if(type==OrderType.NEW || type==OrderType.ALL_PENDING || type ==OrderType.LOW_INVENTORY || type == OrderType.PO_RAISED
|
115 |
if(type==OrderType.NEW || type==OrderType.ALL_PENDING || type ==OrderType.LOW_INVENTORY || type == OrderType.PO_RAISED
|
| 116 |
|| type == OrderType.REVERSAL_INITIATED || type == OrderType.NOT_AVAILABLE){
|
116 |
|| type == OrderType.REVERSAL_INITIATED || type == OrderType.NOT_AVAILABLE){
|
| 117 |
t_orders.addAll(client.getOrdersInBatchAsPromisedShipping(statuses, 0, 0, warehouseId, source));
|
117 |
t_orders.addAll(client.getOrdersInBatchAsPromisedShipping(statuses, 0, 0, warehouseId, source));
|
| 118 |
}else{
|
118 |
}else{
|
| - |
|
119 |
if(orderCategory!=OrderCategory.NONE){
|
| - |
|
120 |
statuses = getStatuses(OrderType.ALL_PENDING);
|
| - |
|
121 |
t_orders.addAll(client.getOrdersInBatchAsPromisedShipping(statuses, 0, 0, warehouseId, source));
|
| - |
|
122 |
}else{
|
| 119 |
t_orders.addAll(client.getOrdersInBatch(statuses, offset, limit, warehouseId, source));
|
123 |
t_orders.addAll(client.getOrdersInBatch(statuses, offset, limit, warehouseId, source));
|
| - |
|
124 |
}
|
| 120 |
}
|
125 |
}
|
| 121 |
|
126 |
|
| 122 |
orders = getOrdersFromThirftOrders(t_orders);
|
127 |
orders = getOrdersFromThirftOrders(t_orders);
|
| 123 |
/*for (in.shop2020.model.v1.order.Order t_order: t_orders){
|
128 |
/*for (in.shop2020.model.v1.order.Order t_order: t_orders){
|
| 124 |
Order o = getOrderFromThriftOrder(t_order);
|
129 |
Order o = getOrderFromThriftOrder(t_order);
|
| 125 |
orders.add(o);
|
130 |
orders.add(o);
|
| 126 |
}*/
|
131 |
}*/
|
| 127 |
if(type==OrderType.NEW || type==OrderType.ALL_PENDING || type ==OrderType.LOW_INVENTORY || type == OrderType.PO_RAISED
|
132 |
if(type==OrderType.NEW || type==OrderType.ALL_PENDING || type ==OrderType.LOW_INVENTORY || type == OrderType.PO_RAISED
|
| 128 |
|| type == OrderType.REVERSAL_INITIATED || type == OrderType.NOT_AVAILABLE){
|
133 |
|| type == OrderType.REVERSAL_INITIATED || type == OrderType.NOT_AVAILABLE || type == OrderType.NOT_APPLICABLE){
|
| 129 |
Map<Long, List<Order>> transactionOrdersMap = new HashMap<Long, List<Order>>();
|
134 |
Map<Long, List<Order>> transactionOrdersMap = new HashMap<Long, List<Order>>();
|
| 130 |
Map<Long, Map<String, Long>> transactionsColorMap = new HashMap<Long, Map<String, Long>>();
|
135 |
Map<Long, Map<String, Long>> transactionsColorMap = new HashMap<Long, Map<String, Long>>();
|
| 131 |
for(Order order : orders){
|
136 |
for(Order order : orders){
|
| 132 |
if(transactionOrdersMap.containsKey(order.getTransactionId())){
|
137 |
if(transactionOrdersMap.containsKey(order.getTransactionId())){
|
| 133 |
List<Order> txnOrders = transactionOrdersMap.get(order.getTransactionId());
|
138 |
List<Order> txnOrders = transactionOrdersMap.get(order.getTransactionId());
|
| Line 338... |
Line 343... |
| 338 |
public static int getOrderCount(OrderType type, long warehouseId, long source, OrderCategory orderCategory){
|
343 |
public static int getOrderCount(OrderType type, long warehouseId, long source, OrderCategory orderCategory){
|
| 339 |
List<OrderStatus> statuses = getStatuses(type);
|
344 |
List<OrderStatus> statuses = getStatuses(type);
|
| 340 |
|
345 |
|
| 341 |
int count = 0;
|
346 |
int count = 0;
|
| 342 |
try{
|
347 |
try{
|
| 343 |
if(type==OrderType.ALL_PENDING && orderCategory!=OrderCategory.NONE){
|
348 |
if(type==OrderType.NOT_APPLICABLE && orderCategory!=OrderCategory.NONE){
|
| 344 |
int orderCount = categoryOrderCount;
|
349 |
int orderCount = categoryOrderCount;
|
| 345 |
categoryOrderCount = 0;
|
350 |
categoryOrderCount = 0;
|
| 346 |
return orderCount;
|
351 |
return orderCount;
|
| 347 |
}
|
352 |
}
|
| 348 |
else{
|
353 |
else{
|