| Line 79... |
Line 79... |
| 79 |
List<InventoryAvailability> nonSerializedInventoryList = scanHandler.getCurrentNonSerializedInventoryByScans(physicalWarehouseId);
|
79 |
List<InventoryAvailability> nonSerializedInventoryList = scanHandler.getCurrentNonSerializedInventoryByScans(physicalWarehouseId);
|
| 80 |
|
80 |
|
| 81 |
totalInventoryList.addAll(serializedInventoryList);
|
81 |
totalInventoryList.addAll(serializedInventoryList);
|
| 82 |
totalInventoryList.addAll(nonSerializedInventoryList);
|
82 |
totalInventoryList.addAll(nonSerializedInventoryList);
|
| 83 |
|
83 |
|
| - |
|
84 |
Map<Long, InventoryAvailability> totalInventoryMap = new HashMap<Long, InventoryAvailability>();
|
| - |
|
85 |
|
| 84 |
for(InventoryAvailability availability : totalInventoryList){
|
86 |
for(InventoryAvailability availability : totalInventoryList){
|
| 85 |
ItemInventory itemInvObj = itemInventoryMap.get(availability.getItemId());
|
87 |
ItemInventory itemInvObj = itemInventoryMap.get(availability.getItemId());
|
| 86 |
Map<Long, Long> itemAvailibility = itemInvObj.getAvailability();
|
- |
|
| 87 |
long totalInventoryAsCatalog = 0;
|
88 |
long totalInventoryAsCatalog = 0;
|
| - |
|
89 |
if(itemInvObj!=null){
|
| - |
|
90 |
Map<Long, Long> itemAvailibility = itemInvObj.getAvailability();
|
| - |
|
91 |
|
| 88 |
for(Long whId : itemAvailibility.keySet()){
|
92 |
for(Long whId : itemAvailibility.keySet()){
|
| 89 |
Warehouse warehouse = allWarehousesMap.get(whId);
|
93 |
Warehouse warehouse = allWarehousesMap.get(whId);
|
| 90 |
if(warehouse.getBillingType() == BillingType.OURS && warehouse.getBillingWarehouseId()==physicalWarehouseId &&
|
94 |
if(warehouse.getBillingType() == BillingType.OURS && warehouse.getBillingWarehouseId()==physicalWarehouseId &&
|
| 91 |
warehouse.getInventoryType()==InventoryType.GOOD && warehouse.getWarehouseType() == WarehouseType.OURS){
|
95 |
warehouse.getInventoryType()==InventoryType.GOOD && warehouse.getWarehouseType() == WarehouseType.OURS){
|
| 92 |
totalInventoryAsCatalog = totalInventoryAsCatalog + itemAvailibility.get(whId);
|
96 |
totalInventoryAsCatalog = totalInventoryAsCatalog + itemAvailibility.get(whId);
|
| - |
|
97 |
}
|
| 93 |
}
|
98 |
}
|
| - |
|
99 |
InventoryMismatchUnit invMismatchUnit = new InventoryMismatchUnit();
|
| - |
|
100 |
invMismatchUnit.setItemId(availability.getItemId());
|
| - |
|
101 |
invMismatchUnit.setBrand(availability.getBrand());
|
| - |
|
102 |
invMismatchUnit.setModelName(availability.getModelName());
|
| - |
|
103 |
invMismatchUnit.setModelNumber(availability.getModelNumber());
|
| - |
|
104 |
invMismatchUnit.setColor(availability.getColor());
|
| - |
|
105 |
invMismatchUnit.setQuantityAsPerScans(availability.getQuantity());
|
| - |
|
106 |
invMismatchUnit.setQuantityAsPerCatalog(totalInventoryAsCatalog);
|
| - |
|
107 |
inventoryMismatches.add(invMismatchUnit);
|
| - |
|
108 |
}else{
|
| - |
|
109 |
InventoryMismatchUnit invMismatchUnit = new InventoryMismatchUnit();
|
| - |
|
110 |
invMismatchUnit.setItemId(availability.getItemId());
|
| - |
|
111 |
invMismatchUnit.setBrand(availability.getBrand());
|
| - |
|
112 |
invMismatchUnit.setModelName(availability.getModelName());
|
| - |
|
113 |
invMismatchUnit.setModelNumber(availability.getModelNumber());
|
| - |
|
114 |
invMismatchUnit.setColor(availability.getColor());
|
| - |
|
115 |
invMismatchUnit.setQuantityAsPerScans(availability.getQuantity());
|
| - |
|
116 |
invMismatchUnit.setQuantityAsPerCatalog(totalInventoryAsCatalog);
|
| - |
|
117 |
inventoryMismatches.add(invMismatchUnit);
|
| 94 |
}
|
118 |
}
|
| 95 |
InventoryMismatchUnit invMismatchUnit = new InventoryMismatchUnit();
|
- |
|
| 96 |
invMismatchUnit.setItemId(availability.getItemId());
|
- |
|
| 97 |
invMismatchUnit.setBrand(availability.getBrand());
|
- |
|
| 98 |
invMismatchUnit.setModelName(availability.getModelName());
|
- |
|
| 99 |
invMismatchUnit.setModelNumber(availability.getModelNumber());
|
- |
|
| 100 |
invMismatchUnit.setColor(availability.getColor());
|
- |
|
| 101 |
invMismatchUnit.setQuantityAsPerScans(availability.getQuantity());
|
- |
|
| 102 |
invMismatchUnit.setQuantityAsPerCatalog(totalInventoryAsCatalog);
|
- |
|
| 103 |
inventoryMismatches.add(invMismatchUnit);
|
- |
|
| 104 |
}
|
119 |
}
|
| 105 |
|
120 |
|
| 106 |
}
|
121 |
}
|
| 107 |
|
122 |
|
| 108 |
/*
|
123 |
/*
|