zouyu
昨天 82f614e4646aeb179927dd82ccf0097a671dce48
inspect-server/src/main/java/com/ruoyi/inspect/service/impl/InsOrderPlanServiceImpl.java
@@ -811,7 +811,7 @@
                )
                .ne(InsProduct::getIsBinding, 1));
        insProducts.addAll(insProductMapper.selectFiberInsProduct(InsSampleIds, laboratory));
        if (insProducts.size() > 0) {
        if (!insProducts.isEmpty()) {
            String str = "";
            int count = 0;
            for (InsProduct product : insProducts) {
@@ -1765,7 +1765,7 @@
        IfsInventoryQuantity ifsInventoryQuantity = ifsInventoryQuantityMapper.selectById(insOrder.getIfsInventoryId());
        //查询零件属性
        IfsPartPropsRecord ifsPartPropsRecord = ifsPartPropsRecordMapper.selectOne(Wrappers.<IfsPartPropsRecord>lambdaQuery()
                .eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId()));
                .eq(IfsPartPropsRecord::getIfsInventoryId, ifsInventoryQuantity.getId()).last("limit 1"));
        if (Objects.nonNull(ifsPartPropsRecord)) {
            enterFactoryReport.setOuterColor(StringUtils.equals(ifsPartPropsRecord.getOuterColor(),"/")?ifsPartPropsRecord.getInsulationColor():ifsPartPropsRecord.getOuterColor());
        }
@@ -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;
    }
    /**