提交内容:大写金额写入代码

时间:2025-06-23 10:06
提交人:邹江涛
This commit is contained in:
zoujiangtao 2025-06-23 10:06:37 +08:00
parent 950f2f595d
commit 5b24ce7357
2 changed files with 18 additions and 6 deletions

View File

@ -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;
}
}

View File

@ -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");//来源系统