From 8f30b77a480f8921bffe2bf176bf3479f5bcbedc Mon Sep 17 00:00:00 2001
From: wujianwei <wjw@11.com>
Date: 星期三, 01 四月 2026 16:38:34 +0800
Subject: [PATCH] 新增手动推送应付,应收账单
---
tms/src/main/java/com/ruoyi/tms/service/impl/TmsArBillServiceImpl.java | 354 ++++++++++++++++++++++++++++++++++++++++++++++++++++------
1 files changed, 316 insertions(+), 38 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..2f0368e 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,9 @@
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.utils.DictUtils;
import com.ruoyi.common.config.RuoYiConfig;
import com.ruoyi.system.service.ISysConfigService;
import com.ruoyi.tms.domain.*;
@@ -37,6 +37,16 @@
import com.ruoyi.tms.service.ITmsArBillService;
import com.ruoyi.common.core.text.Convert;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.core.task.AsyncTaskExecutor;
+import org.springframework.core.task.SimpleAsyncTaskExecutor;
+import org.springframework.http.HttpEntity;
+import org.springframework.http.HttpHeaders;
+import org.springframework.http.HttpMethod;
+import org.springframework.http.MediaType;
+import org.springframework.http.ResponseEntity;
+import org.springframework.web.client.RestTemplate;
+import com.alibaba.fastjson2.JSON;
/**
* 搴旀敹璐﹀崟Service涓氬姟灞傚鐞�
@@ -69,6 +79,12 @@
@Resource
private TmsDispatchOrderMapper tmsDispatchOrderMapper;
+
+ @Autowired
+ private RestTemplate restTemplate;
+
+ @Value("${custom.cwxtApi.url}")
+ private String url;
/**
* 鏌ヨ搴旀敹璐﹀崟
@@ -243,6 +259,197 @@
}
/**
+ * 鎵嬪姩鎺ㄩ�佸簲鏀惰处鍗曞埌澶栭儴绯荤粺
+ *
+ * @param id 搴旀敹璐﹀崟ID
+ * @return 缁撴灉
+ */
+ @Override
+ public void manualPushToExternalSystem(Integer id) {
+ TmsArBill tmsArBill = tmsArBillMapper.selectTmsArBillById(id);
+ if (tmsArBill == null) {
+ throw new RuntimeException("搴旀敹璐﹀崟涓嶅瓨鍦�");
+ }
+
+ // 鏌ヨ鍏宠仈鐨勫簲鏀惰垂鐢ㄥ垪琛�
+ List<TmsReceivableFee> tmsReceivableFees = tmsReceivableFeeMapper.selectList(new com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper<TmsReceivableFee>()
+ .eq(TmsReceivableFee::getBillRelationId, id)
+ );
+
+ // 涓烘瘡涓簲鏀惰垂鐢ㄥ姞杞芥槑缁�
+ for (TmsReceivableFee fee : tmsReceivableFees) {
+ List<TmsReceivableFeeItem> items = tmsReceivableFeeItemMapper.selectTmsReceivableFeeItemList(new TmsReceivableFeeItem() {
+ {
+ setHeadId(fee.getId());
+ }
+ });
+ fee.setItems(items);
+ }
+
+ // 寮傛鎺ㄩ��
+ AsyncTaskExecutor executor = new SimpleAsyncTaskExecutor();
+ executor.execute(() -> pushToExternalSystem(tmsArBill, tmsReceivableFees));
+ }
+
+ /**
+ * 鏇存柊鎺ㄩ�佺姸鎬�
+ *
+ * @param id 搴旀敹璐﹀崟ID
+ * @param pushStatus 鎺ㄩ�佺姸鎬�
+ * @param pushFailReason 鎺ㄩ�佸け璐ュ師鍥�
+ * @return 缁撴灉
+ */
+ @Override
+ public int updatePushStatus(Integer id, Integer pushStatus, String pushFailReason) {
+ TmsArBill tmsArBill = new TmsArBill();
+ tmsArBill.setId(id);
+ tmsArBill.setPushStatus(pushStatus);
+ tmsArBill.setPushTime(DateUtils.getNowDate());
+ tmsArBill.setPushFailReason(pushFailReason);
+ return tmsArBillMapper.updateTmsArBill(tmsArBill);
+ }
+
+ /**
+ * 鍚戝閮ㄧ郴缁熸帹閫佹暟鎹�
+ * @param tmsArBill 搴旀敹璐﹀崟
+ * @param tmsReceivableFees 搴旀敹璐圭敤鍒楄〃
+ */
+ @Async
+ protected void pushToExternalSystem(TmsArBill tmsArBill, List<TmsReceivableFee> tmsReceivableFees) {
+ java.util.Map<String, Object> requestBody = new java.util.HashMap<>();
+ try {
+ // 鏇存柊鎺ㄩ�佺姸鎬佷负鎺ㄩ�佷腑
+ tmsArBill.setPushStatus(1);
+ tmsArBill.setPushTime(DateUtils.getNowDate());
+ tmsArBillMapper.updateTmsArBill(tmsArBill);
+
+ // 鏋勫缓璇锋眰浣�
+ String apiUrl = url+"/addBill";
+
+ // 鏋勫缓bill閮ㄥ垎
+ java.util.Map<String, Object> billMap = new java.util.HashMap<>();
+ billMap.put("billName", tmsArBill.getBillName());
+ billMap.put("customerName", tmsArBill.getCustomerName());
+ billMap.put("payee", "");
+ billMap.put("responsiblePerson", "");
+ billMap.put("responsibleLeader", "");
+ billMap.put("settlementMethod", "");
+ billMap.put("businessType", "");
+ billMap.put("promotionRequirement", "");
+ billMap.put("isInternalSettlement", "0");
+ billMap.put("internalSettlementUnit", "");
+ billMap.put("documentCount", tmsReceivableFees.size());
+ billMap.put("totalAmount", tmsArBill.getSettleAmount());
+ billMap.put("currency", "RMB");
+ billMap.put("discountAmount", 0.00);
+ billMap.put("receivedAmount", 0.00);
+ billMap.put("pendingAmount", tmsArBill.getSettleAmount());
+ billMap.put("exchangeRate", tmsArBill.getSettleRate());
+ billMap.put("cnyAmount", tmsArBill.getSettleAmount());
+ billMap.put("periodType", "");
+ billMap.put("businessStartDate", "");
+ billMap.put("businessEndDate", "");
+ billMap.put("billingStartDate", "");
+ billMap.put("billingEndDate", "");
+ billMap.put("billGenerateDate", "");
+ billMap.put("billSendDate", "");
+ billMap.put("billDueDate", "");
+ billMap.put("settlementCategory", "");
+ billMap.put("settlementPeriod", "");
+ billMap.put("status", "0");
+ billMap.put("remark", "");
+
+ // 鏋勫缓fees閮ㄥ垎
+ List<java.util.Map<String, Object>> feesList = new java.util.ArrayList<>();
+ for (int i = 0; i < tmsReceivableFees.size(); i++) {
+ TmsReceivableFee fee = tmsReceivableFees.get(i);
+ java.util.Map<String, Object> feeMap = new java.util.HashMap<>();
+ feeMap.put("serialNumber", String.format("%03d", i + 1));
+ feeMap.put("relatedBillNo", "");
+ feeMap.put("sourceSystem", "TMS");
+ feeMap.put("businessSector", "0");
+ feeMap.put("documentType", "0");
+ feeMap.put("documentNo", fee.getDispatchNo() != null ? fee.getDispatchNo() : "");
+ feeMap.put("isInternalSettlement", "0");
+ feeMap.put("internalSettlementUnit", "");
+ feeMap.put("customerName", tmsArBill.getCustomerName());
+ feeMap.put("projectName", fee.getProjectName() != null ? fee.getProjectName() : "");
+ feeMap.put("businessTime", fee.getDispatchConfirmTime());
+ feeMap.put("receivableConfirmTime", fee.getDispatchConfirmTime());
+ feeMap.put("receivableAmount", fee.getReceivableRMBAmount().add(fee.getReceivableHKBAmount()));
+ // 鏋勫缓receivableAmountStr
+ BigDecimal rmbAmount = fee.getReceivableRMBAmount();
+ BigDecimal hkbAmount = fee.getReceivableHKBAmount();
+ StringBuilder amountStr = new StringBuilder();
+ if (rmbAmount.compareTo(BigDecimal.ZERO) > 0) {
+ amountStr.append(rmbAmount).append("浜烘皯甯�");
+ }
+ if (hkbAmount.compareTo(BigDecimal.ZERO) > 0) {
+ if (amountStr.length() > 0) {
+ amountStr.append(" ");
+ }
+ amountStr.append(hkbAmount).append("娓竵");
+ }
+ feeMap.put("receivableAmountStr", amountStr.toString());
+ feeMap.put("status", "1");
+ feeMap.put("remark", "");
+
+ // 鏋勫缓feeDetails閮ㄥ垎
+ List<java.util.Map<String, Object>> feeDetailsList = new java.util.ArrayList<>();
+ List<TmsReceivableFeeItem> items = fee.getItems();
+ for (int j = 0; j < items.size(); j++) {
+ TmsReceivableFeeItem item = items.get(j);
+ java.util.Map<String, Object> feeDetailMap = new java.util.HashMap<>();
+ feeDetailMap.put("serialNumber", String.format("%03d", j + 1));
+ feeDetailMap.put("feeType", item.getFeeType());
+ feeDetailMap.put("feeName", item.getFeeName());
+ feeDetailMap.put("billingUnit", "娆�");
+ feeDetailMap.put("unitPrice", item.getRegisterAmount());
+ feeDetailMap.put("billingQuantity", item.getRegisterAmount());
+ feeDetailMap.put("billingAmount", item.getRegisterAmount());
+ feeDetailMap.put("actualAmount", item.getRegisterAmount());
+ feeDetailMap.put("currency", item.getCurrency());
+ feeDetailMap.put("feeRegTime", item.getRegisterTime());
+ feeDetailMap.put("remark", "");
+ feeDetailsList.add(feeDetailMap);
+ }
+
+ feeMap.put("feeDetails", feeDetailsList);
+ feesList.add(feeMap);
+ }
+
+ // 鏋勫缓瀹屾暣璇锋眰浣�
+ requestBody.put("bill", billMap);
+ requestBody.put("fees", feesList);
+
+ // 璁剧疆HTTP澶�
+ HttpHeaders headers = new HttpHeaders();
+ headers.setContentType(MediaType.APPLICATION_JSON);
+ HttpEntity<String> entity = new HttpEntity<>(JSON.toJSONString(requestBody), headers);
+
+ // 鍙戦�丄PI璇锋眰
+ ResponseEntity<String> response = restTemplate.exchange(apiUrl, HttpMethod.POST, entity, String.class);
+ logger.info("鎺ㄩ�佹暟鎹埌澶栭儴绯荤粺鎴愬姛锛屽搷搴�: {}", response.getBody());
+
+ // 鏇存柊鎺ㄩ�佺姸鎬佷负鎴愬姛
+ tmsArBill.setPushStatus(2);
+ tmsArBill.setPushTime(DateUtils.getNowDate());
+ tmsArBill.setPushFailReason(null);
+ tmsArBillMapper.updateTmsArBill(tmsArBill);
+ } catch (Exception e) {
+ logger.error("鎺ㄩ�佹暟鎹埌澶栭儴绯荤粺澶辫触锛岃处鍗旾D: {}, 瀹㈡埛: {}",
+ tmsArBill.getId(), tmsArBill.getCustomerName(), e);
+ logger.debug("鎺ㄩ�佸け璐ョ殑璇锋眰鏁版嵁: {}", JSON.toJSONString(requestBody));
+
+ // 鏇存柊鎺ㄩ�佺姸鎬佷负澶辫触
+ tmsArBill.setPushStatus(3);
+ tmsArBill.setPushTime(DateUtils.getNowDate());
+ tmsArBill.setPushFailReason(e.getMessage());
+ tmsArBillMapper.updateTmsArBill(tmsArBill);
+ }
+ }
+
+ /**
* 瀵煎嚭瀵硅处鍗曚竴寮忓鑱旀牸寮�
*
* @param tmsArBill 搴旀敹璐﹀崟
@@ -378,15 +585,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"));
}
@@ -400,7 +607,10 @@
// 鍨嬪彿
Cell cell5 = row.createCell(5);
if (dispatchOrder != null && dispatchOrder.getActualVehicleType() != null) {
- cell5.setCellValue(dispatchOrder.getActualVehicleType());
+ // 浣跨敤瀛楀吀杞崲杞﹁締鍨嬪彿
+ String vehicleType = dispatchOrder.getActualVehicleType();
+ String vehicleTypeLabel = DictUtils.getDictLabel("vehicle_type", vehicleType);
+ cell5.setCellValue(StringUtils.isNotEmpty(vehicleTypeLabel) ? vehicleTypeLabel : vehicleType);
cell5.setCellStyle(styles.get("data"));
}
@@ -445,10 +655,10 @@
// 灏忚琛�
int subTotalRow = startRow + rowIndex;
Row subTotal = sheet.createRow(subTotalRow);
- Cell subTotalCell = subTotal.createCell(2);
+ Cell subTotalCell = subTotal.createCell(0);
subTotalCell.setCellValue("灏忚");
subTotalCell.setCellStyle(styles.get("total"));
- sheet.addMergedRegion(new CellRangeAddress(subTotalRow, subTotalRow, 2, 5));
+ sheet.addMergedRegion(new CellRangeAddress(subTotalRow, subTotalRow, 0, 5));
// 濉厖璐圭敤灏忚
for (int j = 0; j < feeNameList.size(); j++) {
@@ -461,27 +671,34 @@
// 鍚堣琛�
int totalRow = subTotalRow + 1;
Row total = sheet.createRow(totalRow);
- Cell totalCell = total.createCell(2);
- totalCell.setCellValue("鍚堣(CNB)");
+ Cell totalCell = total.createCell(0);
+ totalCell.setCellValue("鍚堣(RMB)");
totalCell.setCellStyle(styles.get("total"));
- sheet.addMergedRegion(new CellRangeAddress(totalRow, totalRow, 2, 5));
+ sheet.addMergedRegion(new CellRangeAddress(totalRow, totalRow, 0, 5));
- // 濉厖璐圭敤鍚堣
- for (int j = 0; j < feeNameList.size(); j++) {
- String feeName = feeNameList.get(j);
- Cell cell = total.createCell(baseColumns + j);
- cell.setCellValue(feeTotals.get(feeName).doubleValue());
- cell.setCellStyle(styles.get("total"));
+ // 璁$畻鎵�鏈夎垂鐢ㄧ殑鍚堣
+ BigDecimal grandTotal = BigDecimal.ZERO;
+ for (BigDecimal amount : feeTotals.values()) {
+ grandTotal = grandTotal.add(amount);
+ }
+
+ // 濉厖璐圭敤鍚堣锛堟墍鏈夎垂鐢ㄧ殑鎬诲拰锛�
+ Cell totalAmountCell = total.createCell(baseColumns);
+ totalAmountCell.setCellValue(grandTotal.doubleValue());
+ totalAmountCell.setCellStyle(styles.get("total"));
+ // 鍚堝苟璐圭敤鍒楀崟鍏冩牸
+ if (feeNameList.size() > 1) {
+ sheet.addMergedRegion(new CellRangeAddress(totalRow, totalRow, baseColumns, baseColumns + feeNameList.size() - 1));
}
// 澶囨敞璇存槑鍖哄煙
- createNotesArea(sheet, styles, totalRow + 1);
+ createNotesArea(sheet, styles, totalRow + 1, grandTotal);
// 璐︽埛淇℃伅鍖哄煙
createAccountInfo(sheet, styles, totalRow + 4);
// 绛惧瓧鐩栫珷鍖哄煙
- createSignatureArea(sheet, styles, totalRow + 8);
+ createSignatureArea(sheet, styles, totalRow + 8,bill);
// 淇濆瓨鏂囦欢
String path = RuoYiConfig.getDownloadPath() + fileName;
@@ -531,8 +748,6 @@
headerStyle.setBorderBottom(BorderStyle.THIN);
headerStyle.setBorderLeft(BorderStyle.THIN);
headerStyle.setBorderRight(BorderStyle.THIN);
- headerStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
- headerStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
Font headerFont = workbook.createFont();
headerFont.setFontName("寰蒋闆呴粦");
headerFont.setFontHeightInPoints((short) 11);
@@ -562,8 +777,6 @@
totalStyle.setBorderBottom(BorderStyle.THIN);
totalStyle.setBorderLeft(BorderStyle.THIN);
totalStyle.setBorderRight(BorderStyle.THIN);
- totalStyle.setFillPattern(FillPatternType.SOLID_FOREGROUND);
- totalStyle.setFillForegroundColor(IndexedColors.GREY_25_PERCENT.getIndex());
Font totalFont = workbook.createFont();
totalFont.setFontName("寰蒋闆呴粦");
totalFont.setFontHeightInPoints((short) 11);
@@ -600,22 +813,22 @@
titleCell.setCellStyle(styles.get("title"));
sheet.addMergedRegion(new CellRangeAddress(0, 0, 0, 9));
- // 瀵硅处鍗曡
+ // 瀵硅处鍗曡 - 灞呬腑鏄剧ず
Row billRow = sheet.createRow(1);
billRow.setHeightInPoints(20);
- Cell toCell = billRow.createCell(0);
- toCell.setCellValue("TO: "+tmsArBill.getCustomerName());
- toCell.setCellStyle(styles.get("text"));
-
- Cell billTitleCell = billRow.createCell(3);
+ Cell billTitleCell = billRow.createCell(0);
billTitleCell.setCellValue(tmsArBill.getBillName());
- billTitleCell.setCellStyle(styles.get("text"));
- sheet.addMergedRegion(new CellRangeAddress(1, 1, 3, 6));
+ billTitleCell.setCellStyle(styles.get("title"));
+ sheet.addMergedRegion(new CellRangeAddress(1, 1, 0, 9));
// 鍏徃淇℃伅琛�
Row companyRow = sheet.createRow(2);
companyRow.setHeightInPoints(20);
- Cell fromCell = companyRow.createCell(0);
+ Cell toCell = companyRow.createCell(0);
+ toCell.setCellValue("TO: "+tmsArBill.getCustomerName());
+ toCell.setCellStyle(styles.get("text"));
+
+ Cell fromCell = companyRow.createCell(5);
fromCell.setCellValue("FROM:鐝犳捣甯傛眹鐣呬氦閫氭姇璧勬湁闄愬叕鍙�");
fromCell.setCellStyle(styles.get("text"));
}
@@ -655,16 +868,79 @@
}
/**
+ * 灏嗛噾棰濊浆鎹负涓枃澶у啓
+ *
+ * @param amount 閲戦
+ * @return 涓枃澶у啓閲戦
+ */
+ private String convertToChineseUppercase(BigDecimal amount) {
+ if (amount == null) {
+ return "闆跺厓鏁�";
+ }
+
+ String[] digits = {"闆�", "澹�", "璐�", "鍙�", "鑲�", "浼�", "闄�", "鏌�", "鎹�", "鐜�"};
+ String[] units = {"", "鎷�", "浣�", "浠�"};
+ String[] bigUnits = {"", "涓�", "浜�"};
+
+ String amountStr = amount.setScale(2, RoundingMode.HALF_UP).toString();
+ String integerPart = amountStr.split("\\.")[0];
+ String decimalPart = amountStr.split("\\.")[1];
+
+ StringBuilder result = new StringBuilder();
+
+ // 澶勭悊鏁存暟閮ㄥ垎
+ int length = integerPart.length();
+ for (int i = 0; i < length; i++) {
+ int digit = Integer.parseInt(String.valueOf(integerPart.charAt(i)));
+ int unitIndex = (length - i - 1) % 4;
+ int bigUnitIndex = (length - i - 1) / 4;
+
+ if (digit != 0) {
+ result.append(digits[digit]).append(units[unitIndex]).append(bigUnits[bigUnitIndex]);
+ } else {
+ // 閬垮厤杩炵画鐨勯浂
+ if (i > 0 && Integer.parseInt(String.valueOf(integerPart.charAt(i - 1))) != 0) {
+ result.append(digits[digit]);
+ }
+ // 鍙湪闈炴湯灏句綅缃坊鍔犲ぇ鍗曚綅
+ if (unitIndex == 0 && bigUnitIndex > 0 && i < length - 1) {
+ result.append(bigUnits[bigUnitIndex]);
+ }
+ }
+ }
+
+ result.append("鍏�");
+
+ // 澶勭悊灏忔暟閮ㄥ垎
+ int jiao = Integer.parseInt(String.valueOf(decimalPart.charAt(0)));
+ int fen = Integer.parseInt(String.valueOf(decimalPart.charAt(1)));
+
+ if (jiao == 0 && fen == 0) {
+ result.append("鏁�");
+ } else if (jiao == 0) {
+ result.append("闆�").append(digits[fen]).append("鍒�");
+ } else if (fen == 0) {
+ result.append(digits[jiao]).append("瑙掓暣");
+ } else {
+ result.append(digits[jiao]).append("瑙�").append(digits[fen]).append("鍒�");
+ }
+
+ return result.toString();
+ }
+
+ /**
* 鍒涘缓澶囨敞璇存槑鍖哄煙
*
* @param sheet 宸ヤ綔琛�
* @param styles 鏍峰紡鏄犲皠
* @param startRow 璧峰琛�
+ * @param grandTotal 鎬婚噾棰�
*/
- private void createNotesArea(SXSSFSheet sheet, Map<String, CellStyle> styles, int startRow) {
+ private void createNotesArea(SXSSFSheet sheet, Map<String, CellStyle> styles, int startRow, BigDecimal grandTotal) {
Row note1Row = sheet.createRow(startRow);
Cell note1Cell = note1Row.createCell(0);
- note1Cell.setCellValue("1.渚濇嵁鍚堝悓鐩稿叧瑙勫畾锛岃吹鍙搁渶鍚戞垜鍙告敮浠橈骏锛堝ぇ鍐欓噾棰濓細锛夌殑璐圭敤锛岃璐靛徃鍙婃椂瀹夋帓鏀粯銆�");
+ String chineseAmount = convertToChineseUppercase(grandTotal);
+ note1Cell.setCellValue("1.渚濇嵁鍚堝悓鐩稿叧瑙勫畾锛岃吹鍙搁渶鍚戞垜鍙告敮浠橈骏" + grandTotal.setScale(2, RoundingMode.HALF_UP) + "锛堝ぇ鍐欓噾棰濓細" + chineseAmount + "锛夌殑璐圭敤锛岃璐靛徃鍙婃椂瀹夋帓鏀粯銆�");
note1Cell.setCellStyle(styles.get("text"));
sheet.addMergedRegion(new CellRangeAddress(startRow, startRow, 0, 9));
@@ -711,14 +987,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);
@@ -771,3 +1048,4 @@
dateCell2.setCellStyle(styles.get("text"));
}
}
+
--
Gitblit v1.8.0