package thyyxxk.webserver.utils;

import java.math.BigDecimal;

/**
 * @ClassName YbReportUtil
 * @Description 医保报表工具类
 * @Author hsh
 * @Date 2022/9/8 16:32
 **/
public class YbReportUtil {

    /**
     *@Author hsh
     *@Description // 获取有效位数
     *@Date 2022/9/8 16:39
     *@Param [b]
     *@Return int
     **/
    public static int getYxws(BigDecimal b){
        String str = String.valueOf(b);
        int index = str.lastIndexOf(".");
        if(index < 0){
            return str.length();
        } else {
            return str.length() - 1;
        }
    }

}
