| Line 119... |
Line 119... |
| 119 |
StringBuilder snapdealSaleHistory = new StringBuilder("");
|
119 |
StringBuilder snapdealSaleHistory = new StringBuilder("");
|
| 120 |
StringBuilder flipkartSaleHistory = new StringBuilder("");
|
120 |
StringBuilder flipkartSaleHistory = new StringBuilder("");
|
| 121 |
StringBuilder amzn_mfnSaleHistory = new StringBuilder("");
|
121 |
StringBuilder amzn_mfnSaleHistory = new StringBuilder("");
|
| 122 |
|
122 |
|
| 123 |
ItemInventory itemInventory = inventoryMap.get(item.getId());
|
123 |
ItemInventory itemInventory = inventoryMap.get(item.getId());
|
| - |
|
124 |
Map<Long, Long> availabilityMap;
|
| - |
|
125 |
if(itemInventory!= null) {
|
| 124 |
Map<Long, Long> availabilityMap = itemInventory.getAvailability();
|
126 |
availabilityMap = itemInventory.getAvailability();
|
| 125 |
for (Long warehouseId : availabilityMap.keySet()) {
|
127 |
for (Long warehouseId : availabilityMap.keySet()) {
|
| 126 |
if(ourGoodWarehouses.contains(warehouseId)) {
|
128 |
if(ourGoodWarehouses.contains(warehouseId)) {
|
| 127 |
long currentAvailability = availabilityMap.get(warehouseId);
|
129 |
long currentAvailability = availabilityMap.get(warehouseId);
|
| 128 |
stockCount += currentAvailability;
|
130 |
stockCount += currentAvailability;
|
| 129 |
if(currentAvailability>0) {
|
131 |
if(currentAvailability>0) {
|
| 130 |
List<VendorItemPricing> pricingList = itemPricingMap.get(item.getId());
|
132 |
List<VendorItemPricing> pricingList = itemPricingMap.get(item.getId());
|
| 131 |
for(VendorItemPricing vendorItemPricing: pricingList) {
|
133 |
for(VendorItemPricing vendorItemPricing: pricingList) {
|
| 132 |
if(vendorItemPricing.getVendorId() == ourWarehouseMap.get(warehouseId).getVendor().getId()) {
|
134 |
if(vendorItemPricing.getVendorId() == ourWarehouseMap.get(warehouseId).getVendor().getId()) {
|
| 133 |
stockValue = stockValue + (vendorItemPricing.getNlc()*currentAvailability);
|
135 |
stockValue = stockValue + (vendorItemPricing.getNlc()*currentAvailability);
|
| 134 |
}
|
136 |
}
|
| 135 |
}
|
137 |
}
|
| 136 |
}
|
138 |
}
|
| 137 |
}
|
139 |
}
|
| - |
|
140 |
}
|
| 138 |
}
|
141 |
}
|
| 139 |
for(OOSStatus oosStatus : oosStatusMapByItem.get(item.getId())) {
|
142 |
for(OOSStatus oosStatus : oosStatusMapByItem.get(item.getId())) {
|
| 140 |
switch(oosStatus.getSourceId()) {
|
143 |
switch(oosStatus.getSourceId()) {
|
| 141 |
case 0:
|
144 |
case 0:
|
| 142 |
if(oosStatus.isIs_oos()== false) {
|
145 |
if(oosStatus.isIs_oos()== false) {
|