mirror of
https://gitee.com/pan648540858/wvp-GB28181-pro.git
synced 2026-05-25 22:47:49 +08:00
临时提交
This commit is contained in:
parent
d029fb7adb
commit
35a1733510
@ -582,21 +582,22 @@ public class ChannelProvider {
|
|||||||
public String queryListWithChildForSy(Map<String, Object> params ){
|
public String queryListWithChildForSy(Map<String, Object> params ){
|
||||||
StringBuilder sqlBuild = new StringBuilder();
|
StringBuilder sqlBuild = new StringBuilder();
|
||||||
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
|
sqlBuild.append(BASE_SQL_FOR_CAMERA_DEVICE);
|
||||||
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) " +
|
sqlBuild.append(" where wdc.channel_type != 1 AND (wdc.gb_ptz_type is null || ( wdc.gb_ptz_type != 98 && wdc.gb_ptz_type != 99)) ");
|
||||||
" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
|
|
||||||
|
|
||||||
sqlBuild.append(" ");
|
|
||||||
List<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList");
|
List<CameraGroup> groupList = (List<CameraGroup>)params.get("groupList");
|
||||||
boolean first = true;
|
if (groupList != null && !groupList.isEmpty()) {
|
||||||
for (CameraGroup group : groupList) {
|
sqlBuild.append(" AND coalesce(wdc.gb_parent_id, wdc.parent_id) in (");
|
||||||
if (!first) {
|
boolean first = true;
|
||||||
sqlBuild.append(",");
|
for (CameraGroup group : groupList) {
|
||||||
|
if (!first) {
|
||||||
|
sqlBuild.append(",");
|
||||||
|
}
|
||||||
|
sqlBuild.append("'" + group.getDeviceId() + "'");
|
||||||
|
first = false;
|
||||||
}
|
}
|
||||||
sqlBuild.append("'" + group.getDeviceId() + "'");
|
sqlBuild.append(" )");
|
||||||
first = false;
|
|
||||||
}
|
}
|
||||||
sqlBuild.append(" )");
|
|
||||||
|
|
||||||
if (params.get("query") != null) {
|
if (params.get("query") != null) {
|
||||||
sqlBuild.append(" AND (coalesce(wdc.gb_device_id, wdc.device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
sqlBuild.append(" AND (coalesce(wdc.gb_device_id, wdc.device_id) LIKE concat('%',#{query},'%') escape '/'" +
|
||||||
" OR coalesce(wdc.gb_name, wdc.name) LIKE concat('%',#{query},'%') escape '/' )")
|
" OR coalesce(wdc.gb_name, wdc.name) LIKE concat('%',#{query},'%') escape '/' )")
|
||||||
|
|||||||
@ -25,7 +25,7 @@ import java.util.Map;
|
|||||||
* catalog事件
|
* catalog事件
|
||||||
*/
|
*/
|
||||||
@Slf4j
|
@Slf4j
|
||||||
@Component
|
//@Component
|
||||||
public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
public class CatalogEventLister implements ApplicationListener<CatalogEvent> {
|
||||||
|
|
||||||
@Autowired
|
@Autowired
|
||||||
|
|||||||
@ -110,7 +110,7 @@ public class CameraChannelController {
|
|||||||
@RequestParam(required = false) String query,
|
@RequestParam(required = false) String query,
|
||||||
@RequestParam(required = false) String sortName,
|
@RequestParam(required = false) String sortName,
|
||||||
@RequestParam(required = false) Boolean order,
|
@RequestParam(required = false) Boolean order,
|
||||||
String groupAlias,
|
@RequestParam(required = false) String groupAlias,
|
||||||
@RequestParam(required = false) String geoCoordSys,
|
@RequestParam(required = false) String geoCoordSys,
|
||||||
@RequestParam(required = false) Boolean status){
|
@RequestParam(required = false) Boolean status){
|
||||||
if (ObjectUtils.isEmpty(query)) {
|
if (ObjectUtils.isEmpty(query)) {
|
||||||
|
|||||||
@ -273,13 +273,18 @@ public class CameraChannelService implements CommandLineRunner {
|
|||||||
}
|
}
|
||||||
|
|
||||||
public PageInfo<CameraChannel> queryListWithChild(Integer page, Integer count, String query, String sortName, Boolean order, String groupAlias, Boolean status, String geoCoordSys) {
|
public PageInfo<CameraChannel> queryListWithChild(Integer page, Integer count, String query, String sortName, Boolean order, String groupAlias, Boolean status, String geoCoordSys) {
|
||||||
|
|
||||||
|
List<CameraGroup> groupList = null;
|
||||||
// 构建组织结构信息
|
// 构建组织结构信息
|
||||||
CameraGroup group = groupMapper.queryGroupByAlias(groupAlias);
|
if (groupAlias != null) {
|
||||||
Assert.notNull(group, "组织结构不存在");
|
CameraGroup group = groupMapper.queryGroupByAlias(groupAlias);
|
||||||
String groupDeviceId = group.getDeviceId();
|
Assert.notNull(group, "组织结构不存在");
|
||||||
// 获取所有子节点
|
String groupDeviceId = group.getDeviceId();
|
||||||
List<CameraGroup> groupList = queryAllGroupChildren(group.getId(), group.getBusinessGroup());
|
// 获取所有子节点
|
||||||
groupList.add(group);
|
groupList = queryAllGroupChildren(group.getId(), group.getBusinessGroup());
|
||||||
|
groupList.add(group);
|
||||||
|
}
|
||||||
|
|
||||||
// 构建分页
|
// 构建分页
|
||||||
PageHelper.startPage(page, count);
|
PageHelper.startPage(page, count);
|
||||||
if (query != null) {
|
if (query != null) {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user