|
|
@ -399,10 +399,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
public void exportShippingOrderOne(String outOrderCode, HttpServletResponse response) { |
|
|
|
|
|
|
|
String fileName = "销售出货单1.xlsx"; |
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
try { |
|
|
|
String fileAbsolutePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出库单号为空:{}",outOrderCode); |
|
|
@ -482,10 +481,10 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
public void exportShippingOrderTwo(String outOrderCode, HttpServletResponse response) { |
|
|
|
|
|
|
|
String fileName = "销售出货单2.xlsx"; |
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
|
|
|
|
try { |
|
|
|
String fileAbsolutePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
|
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出库单号为空:{}",outOrderCode); |
|
|
@ -564,9 +563,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
|
|
|
|
String fileName = "销售出货箱单1.xlsx"; |
|
|
|
|
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
try { |
|
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出库单号为空:{}",outOrderCode); |
|
|
|
throw new RuntimeException("出库单号为空,请检查"); |
|
|
@ -616,7 +615,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
} |
|
|
|
|
|
|
|
//构建模板
|
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); |
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); |
|
|
|
WriteSheet sheet = EasyExcel.writerSheet().build(); |
|
|
|
FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); |
|
|
|
|
|
|
@ -639,9 +638,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
public void exportShippingPackingTwo(String outOrderCode, HttpServletResponse response) { |
|
|
|
String fileName = "销售出货箱单2.xlsx"; |
|
|
|
|
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
try { |
|
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出库单号为空:{}",outOrderCode); |
|
|
|
throw new RuntimeException("出库单号为空,请检查"); |
|
|
@ -697,7 +696,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
} |
|
|
|
|
|
|
|
//构建模板
|
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); |
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); |
|
|
|
WriteSheet sheet = EasyExcel.writerSheet().build(); |
|
|
|
FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); |
|
|
|
|
|
|
@ -718,9 +717,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
@Override |
|
|
|
public void exportShippingInvoiceOne(String outOrderCode, HttpServletResponse response) { |
|
|
|
String fileName = "销售出货发票1.xlsx"; |
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
try { |
|
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出货单号为空,请检查:{}", outOrderCode); |
|
|
|
throw new RuntimeException("出货单号为空,请检查"); |
|
|
@ -786,7 +785,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); |
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); |
|
|
|
WriteSheet sheet = EasyExcel.writerSheet().build(); |
|
|
|
FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); |
|
|
|
workBook.fill(map, sheet); |
|
|
@ -806,9 +805,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
@Override |
|
|
|
public void exportShippingInvoiceTwo(String outOrderCode, HttpServletResponse response) { |
|
|
|
String fileName = "销售出货发票2.xlsx"; |
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
try { |
|
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出货单号为空,请检查:{}", outOrderCode); |
|
|
|
throw new RuntimeException("出货单号为空,请检查"); |
|
|
@ -874,7 +873,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); |
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); |
|
|
|
WriteSheet sheet = EasyExcel.writerSheet().build(); |
|
|
|
FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); |
|
|
|
workBook.fill(map, sheet); |
|
|
@ -894,9 +893,9 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
public void exportShippingInformOrder(String outOrderCode, HttpServletResponse response) { |
|
|
|
|
|
|
|
String fileName = "出货通知单.xlsx"; |
|
|
|
FileDownloadUtils fileDownloadUtils = new FileDownloadUtils(); |
|
|
|
|
|
|
|
try { |
|
|
|
String fileRelativePath = fileDownloadUtils.getFileRelativePath(fileName); |
|
|
|
String fileAbsolutePath = FileDownloadUtils.getFileAbsolutePath(fileName); |
|
|
|
if (StringUtils.isEmpty(outOrderCode)){ |
|
|
|
log.warn("出货单号为空,请检查:{}", outOrderCode); |
|
|
|
throw new RuntimeException("出货单号为空,请检查"); |
|
|
@ -940,7 +939,7 @@ public class SysSalesShippingInformServiceImpl implements ISysSalesShippingInfor |
|
|
|
map.put("customerName",sysSalesShippingInform.getCustomerName()); |
|
|
|
map.put("businessMembers",sysSalesShippingInform.getBusinessMembers()); |
|
|
|
|
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileRelativePath).build(); |
|
|
|
ExcelWriter workBook = EasyExcel.write(response.getOutputStream()).withTemplate(fileAbsolutePath).build(); |
|
|
|
WriteSheet sheet = EasyExcel.writerSheet().build(); |
|
|
|
|
|
|
|
FillConfig fillConfig = FillConfig.builder().forceNewRow(true).build(); |
|
|
|