Commit 88cf39eb authored by 高建强's avatar 高建强

item:视频监控左侧树与分页接口调整

parent 3e9400bc
...@@ -44,4 +44,7 @@ public class OrgUsrDto extends BaseDto { ...@@ -44,4 +44,7 @@ public class OrgUsrDto extends BaseDto {
@ApiModelProperty(value = "省市区名称,用逗号分隔") @ApiModelProperty(value = "省市区名称,用逗号分隔")
private String pczName; private String pczName;
@ApiModelProperty(value = "建筑ID")
private String buildId;
} }
...@@ -74,4 +74,7 @@ public class BuildingTreeVo { ...@@ -74,4 +74,7 @@ public class BuildingTreeVo {
@ApiModelProperty("建筑地址") @ApiModelProperty("建筑地址")
private String address; private String address;
@ApiModelProperty("机构编码")
private String bizOrgCode;
} }
package com.yeejoin.equipmanage.controller; package com.yeejoin.equipmanage.controller;
import java.util.List; import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yeejoin.amos.boot.biz.common.bo.ReginParams;
import com.yeejoin.equipmanage.common.entity.vo.BuildingListVO;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO;
import com.yeejoin.equipmanage.common.vo.BuildingTreeVo;
import com.yeejoin.equipmanage.service.IBuilldService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.web.bind.annotation.GetMapping; import org.springframework.web.bind.annotation.GetMapping;
...@@ -11,15 +18,7 @@ import org.springframework.web.bind.annotation.RestController; ...@@ -11,15 +18,7 @@ import org.springframework.web.bind.annotation.RestController;
import org.typroject.tyboot.core.foundation.enumeration.UserType; import org.typroject.tyboot.core.foundation.enumeration.UserType;
import org.typroject.tyboot.core.restful.doc.TycloudOperation; import org.typroject.tyboot.core.restful.doc.TycloudOperation;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import java.util.List;
import com.yeejoin.equipmanage.common.entity.vo.BuildingListVO;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoListVO;
import com.yeejoin.equipmanage.common.entity.vo.BuildingVideoVO;
import com.yeejoin.equipmanage.common.vo.BuildingTreeVo;
import com.yeejoin.equipmanage.service.IBuilldService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
/** /**
* @Description: 消防建筑视屏监控 * @Description: 消防建筑视屏监控
...@@ -43,12 +42,19 @@ public class BuildingVideoController extends AbstractBaseController { ...@@ -43,12 +42,19 @@ public class BuildingVideoController extends AbstractBaseController {
} }
@TycloudOperation(ApiLevel = UserType.AGENCY) @TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防建筑视屏监控树")
@GetMapping(value = "/treeByBizOrgTypeCode")
public List<BuildingTreeVo> getBuildingTreeByBizOrgTypeCode(@RequestParam(required = false) String orgTypes) {
ReginParams reginParams = getSelectedOrgInfo();
ReginParams.PersonIdentity personIdentity = reginParams.getPersonIdentity();
String bizOrgCode = personIdentity.getBizOrgCode();
return buildService.getBuildingTreeByBizOrgTypeCode(orgTypes, bizOrgCode);
}
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation("消防建筑视屏监控分页列表") @ApiOperation("消防建筑视屏监控分页列表")
@GetMapping(value = "/page") @GetMapping(value = "/page")
public Page<BuildingVideoVO> buildingList(Page page, BuildingVideoListVO dto) { public Page<BuildingVideoVO> buildingList(Page page, BuildingVideoListVO dto) {
if ("0".equals(dto.getBuildingId())) {
dto.setBuildingId(null);
}
return buildService.buildingVideoList(page, dto); return buildService.buildingVideoList(page, dto);
} }
......
...@@ -103,8 +103,9 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> { ...@@ -103,8 +103,9 @@ public interface FormInstanceMapper extends BaseMapper<FormInstance> {
/** /**
* 消防建筑视屏监控统计树 * 消防建筑视屏监控统计树
* @return * @return
* @param bizOrgCodeList
*/ */
List<Map<String, Object>> getBuildVideoListCount(); List<Map<String, Object>> getBuildVideoListCount(@Param("list") List<String> bizOrgCodeList);
/** /**
* 可乐建筑视屏监控统计树 * 可乐建筑视屏监控统计树
......
...@@ -208,6 +208,14 @@ public interface IBuilldService extends IService<Building> { ...@@ -208,6 +208,14 @@ public interface IBuilldService extends IService<Building> {
List<BuildingTreeVo> getBuildingVideoTree(); List<BuildingTreeVo> getBuildingVideoTree();
/** /**
* 消防建筑视屏监控统计树
* @param orgTypes
* @param bizOrgCode
* @return
*/
List<BuildingTreeVo> getBuildingTreeByBizOrgTypeCode(String orgTypes, String bizOrgCode);
/**
* 消防建筑视屏监控分页列表 * 消防建筑视屏监控分页列表
* @param page * @param page
* @param dto * @param dto
...@@ -299,4 +307,5 @@ public interface IBuilldService extends IService<Building> { ...@@ -299,4 +307,5 @@ public interface IBuilldService extends IService<Building> {
* @return * @return
*/ */
Map<String, String> getBuildingToLongitudeAndLatitude(String instanceId); Map<String, String> getBuildingToLongitudeAndLatitude(String instanceId);
} }
...@@ -136,8 +136,9 @@ public interface IFormInstanceService extends IService<FormInstance> { ...@@ -136,8 +136,9 @@ public interface IFormInstanceService extends IService<FormInstance> {
/** /**
* 消防建筑视屏监控统计树 * 消防建筑视屏监控统计树
* @return * @return
* @param bizOrgCodeList
*/ */
List<Map<String, Object>> getBuildVideoListCount(); List<Map<String, Object>> getBuildVideoListCount(List<String> bizOrgCodeList);
/** /**
* 安防消防建筑视屏监控统计树 * 安防消防建筑视屏监控统计树
......
...@@ -479,8 +479,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For ...@@ -479,8 +479,8 @@ public class FormInstanceServiceImpl extends ServiceImpl<FormInstanceMapper, For
} }
@Override @Override
public List<Map<String, Object>> getBuildVideoListCount() { public List<Map<String, Object>> getBuildVideoListCount(List<String> bizOrgCodeList) {
return formInstanceMapper.getBuildVideoListCount(); return formInstanceMapper.getBuildVideoListCount(bizOrgCodeList);
} }
@Override @Override
......
...@@ -36,7 +36,7 @@ dutyMode.fegin.name=AMOS-DUTYMODE ...@@ -36,7 +36,7 @@ dutyMode.fegin.name=AMOS-DUTYMODE
riskSource.feign.name=AMOS-AUTOSYS riskSource.feign.name=AMOS-AUTOSYS
equipManage.name=AMOS-EQUIPMANAGE equipManage.name=AMOS-EQUIPMANAGE
iot.vehicle.track=AMOS-API-IOT iot.vehicle.track=AMOS-API-IOT
jcs.fegin.name=JCS-SHG jcs.fegin.name=JCS
video.fegin.name=VIDEO video.fegin.name=VIDEO
#项目初始化画布id #项目初始化画布id
morphic.projectSeq=1390314016458514433 morphic.projectSeq=1390314016458514433
...@@ -93,3 +93,5 @@ auth-key-fire-system=fire_system_info; ...@@ -93,3 +93,5 @@ auth-key-fire-system=fire_system_info;
auth-key-fire-equip=fire_equip_info; auth-key-fire-equip=fire_equip_info;
# 权限标识-消防视频 # 权限标识-消防视频
auth-key-fire-video=fire_video_info; auth-key-fire-video=fire_video_info;
# 权限标识-消防视频
auth-key-fire-build-video=fire_build_video_info;
\ No newline at end of file
...@@ -259,6 +259,7 @@ ...@@ -259,6 +259,7 @@
</select> </select>
<!-- 消防建筑视屏监控统计树 --> <!-- 消防建筑视屏监控统计树 -->
<select id="getBuildVideoListCount" resultType="hashmap"> <select id="getBuildVideoListCount" resultType="hashmap">
SELECT * FROM(
SELECT SELECT
sa.*, sa.*,
b.total b.total
...@@ -269,7 +270,8 @@ ...@@ -269,7 +270,8 @@
a.group_code AS groupCode, a.group_code AS groupCode,
a.group_type AS groupType, a.group_type AS groupType,
MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId, MAX( CASE WHEN a.field_name = 'parentId' THEN a.field_value END ) AS parentId,
MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName MAX( CASE WHEN a.field_name = 'name' THEN a.field_value END ) AS instanceName,
MAX( CASE WHEN a.field_name = 'biz_org_code' THEN a.field_value END ) AS bizOrgCode
FROM FROM
`wl_form_instance` a `wl_form_instance` a
GROUP BY GROUP BY
...@@ -283,9 +285,19 @@ ...@@ -283,9 +285,19 @@
'else' as groupType, 'else' as groupType,
0 as parentId, 0 as parentId,
'其他' as instanceName, '其他' as instanceName,
NULL AS bizOrgCode,
count(1) as total count(1) as total
from from
wl_video where id not in (select video_id from wl_video_source) wl_video where id not in (select video_id from wl_video_source)
) tmp
<where>
<if test="list != null and list.size() >0">
AND tmp.bizOrgCode IN
<foreach collection="list" item="item" index="index" open="(" close=")" separator=",">
#{item}
</foreach>
</if>
</where>
</select> </select>
<select id="getColaBuildVideoListCount" resultType="hashmap"> <select id="getColaBuildVideoListCount" resultType="hashmap">
......
...@@ -70,6 +70,12 @@ ...@@ -70,6 +70,12 @@
<if test="dto.buildingId!=null and dto.buildingId!=''"> <if test="dto.buildingId!=null and dto.buildingId!=''">
FIND_IN_SET(vc.source_id, getChildrenIdsByRootId(#{dto.buildingId})) FIND_IN_SET(vc.source_id, getChildrenIdsByRootId(#{dto.buildingId}))
</if> </if>
<if test="dto.buildIdList != null and dto.buildIdList.size > 0">
AND
<foreach collection="dto.buildIdList" item="item" index="index" open="(" close=")" separator=" OR ">
FIND_IN_SET(vc.source_id, getChildrenIdsByRootId(#{item, jdbcType=INTEGER}))
</foreach>
</if>
<if test="dto.equipmentName!=null and dto.equipmentName!=''"> <if test="dto.equipmentName!=null and dto.equipmentName!=''">
and v.name like concat('%',#{dto.equipmentName},'%') and v.name like concat('%',#{dto.equipmentName},'%')
</if> </if>
......
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