From 5b24ce73574b351dc85b295613ea00f3a1a7092f Mon Sep 17 00:00:00 2001 From: zoujiangtao Date: Mon, 23 Jun 2025 10:06:37 +0800 Subject: [PATCH] =?UTF-8?q?=E6=8F=90=E4=BA=A4=E5=86=85=E5=AE=B9=EF=BC=9A?= =?UTF-8?q?=E5=A4=A7=E5=86=99=E9=87=91=E9=A2=9D=E5=86=99=E5=85=A5=E4=BB=A3?= =?UTF-8?q?=E7=A0=81=20=E6=97=B6=E9=97=B4=EF=BC=9A2025-06-23=2010=EF=BC=9A?= =?UTF-8?q?06=20=E6=8F=90=E4=BA=A4=E4=BA=BA=EF=BC=9A=E9=82=B9=E6=B1=9F?= =?UTF-8?q?=E6=B6=9B?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../plugin/form/PaymentProcessingBillPlugin.java | 13 ++++++++++--- .../operation/PaymentSlipAssociationFixed.java | 11 ++++++++--- 2 files changed, 18 insertions(+), 6 deletions(-) diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/PaymentProcessingBillPlugin.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/PaymentProcessingBillPlugin.java index c57c14b..d5328b5 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/PaymentProcessingBillPlugin.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/form/PaymentProcessingBillPlugin.java @@ -119,9 +119,16 @@ public class PaymentProcessingBillPlugin extends AbstractBillPlugIn implements P } break; case "actpayamt": - AmountConvertResult result = I18nServiceHelper.amountConvertUppercase("ZH", "CNY", newValue.toString(), "false"); - if (result.isSuccess()) { - this.getModel().setValue("actpayamt", result.getResult()); + // 将 newValue 转换为字符串 + String valueStr = newValue.toString(); + + String formattedValue = String.format("%.2f", Double.parseDouble(valueStr)); + + AmountConvertResult amountConvertResult = I18nServiceHelper.amountConvertUppercase( + "ZH", "CNY", formattedValue, "false"); + + if (amountConvertResult.isSuccess()) { + this.getModel().setValue("shkd_zwamount", amountConvertResult.getResult()); break; } } diff --git a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/operation/PaymentSlipAssociationFixed.java b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/operation/PaymentSlipAssociationFixed.java index a80d497..f32eadd 100644 --- a/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/operation/PaymentSlipAssociationFixed.java +++ b/sys/shkd-sys-sys/src/main/java/shkd/sys/sys/plugin/operation/PaymentSlipAssociationFixed.java @@ -31,9 +31,14 @@ public class PaymentSlipAssociationFixed extends AbstractOperationServicePlugIn DynamicObject fkDynamicObject = BusinessDataServiceHelper.loadSingle(dataEntity.getPkValue(), dataEntity.getDynamicObjectType()); BigDecimal actpayamt = fkDynamicObject.getBigDecimal("actpayamt"); - AmountConvertResult result = I18nServiceHelper.amountConvertUppercase("ZH", "CNY", actpayamt.toString(), "false"); - if (result.isSuccess()) { - fkDynamicObject.set("actpayamt", result.getResult()); + + String formattedValue = String.format("%.2f", Double.parseDouble(actpayamt.toString())); + + AmountConvertResult amountConvertResult = I18nServiceHelper.amountConvertUppercase( + "ZH", "CNY", formattedValue, "false"); + + if (amountConvertResult.isSuccess()) { + fkDynamicObject.set("actpayamt", amountConvertResult.getResult()); } String shkdBusinessname = dataEntity.getString("shkd_businessname");//来源系统