| Line 67... |
Line 67... |
| 67 |
private static final long REPORT_GENERATION_INTERVAL = 3;
|
67 |
private static final long REPORT_GENERATION_INTERVAL = 3;
|
| 68 |
private static final long CUT_OFF_TIME = 15;
|
68 |
private static final long CUT_OFF_TIME = 15;
|
| 69 |
private static long NEXT_DAY_DELAY = 1;
|
69 |
private static long NEXT_DAY_DELAY = 1;
|
| 70 |
|
70 |
|
| 71 |
private static final int ID = 0, BRAND = 1, MODEL_NUMBER = 2, MODEL_NAME = 3, COLOR = 4, DELIVERY_DAYS = 5, TOTAL_AVAILABILITY = 6, TOTAL_RESERVED = 7;
|
71 |
private static final int ID = 0, BRAND = 1, MODEL_NUMBER = 2, MODEL_NAME = 3, COLOR = 4, DELIVERY_DAYS = 5, TOTAL_AVAILABILITY = 6, TOTAL_RESERVED = 7;
|
| 72 |
private static final int WH1_AVAILABILITY = 8, WH1_RESERVED = 9, WH5_AVALABILITY = 10, WH5_RESERVED = 11, WH7_AVALABILITY = 12, WH7_RESERVED = 13, SIMILAR_ITEMS = 14;
|
72 |
private static final int WH1_AVAILABILITY = 8, WH1_RESERVED = 9, WH5_AVALABILITY = 10, WH5_RESERVED = 11, WH7_AVALABILITY = 12, WH7_RESERVED = 13, RISKY = 14, EXPECTED_DELAY = 15, STICKY = 16, SIMILAR_ITEMS = 17;
|
| 73 |
|
73 |
|
| 74 |
private HttpSession session;
|
74 |
private HttpSession session;
|
| 75 |
private HttpServletRequest request;
|
75 |
private HttpServletRequest request;
|
| 76 |
private HttpServletResponse response;
|
76 |
private HttpServletResponse response;
|
| 77 |
private ServletContext context;
|
77 |
private ServletContext context;
|
| Line 277... |
Line 277... |
| 277 |
headerRow.createCell(WH1_RESERVED).setCellValue("901 Reserved");
|
277 |
headerRow.createCell(WH1_RESERVED).setCellValue("901 Reserved");
|
| 278 |
headerRow.createCell(WH5_AVALABILITY).setCellValue("9D2 Availabality");
|
278 |
headerRow.createCell(WH5_AVALABILITY).setCellValue("9D2 Availabality");
|
| 279 |
headerRow.createCell(WH5_RESERVED).setCellValue("9D2 Reserved");
|
279 |
headerRow.createCell(WH5_RESERVED).setCellValue("9D2 Reserved");
|
| 280 |
headerRow.createCell(WH7_AVALABILITY).setCellValue("MP Availabality");
|
280 |
headerRow.createCell(WH7_AVALABILITY).setCellValue("MP Availabality");
|
| 281 |
headerRow.createCell(WH7_RESERVED).setCellValue("MP Reserved");
|
281 |
headerRow.createCell(WH7_RESERVED).setCellValue("MP Reserved");
|
| - |
|
282 |
headerRow.createCell(RISKY).setCellType(Cell.CELL_TYPE_STRING);
|
| - |
|
283 |
headerRow.getCell(RISKY).setCellValue("Risky");
|
| - |
|
284 |
headerRow.createCell(EXPECTED_DELAY).setCellValue("Expected Delay");
|
| - |
|
285 |
headerRow.createCell(STICKY).setCellType(Cell.CELL_TYPE_STRING);
|
| - |
|
286 |
headerRow.getCell(STICKY).setCellValue("Sticky");
|
| 282 |
headerRow.createCell(SIMILAR_ITEMS).setCellType(Cell.CELL_TYPE_STRING);
|
287 |
headerRow.createCell(SIMILAR_ITEMS).setCellType(Cell.CELL_TYPE_STRING);
|
| 283 |
headerRow.getCell(SIMILAR_ITEMS).setCellValue("Similar Items");
|
288 |
headerRow.getCell(SIMILAR_ITEMS).setCellValue("Similar Items");
|
| 284 |
|
289 |
|
| 285 |
// headerRow.createCell(WH2_A).setCellValue("WH2 Availabality");
|
290 |
// headerRow.createCell(WH2_A).setCellValue("WH2 Availabality");
|
| 286 |
// headerRow.createCell(WH3_A).setCellValue("WH3 Availabality");
|
291 |
// headerRow.createCell(WH3_A).setCellValue("WH3 Availabality");
|
| Line 303... |
Line 308... |
| 303 |
contentRow.createCell(WH1_RESERVED).setCellValue(item.wh1Reserved);
|
308 |
contentRow.createCell(WH1_RESERVED).setCellValue(item.wh1Reserved);
|
| 304 |
contentRow.createCell(WH5_AVALABILITY).setCellValue(item.wh5Availability);
|
309 |
contentRow.createCell(WH5_AVALABILITY).setCellValue(item.wh5Availability);
|
| 305 |
contentRow.createCell(WH5_RESERVED).setCellValue(item.wh5Reserved);
|
310 |
contentRow.createCell(WH5_RESERVED).setCellValue(item.wh5Reserved);
|
| 306 |
contentRow.createCell(WH7_AVALABILITY).setCellValue(item.wh7Availability);
|
311 |
contentRow.createCell(WH7_AVALABILITY).setCellValue(item.wh7Availability);
|
| 307 |
contentRow.createCell(WH7_RESERVED).setCellValue(item.wh7Reserved);
|
312 |
contentRow.createCell(WH7_RESERVED).setCellValue(item.wh7Reserved);
|
| - |
|
313 |
contentRow.createCell(RISKY).setCellValue(item.risky);
|
| - |
|
314 |
contentRow.createCell(EXPECTED_DELAY).setCellValue(item.expectedDelay);
|
| - |
|
315 |
contentRow.createCell(STICKY).setCellValue(item.sticky);
|
| 308 |
contentRow.createCell(SIMILAR_ITEMS).setCellValue(item.similarItems);
|
316 |
contentRow.createCell(SIMILAR_ITEMS).setCellValue(item.similarItems);
|
| 309 |
}
|
317 |
}
|
| 310 |
sheet.autoSizeColumn(SIMILAR_ITEMS);
|
318 |
sheet.autoSizeColumn(SIMILAR_ITEMS);
|
| 311 |
|
319 |
|
| 312 |
}
|
320 |
}
|
| Line 365... |
Line 373... |
| 365 |
public long wh5Availability = 0;
|
373 |
public long wh5Availability = 0;
|
| 366 |
public long wh5Reserved = 0;
|
374 |
public long wh5Reserved = 0;
|
| 367 |
public long wh7Availability = 0;
|
375 |
public long wh7Availability = 0;
|
| 368 |
public long wh7Reserved = 0;
|
376 |
public long wh7Reserved = 0;
|
| 369 |
public String similarItems = "";
|
377 |
public String similarItems = "";
|
| - |
|
378 |
public String risky;
|
| - |
|
379 |
public String sticky;
|
| - |
|
380 |
public long expectedDelay = 0;
|
| 370 |
|
381 |
|
| 371 |
public RowItem(Item item, long estimate, ItemInventory itemInventory){
|
382 |
public RowItem(Item item, long estimate, ItemInventory itemInventory){
|
| 372 |
id = item.getId();
|
383 |
id = item.getId();
|
| 373 |
brand = item.getBrand();
|
384 |
brand = item.getBrand();
|
| 374 |
modelNumber = item.getModelNumber();
|
385 |
modelNumber = item.getModelNumber();
|
| 375 |
modelName = item.getModelName();
|
386 |
modelName = item.getModelName();
|
| 376 |
color = item.getColor();
|
387 |
color = item.getColor();
|
| 377 |
deliveryEstimate = estimate;
|
388 |
deliveryEstimate = estimate;
|
| - |
|
389 |
risky = item.isRisky() ? "True" : "False";
|
| - |
|
390 |
sticky = item.isIsWarehousePreferenceSticky() ? "True" : "False";
|
| - |
|
391 |
expectedDelay = item.getExpectedDelay();
|
| 378 |
totalAvailability = 0;
|
392 |
totalAvailability = 0;
|
| 379 |
for(Map.Entry<Long, Long> entry : itemInventory.getAvailability().entrySet()){
|
393 |
for(Map.Entry<Long, Long> entry : itemInventory.getAvailability().entrySet()){
|
| 380 |
long value = entry.getValue();
|
394 |
long value = entry.getValue();
|
| 381 |
switch (entry.getKey().intValue()) {
|
395 |
switch (entry.getKey().intValue()) {
|
| 382 |
case 1:
|
396 |
case 1:
|