From df1f128feb96f999f6b2fcbcae8eae72f584dbe5 Mon Sep 17 00:00:00 2001
From: huminmin <mac@MacBook-Pro.local>
Date: 星期四, 04 六月 2026 15:55:24 +0800
Subject: [PATCH] 过程检、成品检报告需展示客户名称(生产订单对应带出来的),检测单位固定是 天津阳光彩印股份有限公司

---
 src/main/java/com/ruoyi/basic/excel/ProductionPrintOrderExcel.java |   28 ++++++++++++++++------------
 1 files changed, 16 insertions(+), 12 deletions(-)

diff --git a/src/main/java/com/ruoyi/basic/excel/ProductionPrintOrderExcel.java b/src/main/java/com/ruoyi/basic/excel/ProductionPrintOrderExcel.java
index e8bdd25..a3eb0e6 100644
--- a/src/main/java/com/ruoyi/basic/excel/ProductionPrintOrderExcel.java
+++ b/src/main/java/com/ruoyi/basic/excel/ProductionPrintOrderExcel.java
@@ -132,25 +132,29 @@
             Sheet sheet = workbook.getSheetAt(0);
 
             // ===== 鎻掑叆鍥剧墖 =====
-            byte[] imageBytes = printOrderDto.getCuttingImage();
+            if(printOrderDto.getCuttingImage() != null){
+                byte[] imageBytes = printOrderDto.getCuttingImage();
 
-            int pictureIdx = workbook.addPicture(imageBytes, Workbook.PICTURE_TYPE_JPEG);
-            CreationHelper helper = workbook.getCreationHelper();
-            Drawing<?> drawing = sheet.createDrawingPatriarch();
+                int pictureIdx = workbook.addPicture(imageBytes, Workbook.PICTURE_TYPE_JPEG);
+                CreationHelper helper = workbook.getCreationHelper();
+                Drawing<?> drawing = sheet.createDrawingPatriarch();
 
-            ClientAnchor anchor = helper.createClientAnchor();
-            anchor.setCol1(6);  // 绗�7鍒楋紙G鍒楋級
-            anchor.setRow1(7);
-            anchor.setDx1(142700); // 鍚戝彸绉诲姩锛堢害鍗婃牸锛�
-            anchor.setDy1(222700);
+                ClientAnchor anchor = helper.createClientAnchor();
+                anchor.setCol1(6);  // 绗�7鍒楋紙G鍒楋級
+                anchor.setRow1(7);
+                anchor.setDx1(142700); // 鍚戝彸绉诲姩锛堢害鍗婃牸锛�
+                anchor.setDy1(222700);
 
-            anchor.setCol2(8);  // 瀹藉害缁堢偣
-            anchor.setRow2(9);  // 楂樺害缁堢偣
+                anchor.setCol2(8);  // 瀹藉害缁堢偣
+                anchor.setRow2(9);  // 楂樺害缁堢偣
 
-            Picture picture = drawing.createPicture(anchor, pictureIdx);
+                Picture picture = drawing.createPicture(anchor, pictureIdx);
 //            picture.resize(0.5);
 
 
+            }
+
+
 
             // 杩涜鍚堝苟鎿嶄綔 鍒囨枡绀烘剰鍥鹃儴鍒�
             int startRow = 7;

--
Gitblit v1.9.3