java110
2022-06-29 b8941e102aa705200724142562ad655fd720f7e0
优化代码
1个文件已修改
1个文件已添加
25 ■■■■■ 已修改文件
java110-utils/src/main/java/com/java110/utils/util/NumberUtil.java 22 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
service-fee/src/main/java/com/java110/fee/bmo/impl/QueryOweFeeImpl.java 3 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
java110-utils/src/main/java/com/java110/utils/util/NumberUtil.java
New file
@@ -0,0 +1,22 @@
package com.java110.utils.util;
public class NumberUtil {
    public static boolean isDouble(String var) {
        try {
            Double.parseDouble(var);
        } catch (Exception e) {
            return false;
        }
        return true;
    }
    public static double getDouble(String var) {
        try {
            return Double.parseDouble(var);
        } catch (Exception e) {
            return 0;
        }
    }
}
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;
@@ -181,7 +182,7 @@
        feeDto.setFeePrice(Double.parseDouble(feePriceAll.get("feePrice").toString()));
        feeDto.setFeeTotalPrice(Double.parseDouble(feePriceAll.get("feeTotalPrice").toString()));
        computeFeeSMOImpl.dealRentRateCycle(feeDto,Double.parseDouble(feeDto.getCycle()));
        computeFeeSMOImpl.dealRentRateCycle(feeDto, NumberUtil.getDouble(feeDto.getCycle()));
        //应收款取值
        //先取单小区的如果没有配置 取 全局的
        String val = CommunitySettingFactory.getValue(feeDto.getCommunityId(), TOTAL_FEE_PRICE);