Commit 73b91100 authored by 高建强's avatar 高建强

item:建筑属性扩展;视频监控属性扩展;脚本维护。

parent 09404f3d
......@@ -128,4 +128,12 @@ public class Video extends BaseEntity {
@ApiModelProperty(value = "监控区域ID")
@TableField(value = "belongAreaId")
private String belongAreaId;
@ApiModelProperty(value = "机构编码")
@TableField(value = "biz_org_code")
private String bizOrgCode;
@ApiModelProperty(value = "机构/部门名称")
@TableField(value = "biz_org_name")
private String bizOrgName;
}
......@@ -18,4 +18,5 @@ public class PageVideoVO {
private String type;
private String url;
private String img;
private String bizOrgName;
}
......@@ -145,8 +145,8 @@ public class BuildingController extends AbstractBaseController {
@GetMapping(value = "/pointTree")
@TycloudOperation(ApiLevel = UserType.AGENCY)
@ApiOperation(value = "建筑装备树", notes = "楼层点位图使用")
public List<PointTreeVo> getBuildTree() {
return buildService.getBuildTree();
public List<PointTreeVo> getBuildTree(@RequestParam(required = false) String bizOrgCode) {
return buildService.getBuildTree(bizOrgCode);
}
@GetMapping(value = "/3dPointTree")
......
......@@ -72,8 +72,9 @@ public interface BuildingMapper extends BaseMapper<Building> {
/**
* 获取建筑树主干
* @return
* @param bizOrgCode
*/
List<PointTreeVo> getBuildList();
List<PointTreeVo> getBuildList(@Param("bizOrgCode") String bizOrgCode);
/**
* 获取建筑树主干
......
......@@ -114,8 +114,9 @@ public interface IBuilldService extends IService<Building> {
* 获取 建筑装备树
*
* @return
* @param bizOrgCode
*/
List<PointTreeVo> getBuildTree();
List<PointTreeVo> getBuildTree(String bizOrgCode);
/**
* 获取 建筑装备树
*
......
......@@ -462,15 +462,15 @@ public class BuildingServiceImpl extends ServiceImpl<BuildingMapper, Building> i
}
@Override
public List<PointTreeVo> getBuildTree() {
List<PointTreeVo> responses = this.baseMapper.getBuildList();
public List<PointTreeVo> getBuildTree(String bizOrgCode) {
List<PointTreeVo> responses = this.baseMapper.getBuildList(bizOrgCode);
// id为null 避免查询时按系统点位图逻辑查询
return fireFightingSystemService.transferListToPointTree(responses, null);
}
@Override
public List<PointTreeVo> get3dBuildTree() {
List<PointTreeVo> responses = this.baseMapper.getBuildList();
List<PointTreeVo> responses = this.baseMapper.getBuildList(null);
return fireFightingSystemService.transferListTo3dPointTree(responses);
}
......
......@@ -400,7 +400,7 @@ public class FireFightingSystemServiceImpl extends ServiceImpl<FireFightingSyste
// responses.add(p);
// });
// List<PointTreeVo> regionList = responses.stream().filter(r -> "TRUE".equals(r.getIsRegion())).collect(Collectors.toList());
List<PointTreeVo> buildList = buildingMapper.getBuildList();
List<PointTreeVo> buildList = buildingMapper.getBuildList(null);
return transferListToPointTree(buildList, id);
}
......
......@@ -2036,5 +2036,36 @@
alter table `wl_video` modify column `status` varchar(5) DEFAULT NULL COMMENT '状态【0:在线;1:离线】';
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="1639540630-20211215-01">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_video" columnName="biz_org_code"/>
</not>
</preConditions>
<comment>wl_video add column biz_org_code</comment>
<sql>
alter table `wl_video` add column `biz_org_code` varchar(64) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构编码';
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="1639540630-20211215-02">
<preConditions onFail="MARK_RAN">
<not>
<columnExists tableName="wl_video" columnName="biz_org_name"/>
</not>
</preConditions>
<comment>wl_video add column biz_org_name</comment>
<sql>
alter table `wl_video` add column `biz_org_name` varchar(128) COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '机构/部门名称';
</sql>
</changeSet>
<changeSet author="gaojianqiang" id="1639540630-20211215-03">
<preConditions onFail="MARK_RAN">
<tableExists tableName="wl_form_group_column"/>
</preConditions>
<comment>wl_form_group_column 表添加建筑数据</comment>
<sql>
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`, `create_date`) VALUES (133000000251, 'bizOrgCode', '机构编码', 'String', 132828674810, 'eq', b'0', 'building', 2581805, '2021-12-15 17:33:56');
INSERT INTO `wl_form_group_column`(`id`, `field_name`, `field_label`, `data_type`, `group_id`, `query_strategy`, `not_null`, `group_code`, `creator_id`, `create_date`) VALUES (133000000252, 'bizOrgName', '机构/部门名称', 'String', 132828674810, 'eq', b'0', 'building', 2581805, '2021-12-15 17:34:04');
</sql>
</changeSet>
</databaseChangeLog>
\ No newline at end of file
......@@ -204,31 +204,45 @@
</select>
<select id="getBuildList" resultType="com.yeejoin.equipmanage.common.entity.vo.PointTreeVo">
SELECT
id AS sequenceNbr,
group_name AS displayName,
- 1 AS parentId,
NULL AS equipCode
t.*
FROM
wl_form_group
WHERE
id = 0 UNION ALL
SELECT
ins.instance_id AS sequenceNbr,
nam.field_value AS displayName,
par.field_value AS parentId,
cd.field_value AS equipCode
FROM
wl_form_instance AS ins
LEFT JOIN wl_form_instance AS nam ON nam.instance_id = ins.instance_id
AND nam.field_name = 'name'
LEFT JOIN wl_form_instance AS par ON par.instance_id = ins.instance_id
AND par.field_name = 'parentId'
LEFT JOIN wl_form_instance AS cd ON cd.instance_id = ins.instance_id
AND cd.field_name = 'code'
GROUP BY
ins.instance_id
ORDER BY
parentId
(
SELECT
id AS sequenceNbr,
group_name AS displayName,
- 1 AS parentId,
NULL AS equipCode,
NULL AS bizOrgCode
FROM
wl_form_group
WHERE
id = 0 UNION ALL
SELECT
ins.instance_id AS sequenceNbr,
nam.field_value AS displayName,
par.field_value AS parentId,
cd.field_value AS equipCode,
bzc.field_value AS bizOrgCode
FROM
wl_form_instance AS ins
LEFT JOIN wl_form_instance AS nam ON nam.instance_id = ins.instance_id
AND nam.field_name = 'name'
LEFT JOIN wl_form_instance AS par ON par.instance_id = ins.instance_id
AND par.field_name = 'parentId'
LEFT JOIN wl_form_instance AS cd ON cd.instance_id = ins.instance_id
AND cd.field_name = 'code'
LEFT JOIN wl_form_instance AS bzc ON cd.instance_id = ins.instance_id
AND cd.field_name = 'bizOrgCode'
GROUP BY
ins.instance_id
ORDER BY
parentId
) t
<where>
<if test="bizOrgCode != null and bizOrgCode != ''">
t.bizOrgCode = #{bizOrgCode}
</if>
</where>
</select>
<select id="get3dBuildList" resultType="com.yeejoin.equipmanage.common.entity.vo.PointTreeVo">
select
......
......@@ -31,7 +31,8 @@
wlv.address,
wlv.status,
wlv.img,
wlv.type
wlv.type,
wlv.biz_org_name
FROM
wl_video as wlv
left join wl_video_source as vis on vis.video_id = wlv.id
......
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