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/bmo/impl/QueryOweFeeImpl.java | 19 ++++++++++++++++++-
1 files changed, 18 insertions(+), 1 deletions(-)
diff --git a/service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java b/service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java
index 1cda3fd..401eb9b 100755
--- a/service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java
+++ b/service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java
@@ -23,6 +23,7 @@
import com.java110.utils.exception.ListenerExecuteException;
import com.java110.utils.util.Assert;
import com.java110.utils.util.DateUtil;
+import com.java110.utils.util.NumberUtil;
import com.java110.utils.util.StringUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
@@ -32,6 +33,8 @@
import java.math.BigDecimal;
import java.math.RoundingMode;
+import java.time.LocalDate;
+import java.time.format.DateTimeFormatter;
import java.util.*;
@Service
@@ -129,12 +132,19 @@
return ResultVo.success();
}
String cycel = null;
+ String custEndTime = null;
if (!StringUtil.isEmpty(feeDto.getCycle())) {
cycel = feeDto.getCycle();
+ }
+ if (!StringUtil.isEmpty(feeDto.getCustEndTime())) {
+ custEndTime = feeDto.getCustEndTime();
}
feeDto = feeDtos.get(0);
if (!StringUtil.isEmpty(cycel)) {
feeDto.setCycle(cycel);
+ }
+ if (!StringUtil.isEmpty(custEndTime)) {
+ feeDto.setCustEndTime(custEndTime);
}
if (FeeDto.PAYER_OBJ_TYPE_ROOM.equals(feeDto.getPayerObjType())) { //鎴垮眿鐩稿叧
@@ -171,6 +181,8 @@
Map feePriceAll = computeFeeSMOImpl.getFeePrice(feeDto);
feeDto.setFeePrice(Double.parseDouble(feePriceAll.get("feePrice").toString()));
feeDto.setFeeTotalPrice(Double.parseDouble(feePriceAll.get("feeTotalPrice").toString()));
+
+ computeFeeSMOImpl.dealRentRateCycle(feeDto, NumberUtil.getDouble(feeDto.getCycle()));
//搴旀敹娆惧彇鍊�
//鍏堝彇鍗曞皬鍖虹殑濡傛灉娌℃湁閰嶇疆 鍙� 鍏ㄥ眬鐨�
String val = CommunitySettingFactory.getValue(feeDto.getCommunityId(), TOTAL_FEE_PRICE);
@@ -439,6 +451,8 @@
feePrice = 0.0;
} else if ("1101".equals(computingFormula)) { // 绉熼噾
feePrice = 0.0;
+ }else if ("1102".equals(computingFormula)) { // 绉熼噾
+ feePrice = 0.0;
} else if ("4004".equals(computingFormula)) {
feePrice = Double.parseDouble(feeDto.getAmount());
} else if ("5005".equals(computingFormula)) {
@@ -558,7 +572,10 @@
} else if ("1101".equals(computingFormula)) { // 绉熼噾
BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpRoomDto.getRoomRent()));
feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN).doubleValue();
- } else if ("4004".equals(computingFormula)) {
+ } else if ("1102".equals(computingFormula)) { // 绉熼噾
+ BigDecimal additionalAmount = new BigDecimal(Double.parseDouble(tmpRoomDto.getRoomRent()));
+ feePrice = additionalAmount.setScale(3, BigDecimal.ROUND_HALF_EVEN).doubleValue();
+ }else if ("4004".equals(computingFormula)) {
feePrice = Double.parseDouble(feeDto.getAmount());
} else if ("5005".equals(computingFormula)) {
--
Gitblit v1.8.0