临时提交
parent
d2654660cb
commit
5a259aaa63
|
@ -262,7 +262,10 @@ public interface CommonGBChannelMapper {
|
||||||
|
|
||||||
@Select("<script>" +
|
@Select("<script>" +
|
||||||
" select " +
|
" select " +
|
||||||
" *, " +
|
" id," +
|
||||||
|
" coalesce(gb_device_id, device_id) as device_id," +
|
||||||
|
" coalesce(gb_name, name) as name, " +
|
||||||
|
" coalesce(gb_parent_id, parent_id) as parent_device_id, " +
|
||||||
" 1 as type, " +
|
" 1 as type, " +
|
||||||
" true as is_leaf " +
|
" true as is_leaf " +
|
||||||
" from wvp_device_channel " +
|
" from wvp_device_channel " +
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package com.genersoft.iot.vmp.gb28181.dao;
|
package com.genersoft.iot.vmp.gb28181.dao;
|
||||||
|
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
import com.genersoft.iot.vmp.gb28181.bean.CommonGBChannel;
|
||||||
|
import com.genersoft.iot.vmp.gb28181.bean.Group;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
import com.genersoft.iot.vmp.gb28181.bean.Region;
|
||||||
import com.genersoft.iot.vmp.gb28181.bean.RegionTree;
|
import com.genersoft.iot.vmp.gb28181.bean.RegionTree;
|
||||||
import org.apache.ibatis.annotations.*;
|
import org.apache.ibatis.annotations.*;
|
||||||
|
@ -104,4 +105,14 @@ public interface RegionMapper {
|
||||||
" </script>")
|
" </script>")
|
||||||
List<CommonGBChannel> queryByPlatform(@Param("platformId") Integer platformId);
|
List<CommonGBChannel> queryByPlatform(@Param("platformId") Integer platformId);
|
||||||
|
|
||||||
|
|
||||||
|
@Update(" <script>" +
|
||||||
|
" update wvp_common_region w1 " +
|
||||||
|
" inner join (select * from wvp_common_region ) w2 on w1.parent_device_id = w2.device_id " +
|
||||||
|
" set w1.parent_id = w2.id" +
|
||||||
|
" where w1.id in " +
|
||||||
|
" <foreach collection='regionListForAdd' item='item' open='(' separator=',' close=')' > #{item.id}</foreach>" +
|
||||||
|
" </script>")
|
||||||
|
void updateParentId(List<Region> regionListForAdd);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -511,10 +511,10 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
if (i + limitCount > addChannels.size()) {
|
if (i + limitCount > addChannels.size()) {
|
||||||
toIndex = addChannels.size();
|
toIndex = addChannels.size();
|
||||||
}
|
}
|
||||||
result = result || channelMapper.batchAdd(addChannels.subList(i, toIndex)) < 0;
|
result = result || channelMapper.batchAdd(addChannels.subList(i, toIndex)) > 0;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
result = result || channelMapper.batchAdd(addChannels) < 0;
|
result = channelMapper.batchAdd(addChannels) > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!result && !updateChannels.isEmpty()) {
|
if (!result && !updateChannels.isEmpty()) {
|
||||||
|
@ -524,14 +524,13 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
if (i + limitCount > updateChannels.size()) {
|
if (i + limitCount > updateChannels.size()) {
|
||||||
toIndex = updateChannels.size();
|
toIndex = updateChannels.size();
|
||||||
}
|
}
|
||||||
result = result || channelMapper.batchUpdate(updateChannels.subList(i, toIndex)) < 0;
|
result = result || channelMapper.batchUpdate(updateChannels.subList(i, toIndex)) > 0;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
result = result || channelMapper.batchUpdate(updateChannels) < 0;
|
result = channelMapper.batchUpdate(updateChannels) > 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (!result && !deleteChannels.isEmpty()) {
|
if (!result && !deleteChannels.isEmpty()) {
|
||||||
System.out.println("删除: " + deleteChannels.size());
|
|
||||||
if (deleteChannels.size() > limitCount) {
|
if (deleteChannels.size() > limitCount) {
|
||||||
for (int i = 0; i < deleteChannels.size(); i += limitCount) {
|
for (int i = 0; i < deleteChannels.size(); i += limitCount) {
|
||||||
int toIndex = i + limitCount;
|
int toIndex = i + limitCount;
|
||||||
|
@ -541,11 +540,10 @@ public class DeviceChannelServiceImpl implements IDeviceChannelService {
|
||||||
result = result || channelMapper.batchDel(deleteChannels.subList(i, toIndex)) < 0;
|
result = result || channelMapper.batchDel(deleteChannels.subList(i, toIndex)) < 0;
|
||||||
}
|
}
|
||||||
}else {
|
}else {
|
||||||
result = result || channelMapper.batchDel(deleteChannels) < 0;
|
result = channelMapper.batchDel(deleteChannels) < 0;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
return result;
|
||||||
return true;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -640,7 +640,6 @@ public class PlatformServiceImpl implements IPlatformService {
|
||||||
inviteInfo.setStatus(InviteSessionStatus.ok);
|
inviteInfo.setStatus(InviteSessionStatus.ok);
|
||||||
ResponseEvent responseEvent = (ResponseEvent) eventResult.event;
|
ResponseEvent responseEvent = (ResponseEvent) eventResult.event;
|
||||||
String contentString = new String(responseEvent.getResponse().getRawContent());
|
String contentString = new String(responseEvent.getResponse().getRawContent());
|
||||||
System.out.println(contentString);
|
|
||||||
String ssrcInResponse = SipUtils.getSsrcFromSdp(contentString);
|
String ssrcInResponse = SipUtils.getSsrcFromSdp(contentString);
|
||||||
// 兼容回复的消息中缺少ssrc(y字段)的情况
|
// 兼容回复的消息中缺少ssrc(y字段)的情况
|
||||||
if (ssrcInResponse == null) {
|
if (ssrcInResponse == null) {
|
||||||
|
|
|
@ -175,6 +175,7 @@ public class RegionServiceImpl implements IRegionService {
|
||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public boolean batchAdd(List<Region> regionList) {
|
public boolean batchAdd(List<Region> regionList) {
|
||||||
if (regionList== null || regionList.isEmpty()) {
|
if (regionList== null || regionList.isEmpty()) {
|
||||||
return false;
|
return false;
|
||||||
|
@ -190,7 +191,12 @@ public class RegionServiceImpl implements IRegionService {
|
||||||
regionMapForVerification.remove(region.getDeviceId());
|
regionMapForVerification.remove(region.getDeviceId());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
regionMapper.batchAdd(new ArrayList<>(regionMapForVerification.values()));
|
if (!regionMapForVerification.isEmpty()) {
|
||||||
return false;
|
List<Region> regions = new ArrayList<>(regionMapForVerification.values());
|
||||||
|
regionMapper.batchAdd(regions);
|
||||||
|
regionMapper.updateParentId(regions);
|
||||||
|
}
|
||||||
|
|
||||||
|
return true;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -74,7 +74,6 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp
|
||||||
@Transactional
|
@Transactional
|
||||||
public void handForDevice(RequestEvent evt, Device device, Element element) {
|
public void handForDevice(RequestEvent evt, Device device, Element element) {
|
||||||
taskQueue.offer(new HandlerCatchData(evt, device, element));
|
taskQueue.offer(new HandlerCatchData(evt, device, element));
|
||||||
System.out.println(evt.getRequest());
|
|
||||||
// 回复200 OK
|
// 回复200 OK
|
||||||
try {
|
try {
|
||||||
responseAck((SIPRequest) evt.getRequest(), Response.OK);
|
responseAck((SIPRequest) evt.getRequest(), Response.OK);
|
||||||
|
@ -187,7 +186,7 @@ public class CatalogResponseMessageHandler extends SIPRequestProcessorParent imp
|
||||||
|
|
||||||
List<Region> regionList = catalogDataCatch.getRegionList(device.getDeviceId());
|
List<Region> regionList = catalogDataCatch.getRegionList(device.getDeviceId());
|
||||||
if ( regionList!= null && !regionList.isEmpty()) {
|
if ( regionList!= null && !regionList.isEmpty()) {
|
||||||
result &= regionService.batchAdd(catalogDataCatch.getRegionList(device.getDeviceId()));
|
result &= regionService.batchAdd(regionList);
|
||||||
}
|
}
|
||||||
|
|
||||||
List<Group> groupList = catalogDataCatch.getGroupList(device.getDeviceId());
|
List<Group> groupList = catalogDataCatch.getGroupList(device.getDeviceId());
|
||||||
|
|
|
@ -227,7 +227,6 @@ public class ZLMServerFactory {
|
||||||
if (sendRtpItem.getLocalPort() != 0) {
|
if (sendRtpItem.getLocalPort() != 0) {
|
||||||
if (sendRtpItem.isTcpActive()) {
|
if (sendRtpItem.isTcpActive()) {
|
||||||
startSendRtpStreamResult = startSendRtpPassive(mediaInfo, param);
|
startSendRtpStreamResult = startSendRtpPassive(mediaInfo, param);
|
||||||
System.out.println(JSON.toJSON(param));
|
|
||||||
}else {
|
}else {
|
||||||
param.put("is_udp", is_Udp);
|
param.put("is_udp", is_Udp);
|
||||||
param.put("dst_url", sendRtpItem.getIp());
|
param.put("dst_url", sendRtpItem.getIp());
|
||||||
|
|
|
@ -1,38 +1,40 @@
|
||||||
编号,名称,上级
|
编号,名称,上级
|
||||||
11,北京市,
|
11,北京市,
|
||||||
110101,东城区,11
|
1101,市辖区,11
|
||||||
110102,西城区,11
|
110101,东城区,1101
|
||||||
110105,朝阳区,11
|
110102,西城区,1101
|
||||||
110106,丰台区,11
|
110105,朝阳区,1101
|
||||||
110107,石景山区,11
|
110106,丰台区,1101
|
||||||
110108,海淀区,11
|
110107,石景山区,1101
|
||||||
110109,门头沟区,11
|
110108,海淀区,1101
|
||||||
110111,房山区,11
|
110109,门头沟区,1101
|
||||||
110112,通州区,11
|
110111,房山区,1101
|
||||||
110113,顺义区,11
|
110112,通州区,1101
|
||||||
110114,昌平区,11
|
110113,顺义区,1101
|
||||||
110115,大兴区,11
|
110114,昌平区,1101
|
||||||
110116,怀柔区,11
|
110115,大兴区,1101
|
||||||
110117,平谷区,11
|
110116,怀柔区,1101
|
||||||
110118,密云区,11
|
110117,平谷区,1101
|
||||||
110119,延庆区,11
|
110118,密云区,1101
|
||||||
|
110119,延庆区,1101
|
||||||
12,天津市,
|
12,天津市,
|
||||||
120101,和平区,12
|
1201,市辖区,12
|
||||||
120102,河东区,12
|
120101,和平区,1201
|
||||||
120103,河西区,12
|
120102,河东区,1201
|
||||||
120104,南开区,12
|
120103,河西区,1201
|
||||||
120105,河北区,12
|
120104,南开区,1201
|
||||||
120106,红桥区,12
|
120105,河北区,1201
|
||||||
120110,东丽区,12
|
120106,红桥区,1201
|
||||||
120111,西青区,12
|
120110,东丽区,1201
|
||||||
120112,津南区,12
|
120111,西青区,1201
|
||||||
120113,北辰区,12
|
120112,津南区,1201
|
||||||
120114,武清区,12
|
120113,北辰区,1201
|
||||||
120115,宝坻区,12
|
120114,武清区,1201
|
||||||
120116,滨海新区,12
|
120115,宝坻区,1201
|
||||||
120117,宁河区,12
|
120116,滨海新区,1201
|
||||||
120118,静海区,12
|
120117,宁河区,1201
|
||||||
120119,蓟州区,12
|
120118,静海区,1201
|
||||||
|
120119,蓟州区,1201
|
||||||
13,河北省,
|
13,河北省,
|
||||||
1301,石家庄市,13
|
1301,石家庄市,13
|
||||||
130102,长安区,1301
|
130102,长安区,1301
|
||||||
|
@ -786,22 +788,23 @@
|
||||||
232721,呼玛县,2327
|
232721,呼玛县,2327
|
||||||
232722,塔河县,2327
|
232722,塔河县,2327
|
||||||
31,上海市,
|
31,上海市,
|
||||||
310101,黄浦区,31
|
3101,市辖区,31
|
||||||
310104,徐汇区,31
|
310101,黄浦区,3101
|
||||||
310105,长宁区,31
|
310104,徐汇区,3101
|
||||||
310106,静安区,31
|
310105,长宁区,3101
|
||||||
310107,普陀区,31
|
310106,静安区,3101
|
||||||
310109,虹口区,31
|
310107,普陀区,3101
|
||||||
310110,杨浦区,31
|
310109,虹口区,3101
|
||||||
310112,闵行区,31
|
310110,杨浦区,3101
|
||||||
310113,宝山区,31
|
310112,闵行区,3101
|
||||||
310114,嘉定区,31
|
310113,宝山区,3101
|
||||||
310115,浦东新区,31
|
310114,嘉定区,3101
|
||||||
310116,金山区,31
|
310115,浦东新区,3101
|
||||||
310117,松江区,31
|
310116,金山区,3101
|
||||||
310118,青浦区,31
|
310117,松江区,3101
|
||||||
310120,奉贤区,31
|
310118,青浦区,3101
|
||||||
310151,崇明区,31
|
310120,奉贤区,3101
|
||||||
|
310151,崇明区,3101
|
||||||
32,江苏省,
|
32,江苏省,
|
||||||
3201,南京市,32
|
3201,南京市,32
|
||||||
320102,玄武区,3201
|
320102,玄武区,3201
|
||||||
|
@ -2226,44 +2229,45 @@
|
||||||
469029,保亭黎族苗族自治县,46
|
469029,保亭黎族苗族自治县,46
|
||||||
469030,琼中黎族苗族自治县,46
|
469030,琼中黎族苗族自治县,46
|
||||||
50,重庆市,
|
50,重庆市,
|
||||||
500101,万州区,50
|
5001,市辖区,50
|
||||||
500102,涪陵区,50
|
500101,万州区,5001
|
||||||
500103,渝中区,50
|
500102,涪陵区,5001
|
||||||
500104,大渡口区,50
|
500103,渝中区,5001
|
||||||
500105,江北区,50
|
500104,大渡口区,5001
|
||||||
500106,沙坪坝区,50
|
500105,江北区,5001
|
||||||
500107,九龙坡区,50
|
500106,沙坪坝区,5001
|
||||||
500108,南岸区,50
|
500107,九龙坡区,5001
|
||||||
500109,北碚区,50
|
500108,南岸区,5001
|
||||||
500110,綦江区,50
|
500109,北碚区,5001
|
||||||
500111,大足区,50
|
500110,綦江区,5001
|
||||||
500112,渝北区,50
|
500111,大足区,5001
|
||||||
500113,巴南区,50
|
500112,渝北区,5001
|
||||||
500114,黔江区,50
|
500113,巴南区,5001
|
||||||
500115,长寿区,50
|
500114,黔江区,5001
|
||||||
500116,江津区,50
|
500115,长寿区,5001
|
||||||
500117,合川区,50
|
500116,江津区,5001
|
||||||
500118,永川区,50
|
500117,合川区,5001
|
||||||
500119,南川区,50
|
500118,永川区,5001
|
||||||
500120,璧山区,50
|
500119,南川区,5001
|
||||||
500151,铜梁区,50
|
500120,璧山区,5001
|
||||||
500152,潼南区,50
|
500151,铜梁区,5001
|
||||||
500153,荣昌区,50
|
500152,潼南区,5001
|
||||||
500154,开州区,50
|
500153,荣昌区,5001
|
||||||
500155,梁平区,50
|
500154,开州区,5001
|
||||||
500156,武隆区,50
|
500155,梁平区,5001
|
||||||
500229,城口县,50
|
500156,武隆区,5001
|
||||||
500230,丰都县,50
|
500229,城口县,5001
|
||||||
500231,垫江县,50
|
500230,丰都县,5001
|
||||||
500233,忠县,50
|
500231,垫江县,5001
|
||||||
500235,云阳县,50
|
500233,忠县,5001
|
||||||
500236,奉节县,50
|
500235,云阳县,5001
|
||||||
500237,巫山县,50
|
500236,奉节县,5001
|
||||||
500238,巫溪县,50
|
500237,巫山县,5001
|
||||||
500240,石柱土家族自治县,50
|
500238,巫溪县,5001
|
||||||
500241,秀山土家族苗族自治县,50
|
500240,石柱土家族自治县,5001
|
||||||
500242,酉阳土家族苗族自治县,50
|
500241,秀山土家族苗族自治县,5001
|
||||||
500243,彭水苗族土家族自治县,50
|
500242,酉阳土家族苗族自治县,5001
|
||||||
|
500243,彭水苗族土家族自治县,5001
|
||||||
51,四川省,
|
51,四川省,
|
||||||
5101,成都市,51
|
5101,成都市,51
|
||||||
510104,锦江区,5101
|
510104,锦江区,5101
|
||||||
|
@ -3217,4 +3221,4 @@
|
||||||
659009,昆玉市,65
|
659009,昆玉市,65
|
||||||
71,台湾省,
|
71,台湾省,
|
||||||
81,香港特别行政区,
|
81,香港特别行政区,
|
||||||
82,澳门特别行政区,
|
82,澳门特别行政区,
|
||||||
|
|
|
|
@ -224,54 +224,9 @@ export default {
|
||||||
let parent = ''
|
let parent = ''
|
||||||
if (this.activeKey === '1') {
|
if (this.activeKey === '1') {
|
||||||
parent = this.allVal[0].val
|
parent = this.allVal[0].val
|
||||||
if (parent === '11' || parent === '12' || parent === '31') {
|
|
||||||
this.regionList = []
|
|
||||||
this.regionList.push({
|
|
||||||
// 数据库自增ID
|
|
||||||
commonRegionId: -1,
|
|
||||||
// 区域国标编号
|
|
||||||
deviceId: parent + '01',
|
|
||||||
// 区域名称
|
|
||||||
name: '市辖区',
|
|
||||||
// 父区域国标ID
|
|
||||||
commonRegionParentId: parent,
|
|
||||||
})
|
|
||||||
console.log(this.regionList)
|
|
||||||
return
|
|
||||||
} else if (parent === '50') {
|
|
||||||
this.regionList = [
|
|
||||||
{
|
|
||||||
// 数据库自增ID
|
|
||||||
commonRegionId: -1,
|
|
||||||
// 区域国标编号
|
|
||||||
deviceId: parent + '01',
|
|
||||||
// 区域名称
|
|
||||||
name: '市辖区',
|
|
||||||
// 父区域国标ID
|
|
||||||
commonRegionParentId: parent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 数据库自增ID
|
|
||||||
commonRegionId: -1,
|
|
||||||
// 区域国标编号
|
|
||||||
deviceId: parent + '02',
|
|
||||||
// 区域名称
|
|
||||||
name: '县',
|
|
||||||
// 父区域国标ID
|
|
||||||
commonRegionParentId: parent,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.activeKey === '2') {
|
if (this.activeKey === '2') {
|
||||||
if (this.allVal[0].val === '11' || this.allVal[0].val === '12' || this.allVal[0].val === '31' || this.allVal[0].val === '50') {
|
parent = this.allVal[0].val + this.allVal[1].val
|
||||||
parent = this.allVal[0].val
|
|
||||||
} else {
|
|
||||||
parent = this.allVal[0].val + this.allVal[1].val
|
|
||||||
}
|
|
||||||
|
|
||||||
console.log(parent)
|
|
||||||
}
|
}
|
||||||
if (this.activeKey !== '0' && parent === '') {
|
if (this.activeKey !== '0' && parent === '') {
|
||||||
this.$message.error('请先选择上级行政区划');
|
this.$message.error('请先选择上级行政区划');
|
||||||
|
|
|
@ -200,56 +200,13 @@ export default {
|
||||||
let parent = ''
|
let parent = ''
|
||||||
if (this.activeKey === '1') {
|
if (this.activeKey === '1') {
|
||||||
parent = this.allVal[0].val
|
parent = this.allVal[0].val
|
||||||
|
|
||||||
if (parent === '11' || parent === '12' || parent === '31') {
|
|
||||||
this.regionList = []
|
|
||||||
this.regionList.push({
|
|
||||||
// 数据库自增ID
|
|
||||||
commonRegionId: -1,
|
|
||||||
// 区域国标编号
|
|
||||||
deviceId: parent + '01',
|
|
||||||
// 区域名称
|
|
||||||
name: '市辖区',
|
|
||||||
// 父区域国标ID
|
|
||||||
commonRegionParentId: parent,
|
|
||||||
})
|
|
||||||
console.log(this.regionList)
|
|
||||||
return
|
|
||||||
} else if (parent === '50') {
|
|
||||||
this.regionList = [
|
|
||||||
{
|
|
||||||
// 数据库自增ID
|
|
||||||
commonRegionId: -1,
|
|
||||||
// 区域国标编号
|
|
||||||
deviceId: parent + '01',
|
|
||||||
// 区域名称
|
|
||||||
name: '市辖区',
|
|
||||||
// 父区域国标ID
|
|
||||||
commonRegionParentId: parent,
|
|
||||||
},
|
|
||||||
{
|
|
||||||
// 数据库自增ID
|
|
||||||
commonRegionId: -1,
|
|
||||||
// 区域国标编号
|
|
||||||
deviceId: parent + '02',
|
|
||||||
// 区域名称
|
|
||||||
name: '县',
|
|
||||||
// 父区域国标ID
|
|
||||||
commonRegionParentId: parent,
|
|
||||||
},
|
|
||||||
]
|
|
||||||
return
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
if (this.activeKey === '2') {
|
if (this.activeKey === '2') {
|
||||||
if (this.allVal[1].val === ""){
|
if (this.allVal[1].val === ""){
|
||||||
parent = ""
|
parent = ""
|
||||||
}else if (this.allVal[0].val === '11' || this.allVal[0].val === '12' || this.allVal[0].val === '31' || this.allVal[0].val === '50') {
|
|
||||||
parent = this.allVal[0].val
|
|
||||||
} else {
|
} else {
|
||||||
parent = this.allVal[0].val + this.allVal[1].val
|
parent = this.allVal[0].val + this.allVal[1].val
|
||||||
}
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
if (this.activeKey !== '0' && parent === '') {
|
if (this.activeKey !== '0' && parent === '') {
|
||||||
this.$message.error('请先选择上级行政区划');
|
this.$message.error('请先选择上级行政区划');
|
||||||
|
|
Loading…
Reference in New Issue