| Line 5... |
Line 5... |
| 5 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
5 |
import com.spice.profitmandi.common.exception.ProfitMandiBusinessException;
|
| 6 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
6 |
import com.spice.profitmandi.common.model.CustomRetailer;
|
| 7 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
7 |
import com.spice.profitmandi.common.model.ProfitMandiConstants;
|
| 8 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
8 |
import com.spice.profitmandi.common.model.SendNotificationModel;
|
| 9 |
import com.spice.profitmandi.common.util.FileUtil;
|
9 |
import com.spice.profitmandi.common.util.FileUtil;
|
| - |
|
10 |
import com.spice.profitmandi.common.util.FormattingUtils;
|
| 10 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
11 |
import com.spice.profitmandi.dao.entity.auth.AuthUser;
|
| 11 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
12 |
import com.spice.profitmandi.dao.entity.cs.Position;
|
| 12 |
import com.spice.profitmandi.dao.entity.logistics.Provider;
|
13 |
import com.spice.profitmandi.dao.entity.logistics.Provider;
|
| 13 |
import com.spice.profitmandi.dao.entity.logistics.ProviderDetails;
|
14 |
import com.spice.profitmandi.dao.entity.logistics.ProviderDetails;
|
| 14 |
import com.spice.profitmandi.dao.entity.logistics.ProviderTat;
|
15 |
import com.spice.profitmandi.dao.entity.logistics.ProviderTat;
|
| Line 339... |
Line 340... |
| 339 |
BilledOrderListModel bol = new BilledOrderListModel();
|
340 |
BilledOrderListModel bol = new BilledOrderListModel();
|
| 340 |
bol.setInvoiceNumber(record.get(0));
|
341 |
bol.setInvoiceNumber(record.get(0));
|
| 341 |
bol.setLogisticsProviderName(record.get(1));
|
342 |
bol.setLogisticsProviderName(record.get(1));
|
| 342 |
bol.setAirwayBillNumber(record.get(2));
|
343 |
bol.setAirwayBillNumber(record.get(2));
|
| 343 |
bol.setWeight(Double.valueOf(record.get(3)));
|
344 |
bol.setWeight(Double.valueOf(record.get(3)));
|
| - |
|
345 |
bol.setShippingDate(String.valueOf(LocalDateTime.parse(record.get(4), FormattingUtils.dateTimeFormatter)));
|
| - |
|
346 |
// bol.setShippingDate(String.valueOf(LocalDateTime.parse(record.get(4), FormattingUtils.yyMMDDTimeFormatter)));
|
| - |
|
347 |
//rkb
|
| - |
|
348 |
|
| - |
|
349 |
//bol.setShipping_Date(record.get(formattingUtils.formatDateTime(ofpat)));
|
| - |
|
350 |
//bol.setShipping_Date(record.get(FormattingUtils.formatDateTime(yyyy-MM-dd HH:mm));
|
| - |
|
351 |
// bol.setDate(record.get(4));
|
| - |
|
352 |
//bol.setDate(DateTimeFormatter);
|
| - |
|
353 |
// bol.simpleDateFormat(dateTimeFormat);
|
| 344 |
|
354 |
|
| 345 |
return bol;
|
355 |
return bol;
|
| 346 |
}
|
356 |
}
|
| 347 |
|
357 |
|
| 348 |
@RequestMapping(value = "/provider", method = RequestMethod.GET)
|
358 |
@RequestMapping(value = "/provider", method = RequestMethod.GET)
|
| Line 515... |
Line 525... |
| 515 |
|
525 |
|
| 516 |
for (String invoiceNumber : invoiceNumbers) {
|
526 |
for (String invoiceNumber : invoiceNumbers) {
|
| 517 |
rows.add(Arrays.asList(invoiceNumber));
|
527 |
rows.add(Arrays.asList(invoiceNumber));
|
| 518 |
|
528 |
|
| 519 |
}
|
529 |
}
|
| 520 |
|
530 |
//rkb
|
| 521 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(Arrays.asList("Invoice Number", "Provider", "AWB", "Weight(Kg)"), rows);
|
531 |
org.apache.commons.io.output.ByteArrayOutputStream baos = FileUtil.getCSVByteStream(Arrays.asList("Invoice Number", "Provider", "AWB", "Weight(Kg)", "Shipping Date(dd-MM-yyyy HH:mm:ss)"), rows);
|
| 522 |
|
532 |
|
| 523 |
final HttpHeaders headers = new HttpHeaders();
|
533 |
final HttpHeaders headers = new HttpHeaders();
|
| 524 |
headers.set("Content-Type", "text/csv");
|
534 |
headers.set("Content-Type", "text/csv");
|
| 525 |
headers.set("Content-disposition", "inline; filename=upload-shipping-template.csv");
|
535 |
headers.set("Content-disposition", "inline; filename=upload-shipping-template.csv");
|
| 526 |
headers.setContentLength(baos.toByteArray().length);
|
536 |
headers.setContentLength(baos.toByteArray().length);
|