| Line 117... |
Line 117... |
| 117 |
Long[] mismatch = new Long[2];
|
117 |
Long[] mismatch = new Long[2];
|
| 118 |
mismatch[0] = itemAvailabilityByScans.get(itemId);
|
118 |
mismatch[0] = itemAvailabilityByScans.get(itemId);
|
| 119 |
mismatch[1] = itemAvailabilitiesOnSite.get(itemId);
|
119 |
mismatch[1] = itemAvailabilitiesOnSite.get(itemId);
|
| 120 |
availabilityMismatchMap.put(itemId, mismatch);
|
120 |
availabilityMismatchMap.put(itemId, mismatch);
|
| 121 |
}
|
121 |
}
|
| 122 |
} else if (itemAvailabilitiesOnSite.get(itemId)==0) {
|
122 |
} else {
|
| 123 |
if(itemAvailabilityByScans.get(itemId)!=0) {
|
123 |
if(itemAvailabilityByScans.get(itemId)!=0) {
|
| 124 |
Long[] mismatch = new Long[2];
|
124 |
Long[] mismatch = new Long[2];
|
| 125 |
mismatch[0] = itemAvailabilityByScans.get(itemId);
|
125 |
mismatch[0] = itemAvailabilityByScans.get(itemId);
|
| 126 |
mismatch[1] = 0L;
|
126 |
mismatch[1] = 0L;
|
| 127 |
availabilityMismatchMap.put(itemId, mismatch);
|
127 |
availabilityMismatchMap.put(itemId, mismatch);
|
| Line 137... |
Line 137... |
| 137 |
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));
|
137 |
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(file));
|
| 138 |
bufferedWriter.write(StringUtils.join(new String[] { "Item Id",
|
138 |
bufferedWriter.write(StringUtils.join(new String[] { "Item Id",
|
| 139 |
"Brand", "Model Name", "Model Number",
|
139 |
"Brand", "Model Name", "Model Number",
|
| 140 |
"Color", "Inventory shown", "Inventory through Scans" }, '\t'));
|
140 |
"Color", "Inventory shown", "Inventory through Scans" }, '\t'));
|
| 141 |
for (Long itemId : availabilityMismatchMap.keySet()) {
|
141 |
for (Long itemId : availabilityMismatchMap.keySet()) {
|
| 142 |
if(availabilityMismatchMap.get(itemId)[0] == availabilityMismatchMap.get(itemId)[1]){
|
142 |
if(availabilityMismatchMap.get(itemId)[0].equals(availabilityMismatchMap.get(itemId)[1])){
|
| 143 |
continue;
|
143 |
continue;
|
| 144 |
}
|
144 |
}
|
| 145 |
Item item = null;
|
145 |
Item item = null;
|
| 146 |
try {
|
146 |
try {
|
| 147 |
in.shop2020.model.v1.catalog.CatalogService.Client catalogClient = new CatalogClient().getClient();
|
147 |
in.shop2020.model.v1.catalog.CatalogService.Client catalogClient = new CatalogClient().getClient();
|