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); + } } }