瀏覽代碼

优化代码

Your Name 2 年之前
父節點
當前提交
9bc2c23490
共有 1 個文件被更改,包括 5 次插入6 次删除
  1. 5 6
      java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java

+ 5 - 6
java110-core/src/main/java/com/java110/core/smo/impl/ComputeFeeSMOImpl.java

@@ -35,10 +35,7 @@ import com.java110.po.fee.FeeReceiptDetailPo;
 import com.java110.utils.constant.FeeConfigConstant;
 import com.java110.utils.constant.FeeConfigConstant;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.constant.ResponseConstant;
 import com.java110.utils.exception.ListenerExecuteException;
 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.slf4j.Logger;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.beans.factory.annotation.Autowired;
 import org.springframework.stereotype.Service;
 import org.springframework.stereotype.Service;
@@ -2253,8 +2250,10 @@ public class ComputeFeeSMOImpl implements IComputeFeeSMO {
             }
             }
             preCycleAmount = curAmount;
             preCycleAmount = curAmount;
         }
         }
-        feeDto.setAmountOwed(addTotalAmount.doubleValue() + "");
-        feeDto.setFeeTotalPrice(addTotalAmount.doubleValue());
+
+        Double amountOwed = MoneyUtil.computePriceScale(addTotalAmount.doubleValue(), feeDto.getScale(), Integer.parseInt(feeDto.getDecimalPlace()));
+        feeDto.setAmountOwed(amountOwed + "");
+        feeDto.setFeeTotalPrice(amountOwed);
     }
     }
 }
 }