|
@@ -3,6 +3,7 @@ package com.java110.fee.bmo.impl;
|
|
|
import com.alibaba.fastjson.JSONArray;
|
|
import com.alibaba.fastjson.JSONArray;
|
|
|
import com.java110.core.factory.CommunitySettingFactory;
|
|
import com.java110.core.factory.CommunitySettingFactory;
|
|
|
import com.java110.core.factory.Java110ThreadPoolFactory;
|
|
import com.java110.core.factory.Java110ThreadPoolFactory;
|
|
|
|
|
+import com.java110.core.log.LoggerFactory;
|
|
|
import com.java110.core.smo.IComputeFeeSMO;
|
|
import com.java110.core.smo.IComputeFeeSMO;
|
|
|
import com.java110.dto.RoomDto;
|
|
import com.java110.dto.RoomDto;
|
|
|
import com.java110.dto.fee.FeeConfigDto;
|
|
import com.java110.dto.fee.FeeConfigDto;
|
|
@@ -25,7 +26,6 @@ import com.java110.utils.util.DateUtil;
|
|
|
import com.java110.utils.util.StringUtil;
|
|
import com.java110.utils.util.StringUtil;
|
|
|
import com.java110.vo.ResultVo;
|
|
import com.java110.vo.ResultVo;
|
|
|
import org.slf4j.Logger;
|
|
import org.slf4j.Logger;
|
|
|
-import com.java110.core.log.LoggerFactory;
|
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.http.ResponseEntity;
|
|
import org.springframework.http.ResponseEntity;
|
|
|
import org.springframework.stereotype.Service;
|
|
import org.springframework.stereotype.Service;
|
|
@@ -88,11 +88,15 @@ public class QueryOweFeeImpl implements IQueryOweFee {
|
|
|
}
|
|
}
|
|
|
List<FeeDto> tmpFeeDtos = new ArrayList<>();
|
|
List<FeeDto> tmpFeeDtos = new ArrayList<>();
|
|
|
for (FeeDto tmpFeeDto : feeDtos) {
|
|
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 @@ public class QueryOweFeeImpl implements IQueryOweFee {
|
|
|
feeDto.setFeeTotalPrice(Double.parseDouble(feePriceAll.get("feeTotalPrice").toString()));
|
|
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);
|
|
val = MappingCache.getValue(DOMAIN_COMMON, TOTAL_FEE_PRICE);
|
|
|
}
|
|
}
|
|
|
feeDto.setVal(val);
|
|
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)) {
|
|
if (StringUtil.isEmpty(received_amount_switch)) {
|
|
@@ -186,8 +190,8 @@ public class QueryOweFeeImpl implements IQueryOweFee {
|
|
|
feeDto.setReceivedAmountSwitch(received_amount_switch);
|
|
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);
|
|
offlinePayFeeSwitch = MappingCache.getValue(DOMAIN_COMMON, OFFLINE_PAY_FEE_SWITCH);
|
|
|
}
|
|
}
|
|
|
feeDto.setOfflinePayFeeSwitch(offlinePayFeeSwitch);
|
|
feeDto.setOfflinePayFeeSwitch(offlinePayFeeSwitch);
|