648540858
2024-01-22 a9264a8bc04335d5d49a39841b039ba5a64d7717
src/main/java/com/genersoft/iot/vmp/service/impl/PlayServiceImpl.java
@@ -1,6 +1,7 @@
package com.genersoft.iot.vmp.service.impl;
import com.alibaba.fastjson2.JSONObject;
import com.baomidou.dynamic.datasource.annotation.DS;
import com.genersoft.iot.vmp.common.InviteInfo;
import com.genersoft.iot.vmp.common.InviteSessionStatus;
import com.genersoft.iot.vmp.common.InviteSessionType;
@@ -57,6 +58,7 @@
@SuppressWarnings(value = {"rawtypes", "unchecked"})
@Service
@DS("master")
public class PlayServiceImpl implements IPlayService {
    private final static Logger logger = LoggerFactory.getLogger(PlayServiceImpl.class);
@@ -780,11 +782,12 @@
            } else {
                String startTime = inviteInfo.getStreamInfo().getStartTime();
                String endTime = inviteInfo.getStreamInfo().getEndTime();
                // 此时start和end单位是秒
                long start = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(startTime);
                long end = DateUtil.yyyy_MM_dd_HH_mm_ssToTimestamp(endTime);
                BigDecimal currentCount = new BigDecimal(duration);
                BigDecimal totalCount = new BigDecimal(end - start);
                BigDecimal totalCount = new BigDecimal((end - start) * 1000);
                BigDecimal divide = currentCount.divide(totalCount, 2, RoundingMode.HALF_UP);
                double process = divide.doubleValue();
                inviteInfo.getStreamInfo().setProgress(process);