wujianwei
2026-04-01 c11e6f07b031eea6c7de4c5508b8dbf0ee01d2c7
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("付款单位(甲方):XXXXXXXXXXXXXX");
        payerCell.setCellValue("付款单位(甲方):"+bill.getCustomerName());
        payerCell.setCellStyle(styles.get("text"));
        Cell payeeCell = payerRow.createCell(6);