From 4281f6c90e4a17845a5721ab51b3bc5c5409ab45 Mon Sep 17 00:00:00 2001
From: fei <791364011@qq.com>
Date: 星期三, 07 一月 2026 23:27:04 +0800
Subject: [PATCH] 修改了对应代码

---
 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetFour.java           |    2 
 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java               |   23 ++++---
 ruoyi-admin/src/main/resources/application-druid.yml                                        |    2 
 archiveManager/src/main/java/com/ruoyi/domain/vo/ArchiveRecordModelOther.java               |    8 +-
 ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetSecond.java         |   45 ++++++++++++++-
 archiveManager/src/main/java/com/ruoyi/domain/ArchiveRecords.java                           |   12 ++++
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java    |    4 
 archiveManager/src/main/java/com/ruoyi/domain/vo/DocumentMaterialFileSmallVo.java           |    4 +
 ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java |   12 +++
 ruoyi-admin/src/main/resources/application.yml                                              |    4 
 archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java       |   33 ++++++++++
 11 files changed, 124 insertions(+), 25 deletions(-)

diff --git a/archiveManager/src/main/java/com/ruoyi/domain/ArchiveRecords.java b/archiveManager/src/main/java/com/ruoyi/domain/ArchiveRecords.java
index 852cca1..8c1c218 100644
--- a/archiveManager/src/main/java/com/ruoyi/domain/ArchiveRecords.java
+++ b/archiveManager/src/main/java/com/ruoyi/domain/ArchiveRecords.java
@@ -117,6 +117,10 @@
     /** 澶囨敞 */
     @Excel(name = "澶囨敞", headerColor = IndexedColors.BLACK, width = 8)
     private String remarks;
+
+    /** 澶囨敞 */
+    @Excel(name = "澶囪�冭〃澶囨敞", headerColor = IndexedColors.BLACK, width = 8)
+    private String noteRemark;
     @TableField(exist = false)
     private String orderByColumn;
     @TableField(exist = false)
@@ -478,4 +482,12 @@
             .append("historicalReferenceNumber", getHistoricalReferenceNumber())
             .toString();
     }
+
+    public String getNoteRemark() {
+        return noteRemark;
+    }
+
+    public void setNoteRemark(String noteRemark) {
+        this.noteRemark = noteRemark;
+    }
 }
diff --git a/archiveManager/src/main/java/com/ruoyi/domain/vo/ArchiveRecordModelOther.java b/archiveManager/src/main/java/com/ruoyi/domain/vo/ArchiveRecordModelOther.java
index 43ab5a5..bb731b5 100644
--- a/archiveManager/src/main/java/com/ruoyi/domain/vo/ArchiveRecordModelOther.java
+++ b/archiveManager/src/main/java/com/ruoyi/domain/vo/ArchiveRecordModelOther.java
@@ -21,7 +21,7 @@
 
 
     /** 妗堝嵎棰樺悕 */
-    @Excel(name = "妗堝嵎棰樺悕", headerColor = IndexedColors.BLACK)
+   // @Excel(name = "妗堝嵎棰樺悕", headerColor = IndexedColors.BLACK)
     private String caseTitle;
 
     /** 鍏紑灞炴�� */
@@ -45,7 +45,7 @@
     @Excel(name = "瀵嗙骇", readConverterExp = "璇ラ〉鍙﹀瓨=鏅��", headerColor = IndexedColors.BLACK)
     private String securityClassification;
 
-    @Excel(name = "妗堝嵎鐘舵��", headerColor = IndexedColors.BLACK)
+   // @Excel(name = "妗堝嵎鐘舵��", headerColor = IndexedColors.BLACK)
     private String recordStatus;
 
     /** 妗堝嵎椤垫暟 */
@@ -73,7 +73,7 @@
     private String projectNumber;
 
     /** 鎵弿鍔犲伐鍏徃 */
-    @Excel(name = "鎵弿鍔犲伐鍏徃", headerColor = IndexedColors.BLACK)
+ //   @Excel(name = "鎵弿鍔犲伐鍏徃", headerColor = IndexedColors.BLACK)
     private String scanningCompany;
 
     /** 妗f绠�(瀹�)鍙� */
