Showing
1 changed file
with
6 additions
and
1 deletions
xingyun-sc/src/main/java/com/lframework/xingyun/sc/controller/order/PurchaseOrderInfoController.java
| @@ -360,7 +360,7 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | @@ -360,7 +360,7 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | ||
| 360 | 360 | ||
| 361 | @ApiOperation("订货单打印") | 361 | @ApiOperation("订货单打印") |
| 362 | @GetMapping("/printPurchaseOrder") | 362 | @GetMapping("/printPurchaseOrder") |
| 363 | - public void printPurchaseOrder(@NotBlank(message = "id不能为空") String id, String exportType, HttpServletResponse response) throws IOException { | 363 | + public void printPurchaseOrder(@NotBlank(message = "id不能为空") String id, String exportType, String templateType, HttpServletResponse response) throws IOException { |
| 364 | PurchaseOrderInfo data = purchaseOrderInfoService.findById(id); | 364 | PurchaseOrderInfo data = purchaseOrderInfoService.findById(id); |
| 365 | 365 | ||
| 366 | Wrapper<PurchaseOrderLine> purchaseOrderLineWrapper = Wrappers.lambdaQuery(PurchaseOrderLine.class) | 366 | Wrapper<PurchaseOrderLine> purchaseOrderLineWrapper = Wrappers.lambdaQuery(PurchaseOrderLine.class) |
| @@ -370,6 +370,9 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | @@ -370,6 +370,9 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | ||
| 370 | try { | 370 | try { |
| 371 | // 加载模板文件 | 371 | // 加载模板文件 |
| 372 | ClassPathResource templateResource = new ClassPathResource("templates/purchaseOrderTemplate.xlsx"); | 372 | ClassPathResource templateResource = new ClassPathResource("templates/purchaseOrderTemplate.xlsx"); |
| 373 | + if ("PRODUCTION_PROCESS".equals(templateType)) { | ||
| 374 | + templateResource = new ClassPathResource("templates/purchaseOrderTemplateForProduction.xlsx"); | ||
| 375 | + } | ||
| 373 | try (InputStream inputStream = templateResource.getStream(); | 376 | try (InputStream inputStream = templateResource.getStream(); |
| 374 | Workbook workbook = new XSSFWorkbook(inputStream)) { | 377 | Workbook workbook = new XSSFWorkbook(inputStream)) { |
| 375 | try { | 378 | try { |
| @@ -465,6 +468,8 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | @@ -465,6 +468,8 @@ public class PurchaseOrderInfoController extends DefaultBaseController { | ||
| 465 | dataMap.put("stockUpCompanyName", data.getStockUpCompanyName() == null ? "" : data.getStockUpCompanyName()); | 468 | dataMap.put("stockUpCompanyName", data.getStockUpCompanyName() == null ? "" : data.getStockUpCompanyName()); |
| 466 | //价格表编号 | 469 | //价格表编号 |
| 467 | dataMap.put("priceListNo", data.getPriceListNo()); | 470 | dataMap.put("priceListNo", data.getPriceListNo()); |
| 471 | + // 生产工艺 | ||
| 472 | + dataMap.put("productionProcess", data.getProductionProcess()); | ||
| 468 | 473 | ||
| 469 | processTemplate(workbook, dataMap); | 474 | processTemplate(workbook, dataMap); |
| 470 | 475 |