From 27e59ba108e5da1af2ceea07492f425efc64effd Mon Sep 17 00:00:00 2001
From: Your Name <you@example.com>
Date: 星期一, 04 九月 2023 17:33:08 +0800
Subject: [PATCH] 优化调拨入库
---
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java | 15 +++++++++++----
1 files changed, 11 insertions(+), 4 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java b/service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java
index ad00a50..cbc60cd 100644
--- a/service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java
+++ b/service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java
@@ -29,10 +29,7 @@
import com.java110.utils.constant.ResponseConstant;
import com.java110.utils.exception.CmdException;
import com.java110.utils.exception.ListenerExecuteException;
-import com.java110.utils.util.Assert;
-import com.java110.utils.util.BeanConvertUtil;
-import com.java110.utils.util.DateUtil;
-import com.java110.utils.util.StringUtil;
+import com.java110.utils.util.*;
import org.slf4j.Logger;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.HttpStatus;
@@ -180,13 +177,16 @@
feeDto = feeDtos.get(0);
reqJson.put("feeTypeCd", feeDto.getFeeTypeCd());
reqJson.put("feeId", feeDto.getFeeId());
+
Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto);
+ //todo 璁$畻搴旀敹
BigDecimal receivableAmount = new BigDecimal(feePriceAll.get("feePrice").toString());
BigDecimal cycles = new BigDecimal(Double.parseDouble(reqJson.getString("cycles")));
double tmpReceivableAmount = cycles.multiply(receivableAmount).setScale(2, BigDecimal.ROUND_HALF_EVEN).doubleValue();
JSONObject paramOut = new JSONObject();
paramOut.put("receivableAmount", tmpReceivableAmount);
paramOut.put("oId", GenerateCodeFactory.getGeneratorId(GenerateCodeFactory.CODE_PREFIX_oId));
+
//瀹炴敹閲戦
BigDecimal tmpReceivedAmout = new BigDecimal(tmpReceivableAmount);
@@ -208,6 +208,13 @@
if (receivedAmount <= 0) {
receivedAmount = 0.0;
}
+ //todo 灏忔暟鐐瑰鐞�
+ receivedAmount = MoneyUtil.computePriceScale(
+ receivedAmount,
+ feeDto.getScale(),
+ Integer.parseInt(feeDto.getDecimalPlace())
+ );
+
paramOut.put("receivedAmount", receivedAmount);
String feeName = getObjName(feeDto);
--
Gitblit v1.8.0