@@ -90,6 +90,8 @@
 
 
 
+    @Excel(name = "澶囪�冭〃澶囨敞", headerColor = IndexedColors.BLACK)
+    private String noteRemark;
 
     /** 鍘嗗彶鐩稿叧鍙戞枃鍙� */
     @Excel(name = "鍘嗗彶鐩稿叧鍙戞枃鍙�", headerColor = IndexedColors.BLACK)
diff --git a/archiveManager/src/main/java/com/ruoyi/domain/vo/DocumentMaterialFileSmallVo.java b/archiveManager/src/main/java/com/ruoyi/domain/vo/DocumentMaterialFileSmallVo.java
index f955e09..769404e 100644
--- a/archiveManager/src/main/java/com/ruoyi/domain/vo/DocumentMaterialFileSmallVo.java
+++ b/archiveManager/src/main/java/com/ruoyi/domain/vo/DocumentMaterialFileSmallVo.java
@@ -55,7 +55,7 @@
     private String retentionPeriod;
 
     /** $column.columnComment */
-    @Excel(name = "瀵嗙骇", readConverterExp = "璇ラ〉鍙﹀瓨=鏅��,鏅��=鏅��,鍐呴儴鐢ㄥ浘=鍐呴儴鐢ㄥ浘,鍐呴儴鐢ㄩ��=鍐呴儴鐢ㄩ��,绉樺瘑=绉樺瘑", headerColor = IndexedColors.BLACK)
+    @Excel(name = "瀵嗙骇",   headerColor = IndexedColors.BLACK)
     private String securityLevel;
 
     /** $column.columnComment */
@@ -68,6 +68,8 @@
 
 
 
+    @Excel(name = "澶囨敞", headerColor = IndexedColors.BLACK)
+    private String remarks;
 
 
 
diff --git a/archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java b/archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java
index 089753a..8ba1663 100644
--- a/archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java
+++ b/archiveManager/src/main/java/com/ruoyi/service/impl/DocumentMaterialsServiceImpl.java
@@ -129,6 +129,8 @@
                 // 鍏朵粬琛岋細鐩存帴浣跨敤pageNumber鐨勫��
                 item.setPageNumberFormatted(pageNumber != null ? pageNumber.toString() : "");
             }
+            if(item.getSecurityLevel().equals("璇ラ〉鍙﹀瓨"))
+                item.setSecurityLevel("鏅��");
         }
         return beanRecords;
     }
@@ -136,7 +138,17 @@
     @Override
     public List<DocumentMaterialsVoLarge> selectDocumentMaterialsAllByRecordId(Long id) {
 
-        return this.baseMapper.getDocumentMaterialsvoLarge(Math.toIntExact(id));
+        List<DocumentMaterialsVoLarge> lists = this.baseMapper.getDocumentMaterialsvoLarge(Math.toIntExact(id));
+        // 閬嶅巻鎵�鏈夋潯鐩紝璁剧疆pageNumberFormatted
+        for (int i = 0; i < lists.size(); i++) {
+            DocumentMaterialsVoLarge item = lists.get(i);
+            Long pageNumber = item.getPageNumber();
+
+
+            if(item.getSecurityLevel().equals("璇ラ〉鍙﹀瓨"))
+                item.setSecurityLevel("鏅��");
+        }
+        return lists;
     }
 
     @Override
@@ -187,6 +199,15 @@
         }
 
         List<DocumentMaterials> beanRecords = list(lambdaQueryWrapper);
+        // 閬嶅巻鎵�鏈夋潯鐩紝璁剧疆pageNumberFormatted
+        for (int i = 0; i < beanRecords.size(); i++) {
+            DocumentMaterials item = beanRecords.get(i);
+            Long pageNumber = item.getPageNumber();
+
+
+            if(item.getSecurityLevel().equals("璇ラ〉鍙﹀瓨"))
+                item.setSecurityLevel("鏅��");
+        }
         return beanRecords;
     }
 
