| Line 60... |
Line 60... |
| 60 |
import org.apache.thrift.TException;
|
60 |
import org.apache.thrift.TException;
|
| 61 |
import org.apache.thrift.transport.TTransportException;
|
61 |
import org.apache.thrift.transport.TTransportException;
|
| 62 |
|
62 |
|
| 63 |
import com.google.gson.Gson;
|
63 |
import com.google.gson.Gson;
|
| 64 |
|
64 |
|
| 65 |
public class UpdateSnapdealInventoryUsingPanel {
|
65 |
public class UpdateSnapdealInventoryUsingPanel{
|
| 66 |
private static long time = System.currentTimeMillis();
|
66 |
private static long time = System.currentTimeMillis();
|
| 67 |
private static String SNAPDEAL_INVENTORY_SHEET;
|
67 |
private static String SNAPDEAL_INVENTORY_SHEET;
|
| 68 |
private static Map<Long, SnapdealItemForInventory> allItemsInventoryMap = new HashMap<Long, SnapdealItemForInventory>();
|
68 |
private static Map<Long, SnapdealItemForInventory> allItemsInventoryMap = new HashMap<Long, SnapdealItemForInventory>();
|
| 69 |
private static ArrayList<Inventory> currentInventoryItemList;
|
69 |
private static ArrayList<Inventory> currentInventoryItemList;
|
| 70 |
static Map<Long,Long> itemIdpendingOrdersMap;
|
70 |
static Map<Long,Long> itemIdpendingOrdersMap;
|
| Line 136... |
Line 136... |
| 136 |
try {
|
136 |
try {
|
| 137 |
List<Item> aliveItems = catalogClient.getAllAliveItems();
|
137 |
List<Item> aliveItems = catalogClient.getAllAliveItems();
|
| 138 |
Map<Long,Item> aliveItemsMap = new HashMap<Long,Item>();
|
138 |
Map<Long,Item> aliveItemsMap = new HashMap<Long,Item>();
|
| 139 |
for(in.shop2020.model.v1.catalog.Item thriftItem:aliveItems){
|
139 |
for(in.shop2020.model.v1.catalog.Item thriftItem:aliveItems){
|
| 140 |
aliveItemsMap.put(thriftItem.getId(), thriftItem);
|
140 |
aliveItemsMap.put(thriftItem.getId(), thriftItem);
|
| 141 |
|
- |
|
| 142 |
}
|
141 |
}
|
| 143 |
InventoryClient inventoryServiceClient = new InventoryClient();
|
142 |
InventoryClient inventoryServiceClient = new InventoryClient();
|
| 144 |
try {
|
143 |
try {
|
| 145 |
inventoryServiceClient = new InventoryClient();
|
144 |
inventoryServiceClient = new InventoryClient();
|
| 146 |
} catch (TTransportException e) {
|
145 |
} catch (TTransportException e) {
|
| Line 996... |
Line 995... |
| 996 |
if(notMappedItems.length() >0){
|
995 |
if(notMappedItems.length() >0){
|
| 997 |
text = "<html><table border=\"1\" align=\"center\">"+tableHeader+notMappedItems.toString()+"</table></html>";
|
996 |
text = "<html><table border=\"1\" align=\"center\">"+tableHeader+notMappedItems.toString()+"</table></html>";
|
| 998 |
mailer.sendSSLMessage(sendTo,"Please create Warehouse ID and Item ID mapping", emailFromAddress, password, text);
|
997 |
mailer.sendSSLMessage(sendTo,"Please create Warehouse ID and Item ID mapping", emailFromAddress, password, text);
|
| 999 |
}
|
998 |
}
|
| 1000 |
}
|
999 |
}
|
| 1001 |
}
|
- |
|
| 1002 |
|
1000 |
}
|
| - |
|
1001 |
|