批量发货导出
This commit is contained in:
@@ -31,12 +31,13 @@ public class OrdertoolsService {
|
||||
ResultBean<FileUploadResult> fub = fileUploadComponent.uploadFile(file, "zfdd");
|
||||
String filePath = fub.getData().getFilePath();
|
||||
String fp = fileUploadComponent.getUploadPath() + filePath;
|
||||
String outFilePath = "/zfdd/fhd" + System.currentTimeMillis() + ".xlsx";
|
||||
String outFilePath = "zfdd/fhd" + System.currentTimeMillis() + ".xlsx";
|
||||
String outFileName = fileUploadComponent.getUploadPath() + outFilePath;
|
||||
String outFileUrl = fileUploadComponent.getUrlPrefix() + outFilePath;
|
||||
|
||||
List<WxOrderIn> inList = new ArrayList<>();
|
||||
ExcelReaderBuilder read = EasyExcel.read(fp, WxOrderIn.class, createReadListener(inList));
|
||||
read.sheet().doRead();
|
||||
|
||||
List<ToImportOrderExcel> toList = new ArrayList<>();
|
||||
inList.forEach(inObj -> {
|
||||
@@ -47,12 +48,9 @@ public class OrdertoolsService {
|
||||
toObj.setGoodsNames(ordOrderService.orderGoodsNames(inObj.getMerchantOrderNo()));
|
||||
toList.add(toObj);
|
||||
});
|
||||
EasyExcel.write(outFileName, ToImportOrderExcel.class).sheet("发货单").doWrite(toList);
|
||||
|
||||
// ArrayList EasyExcel.write(response.getOutputStream(), ReserveCustomerExcel.class).sheet("预约单明细").doWrite(list);
|
||||
|
||||
|
||||
read.sheet().doRead();
|
||||
return "";
|
||||
return outFileUrl;
|
||||
}
|
||||
|
||||
private ReadListener<WxOrderIn> createReadListener(List<WxOrderIn> inList) {
|
||||
|
||||
Reference in New Issue
Block a user