From 92bc016575b12fa66b7b7ab9f896b9d2eb411cba Mon Sep 17 00:00:00 2001 From: wangguorui <2069821375@qq.com> Date: Sun, 25 Jan 2026 13:54:18 +0800 Subject: [PATCH] =?UTF-8?q?1=E6=9C=8825=E6=97=A5=EF=BC=8C=E5=8F=8D?= =?UTF-8?q?=E7=BF=BB=E8=AF=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../demo/controller/cash/CashCollectionController.java | 18 ++++++++++++++++++ .../demo/controller/cash/CashRefundController.java | 14 ++++++++++++++ 2 files changed, 32 insertions(+) diff --git a/src/main/java/com/example/demo/controller/cash/CashCollectionController.java b/src/main/java/com/example/demo/controller/cash/CashCollectionController.java index 7984bea..dbd484f 100644 --- a/src/main/java/com/example/demo/controller/cash/CashCollectionController.java +++ b/src/main/java/com/example/demo/controller/cash/CashCollectionController.java @@ -351,6 +351,10 @@ public class CashCollectionController { if (collection.getPaymentCurrency() != null) { collection.setPaymentCurrency(languageTranslationUtil.translate(collection.getPaymentCurrency(), lang)); } + // 翻译数量单位 + if (collection.getNumUnit() != null) { + collection.setNumUnit(languageTranslationUtil.translate(collection.getNumUnit(), lang)); + } } } @@ -436,6 +440,13 @@ public class CashCollectionController { cashCollection.getMarketName(), languageCode); cashCollection.setMarketName(chineseMarketName); } + + // 转换数量单位 + if (cashCollection.getNumUnit() != null && !cashCollection.getNumUnit().isEmpty()) { + String chineseNumUnit = translationService.findChineseSimplifiedByTranslation( + cashCollection.getNumUnit(), languageCode); + cashCollection.setNumUnit(chineseNumUnit); + } } } @@ -513,6 +524,13 @@ public class CashCollectionController { cashCollection.getMarketName(), languageCode); cashCollection.setMarketName(chineseMarketName); } + + // 转换数量单位 + if (cashCollection.getNumUnit() != null && !cashCollection.getNumUnit().isEmpty()) { + String chineseNumUnit = translationService.findChineseSimplifiedByTranslation( + cashCollection.getNumUnit(), languageCode); + cashCollection.setNumUnit(chineseNumUnit); + } } } diff --git a/src/main/java/com/example/demo/controller/cash/CashRefundController.java b/src/main/java/com/example/demo/controller/cash/CashRefundController.java index 70ca611..ec62d0b 100644 --- a/src/main/java/com/example/demo/controller/cash/CashRefundController.java +++ b/src/main/java/com/example/demo/controller/cash/CashRefundController.java @@ -675,6 +675,20 @@ public class CashRefundController { cashRecordRefund.getRefundCurrency(), languageCode); cashRecordRefund.setRefundCurrency(chineseCurrency); } + + // 转换所属地区 + if (cashRecordRefund.getMarketName() != null && !cashRecordRefund.getMarketName().isEmpty()) { + String chineseMarket = translationService.findChineseSimplifiedByTranslation( + cashRecordRefund.getMarketName(), languageCode); + cashRecordRefund.setMarketName(chineseMarket); + } + + // 转换提交人地区 + if (cashRecordRefund.getSubmitterMarket() != null && !cashRecordRefund.getSubmitterMarket().isEmpty()) { + String chineseMarket = translationService.findChineseSimplifiedByTranslation( + cashRecordRefund.getSubmitterMarket(), languageCode); + cashRecordRefund.setSubmitterMarket(chineseMarket); + } } }