临时提交

This commit is contained in:
lin
2025-10-16 15:20:15 +08:00
parent d2ffc867e6
commit ac92237e08
6 changed files with 49 additions and 20 deletions

View File

@@ -4,6 +4,7 @@ import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
import com.genersoft.iot.vmp.gb28181.bean.Group;
import com.genersoft.iot.vmp.gb28181.bean.GroupTree;
import com.genersoft.iot.vmp.gb28181.bean.Platform;
import com.genersoft.iot.vmp.web.custom.bean.CameraCount;
import com.genersoft.iot.vmp.web.custom.bean.CameraGroup;
import org.apache.ibatis.annotations.*;
@@ -304,4 +305,17 @@ public interface GroupMapper {
@Select("SELECT * from wvp_common_group WHERE alias = #{alias} and business_group = #{businessGroup}")
Group queryGroupByAliasAndBusinessGroup(@Param("alias") String alias, @Param("deviceId") String businessGroup);
@Select(" <script>" +
" SELECT " +
" coalesce( wdc.gb_parent_id, wdc.parent_id) as deviceId," +
" COUNT(*) AS allCount," +
" SUM(CASE WHEN coalesce( wdc.gb_status, wdc.status) = 'ON' THEN 1 ELSE 0 END) AS onlineCount" +
" FROM " +
" wvp_device_channel wdc " +
" where coalesce( wdc.gb_parent_id, wdc.parent_id) in " +
" <foreach collection='groupList' item='item' open='(' separator=',' close=')' > #{item.deviceId}</foreach>" +
"</script>")
List<CameraCount> queryCountWithChild(List<CameraGroup> groupList);
}

View File

@@ -10,7 +10,6 @@ import com.genersoft.iot.vmp.gb28181.dao.PlatformChannelMapper;
import com.genersoft.iot.vmp.gb28181.dao.RegionMapper;
import com.genersoft.iot.vmp.gb28181.event.EventPublisher;
import com.genersoft.iot.vmp.gb28181.event.subscribe.catalog.CatalogEvent;
import com.genersoft.iot.vmp.gb28181.service.IDeviceChannelService;
import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
import com.genersoft.iot.vmp.gb28181.service.IPlatformChannelService;
import com.genersoft.iot.vmp.service.bean.GPSMsgInfo;
@@ -52,9 +51,6 @@ public class GbChannelServiceImpl implements IGbChannelService {
@Autowired
private GroupMapper groupMapper;
@Autowired
private IDeviceChannelService deviceChannelService;
@Override
public CommonGBChannel queryByDeviceId(String gbDeviceId) {
return commonGBChannelMapper.queryByDeviceId(gbDeviceId);