@@ -359,6 +380,16 @@
         if (StringUtils.isEmpty(documentMaterials.getIsCanceled())) {
             throw new ErrorcodeExceptionextends(400, "鏄惁娉ㄩ攢涓嶈兘涓虹┖");
         }
+            // 鎵嬪姩杞崲瀵嗙骇瀛楁
+//            if ("绉樺瘑".equals(documentMaterials.getSecurityLevel())) {
+//                documentMaterials.setSecurityLevel("璇ラ〉鍙﹀瓨");
+//            }
+//            if ("鍐呴儴鐢ㄥ浘".equals(documentMaterials.getSecurityLevel())) {
+//                documentMaterials.setSecurityLevel("璇ラ〉鍙﹀瓨");
+//            }
+//            if ("鍐呴儴鐢ㄩ��".equals(documentMaterials.getSecurityLevel())) {
+//                documentMaterials.setSecurityLevel("璇ラ〉鍙﹀瓨");
+//            }
             this.insertDocumentMaterials(documentMaterials);
         }
 
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
index caaf3c0..40b7830 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/ArchiveRecordsController.java
@@ -203,7 +203,7 @@
     public void getExportModel(HttpServletResponse response) {
         List<ArchiveRecordModelExp> list = Collections.singletonList(new ArchiveRecordModelExp());
         ExcelUtil<ArchiveRecordModelExp> util = new ExcelUtil<>(ArchiveRecordModelExp.class);
-        util.exportExcel(response, list, "妗f淇℃伅瀵煎叆妯℃澘");
+        util.exportExcel(response, list, "妗f淇℃伅");
     }
 
 
@@ -211,7 +211,7 @@
     public void getExportModelOther(HttpServletResponse response) {
         List<ArchiveRecordModelOther> list = Collections.singletonList(new ArchiveRecordModelOther());
         ExcelUtil<ArchiveRecordModelOther> util = new ExcelUtil<>(ArchiveRecordModelOther.class);
-        util.exportExcel(response, list, "妗f淇℃伅瀵煎叆妯℃澘");
+        util.exportExcel(response, list, "妗f淇℃伅");
     }
 
     @PreAuthorize("@ss.hasPermi('system:records:list')")
diff --git a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java
index 710af70..43f5975 100644
--- a/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java
+++ b/ruoyi-admin/src/main/java/com/ruoyi/web/controller/archive/DocumentMaterialsController.java
@@ -176,6 +176,8 @@
             list = documentMaterialsService.selectDocumentMaterialsList(documentMaterials);
 
         }
+
+
         ExcelUtil<DocumentMaterials> util = new ExcelUtil<DocumentMaterials>(DocumentMaterials.class);
         util.exportExcel(response, list, "鐢靛瓙鏂囦欢鐩綍");
     }
@@ -479,9 +481,14 @@
         String compName = "骞垮窞鐩堝妗f绠$悊鏈夐檺鍏徃";
         String li_person = "浠囩縺";
         String sh_person = "鏇剧憺鑾�";
+
         ArchiveRecords archiveRecords = iArchiveRecordsService.selectArchiveRecordsById(id);
         if(!StringUtils.isEmpty(archiveRecords.getLiPerson()))
             li_person = archiveRecords.getLiPerson();
+        String note_remark = "";
+        if(!StringUtils.isEmpty(archiveRecords.getNoteRemark()))
+            note_remark = "锛�"+archiveRecords.getNoteRemark();
+        System.out.println(note_remark+"{{{{");
         ArchiveProjectName tmp = new ArchiveProjectName();
         tmp.setName(archiveRecords.getProjectName());
         List<ArchiveProjectName> projectName = iArchiveProjectNameService.selectArchiveProjectNameList(tmp);
@@ -534,6 +541,7 @@
         hs.put("company", compName);
         hs.put("liPerson", li_person);
         hs.put("shPerson", sh_person);
