From 05683f2b2bdbdbe21cf17ad523c21ab338bd1c54 Mon Sep 17 00:00:00 2001
From: wuxw <928255095@qq.com>
Date: 星期二, 19 七月 2022 21:49:55 +0800
Subject: [PATCH] 优化添加设备 功能

---
 service-fee/src/main/java/com/java110/fee/discount/impl/LateFeeByDayRule.java |   21 +++++++++++++++++----
 1 files changed, 17 insertions(+), 4 deletions(-)

diff --git a/service-fee/src/main/java/com/java110/fee/discount/impl/LateFeeByDayRule.java b/service-fee/src/main/java/com/java110/fee/discount/impl/LateFeeByDayRule.java
old mode 100644
new mode 100755
index c1f8086..3235a35
--- a/service-fee/src/main/java/com/java110/fee/discount/impl/LateFeeByDayRule.java
+++ b/service-fee/src/main/java/com/java110/fee/discount/impl/LateFeeByDayRule.java
@@ -19,7 +19,7 @@
 import com.java110.dto.fee.FeeDto;
 import com.java110.dto.feeDiscount.ComputeDiscountDto;
 import com.java110.dto.feeDiscount.FeeDiscountDto;
-import com.java110.dto.feeDiscountSpec.FeeDiscountSpecDto;
+import com.java110.dto.feeDiscount.FeeDiscountSpecDto;
 import com.java110.fee.discount.IComputeDiscount;
 import com.java110.intf.fee.IFeeInnerServiceSMO;
 import com.java110.utils.util.DateUtil;
@@ -27,8 +27,10 @@
 import org.springframework.stereotype.Component;
 
 import java.math.BigDecimal;
+import java.text.ParseException;
 import java.util.Date;
 import java.util.List;
+import java.util.Map;
 
 /**
  * @desc add by 鍚村鏂� 12:43
@@ -96,9 +98,9 @@
             return computeDiscountDto;
         }
 
-        double price = computeFeeSMOImpl.getFeePrice(feeDtos.get(0));
+        Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDtos.get(0));
 
-        BigDecimal priceDec = new BigDecimal(price);
+        BigDecimal priceDec = new BigDecimal(feePriceAll.get("feePrice").toString());
 
         BigDecimal dayDec = new BigDecimal(day);
 
@@ -110,8 +112,19 @@
         computeDiscountDto.setRuleId(feeDiscountDto.getRuleId());
         computeDiscountDto.setRuleName(feeDiscountDto.getRuleName());
         computeDiscountDto.setDiscountName(feeDiscountDto.getDiscountName());
-        computeDiscountDto.setDiscountPrice(discountPrice);
+        computeDiscountDto.setDiscountPrice(discountPrice * -1);
         computeDiscountDto.setFeeDiscountSpecs(feeDiscountSpecDtos);
         return computeDiscountDto;
     }
+
+    public static void main(String[] args) throws Exception {
+        int day = 316;
+        double money = 0.0;
+        for (int i = 1; i< day+1;i++){
+            money += ((124.51/30 * (i-1) +money)  * 0.003);
+            System.out.println("绗�"+i+"澶� 杩濈害閲� = "+money + ",璁$畻鍏紡涓猴細(124.51/30 * ("+i+"-1) + " + money +") * 0.003");
+        }
+
+        System.out.println(money);
+    }
 }

--
Gitblit v1.8.0