wuxw
2024-10-17 11900053f072cf6f6ede675f81687e9bc4a441c1
优化代码
2个文件已修改
11 ■■■■ 已修改文件
service-acct/src/main/java/com/java110/acct/payment/business/oweFee/OweFeePaymentBusiness.java 7 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java 4 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-acct/src/main/java/com/java110/acct/payment/business/oweFee/OweFeePaymentBusiness.java
@@ -21,10 +21,7 @@
import com.java110.intf.user.IOwnerV1InnerServiceSMO;
import com.java110.utils.cache.CommonCache;
import com.java110.utils.cache.MappingCache;
import com.java110.utils.util.Assert;
import com.java110.utils.util.DateUtil;
import com.java110.utils.util.ListUtil;
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.stereotype.Service;
@@ -125,6 +122,8 @@
                //todo  考虑 负数金额 可能用于红冲
                if (tmpFeeDto.getFeeTotalPrice() != 0 && "Y".equals(tmpFeeDto.getPayOnline())) {
                    tmpFeeDtos.add(tmpFeeDto);
                    //todo 处理小数点
                    tmpFeeDto.setFeeTotalPrice(MoneyUtil.computePriceScale(tmpFeeDto.getFeeTotalPrice(), tmpFeeDto.getScale(), Integer.parseInt(tmpFeeDto.getDecimalPlace())));
                    feeTotalPrice = new BigDecimal(tmpFeeDto.getFeeTotalPrice());
                    tmpMoney = tmpMoney.add(feeTotalPrice);
                }
service-fee/src/main/java/com/java110/fee/cmd/fee/PayFeePreCmd.java
@@ -192,8 +192,8 @@
        //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();
        double tmpReceivableAmount = cycles.multiply(receivableAmount).setScale(4, BigDecimal.ROUND_HALF_EVEN).doubleValue();
        tmpReceivableAmount = MoneyUtil.computePriceScale(tmpReceivableAmount, feeDto.getScale(), Integer.parseInt(feeDto.getDecimalPlace()));
        JSONObject paramOut = new JSONObject();
        paramOut.put("receivableAmount", tmpReceivableAmount);