From ca399cf81bf61af74ddd624e6fcdcc328d13cab8 Mon Sep 17 00:00:00 2001
From: java110 <928255095@qq.com>
Date: 星期二, 12 四月 2022 13:35:31 +0800
Subject: [PATCH] 优化 算费
---
service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java | 30 +++++++++++++++++-------------
1 files changed, 17 insertions(+), 13 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 4d7383c..1cda3fd 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
@@ -3,6 +3,7 @@
import com.alibaba.fastjson.JSONArray;
import com.java110.core.factory.CommunitySettingFactory;
import com.java110.core.factory.Java110ThreadPoolFactory;
+import com.java110.core.log.LoggerFactory;
import com.java110.core.smo.IComputeFeeSMO;
import com.java110.dto.RoomDto;
import com.java110.dto.fee.FeeConfigDto;
@@ -25,7 +26,6 @@
import com.java110.utils.util.StringUtil;
import com.java110.vo.ResultVo;
import org.slf4j.Logger;
-import com.java110.core.log.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.ResponseEntity;
import org.springframework.stereotype.Service;
@@ -88,11 +88,15 @@
}
List<FeeDto> tmpFeeDtos = new ArrayList<>();
for (FeeDto tmpFeeDto : feeDtos) {
- computeFeeSMOImpl.computeEveryOweFee(tmpFeeDto);//璁$畻娆犺垂閲戦
- //濡傛灉閲戦涓�0 灏辨帓闄�
- //if (tmpFeeDto.getFeePrice() > 0 && tmpFeeDto.getEndTime().getTime() <= DateUtil.getCurrentDate().getTime()) {
- if (tmpFeeDto.getFeePrice() > 0) {
- tmpFeeDtos.add(tmpFeeDto);
+ try {
+ computeFeeSMOImpl.computeEveryOweFee(tmpFeeDto);//璁$畻娆犺垂閲戦
+ //濡傛灉閲戦涓�0 灏辨帓闄�
+ //if (tmpFeeDto.getFeePrice() > 0 && tmpFeeDto.getEndTime().getTime() <= DateUtil.getCurrentDate().getTime()) {
+ if (tmpFeeDto.getFeePrice() > 0) {
+ tmpFeeDtos.add(tmpFeeDto);
+ }
+ } catch (Exception e) {
+ logger.error("鍙兘璐圭敤璧勬枡鏈夐棶棰樺鑷寸畻璐瑰け璐�", e);
}
}
@@ -169,15 +173,15 @@
feeDto.setFeeTotalPrice(Double.parseDouble(feePriceAll.get("feeTotalPrice").toString()));
//搴旀敹娆惧彇鍊�
//鍏堝彇鍗曞皬鍖虹殑濡傛灉娌℃湁閰嶇疆 鍙� 鍏ㄥ眬鐨�
- String val = CommunitySettingFactory.getValue(feeDto.getCommunityId(),TOTAL_FEE_PRICE);
- if(StringUtil.isEmpty(val)){
+ String val = CommunitySettingFactory.getValue(feeDto.getCommunityId(), TOTAL_FEE_PRICE);
+ if (StringUtil.isEmpty(val)) {
val = MappingCache.getValue(DOMAIN_COMMON, TOTAL_FEE_PRICE);
}
feeDto.setVal(val);
//鍏堝彇鍗曞皬鍖虹殑濡傛灉娌℃湁閰嶇疆 鍙� 鍏ㄥ眬鐨�
- String received_amount_switch = CommunitySettingFactory.getValue(feeDto.getCommunityId(),RECEIVED_AMOUNT_SWITCH);
- if(StringUtil.isEmpty(received_amount_switch)){
- received_amount_switch = MappingCache.getValue(DOMAIN_COMMON, RECEIVED_AMOUNT_SWITCH);
+ String received_amount_switch = CommunitySettingFactory.getValue(feeDto.getCommunityId(), RECEIVED_AMOUNT_SWITCH);
+ if (StringUtil.isEmpty(received_amount_switch)) {
+ received_amount_switch = MappingCache.getValue(DOMAIN_COMMON, RECEIVED_AMOUNT_SWITCH);
}
//鍏抽棴 绾夸笅鏀堕摱鍔熻兘
if (StringUtil.isEmpty(received_amount_switch)) {
@@ -186,8 +190,8 @@
feeDto.setReceivedAmountSwitch(received_amount_switch);
}
//鍏堝彇鍗曞皬鍖虹殑濡傛灉娌℃湁閰嶇疆 鍙� 鍏ㄥ眬鐨�
- String offlinePayFeeSwitch = CommunitySettingFactory.getValue(feeDto.getCommunityId(),OFFLINE_PAY_FEE_SWITCH);
- if(StringUtil.isEmpty(offlinePayFeeSwitch)){
+ String offlinePayFeeSwitch = CommunitySettingFactory.getValue(feeDto.getCommunityId(), OFFLINE_PAY_FEE_SWITCH);
+ if (StringUtil.isEmpty(offlinePayFeeSwitch)) {
offlinePayFeeSwitch = MappingCache.getValue(DOMAIN_COMMON, OFFLINE_PAY_FEE_SWITCH);
}
feeDto.setOfflinePayFeeSwitch(offlinePayFeeSwitch);
--
Gitblit v1.8.0