增加新的静态文件放过

结构优化
648540858 2023-10-27 10:45:35 +08:00
parent 89fd69b5ab
commit a73508a24c
2 changed files with 33 additions and 18 deletions

View File

@ -75,6 +75,10 @@ public class WebSecurityConfig extends WebSecurityConfigurerAdapter {
matchers.add("/js/**"); matchers.add("/js/**");
matchers.add("/api/device/query/snap/**"); matchers.add("/api/device/query/snap/**");
matchers.add("/record_proxy/*/**"); matchers.add("/record_proxy/*/**");
matchers.add("/_app.config.js");
matchers.add("/assets/**");
matchers.add("/resource/**");
matchers.add("/favicon.ico");
matchers.addAll(userSetting.getInterfaceAuthenticationExcludes()); matchers.addAll(userSetting.getInterfaceAuthenticationExcludes());
// 可以直接访问的静态数据 // 可以直接访问的静态数据
web.ignoring().antMatchers(matchers.toArray(new String[0])); web.ignoring().antMatchers(matchers.toArray(new String[0]));

View File

@ -1,5 +1,6 @@
package com.genersoft.iot.vmp.service.impl; package com.genersoft.iot.vmp.service.impl;
import com.genersoft.iot.vmp.common.CivilCodePo;
import com.genersoft.iot.vmp.common.CommonGbChannel; import com.genersoft.iot.vmp.common.CommonGbChannel;
import com.genersoft.iot.vmp.conf.CivilCodeFileConf; import com.genersoft.iot.vmp.conf.CivilCodeFileConf;
import com.genersoft.iot.vmp.gb28181.bean.Device; import com.genersoft.iot.vmp.gb28181.bean.Device;
@ -128,9 +129,14 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
&& &&
!regionMap.containsKey(deviceChannel.getChannelId()) !regionMap.containsKey(deviceChannel.getChannelId())
) { ) {
CivilCodePo parentCivilCodePo = civilCodeFileConf.getParentCode(deviceChannel.getChannelId());
String civilCode = null;
if (parentCivilCodePo != null) {
civilCode = parentCivilCodePo.getCode();
}
// 行政区划条目 // 行政区划条目
Region region = Region.getInstance(deviceChannel.getChannelId(), deviceChannel.getName(), Region region = Region.getInstance(deviceChannel.getChannelId(), deviceChannel.getName(),
civilCodeFileConf.getParentCode(deviceChannel.getChannelId()).getCode()); civilCode);
regionMap.put(deviceChannel.getChannelId(), region); regionMap.put(deviceChannel.getChannelId(), region);
} }
if (channelIdType == Gb28181CodeType.BUSINESS_GROUP if (channelIdType == Gb28181CodeType.BUSINESS_GROUP
@ -386,6 +392,7 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
commonGbChannel.setCommonGbManufacturer(deviceChannel.getManufacture()); commonGbChannel.setCommonGbManufacturer(deviceChannel.getManufacture());
commonGbChannel.setCommonGbModel(deviceChannel.getModel()); commonGbChannel.setCommonGbModel(deviceChannel.getModel());
commonGbChannel.setCommonGbOwner(deviceChannel.getOwner()); commonGbChannel.setCommonGbOwner(deviceChannel.getOwner());
if (deviceChannel.getCivilCode() != null) {
Gb28181CodeType channelIdType = SipUtils.getChannelIdType(deviceChannel.getCivilCode()); Gb28181CodeType channelIdType = SipUtils.getChannelIdType(deviceChannel.getCivilCode());
if (channelIdType == Gb28181CodeType.CIVIL_CODE_PROVINCE if (channelIdType == Gb28181CodeType.CIVIL_CODE_PROVINCE
|| channelIdType == Gb28181CodeType.CIVIL_CODE_CITY || channelIdType == Gb28181CodeType.CIVIL_CODE_CITY
@ -399,6 +406,7 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
deviceChannel.getChannelId(), deviceChannel.getChannelId(),
deviceChannel.getCivilCode()); deviceChannel.getCivilCode());
} }
}
commonGbChannel.setCommonGbCivilCode(deviceChannel.getCivilCode()); commonGbChannel.setCommonGbCivilCode(deviceChannel.getCivilCode());
commonGbChannel.setCommonGbBlock(deviceChannel.getBlock()); commonGbChannel.setCommonGbBlock(deviceChannel.getBlock());
@ -443,6 +451,9 @@ public class CommonGbChannelServiceImpl implements ICommonGbChannelService {
commonGbChannel.setCommonGbOwner(deviceChannel.getOwner()); commonGbChannel.setCommonGbOwner(deviceChannel.getOwner());
break; break;
case "commonGbCivilCode": case "commonGbCivilCode":
if (deviceChannel.getCivilCode() == null) {
break;
}
Gb28181CodeType channelIdType = SipUtils.getChannelIdType(deviceChannel.getCivilCode()); Gb28181CodeType channelIdType = SipUtils.getChannelIdType(deviceChannel.getCivilCode());
if (channelIdType == Gb28181CodeType.CIVIL_CODE_PROVINCE if (channelIdType == Gb28181CodeType.CIVIL_CODE_PROVINCE
|| channelIdType == Gb28181CodeType.CIVIL_CODE_CITY || channelIdType == Gb28181CodeType.CIVIL_CODE_CITY