Commit a6e45dbd authored by suhuiguang's avatar suhuiguang

1.视频监控bug

parent a2bf4b8f
......@@ -770,15 +770,6 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
@Override
public Page<BuildingVideoVO> buildingVideoList(Page page, BuildingVideoListVO dto) {
String orgTypes = dto.getOrgTypes();
if (StringUtils.isNotBlank(orgTypes)) {
List<OrgUsrDto> list = jcsRemoteService.getCompanyDeptListWithAuth(authKey, orgTypes);
if (!CollectionUtils.isEmpty(list)) {
List<String> bizOrgCodeList = new ArrayList<>();
list.stream().filter(x -> StringUtils.isNotEmpty(x.getBizOrgCode())).forEach(o -> bizOrgCodeList.add(o.getBizOrgCode()));
dto.setBizOrgCodeList(bizOrgCodeList);
}
}
Page<BuildingVideoVO> pages = videoService.pageBuildingVideo(page, dto);
if (0 < pages.getRecords().size()) {
pages.getRecords().forEach(x -> {
......
......@@ -70,46 +70,17 @@
<if test="dto.buildingId!=null and dto.buildingId!=''">
FIND_IN_SET(vc.source_id, getBuildChildIdsByRootId(#{dto.buildingId}))
</if>
<choose>
<when test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
OR v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</when>
<otherwise>
<if test="dto.bizOrgCodeList != null and dto.bizOrgCodeList.size > 0">
AND v.biz_org_code IN
<foreach collection="dto.bizOrgCodeList" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</otherwise>
</choose>
<if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if test="dto.code!=null and dto.code!=''">
and v.code like concat('%',#{dto.code},'%')
<if test="dto.bizOrgCode!=null and dto.bizOrgCode!=''">
and v.biz_org_code LIKE CONCAT(#{dto.bizOrgCode}, '%')
</if>
</where>
<if test="dto.buildingId ==null or dto.buildingId =='' or dto.buildingId =='123456789123456789' ">
union all
select
v.id AS id,
v.name AS name,
v.token AS token,
v.url AS url,
v.code AS code,
null as location,
v.address,
v.preset_position as presetPosition
from
wl_video v where id not in (select video_id from wl_video_source)
<if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%')
</if>
<if test="dto.code!=null and dto.code!=''">
and v.code like concat('%',#{dto.code},'%')
</if>
</if>
</where>
order by v.create_date
</select>
<select id="getFireEquipByVideoId" resultType="com.yeejoin.equipmanage.common.entity.vo.BuildingListVO">
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment