Code review comment: `getCheckedRecordsCount` might be greater than `getRecordsCount`, the percentage could not greater than 100

Code under review:
public ConsistencyCheckJobProgressInfo getJobProgressInfo(final String parentJobId) {
        Optional<String> checkLatestJobId = PipelineAPIFactory.getGovernanceRepositoryAPI().getCheckLatestJobId(parentJobId);
        ShardingSpherePreconditions.checkState(checkLatestJobId.isPresent(), () -> new PipelineJobNotFoundException(parentJobId));
        String checkJobId = checkLatestJobId.get();
        ConsistencyCheckJobProgress jobItemProgress = getJobItemProgress(checkJobId, 0);
        ConsistencyCheckJobProgressInfo result = new ConsistencyCheckJobProgressInfo();
        if (null == jobItemProgress) {
            return result;
        }
        int inventoryFinishedPercentage;
        LocalDateTime checkBeginTime = new Timestamp(jobItemProgress.getCheckBeginTimeMillis()).toLocalDateTime();
        if (null != jobItemProgress.getRecordsCount() && Objects.equals(jobItemProgress.getCheckedRecordsCount(), jobItemProgress.getRecordsCount())) {
            inventoryFinishedPercentage = 100;
            LocalDateTime checkEndTime = new Timestamp(jobItemProgress.getCheckEndTimeMillis()).toLocalDateTime();
            Duration duration = Duration.between(checkBeginTime, checkEndTime);
            result.setCheckDuration(duration.toMillis() / 1000);
            result.setCheckEndTime(DATE_TIME_FORMATTER.format(checkEndTime));
            result.setRemainingTime(0L);
        } else {
            if (null == jobItemProgress.getRecordsCount()) {
                inventoryFinishedPercentage = 0;
            } else {
                inventoryFinishedPercentage = BigDecimal.valueOf(Math.floorDiv(jobItemProgress.getCheckedRecordsCount() * 100, jobItemProgress.getRecordsCount())).intValue();
                Duration duration = Duration.between(checkBeginTime, LocalDateTime.now());
                long remainMills = jobItemProgress.getRecordsCount() * 100 / jobItemProgress.getCheckedRecordsCount() * duration.toMillis();
                result.setRemainingTime(remainMills / 1000);
            }
        }
        result.setInventoryFinishedPercentage(inventoryFinishedPercentage);
        result.setTableName(Optional.ofNullable(jobItemProgress.getTableName()).orElse(""));
        result.setCheckBeginTime(DATE_TIME_FORMATTER.format(checkBeginTime));
        result.setErrorMessage(getJobItemErrorMessage(checkJobId, 0));
        Map<String, DataConsistencyCheckResult> checkJobResult = PipelineAPIFactory.getGovernanceRepositoryAPI().getCheckJobResult(parentJobId, checkJobId);
        Optional<DataConsistencyCheckResult> dataConsistencyCheckResult = Optional.ofNullable(checkJobResult.get(jobItemProgress.getTableName()));
        dataConsistencyCheckResult.ifPresent(optional -> result.setCheckResult(optional.getContentCheckResult().isMatched()));
        return result;
    }

Line commented on: inventoryFinishedPercentage = BigDecimal.valueOf(Math.floorDiv(jobItemProgress.getCheckedRecordsCount() * 100, jobItemProgress.getRecordsCount())).intValue();

Revised code:
public ConsistencyCheckJobProgressInfo getJobProgressInfo(final String parentJobId) {
        Optional<String> checkLatestJobId = PipelineAPIFactory.getGovernanceRepositoryAPI().getCheckLatestJobId(parentJobId);
        ShardingSpherePreconditions.checkState(checkLatestJobId.isPresent(), () -> new PipelineJobNotFoundException(parentJobId));
        String checkJobId = checkLatestJobId.get();
        ConsistencyCheckJobProgress jobItemProgress = getJobItemProgress(checkJobId, 0);
        ConsistencyCheckJobProgressInfo result = new ConsistencyCheckJobProgressInfo();
        if (null == jobItemProgress) {
            return result;
        }
        int finishedPercentage;
        LocalDateTime checkBeginTime = new Timestamp(jobItemProgress.getCheckBeginTimeMillis()).toLocalDateTime();
        if (null != jobItemProgress.getRecordsCount() && Objects.equals(jobItemProgress.getCheckedRecordsCount(), jobItemProgress.getRecordsCount())) {
            finishedPercentage = 100;
            LocalDateTime checkEndTime = new Timestamp(jobItemProgress.getCheckEndTimeMillis()).toLocalDateTime();
            Duration duration = Duration.between(checkBeginTime, checkEndTime);
            result.setDurationSeconds(duration.toMillis() / 1000);
            result.setCheckEndTime(DATE_TIME_FORMATTER.format(checkEndTime));
            result.setRemainingSeconds(0L);
        } else {
            if (null == jobItemProgress.getRecordsCount()) {
                finishedPercentage = 0;
            } else {
                finishedPercentage = Math.min(100, BigDecimal.valueOf(Math.floorDiv(jobItemProgress.getCheckedRecordsCount() * 100, jobItemProgress.getRecordsCount())).intValue());
                Duration duration = Duration.between(checkBeginTime, LocalDateTime.now());
                long remainMills = jobItemProgress.getRecordsCount() * 100 / jobItemProgress.getCheckedRecordsCount() * duration.toMillis();
                result.setRemainingSeconds(remainMills / 1000);
            }
        }
        result.setFinishedPercentage(finishedPercentage);
        String tableName = null == jobItemProgress.getTableNames() ? null : jobItemProgress.getTableNames().split(",")[0];
        result.setTableName(Optional.ofNullable(tableName).orElse(""));
        result.setCheckBeginTime(DATE_TIME_FORMATTER.format(checkBeginTime));
        result.setErrorMessage(getJobItemErrorMessage(checkJobId, 0));
        Map<String, DataConsistencyCheckResult> checkJobResult = PipelineAPIFactory.getGovernanceRepositoryAPI().getCheckJobResult(parentJobId, checkJobId);
        Optional<DataConsistencyCheckResult> dataConsistencyCheckResult = Optional.ofNullable(checkJobResult.get(tableName));
        dataConsistencyCheckResult.ifPresent(optional -> result.setResult(optional.getContentCheckResult().isMatched()));
        return result;
    }