From c11e6f07b031eea6c7de4c5508b8dbf0ee01d2c7 Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 01 四月 2026 10:08:08 +0800
Subject: [PATCH] 去除不同报价方案,不能添加相同【客户-路线-车型】数据

---
 tms/src/main/java/com/ruoyi/tms/service/impl/TmsArBillServiceImpl.java |   21 ++++++++++-----------
 1 files changed, 10 insertions(+), 11 deletions(-)

diff --git a/tms/src/main/java/com/ruoyi/tms/service/impl/TmsArBillServiceImpl.java b/tms/src/main/java/com/ruoyi/tms/service/impl/TmsArBillServiceImpl.java
index 0a3507a..637ef81 100644
--- a/tms/src/main/java/com/ruoyi/tms/service/impl/TmsArBillServiceImpl.java
+++ b/tms/src/main/java/com/ruoyi/tms/service/impl/TmsArBillServiceImpl.java
@@ -5,9 +5,7 @@
 import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
 import com.ruoyi.common.core.domain.AjaxResult;
 import com.ruoyi.common.core.redis.RedisCache;
-import com.ruoyi.common.exception.ServiceException;
 import com.ruoyi.common.utils.DateUtils;
-import com.ruoyi.common.utils.StringUtils;
 import com.ruoyi.common.config.RuoYiConfig;
 import com.ruoyi.system.service.ISysConfigService;
 import com.ruoyi.tms.domain.*;
@@ -378,15 +376,15 @@
                         
                         // 瑁呰揣鐐�
                         Cell cell2 = row.createCell(2);
-                        if (dispatchOrder != null && dispatchOrder.getShipperAddress() != null) {
-                            cell2.setCellValue(dispatchOrder.getShipperAddress());
+                        if (dispatchOrder != null && dispatchOrder.getShipperRegionLabel() != null) {
+                            cell2.setCellValue(dispatchOrder.getShipperRegionLabel());
                             cell2.setCellStyle(styles.get("data"));
                         }
 
                         // 鍗歌揣鐐�
                         Cell cell3 = row.createCell(3);
-                        if (dispatchOrder != null && dispatchOrder.getReceiverAddress() != null) {
-                            cell3.setCellValue(dispatchOrder.getReceiverAddress());
+                        if (dispatchOrder != null && dispatchOrder.getReceiverRegionLabel() != null) {
+                            cell3.setCellValue(dispatchOrder.getReceiverRegionLabel());
                             cell3.setCellStyle(styles.get("data"));
                         }
 
@@ -481,7 +479,7 @@
             createAccountInfo(sheet, styles, totalRow + 4);
             
             // 绛惧瓧鐩栫珷鍖哄煙
-            createSignatureArea(sheet, styles, totalRow + 8);
+            createSignatureArea(sheet, styles, totalRow + 8,bill);
 
             // 淇濆瓨鏂囦欢
             String path = RuoYiConfig.getDownloadPath() + fileName;
@@ -711,14 +709,15 @@
     /**
      * 鍒涘缓绛惧瓧鐩栫珷鍖哄煙
      *
-     * @param sheet 宸ヤ綔琛�
-     * @param styles 鏍峰紡鏄犲皠
+     * @param sheet    宸ヤ綔琛�
+     * @param styles   鏍峰紡鏄犲皠
      * @param startRow 璧峰琛�
+     * @param bill
      */
-    private void createSignatureArea(SXSSFSheet sheet, Map<String, CellStyle> styles, int startRow) {
+    private void createSignatureArea(SXSSFSheet sheet, Map<String, CellStyle> styles, int startRow, TmsArBill bill) {
         Row payerRow = sheet.createRow(startRow);
         Cell payerCell = payerRow.createCell(0);
-        payerCell.setCellValue("浠樻鍗曚綅锛堢敳鏂癸級锛歑XXXXXXXXXXXXX");
+        payerCell.setCellValue("浠樻鍗曚綅锛堢敳鏂癸級锛�"+bill.getCustomerName());
         payerCell.setCellStyle(styles.get("text"));
 
         Cell payeeCell = payerRow.createCell(6);

--
Gitblit v1.8.0