Browse Source

20260315 优化查询翻译

milestone-20260224-现金钱包
wangguorui 4 weeks ago
parent
commit
8b926f7bdc
  1. 11
      src/main/java/com/example/demo/controller/cash/CashCollectionController.java

11
src/main/java/com/example/demo/controller/cash/CashCollectionController.java

@ -517,6 +517,10 @@ public class CashCollectionController {
if (collection.getPaymentCurrency() != null) { if (collection.getPaymentCurrency() != null) {
collection.setPaymentCurrency(languageTranslationUtil.translate(collection.getPaymentCurrency(), lang)); collection.setPaymentCurrency(languageTranslationUtil.translate(collection.getPaymentCurrency(), lang));
} }
// 翻译到账币种
if (collection.getReceivedCurrency() != null) {
collection.setReceivedCurrency(languageTranslationUtil.translate(collection.getReceivedCurrency(), lang));
}
// 翻译数量单位 // 翻译数量单位
if (collection.getNumUnit() != null) { if (collection.getNumUnit() != null) {
collection.setNumUnit(languageTranslationUtil.translate(collection.getNumUnit(), lang)); collection.setNumUnit(languageTranslationUtil.translate(collection.getNumUnit(), lang));
@ -684,6 +688,13 @@ public class CashCollectionController {
cashCollection.setPaymentCurrency(chineseCurrency); cashCollection.setPaymentCurrency(chineseCurrency);
} }
// 转换到账币种
if (cashCollection.getReceivedCurrency() != null && !cashCollection.getReceivedCurrency().isEmpty()) {
String chineseCurrency = translationService.findChineseSimplifiedByTranslation(
cashCollection.getReceivedCurrency(), languageCode);
cashCollection.setReceivedCurrency(chineseCurrency);
}
// 转换提交人地区 // 转换提交人地区
if (cashCollection.getSubmitterMarket() != null && !cashCollection.getSubmitterMarket().isEmpty()) { if (cashCollection.getSubmitterMarket() != null && !cashCollection.getSubmitterMarket().isEmpty()) {
String chineseMarket = translationService.findChineseSimplifiedByTranslation( String chineseMarket = translationService.findChineseSimplifiedByTranslation(

Loading…
Cancel
Save