This commit is contained in:
pengjie 2025-07-18 16:17:30 +08:00
parent 1c5b890fb2
commit 8e4eb0d6b7
4 changed files with 17 additions and 3 deletions

View File

@ -52,9 +52,15 @@ public class VideoItemVO {
@Schema(description = "分组Id") @Schema(description = "分组Id")
private Long groupId; private Long groupId;
@Schema(description = "分组名称")
private String groupName;
@Schema(description = "网格Id") @Schema(description = "网格Id")
private Long gridId; private Long gridId;
@Schema(description = "网格名称")
private String gridName;
@Schema(description = "自定义分组Id") @Schema(description = "自定义分组Id")
private Long videoGroupId; private Long videoGroupId;

View File

@ -195,10 +195,14 @@ public class VideoItemService {
} }
public Map<String, Object> getHikVideoUrl(Map<String, Object> map) { public Map<String, Object> getHikVideoUrl(Map<String, Object> map) {
Integer villageId = SmartRequestUtil.getRequestUser().getVillageId();
if (MapUtils.getInteger(map, "villageId") != null) {
villageId = MapUtils.getInteger(map, "villageId");
}
Map<String, Object> data = new HashMap<>(16); Map<String, Object> data = new HashMap<>(16);
String url = ""; String url = "";
VideoConfigEntity videoConfig = videoConfigDao.selectOne(Wrappers.<VideoConfigEntity>lambdaQuery() VideoConfigEntity videoConfig = videoConfigDao.selectOne(Wrappers.<VideoConfigEntity>lambdaQuery()
.eq(VideoConfigEntity::getVillageId, SmartRequestUtil.getRequestUser().getVillageId()) .eq(VideoConfigEntity::getVillageId, villageId)
.eq(VideoConfigEntity::getIsEnable, 1)); .eq(VideoConfigEntity::getIsEnable, 1));
if (videoConfig == null) { if (videoConfig == null) {
throw new BusinessException("未启用视频配置"); throw new BusinessException("未启用视频配置");

View File

@ -343,7 +343,7 @@ public class VillageService {
vo.setInsectPestSituationTotal(insectPestSituations.size()); vo.setInsectPestSituationTotal(insectPestSituations.size());
vo.setInsectPestSituationOffLine((int) insectPestSituations.stream().filter(i -> i.getState() == 0).count()); vo.setInsectPestSituationOffLine((int) insectPestSituations.stream().filter(i -> i.getState() == 0).count());
vo.setEnvironmentTotal(environmentDevs.size()); vo.setEnvironmentTotal(environmentDevs.size());
vo.setEnvironmentTotal((int) environmentDevs.stream().filter(e -> e.getState() == 0).count()); vo.setEnvironmentOffLine((int) environmentDevs.stream().filter(e -> e.getState() == 0).count());
return vo; return vo;
} }

View File

@ -24,7 +24,9 @@
video_item.create_time, video_item.create_time,
video_item.create_by, video_item.create_by,
video_item.update_time, video_item.update_time,
video_item.village_id video_item.village_id,
grid.name gridName,
group_info.name groupName
</sql> </sql>
<!-- 分页查询 --> <!-- 分页查询 -->
@ -32,6 +34,8 @@
SELECT SELECT
<include refid="base_columns"/> <include refid="base_columns"/>
FROM video_item FROM video_item
left join grid on video_item.grid_id = grid.grid_id
left join group_info on video_item.group_id = group_info.group_id
<where> <where>
<!--分组类型(1:自定义分组2网格分组3小组分组)--> <!--分组类型(1:自定义分组2网格分组3小组分组)-->
<!-- <if test="queryForm.groupType != null"> <!-- <if test="queryForm.groupType != null">