From 6e27c1e9455efde6ff85facdf977147953eabd93 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期四, 02 二月 2023 16:22:19 +0800
Subject: [PATCH] optimize batch import history fee bug
---
service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java | 16 ++++++++++++++++
1 files changed, 16 insertions(+), 0 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java b/service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java
index 9c18ccd..96e9a3f 100755
--- a/service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/smo/impl/FeeDiscountInnerServiceSMOImpl.java
@@ -18,6 +18,7 @@
import com.java110.utils.factory.ApplicationContextFactory;
import com.java110.utils.util.Assert;
import com.java110.utils.util.BeanConvertUtil;
+import com.java110.utils.util.MoneyUtil;
import com.java110.utils.util.StringUtil;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
@@ -171,6 +172,14 @@
List<ComputeDiscountDto> computeDiscountDtoList = new ArrayList<>();
for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) {
computeDiscountDto.setValue(value);
+
+ computeDiscountDto.setDiscountPrice(
+ MoneyUtil.computePriceScale(
+ computeDiscountDto.getDiscountPrice(),
+ feeDtos.get(0).getScale(),
+ Integer.parseInt(feeDtos.get(0).getDecimalPlace())
+ )
+ );
if (!StringUtil.isEmpty(computeDiscountDto.getDiscountType()) && "3003".equals(computeDiscountDto.getDiscountType())) {
computeDiscountDto.setArdId(feeDetailDto.getArdId());
}
@@ -225,6 +234,13 @@
List<ComputeDiscountDto> computeDiscountDtoList = new ArrayList<>();
for (ComputeDiscountDto computeDiscountDto : computeDiscountDtos) {
computeDiscountDto.setValue(value);
+ computeDiscountDto.setDiscountPrice(
+ MoneyUtil.computePriceScale(
+ computeDiscountDto.getDiscountPrice(),
+ feeDtos.get(0).getScale(),
+ Integer.parseInt(feeDtos.get(0).getDecimalPlace())
+ )
+ );
if (!StringUtil.isEmpty(computeDiscountDto.getDiscountType()) && "3003".equals(computeDiscountDto.getDiscountType())) {
computeDiscountDto.setArdId(feeDetailDto.getArdId());
}
--
Gitblit v1.8.0