Merge branch 'master' into dev/数据库统合
commit
158fbaac9c
|
@ -10,6 +10,7 @@ import com.genersoft.iot.vmp.gb28181.service.IGbChannelService;
|
||||||
import com.genersoft.iot.vmp.gb28181.service.IGroupService;
|
import com.genersoft.iot.vmp.gb28181.service.IGroupService;
|
||||||
import com.genersoft.iot.vmp.utils.DateUtil;
|
import com.genersoft.iot.vmp.utils.DateUtil;
|
||||||
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
import com.genersoft.iot.vmp.vmanager.bean.ErrorCode;
|
||||||
|
import com.google.common.collect.Lists;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
@ -47,6 +48,13 @@ public class GroupServiceImpl implements IGroupService {
|
||||||
|
|
||||||
GbCode gbCode = GbCode.decode(group.getDeviceId());
|
GbCode gbCode = GbCode.decode(group.getDeviceId());
|
||||||
Assert.notNull(gbCode, "设备编号不满足国标定义");
|
Assert.notNull(gbCode, "设备编号不满足国标定义");
|
||||||
|
|
||||||
|
// 查询数据库中已经存在的.
|
||||||
|
List<Group> groupListInDb = groupManager.queryInGroupListByDeviceId(Lists.newArrayList(group));
|
||||||
|
if (!ObjectUtils.isEmpty(groupListInDb)){
|
||||||
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), String.format("该节点编号 %s 已存在", group.getDeviceId()));
|
||||||
|
}
|
||||||
|
|
||||||
if ("215".equals(gbCode.getTypeCode())){
|
if ("215".equals(gbCode.getTypeCode())){
|
||||||
// 添加业务分组
|
// 添加业务分组
|
||||||
addBusinessGroup(group);
|
addBusinessGroup(group);
|
||||||
|
@ -100,6 +108,12 @@ public class GroupServiceImpl implements IGroupService {
|
||||||
Group groupInDb = groupManager.queryOne(group.getId());
|
Group groupInDb = groupManager.queryOne(group.getId());
|
||||||
Assert.notNull(groupInDb, "分组不存在");
|
Assert.notNull(groupInDb, "分组不存在");
|
||||||
|
|
||||||
|
// 查询数据库中已经存在的.
|
||||||
|
List<Group> groupListInDb = groupManager.queryInGroupListByDeviceId(Lists.newArrayList(group));
|
||||||
|
if (!ObjectUtils.isEmpty(groupListInDb) && groupListInDb.get(0).getId() != group.getId()){
|
||||||
|
throw new ControllerException(ErrorCode.ERROR100.getCode(), String.format("该该节点编号 %s 已存在", group.getDeviceId()));
|
||||||
|
}
|
||||||
|
|
||||||
group.setName(group.getName());
|
group.setName(group.getName());
|
||||||
group.setUpdateTime(DateUtil.getNow());
|
group.setUpdateTime(DateUtil.getNow());
|
||||||
groupManager.update(group);
|
groupManager.update(group);
|
||||||
|
|
|
@ -89,7 +89,8 @@ public class RecordPlanServiceImpl implements IRecordPlanService {
|
||||||
if (startChannelIdList.isEmpty()) {
|
if (startChannelIdList.isEmpty()) {
|
||||||
// 当前没有录像任务, 如果存在旧的正在录像的就移除
|
// 当前没有录像任务, 如果存在旧的正在录像的就移除
|
||||||
if(!recordStreamMap.isEmpty()) {
|
if(!recordStreamMap.isEmpty()) {
|
||||||
stopStreams(recordStreamMap.keySet(), recordStreamMap);
|
Set<Integer> recordStreamSet = new HashSet<>(recordStreamMap.keySet());
|
||||||
|
stopStreams(recordStreamSet, recordStreamMap);
|
||||||
recordStreamMap.clear();
|
recordStreamMap.clear();
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
|
|
0
web_src/src/components/common/ h265web.vue → web_src/src/components/common/h265web.vue
Executable file → Normal file
0
web_src/src/components/common/ h265web.vue → web_src/src/components/common/h265web.vue
Executable file → Normal file
Loading…
Reference in New Issue