+        hs.put("noteRemark", note_remark);
         hs.put("time", cdt);
 
         if (!getLicense()) {
@@ -702,7 +710,9 @@
                 // 鏍规嵁椤靛彿鎷垮埌妗堝嵎鐨勮缁嗕俊鎭�
                 DocumentMaterials doc = documentMaterialsService.selectByPageNumber(nam, Math.toIntExact(recordId));
                 if (doc != null) {
-                    if (doc.getSecurityLevel() != null && doc.getSecurityLevel().equals("璇ラ〉鍙﹀瓨")) {
+                    if (doc.getSecurityLevel() != null && (doc.getSecurityLevel().equals("璇ラ〉鍙﹀瓨")||
+                            doc.getSecurityLevel().equals("绉樺瘑")||doc.getSecurityLevel().equals("鍐呴儴鐢ㄩ��")||
+                            doc.getSecurityLevel().equals("鍐呴儴鐢ㄥ浘"))) {
                         // 鏇挎崲涓轰簡鍑嗗濂界殑鍥惧儚
                         String fp = filePath + "\\glc.jpg";
                         Path path = Paths.get(fp);
diff --git a/ruoyi-admin/src/main/resources/application-druid.yml b/ruoyi-admin/src/main/resources/application-druid.yml
index d234933..bb5c743 100644
--- a/ruoyi-admin/src/main/resources/application-druid.yml
+++ b/ruoyi-admin/src/main/resources/application-druid.yml
@@ -20,7 +20,7 @@
             # 鏈�灏忚繛鎺ユ睜鏁伴噺
             minIdle: 10
             # 鏈�澶ц繛鎺ユ睜鏁伴噺
-            maxActive: 140
+            maxActive: 200
             # 閰嶇疆鑾峰彇杩炴帴绛夊緟瓒呮椂鐨勬椂闂�
             maxWait: 60000
             # 閰嶇疆杩炴帴瓒呮椂鏃堕棿
diff --git a/ruoyi-admin/src/main/resources/application.yml b/ruoyi-admin/src/main/resources/application.yml
index 3a5d8b9..a2b9d8d 100644
--- a/ruoyi-admin/src/main/resources/application.yml
+++ b/ruoyi-admin/src/main/resources/application.yml
@@ -41,9 +41,9 @@
 user:
   password:
     # 瀵嗙爜鏈�澶ч敊璇鏁�
-    maxRetryCount: 5
+    maxRetryCount: 100000
     # 瀵嗙爜閿佸畾鏃堕棿锛堥粯璁�10鍒嗛挓锛�
-    lockTime: 10
+    lockTime: 1
 
 # Spring閰嶇疆
 spring:
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
index 4631cea..3b53014 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheet.java
@@ -316,8 +316,10 @@
                     printSetup.setLandscape(false);  // 绾靛悜鎵撳嵃
 
                     // 璁剧疆椤佃竟璺�
-                    sheet.setMargin(Sheet.LeftMargin, 0.5);
-                    sheet.setMargin(Sheet.RightMargin, 0.5);
+                    sheet.setMargin(Sheet.LeftMargin, 0.65);
+                    sheet.setMargin(Sheet.RightMargin, 0.65);
+                    sheet.setMargin(Sheet.TopMargin,0.31);
+                    sheet.setMargin(Sheet.BottomMargin, 0.31);
                     // 璁剧疆鎵撳嵃鍖哄煙锛屼粠绗�0琛屽埌绗�1000琛岋紝绗�0鍒楀埌绗�20鍒楋紙鏍规嵁瀹為檯鎯呭喌璋冩暣锛�
                  //   sheet.setPrintArea(0, 0, 20, 0, 1000);
                     // 濡傛灉鏄痠ndex涓�1鐨剆heet锛岃缃《绔爣棰樿
@@ -401,7 +403,7 @@
                     CellStyle underlineStyle = wb.createCellStyle();
                     Font underlineFont = wb.createFont();
                     underlineFont.setFontName("瀹嬩綋");
-                    underlineFont.setFontHeightInPoints((short) 11);
+                    underlineFont.setFontHeightInPoints((short) 12);
                     underlineFont.setUnderline(Font.U_SINGLE); // 璁剧疆涓嬪垝绾�
                     underlineStyle.setFont(underlineFont);
                     recordIdCell.setCellStyle(underlineStyle);
@@ -525,6 +527,7 @@
                 row = sheet.createRow(i + 5 );
             else
                 row = sheet.createRow(i + 1 );
+
             // 寰楀埌瀵煎嚭瀵硅薄.
             T vo = (T) list.get(i);
             int column = 0;
@@ -551,17 +554,17 @@
         style.setAlignment(HorizontalAlignment.CENTER);
         style.setVerticalAlignment(VerticalAlignment.CENTER);
         style.setBorderRight(BorderStyle.THIN);
-        style.setRightBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setRightBorderColor(IndexedColors.BLACK.getIndex());
         style.setBorderLeft(BorderStyle.THIN);
-        style.setLeftBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setLeftBorderColor(IndexedColors.BLACK.getIndex());
         style.setBorderTop(BorderStyle.THIN);
-        style.setTopBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setTopBorderColor(IndexedColors.BLACK.getIndex());
         style.setBorderBottom(BorderStyle.THIN);
-        style.setBottomBorderColor(IndexedColors.GREY_50_PERCENT.getIndex());
+        style.setBottomBorderColor(IndexedColors.BLACK.getIndex());
         // 璁剧疆鑷姩鎹㈣
         style.setWrapText(true);
         Font dataFont = wb.createFont();
-        dataFont.setFontName("Arial");
+        dataFont.setFontName("瀹嬩綋");
         dataFont.setFontHeightInPoints((short) 12);
         style.setFont(dataFont);
         styles.put("data", style);
@@ -600,7 +603,7 @@
         style.setAlignment(HorizontalAlignment.CENTER);
         style.setVerticalAlignment(VerticalAlignment.CENTER);
         Font totalFont = wb.createFont();
-        totalFont.setFontName("Arial");
+        totalFont.setFontName("瀹嬩綋");
         totalFont.setFontHeightInPoints((short) 12);
         style.setFont(totalFont);
         // 鎬昏琛屼篃璁剧疆鑷姩鎹㈣
@@ -1094,7 +1097,7 @@
            // header.setFontSize((short) 10);
             // 璁剧疆椤电湁鍐呭
             hssfSheet.setMargin(Sheet.HeaderMargin, 2.1);
-            header.setRight("鍏� &N 椤�   绗� &P椤�");
+            header.setRight("&\"瀹嬩綋,Bold\"鍏� &N 椤�   绗� &P 椤�");
         }
         // 濡傛灉鏄痠ndex涓�1鐨剆heet锛岃缃《绔爣棰樿
         if (index == 1) {
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetFour.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetFour.java
index 20cfed5..6d3021f 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetFour.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetFour.java
@@ -323,7 +323,7 @@
 
                     // 鍏朵粬鎵撳嵃璁剧疆
                     printSetup.setPaperSize(PrintSetup.A4_PAPERSIZE);  // A4绾�
-                    printSetup.setLandscape(false);  // 绾靛悜鎵撳嵃
+                    printSetup.setLandscape(true);  // 绾靛悜鎵撳嵃
 
 
                     // 鍒涘缓琛屽苟璁剧疆楂樺害
diff --git a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetSecond.java b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetSecond.java
index e18f2be..e50b657 100644
--- a/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetSecond.java
+++ b/ruoyi-common/src/main/java/com/ruoyi/common/utils/poi/ExcelUtilManySheetSecond.java
@@ -22,7 +22,9 @@
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
+import javax.imageio.ImageIO;
 import javax.servlet.http.HttpServletResponse;
+import java.awt.image.BufferedImage;
 import java.io.ByteArrayInputStream;
 import java.io.ByteArrayOutputStream;
 import java.io.IOException;
@@ -269,7 +271,30 @@
         this.init(list, sheetName, Excel.Type.EXPORT);
         exportExcel(response.getOutputStream());
     }
+    private static double calculateScaleForCm(byte[] imageData, double widthCm, double heightCm) throws IOException {
+        // 璇诲彇鍥剧墖鑾峰彇鍘熷灏哄
+        BufferedImage img = ImageIO.read(new ByteArrayInputStream(imageData));
+        double originalWidthPx = img.getWidth();
+        double originalHeightPx = img.getHeight();
 
+        // Excel榛樿DPI锛�96锛�
+        double excelDpi = 96.0;
+        double pixelsPerCm = excelDpi / 2.54;
+
+        // 鐩爣鍍忕礌灏哄
+        double targetWidthPx = widthCm * pixelsPerCm;
+        double targetHeightPx = heightCm * pixelsPerCm;
+
+        // 璁$畻姣斾緥锛堝彇瀹介珮涓殑杈冨皬姣斾緥锛屼繚鎸佺旱妯瘮锛�
+        double scaleWidth = targetWidthPx / originalWidthPx;
+        double scaleHeight = targetHeightPx / originalHeightPx;
+        System.out.println("-=========67676");
+        System.out.println(originalHeightPx);
+        System.out.println(originalWidthPx);
+        System.out.println(targetWidthPx);
+        System.out.println(targetHeightPx);
+        return Math.min(scaleWidth, scaleHeight);
+    }
     /**
      * 瀵筶ist鏁版嵁婧愬皢鍏堕噷闈㈢殑鏁版嵁瀵煎叆鍒癳xcel琛ㄥ崟
      *
@@ -348,13 +373,27 @@
                         // 鍒涘缓鍥剧墖閿氱偣锛岃缃湪绗�2琛岀2鍒�
                         // 浜岀淮鐮佹樉绀哄湪鍙充笂瑙掍笖涓嶅~婊℃暣涓牸瀛�
                         // 缂╁皬鍥剧墖鑼冨洿锛氬彧鍗犵敤閮ㄥ垎鍗曞厓鏍肩┖闂�
-                        ClientAnchor anchor = new HSSFClientAnchor(680, 0, 1000, 250, (short) 1, 2, (short) 1, 2);
+
+                        ClientAnchor anchor = new HSSFClientAnchor(699, 0, 1023, 97, (short) 1, 2, (short) 1, 3);
                         // 璁剧疆鍥剧墖浣嶇疆鍜屽ぇ灏�
                         anchor.setAnchorType(ClientAnchor.AnchorType.MOVE_DONT_RESIZE);
                         
                         // 娣诲姞鍥剧墖鍒板伐浣滆〃
-                        getDrawingPatriarch(sheet).createPicture(anchor,
+                        org.apache.poi.ss.usermodel.Picture picture = getDrawingPatriarch(sheet).createPicture(anchor,
                                 wb.addPicture(data, getImageType(data)));
+
+
+                        int pictureIdx = wb.addPicture(data, getImageType(data));
+                     //   Picture picture = drawing.createPicture(anchor, pictureIdx);
+
+// 鍏抽敭锛氳绠楀苟搴旂敤3.15cm鐨勭缉鏀�
+//                        double targetSizeCm = 3.15;
+//
+//// 鏂规硶1锛氫娇鐢ㄧ簿纭绠�
+//                        double scale = calculateScaleForCm(data, targetSizeCm, targetSizeCm);
+//                        System.out.println(scale);
+//                        picture.resize(scale);
+
                         // 浜岀淮鐮佹坊鍔犲畬鎴愬悗锛屾仮澶嶅師鏉ョ殑鍒楀璁剧疆
                         sheet.setColumnWidth(1, currentColumnWidth);
                     }
@@ -410,7 +449,7 @@
                         sheet.setColumnWidth(1, (int) ((51.57 + 0.72) * 256)); // 绗簩鍒楋細瀹藉害51
 
                         CellStyle style = wb.createCellStyle();
-                        style.setAlignment(HorizontalAlignment.RIGHT);
+                        style.setAlignment(HorizontalAlignment.LEFT);
                         style.setVerticalAlignment(VerticalAlignment.BOTTOM); // 璁剧疆鍨傜洿涓嬪榻�
                         style.setWrapText(true); // 璁剧疆鑷姩鎹㈣
 

--
Gitblit v1.9.1