Commit 92856c5f2cecace7c3b391c68618f8ec56416441
1 parent
f0b0fac0
生产指示书额外添加一栏 Modelo(REFERNCR)
Showing
2 changed files
with
28 additions
and
22 deletions
src/main/java/com/order/erp/common/utils/EasyPdfUtils.java
... | ... | @@ -349,19 +349,20 @@ public class EasyPdfUtils { |
349 | 349 | } |
350 | 350 | rowList.add(XEasyPdfHandler.Table.Row.build(header)); |
351 | 351 | // 第一行设置表头,默认标题 |
352 | - cellList.add(createCell("编号", 90F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
352 | + cellList.add(createCell("编号", 50F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
353 | 353 | cellList.add(createCell("项目号", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
354 | - cellList.add(createCell("生产科", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
354 | + cellList.add(createCell("生产科", 90F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
355 | 355 | cellList.add(createCell("内部编号", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
356 | 356 | cellList.add(createCell("客户订单号", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
357 | 357 | cellList.add(createCell("客户款号", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
358 | - cellList.add(createCell("订单颜色", 140F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
359 | - cellList.add(createCell("颜色中文", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
358 | + cellList.add(createCell("REFERENCE", 100F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
359 | + cellList.add(createCell("订单颜色", 120F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
360 | + cellList.add(createCell("颜色中文", 100F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
360 | 361 | cellList.add(createCell("订单图片", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
361 | 362 | cellList.add(createCell("产品意见", 150F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
362 | 363 | cellList.add(createCell("订单数量", 90F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
363 | 364 | cellList.add(createCell("生产科交期", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
364 | - cellList.add(createCell("包装类型", 90F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
365 | + cellList.add(createCell("包装类型", 80F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); | |
365 | 366 | cellList.add(createCell("生产科单价", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
366 | 367 | cellList.add(createCell("生产科总价", 110F, 60F, 16F, XEasyPdfDefaultFontStyle.BOLD)); |
367 | 368 | rowList.add(XEasyPdfHandler.Table.Row.build(cellList)); |
... | ... | @@ -372,14 +373,15 @@ public class EasyPdfUtils { |
372 | 373 | DateUtils.format(DateUtils.parseDate(producePdfVO.getProductionDepartmentConsignTime(), DateUtils.DATE_TIME), DateUtils.DATE) : ""; |
373 | 374 | |
374 | 375 | List<XEasyPdfCell> dataCellList = new ArrayList<>(15); |
375 | - dataCellList.add(createCell("" + (startIndex + i), 90F)); // 使用连续编号 | |
376 | + dataCellList.add(createCell("" + (startIndex + i), 50F)); // 使用连续编号 | |
376 | 377 | dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getProjectNo()) ? producePdfVO.getProjectNo() : "", 110F)); |
377 | - dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getProductionDepartment()) ? producePdfVO.getProductionDepartment() : "", 110F)); | |
378 | + dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getProductionDepartment()) ? producePdfVO.getProductionDepartment() : "", 90F)); | |
378 | 379 | dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getInnerNo()) ? producePdfVO.getInnerNo() : "", 110F)); |
379 | 380 | dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getCustomerPo()) ? producePdfVO.getCustomerPo() : "", 110F)); |
380 | 381 | dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getCustomerStyle()) ? producePdfVO.getCustomerStyle() : "", 110F)); |
381 | - dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getPoColor()) ? producePdfVO.getPoColor() : "", 140F)); | |
382 | - dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getCnColor()) ? producePdfVO.getCnColor() : "", 110F)); | |
382 | + dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getModeleLo()) ? producePdfVO.getModeleLo() : "", 100F)); | |
383 | + dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getPoColor()) ? producePdfVO.getPoColor() : "", 120F)); | |
384 | + dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getCnColor()) ? producePdfVO.getCnColor() : "", 100F)); | |
383 | 385 | if (StringUtils.isNotBlank(producePdfVO.getPicUrl())) { |
384 | 386 | URL url = new URL(producePdfVO.getPicUrl()); |
385 | 387 | InputStream inputStream = url.openStream(); |
... | ... | @@ -396,29 +398,30 @@ public class EasyPdfUtils { |
396 | 398 | dataCellList.add(createCell("" + producePdfVO.getOrderCount(), 90F)); |
397 | 399 | } |
398 | 400 | dataCellList.add(createCell(productionDepartmentConsignTime, 110F)); |
399 | - dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getPacketType()) ? producePdfVO.getPacketType() : "", 90F)); | |
400 | - dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentPrice()) ? "" + producePdfVO.getProductionDepartmentPrice()+"¥" : "", 110F)); | |
401 | - dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentTotalPrice()) ? "" + producePdfVO.getProductionDepartmentTotalPrice()+"¥" : "", 110F)); | |
401 | + dataCellList.add(createCell(StringUtils.isNotEmpty(producePdfVO.getPacketType()) ? producePdfVO.getPacketType() : "", 80F)); | |
402 | + dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentPrice()) ? "" + "¥"+producePdfVO.getProductionDepartmentPrice() : "", 110F)); | |
403 | + dataCellList.add(createCell(Objects.nonNull(producePdfVO.getProductionDepartmentTotalPrice()) ? "" + "¥"+producePdfVO.getProductionDepartmentTotalPrice() : "", 110F)); | |
402 | 404 | rowList.add(XEasyPdfHandler.Table.Row.build(dataCellList)); |
403 | 405 | } |
404 | 406 | |
405 | 407 | if (isLastPage) { |
406 | 408 | List<XEasyPdfCell> endCellList = new ArrayList<>(15); |
407 | - endCellList.add(createCell("合计", 90F, 16F)); | |
408 | - endCellList.add(createCell("", 110F)); | |
409 | - endCellList.add(createCell("", 110F)); | |
409 | + endCellList.add(createCell("合计", 50F, 16F)); | |
410 | 410 | endCellList.add(createCell("", 110F)); |
411 | + endCellList.add(createCell("", 90F)); | |
411 | 412 | endCellList.add(createCell("", 110F)); |
412 | 413 | endCellList.add(createCell("", 110F)); |
413 | - endCellList.add(createCell("", 140F)); | |
414 | 414 | endCellList.add(createCell("", 110F)); |
415 | + endCellList.add(createCell("", 100F)); | |
416 | + endCellList.add(createCell("", 120F)); | |
417 | + endCellList.add(createCell("", 100F)); | |
415 | 418 | endCellList.add(createCell("", 110F)); |
416 | 419 | endCellList.add(createCell("", 150F)); |
417 | 420 | endCellList.add(createCell("" + totalOrderCount, 90F, 16F)); |
418 | 421 | endCellList.add(createCell("", 110F)); |
419 | - endCellList.add(createCell("", 90F)); | |
422 | + endCellList.add(createCell("", 80F)); | |
420 | 423 | endCellList.add(createCell("", 110F)); |
421 | - endCellList.add(createCell("" + totalPrice+"¥", 110F, 16F)); | |
424 | + endCellList.add(createCell("¥" + totalPrice, 110F, 16F)); | |
422 | 425 | rowList.add(XEasyPdfHandler.Table.Row.build(endCellList)); |
423 | 426 | } |
424 | 427 | |
... | ... | @@ -426,10 +429,10 @@ public class EasyPdfUtils { |
426 | 429 | ClassLoader classLoader = getClass().getClassLoader(); |
427 | 430 | InputStream imageStream = null; |
428 | 431 | if ("青岛吉庆天成饰品有限公司".equals(companyName)) { |
429 | - signList.add(createCell("吉庆天成签字+日期:", 640F, 80F, 20F, XEasyPdfDefaultFontStyle.BOLD, XEasyPdfPositionStyle.CENTER, XEasyPdfPositionStyle.LEFT)); | |
432 | + signList.add(createCell("吉庆天成签字+日期:", 680F, 80F, 20F, XEasyPdfDefaultFontStyle.BOLD, XEasyPdfPositionStyle.CENTER, XEasyPdfPositionStyle.LEFT)); | |
430 | 433 | imageStream = classLoader.getResourceAsStream("images/jqtc.png"); |
431 | 434 | } else { |
432 | - signList.add(createCell("翱特逸格签字+日期:", 640F, 80F, 20F, XEasyPdfDefaultFontStyle.BOLD, XEasyPdfPositionStyle.CENTER, XEasyPdfPositionStyle.LEFT)); | |
435 | + signList.add(createCell("翱特逸格签字+日期:", 680F, 80F, 20F, XEasyPdfDefaultFontStyle.BOLD, XEasyPdfPositionStyle.CENTER, XEasyPdfPositionStyle.LEFT)); | |
433 | 436 | imageStream = classLoader.getResourceAsStream("images/alterego.png"); |
434 | 437 | } |
435 | 438 | if (imageStream != null) { |
... | ... | @@ -448,7 +451,7 @@ public class EasyPdfUtils { |
448 | 451 | log.info("图片资源未找到或不存在"); |
449 | 452 | } |
450 | 453 | |
451 | - signList.add(createCell("外加工签字+日期:", 1020F, 80F, 20F, XEasyPdfDefaultFontStyle.BOLD, XEasyPdfPositionStyle.CENTER, XEasyPdfPositionStyle.LEFT).setMarginLeft(230F)); | |
454 | + signList.add(createCell("外加工签字+日期:", 980F, 80F, 20F, XEasyPdfDefaultFontStyle.BOLD, XEasyPdfPositionStyle.CENTER, XEasyPdfPositionStyle.LEFT).setMarginLeft(230F)); | |
452 | 455 | rowList.add(XEasyPdfHandler.Table.Row.build(signList)); |
453 | 456 | |
454 | 457 | table.addRow(rowList); | ... | ... |
src/main/java/com/order/erp/domain/pdf/OrderProducePdfVO.java