Showing
2 changed files
with
6 additions
and
3 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| @@ -444,7 +444,7 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | @@ -444,7 +444,7 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | ||
| 444 | dataMap.put("supplyUnit", supplyUnitDicItem == null ? "" : supplyUnitDicItem.getName()); | 444 | dataMap.put("supplyUnit", supplyUnitDicItem == null ? "" : supplyUnitDicItem.getName()); |
| 445 | dataMap.put("orderNo", data.getOrderNo()); | 445 | dataMap.put("orderNo", data.getOrderNo()); |
| 446 | dataMap.put("orderingUnitName", data.getOrderingUnitName()); | 446 | dataMap.put("orderingUnitName", data.getOrderingUnitName()); |
| 447 | - dataMap.put("workshopName", data.getWorkshopName()); | 447 | + dataMap.put("workshopName", data.getWorkshopName() == null ? "" : data.getWorkshopName()); |
| 448 | dataMap.put("customerTier", data.getCustomerTier()); | 448 | dataMap.put("customerTier", data.getCustomerTier()); |
| 449 | dataMap.put("orderDate", data.getOrderDate() == null ? "" : data.getOrderDate().format(dateFormatter)); | 449 | dataMap.put("orderDate", data.getOrderDate() == null ? "" : data.getOrderDate().format(dateFormatter)); |
| 450 | 450 |
| @@ -243,6 +243,7 @@ public class BusinessDataExportHandler implements ExportHandler { | @@ -243,6 +243,7 @@ public class BusinessDataExportHandler implements ExportHandler { | ||
| 243 | SysDataDicItem supplyUnitDicItem = sysDataDicItemService.findByCode("SUPPLIER", orderInfo.getSupplyUnit()); | 243 | SysDataDicItem supplyUnitDicItem = sysDataDicItemService.findByCode("SUPPLIER", orderInfo.getSupplyUnit()); |
| 244 | dataMap.put("supplyUnit", supplyUnitDicItem == null ? "" : supplyUnitDicItem.getName()); | 244 | dataMap.put("supplyUnit", supplyUnitDicItem == null ? "" : supplyUnitDicItem.getName()); |
| 245 | dataMap.put("orderNo", orderInfo.getOrderNo()); | 245 | dataMap.put("orderNo", orderInfo.getOrderNo()); |
| 246 | + dataMap.put("workshopName", orderInfo.getWorkshopName() == null ? "" : orderInfo.getWorkshopName()); | ||
| 246 | dataMap.put("orderingUnitName", orderInfo.getOrderingUnitName()); | 247 | dataMap.put("orderingUnitName", orderInfo.getOrderingUnitName()); |
| 247 | dataMap.put("customerTier", orderInfo.getCustomerTier()); | 248 | dataMap.put("customerTier", orderInfo.getCustomerTier()); |
| 248 | dataMap.put("orderDate", orderInfo.getOrderDate() == null ? "" : orderInfo.getOrderDate().format(dateFormatter)); | 249 | dataMap.put("orderDate", orderInfo.getOrderDate() == null ? "" : orderInfo.getOrderDate().format(dateFormatter)); |
| @@ -288,7 +289,8 @@ public class BusinessDataExportHandler implements ExportHandler { | @@ -288,7 +289,8 @@ public class BusinessDataExportHandler implements ExportHandler { | ||
| 288 | } | 289 | } |
| 289 | File pdfFile = ExcelUtil.convertExcelToPdf(tempExcel, "/usr/bin/libreoffice --headless --convert-to pdf --outdir %s %s"); | 290 | File pdfFile = ExcelUtil.convertExcelToPdf(tempExcel, "/usr/bin/libreoffice --headless --convert-to pdf --outdir %s %s"); |
| 290 | try (InputStream pdfIn = new FileInputStream(pdfFile)) { | 291 | try (InputStream pdfIn = new FileInputStream(pdfFile)) { |
| 291 | - ZipEntry entry = new ZipEntry(orderInfo.getOrderNo() + "-订货单打印-" + createTime + ".pdf"); | 292 | + ZipEntry entry = new ZipEntry(orderInfo.getOrderNo() + "-" |
| 293 | + + orderInfo.getOrderingUnitName() + "-" + orderInfo.getWorkshopName() + "-订货单打印" + ".pdf"); | ||
| 292 | zos.putNextEntry(entry); | 294 | zos.putNextEntry(entry); |
| 293 | byte[] buffer = new byte[8192]; | 295 | byte[] buffer = new byte[8192]; |
| 294 | int len; | 296 | int len; |
| @@ -307,7 +309,8 @@ public class BusinessDataExportHandler implements ExportHandler { | @@ -307,7 +309,8 @@ public class BusinessDataExportHandler implements ExportHandler { | ||
| 307 | } else { | 309 | } else { |
| 308 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); | 310 | ByteArrayOutputStream baos = new ByteArrayOutputStream(); |
| 309 | workbook.write(baos); | 311 | workbook.write(baos); |
| 310 | - ZipEntry entry = new ZipEntry(orderInfo.getOrderNo() + "-订货单打印-" + createTime + ".xlsx"); | 312 | + ZipEntry entry = new ZipEntry(orderInfo.getOrderNo() + "-" |
| 313 | + + orderInfo.getOrderingUnitName() + "-" + orderInfo.getWorkshopName() + "-订货单打印" + ".xlsx"); | ||
| 311 | zos.putNextEntry(entry); | 314 | zos.putNextEntry(entry); |
| 312 | zos.write(baos.toByteArray()); | 315 | zos.write(baos.toByteArray()); |
| 313 | zos.closeEntry(); | 316 | zos.closeEntry(); |