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 | 360 | |
| 361 | 361 | @ApiOperation("订货单打印") |
| 362 | 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 | 364 | PurchaseOrderInfo data = purchaseOrderInfoService.findById(id); |
| 365 | 365 | |
| 366 | 366 | Wrapper<PurchaseOrderLine> purchaseOrderLineWrapper = Wrappers.lambdaQuery(PurchaseOrderLine.class) |
| ... | ... | @@ -370,6 +370,9 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 370 | 370 | try { |
| 371 | 371 | // 加载模板文件 |
| 372 | 372 | ClassPathResource templateResource = new ClassPathResource("templates/purchaseOrderTemplate.xlsx"); |
| 373 | + if ("PRODUCTION_PROCESS".equals(templateType)) { | |
| 374 | + templateResource = new ClassPathResource("templates/purchaseOrderTemplateForProduction.xlsx"); | |
| 375 | + } | |
| 373 | 376 | try (InputStream inputStream = templateResource.getStream(); |
| 374 | 377 | Workbook workbook = new XSSFWorkbook(inputStream)) { |
| 375 | 378 | try { |
| ... | ... | @@ -465,6 +468,8 @@ public class PurchaseOrderInfoController extends DefaultBaseController { |
| 465 | 468 | dataMap.put("stockUpCompanyName", data.getStockUpCompanyName() == null ? "" : data.getStockUpCompanyName()); |
| 466 | 469 | //价格表编号 |
| 467 | 470 | dataMap.put("priceListNo", data.getPriceListNo()); |
| 471 | + // 生产工艺 | |
| 472 | + dataMap.put("productionProcess", data.getProductionProcess()); | |
| 468 | 473 | |
| 469 | 474 | processTemplate(workbook, dataMap); |
| 470 | 475 | ... | ... |