| Line 12... |
Line 12... |
| 12 |
import in.shop2020.warehouse.domain.InventoryItem;
|
12 |
import in.shop2020.warehouse.domain.InventoryItem;
|
| 13 |
import in.shop2020.warehouse.persistence.InventoryItemMapper;
|
13 |
import in.shop2020.warehouse.persistence.InventoryItemMapper;
|
| 14 |
|
14 |
|
| 15 |
import java.util.ArrayList;
|
15 |
import java.util.ArrayList;
|
| 16 |
import java.util.Date;
|
16 |
import java.util.Date;
|
| - |
|
17 |
import java.util.HashMap;
|
| 17 |
import java.util.HashSet;
|
18 |
import java.util.HashSet;
|
| 18 |
import java.util.List;
|
19 |
import java.util.List;
|
| 19 |
import java.util.Map;
|
20 |
import java.util.Map;
|
| 20 |
import java.util.Set;
|
21 |
import java.util.Set;
|
| 21 |
|
22 |
|
| - |
|
23 |
import org.apache.ibatis.annotations.Param;
|
| 22 |
import org.apache.thrift.TException;
|
24 |
import org.apache.thrift.TException;
|
| 23 |
import org.apache.thrift.transport.TTransportException;
|
25 |
import org.apache.thrift.transport.TTransportException;
|
| 24 |
import org.springframework.beans.factory.annotation.Autowired;
|
26 |
import org.springframework.beans.factory.annotation.Autowired;
|
| 25 |
import org.springframework.stereotype.Service;
|
27 |
import org.springframework.stereotype.Service;
|
| 26 |
|
28 |
|
| Line 97... |
Line 99... |
| 97 |
|
99 |
|
| 98 |
public void markPurchaseReturnIdForItem(long id, long currentQuantity, long purchaseReturnId) {
|
100 |
public void markPurchaseReturnIdForItem(long id, long currentQuantity, long purchaseReturnId) {
|
| 99 |
inventoryItemMapper.markPurchaseReturnIdForItem(id, currentQuantity, purchaseReturnId);
|
101 |
inventoryItemMapper.markPurchaseReturnIdForItem(id, currentQuantity, purchaseReturnId);
|
| 100 |
|
102 |
|
| 101 |
}
|
103 |
}
|
| - |
|
104 |
|
| - |
|
105 |
public void markPurchaseReturnIdForBadItem(long id, long currentQuantity, long purchaseReturnId) {
|
| - |
|
106 |
inventoryItemMapper.markPurchaseReturnIdForBadItem(id, currentQuantity, purchaseReturnId);
|
| - |
|
107 |
}
|
| 102 |
|
108 |
|
| 103 |
public List<InventoryItem> getCurrentNonSerializedItemsByItemId(long itemId, long warehouseId) throws InventoryServiceException, TException {
|
109 |
public List<InventoryItem> getCurrentNonSerializedItemsByItemId(long itemId, long warehouseId) throws InventoryServiceException, TException {
|
| 104 |
InventoryService.Client inventoryClient = new InventoryClient().getClient();
|
110 |
InventoryService.Client inventoryClient = new InventoryClient().getClient();
|
| 105 |
Warehouse warehouse = inventoryClient.getWarehouse(warehouseId);
|
111 |
Warehouse warehouse = inventoryClient.getWarehouse(warehouseId);
|
| 106 |
return inventoryItemMapper.getCurrentNonSerializedItemsByItemId(itemId, warehouseId, warehouse.getBillingWarehouseId());
|
112 |
return inventoryItemMapper.getCurrentNonSerializedItemsByItemId(itemId, warehouseId, warehouse.getBillingWarehouseId());
|
| 107 |
}
|
113 |
}
|
| 108 |
|
114 |
|
| - |
|
115 |
public List<InventoryItem> getNonSerializedItemsForBadInventory(long itemId, long currentWarehouseId, long physicalWarehouseId){
|
| - |
|
116 |
return inventoryItemMapper.getNonSerializedItemsForBadInventory(itemId, currentWarehouseId, physicalWarehouseId);
|
| - |
|
117 |
}
|
| - |
|
118 |
|
| 109 |
public List<Map<String, Integer>> getCurrentSerializedInventory() {
|
119 |
public List<Map<String, Integer>> getCurrentSerializedInventory() {
|
| 110 |
return inventoryItemMapper.getCurrentSerializedInventory();
|
120 |
return inventoryItemMapper.getCurrentSerializedInventory();
|
| 111 |
}
|
121 |
}
|
| 112 |
|
122 |
|
| 113 |
public List<Map<String, Integer>> getCurrentNonSerializedInventory() {
|
123 |
public List<Map<String, Integer>> getCurrentNonSerializedInventory() {
|
| Line 187... |
Line 197... |
| 187 |
|
197 |
|
| 188 |
public List<InventoryItem> getInventoryItemScannedInForPO(long itemId, List<Long> purchaseIds) {
|
198 |
public List<InventoryItem> getInventoryItemScannedInForPO(long itemId, List<Long> purchaseIds) {
|
| 189 |
return inventoryItemMapper.getInventoryItemScannedInForPO(itemId, purchaseIds);
|
199 |
return inventoryItemMapper.getInventoryItemScannedInForPO(itemId, purchaseIds);
|
| 190 |
}
|
200 |
}
|
| 191 |
|
201 |
|
| - |
|
202 |
public Long getCurrentBadQuantityForItem( long itemId, long currentWarehouseId, long physicalWarehouseId){
|
| - |
|
203 |
return inventoryItemMapper.getCurrentBadQuantityForItem(itemId, currentWarehouseId, physicalWarehouseId);
|
| - |
|
204 |
}
|
| - |
|
205 |
|
| - |
|
206 |
public Map<Long, Long> getItemsInPurchaseReturn(long purchaseReturnId){
|
| - |
|
207 |
Map<Integer, Integer> result = inventoryItemMapper.getItemsInPurchaseReturn(purchaseReturnId);
|
| - |
|
208 |
Map<Long, Long> purchaseReturnItems = new HashMap<Long, Long>();
|
| - |
|
209 |
|
| - |
|
210 |
for(Integer itemId : result.keySet()){
|
| - |
|
211 |
Long count = Long.parseLong(((Object)((Map<String,Long>)(Object)result.get(itemId)).get("count")).toString());
|
| - |
|
212 |
purchaseReturnItems.put(new Long(itemId), count);
|
| - |
|
213 |
}
|
| - |
|
214 |
return purchaseReturnItems;
|
| - |
|
215 |
}
|
| 192 |
}
|
216 |
}
|