648540858
2024-01-10 c25a99d60bef3d3bbd59fee895bd658928fd00db
src/main/java/com/genersoft/iot/vmp/service/impl/DeviceChannelServiceImpl.java
old mode 100644 new mode 100755
@@ -11,7 +11,7 @@
import com.genersoft.iot.vmp.storager.dao.DeviceChannelMapper;
import com.genersoft.iot.vmp.storager.dao.DeviceMapper;
import com.genersoft.iot.vmp.utils.DateUtil;
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaceInfo;
import com.genersoft.iot.vmp.vmanager.bean.ResourceBaseInfo;
import com.genersoft.iot.vmp.vmanager.gb28181.platform.bean.ChannelReduce;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
@@ -49,8 +49,6 @@
            if (device == null) {
                device = deviceMapper.getDeviceByDeviceId(deviceChannel.getDeviceId());
            }
            if ("WGS84".equals(device.getGeoCoordSys())) {
                deviceChannel.setLongitudeWgs84(deviceChannel.getLongitude());
@@ -143,7 +141,7 @@
                    }
                }
            }
            int limitCount = 300;
            int limitCount = 50;
            if (addChannels.size() > 0) {
                if (addChannels.size() > limitCount) {
                    for (int i = 0; i < addChannels.size(); i += limitCount) {
@@ -175,8 +173,12 @@
    }
    @Override
    public ResourceBaceInfo getOverview() {
        return channelMapper.getOverview();
    public ResourceBaseInfo getOverview() {
        int online = channelMapper.getOnlineCount();
        int total = channelMapper.getAllChannelCount();
        return new ResourceBaseInfo(total, online);
    }
@@ -197,7 +199,7 @@
            deviceChannel.setUpdateTime(now);
            result.add(updateGps(deviceChannel, device));
        });
        int limitCount = 300;
        int limitCount = 50;
        if (result.size() > limitCount) {
            for (int i = 0; i < result.size(); i += limitCount) {
                int toIndex = i + limitCount;
@@ -258,4 +260,6 @@
            }
        }
    }
}