zouyu
昨天 82f614e4646aeb179927dd82ccf0097a671dce48
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -4360,17 +4360,17 @@
    }
    private static int getDecimalPlaces(String str) {
        // 查找小数点位置
        int decimalPointIndex = str.lastIndexOf('.');
        if (decimalPointIndex == -1) {
            // 如果没有小数点,返回0位小数
            return 0;
   private static int getDecimalPlaces(String str) {
        // 使用正则匹配所有带小数点的数字,取最大小数位数
        java.util.regex.Matcher matcher = Pattern.compile("\\d+\\.(\\d+)").matcher(str);
        int maxDecimalPlaces = 0;
        while (matcher.find()) {
            int places = matcher.group(1).length();
            if (places > maxDecimalPlaces) {
                maxDecimalPlaces = places;
            }
        }
        // 计算小数点后的位数
        return str.length() - decimalPointIndex - 1;
        return maxDecimalPlaces;
    }
    /**