Commit 59ef6e67d3a1357c19039527dac47747e2ac20fe
1 parent
c8f9f19c
统一国标设备与级联平台字符集的使用
Showing
8 changed files
with
46 additions
and
96 deletions
src/main/java/com/genersoft/iot/vmp/gb28181/bean/Device.java
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/SIPRequestHeaderPlarformProvider.java
| ... | ... | @@ -223,7 +223,7 @@ public class SIPRequestHeaderPlarformProvider { |
| 223 | 223 | CSeqHeader cSeqHeader = sipFactory.createHeaderFactory().createCSeqHeader(redisCatchStorage.getCSEQ(Request.MESSAGE), Request.MESSAGE); |
| 224 | 224 | MessageFactoryImpl messageFactory = (MessageFactoryImpl) sipFactory.createMessageFactory(); |
| 225 | 225 | // 设置编码, 防止中文乱码 |
| 226 | - messageFactory.setDefaultContentEncodingCharset("gb2312"); | |
| 226 | + messageFactory.setDefaultContentEncodingCharset(parentPlatform.getCharacterSet()); | |
| 227 | 227 | request = messageFactory.createRequest(requestURI, Request.MESSAGE, callIdHeader, cSeqHeader, fromHeader, |
| 228 | 228 | toHeader, viaHeaders, maxForwards); |
| 229 | 229 | List<String> agentParam = new ArrayList<>(); |
| ... | ... | @@ -235,58 +235,4 @@ public class SIPRequestHeaderPlarformProvider { |
| 235 | 235 | request.setContent(content, contentTypeHeader); |
| 236 | 236 | return request; |
| 237 | 237 | } |
| 238 | - | |
| 239 | -// public Request createNotifyRequest(ParentPlatform parentPlatform, String content, CallIdHeader callIdHeader, String viaTag, String fromTag, SubscribeInfo subscribeInfo) throws PeerUnavailableException, ParseException, InvalidArgumentException { | |
| 240 | -// Request request = null; | |
| 241 | -// // sipuri | |
| 242 | -// SipURI requestURI = sipFactory.createAddressFactory().createSipURI(parentPlatform.getServerGBId(), parentPlatform.getServerIP()+ ":" + parentPlatform.getServerPort()); | |
| 243 | -// // via | |
| 244 | -// ArrayList<ViaHeader> viaHeaders = new ArrayList<ViaHeader>(); | |
| 245 | -// ViaHeader viaHeader = sipFactory.createHeaderFactory().createViaHeader(parentPlatform.getDeviceIp(), Integer.parseInt(parentPlatform.getDevicePort()), | |
| 246 | -// parentPlatform.getTransport(), viaTag); | |
| 247 | -// viaHeader.setRPort(); | |
| 248 | -// viaHeaders.add(viaHeader); | |
| 249 | -// // from | |
| 250 | -// SipURI fromSipURI = sipFactory.createAddressFactory().createSipURI(parentPlatform.getDeviceGBId(), | |
| 251 | -// parentPlatform.getDeviceIp() + ":" + parentPlatform.getDevicePort()); | |
| 252 | -// Address fromAddress = sipFactory.createAddressFactory().createAddress(fromSipURI); | |
| 253 | -// FromHeader fromHeader = sipFactory.createHeaderFactory().createFromHeader(fromAddress, fromTag); | |
| 254 | -// // to | |
| 255 | -// SipURI toSipURI = sipFactory.createAddressFactory().createSipURI(parentPlatform.getServerGBId(), parentPlatform.getServerGBDomain()); | |
| 256 | -// Address toAddress = sipFactory.createAddressFactory().createAddress(toSipURI); | |
| 257 | -// ToHeader toHeader = sipFactory.createHeaderFactory().createToHeader(toAddress, subscribeInfo.getFromTag()); | |
| 258 | -// | |
| 259 | -// // Forwards | |
| 260 | -// MaxForwardsHeader maxForwards = sipFactory.createHeaderFactory().createMaxForwardsHeader(70); | |
| 261 | -// // ceq | |
| 262 | -// CSeqHeader cSeqHeader = sipFactory.createHeaderFactory().createCSeqHeader(redisCatchStorage.getCSEQ(Request.NOTIFY), Request.NOTIFY); | |
| 263 | -// MessageFactoryImpl messageFactory = (MessageFactoryImpl) sipFactory.createMessageFactory(); | |
| 264 | -// // 设置编码, 防止中文乱码 | |
| 265 | -// messageFactory.setDefaultContentEncodingCharset("gb2312"); | |
| 266 | -// request = messageFactory.createRequest(requestURI, Request.NOTIFY, callIdHeader, cSeqHeader, fromHeader, | |
| 267 | -// toHeader, viaHeaders, maxForwards); | |
| 268 | -// List<String> agentParam = new ArrayList<>(); | |
| 269 | -// agentParam.add("wvp-pro"); | |
| 270 | -// UserAgentHeader userAgentHeader = sipFactory.createHeaderFactory().createUserAgentHeader(agentParam); | |
| 271 | -// request.addHeader(userAgentHeader); | |
| 272 | -// | |
| 273 | -// EventHeader event = sipFactory.createHeaderFactory().createEventHeader(subscribeInfo.getEventType()); | |
| 274 | -// if (subscribeInfo.getEventId() != null) { | |
| 275 | -// event.setEventId(subscribeInfo.getEventId()); | |
| 276 | -// } | |
| 277 | -// | |
| 278 | -// request.addHeader(event); | |
| 279 | -// | |
| 280 | -// SubscriptionStateHeader active = sipFactory.createHeaderFactory().createSubscriptionStateHeader("active"); | |
| 281 | -// request.setHeader(active); | |
| 282 | -// | |
| 283 | -// String sipAddress = sipConfig.getIp() + ":" + sipConfig.getPort(); | |
| 284 | -// Address concatAddress = sipFactory.createAddressFactory().createAddress(sipFactory.createAddressFactory() | |
| 285 | -// .createSipURI(parentPlatform.getDeviceGBId(), sipAddress)); | |
| 286 | -// request.addHeader(sipFactory.createHeaderFactory().createContactHeader(concatAddress)); | |
| 287 | -// | |
| 288 | -// ContentTypeHeader contentTypeHeader = sipFactory.createHeaderFactory().createContentTypeHeader("Application", "MANSCDP+xml"); | |
| 289 | -// request.setContent(content, contentTypeHeader); | |
| 290 | -// return request; | |
| 291 | -// } | |
| 292 | 238 | } | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommander.java
| ... | ... | @@ -1120,8 +1120,9 @@ public class SIPCommander implements ISIPCommander { |
| 1120 | 1120 | @Override |
| 1121 | 1121 | public boolean deviceStatusQuery(Device device, SipSubscribe.Event errorEvent) { |
| 1122 | 1122 | try { |
| 1123 | + String charset = device.getCharset(); | |
| 1123 | 1124 | StringBuffer catalogXml = new StringBuffer(200); |
| 1124 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1125 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1125 | 1126 | catalogXml.append("<Query>\r\n"); |
| 1126 | 1127 | catalogXml.append("<CmdType>DeviceStatus</CmdType>\r\n"); |
| 1127 | 1128 | catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1153,7 +1154,8 @@ public class SIPCommander implements ISIPCommander { |
| 1153 | 1154 | public boolean deviceInfoQuery(Device device) { |
| 1154 | 1155 | try { |
| 1155 | 1156 | StringBuffer catalogXml = new StringBuffer(200); |
| 1156 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1157 | + String charset = device.getCharset(); | |
| 1158 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1157 | 1159 | catalogXml.append("<Query>\r\n"); |
| 1158 | 1160 | catalogXml.append("<CmdType>DeviceInfo</CmdType>\r\n"); |
| 1159 | 1161 | catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1185,7 +1187,8 @@ public class SIPCommander implements ISIPCommander { |
| 1185 | 1187 | public boolean catalogQuery(Device device, SipSubscribe.Event errorEvent) { |
| 1186 | 1188 | try { |
| 1187 | 1189 | StringBuffer catalogXml = new StringBuffer(200); |
| 1188 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1190 | + String charset = device.getCharset(); | |
| 1191 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1189 | 1192 | catalogXml.append("<Query>\r\n"); |
| 1190 | 1193 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 1191 | 1194 | catalogXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1224,7 +1227,8 @@ public class SIPCommander implements ISIPCommander { |
| 1224 | 1227 | } |
| 1225 | 1228 | try { |
| 1226 | 1229 | StringBuffer recordInfoXml = new StringBuffer(200); |
| 1227 | - recordInfoXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1230 | + String charset = device.getCharset(); | |
| 1231 | + recordInfoXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1228 | 1232 | recordInfoXml.append("<Query>\r\n"); |
| 1229 | 1233 | recordInfoXml.append("<CmdType>RecordInfo</CmdType>\r\n"); |
| 1230 | 1234 | recordInfoXml.append("<SN>" + sn + "</SN>\r\n"); |
| ... | ... | @@ -1396,7 +1400,8 @@ public class SIPCommander implements ISIPCommander { |
| 1396 | 1400 | public boolean mobilePostitionQuery(Device device, SipSubscribe.Event errorEvent) { |
| 1397 | 1401 | try { |
| 1398 | 1402 | StringBuffer mobilePostitionXml = new StringBuffer(200); |
| 1399 | - mobilePostitionXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1403 | + String charset = device.getCharset(); | |
| 1404 | + mobilePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1400 | 1405 | mobilePostitionXml.append("<Query>\r\n"); |
| 1401 | 1406 | mobilePostitionXml.append("<CmdType>MobilePosition</CmdType>\r\n"); |
| 1402 | 1407 | mobilePostitionXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1431,7 +1436,8 @@ public class SIPCommander implements ISIPCommander { |
| 1431 | 1436 | public boolean mobilePositionSubscribe(Device device, int expires, int interval) { |
| 1432 | 1437 | try { |
| 1433 | 1438 | StringBuffer subscribePostitionXml = new StringBuffer(200); |
| 1434 | - subscribePostitionXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1439 | + String charset = device.getCharset(); | |
| 1440 | + subscribePostitionXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1435 | 1441 | subscribePostitionXml.append("<Query>\r\n"); |
| 1436 | 1442 | subscribePostitionXml.append("<CmdType>MobilePosition</CmdType>\r\n"); |
| 1437 | 1443 | subscribePostitionXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1473,7 +1479,8 @@ public class SIPCommander implements ISIPCommander { |
| 1473 | 1479 | public boolean alarmSubscribe(Device device, int expires, String startPriority, String endPriority, String alarmMethod, String alarmType, String startTime, String endTime) { |
| 1474 | 1480 | try { |
| 1475 | 1481 | StringBuffer cmdXml = new StringBuffer(200); |
| 1476 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1482 | + String charset = device.getCharset(); | |
| 1483 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1477 | 1484 | cmdXml.append("<Query>\r\n"); |
| 1478 | 1485 | cmdXml.append("<CmdType>Alarm</CmdType>\r\n"); |
| 1479 | 1486 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -1518,7 +1525,8 @@ public class SIPCommander implements ISIPCommander { |
| 1518 | 1525 | public boolean catalogSubscribe(Device device, SipSubscribe.Event okEvent, SipSubscribe.Event errorEvent) { |
| 1519 | 1526 | try { |
| 1520 | 1527 | StringBuffer cmdXml = new StringBuffer(200); |
| 1521 | - cmdXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 1528 | + String charset = device.getCharset(); | |
| 1529 | + cmdXml.append("<?xml version=\"1.0\" encoding=\"" + charset + "\"?>\r\n"); | |
| 1522 | 1530 | cmdXml.append("<Query>\r\n"); |
| 1523 | 1531 | cmdXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 1524 | 1532 | cmdXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/cmd/impl/SIPCommanderFroPlatform.java
| ... | ... | @@ -215,8 +215,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 215 | 215 | return false; |
| 216 | 216 | } |
| 217 | 217 | try { |
| 218 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 218 | 219 | StringBuffer catalogXml = new StringBuffer(600); |
| 219 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 220 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet +"\"?>\r\n"); | |
| 220 | 221 | catalogXml.append("<Response>\r\n"); |
| 221 | 222 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 222 | 223 | catalogXml.append("<SN>" +sn + "</SN>\r\n"); |
| ... | ... | @@ -280,8 +281,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 280 | 281 | return false; |
| 281 | 282 | } |
| 282 | 283 | try { |
| 284 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 283 | 285 | StringBuffer deviceInfoXml = new StringBuffer(600); |
| 284 | - deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 286 | + deviceInfoXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 285 | 287 | deviceInfoXml.append("<Response>\r\n"); |
| 286 | 288 | deviceInfoXml.append("<CmdType>DeviceInfo</CmdType>\r\n"); |
| 287 | 289 | deviceInfoXml.append("<SN>" +sn + "</SN>\r\n"); |
| ... | ... | @@ -319,8 +321,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 319 | 321 | return false; |
| 320 | 322 | } |
| 321 | 323 | try { |
| 324 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 322 | 325 | StringBuffer deviceStatusXml = new StringBuffer(600); |
| 323 | - deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 326 | + deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 324 | 327 | deviceStatusXml.append("<Response>\r\n"); |
| 325 | 328 | deviceStatusXml.append("<CmdType>DeviceStatus</CmdType>\r\n"); |
| 326 | 329 | deviceStatusXml.append("<SN>" +sn + "</SN>\r\n"); |
| ... | ... | @@ -350,8 +353,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 350 | 353 | } |
| 351 | 354 | |
| 352 | 355 | try { |
| 356 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 353 | 357 | StringBuffer deviceStatusXml = new StringBuffer(600); |
| 354 | - deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 358 | + deviceStatusXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 355 | 359 | deviceStatusXml.append("<Notify>\r\n"); |
| 356 | 360 | deviceStatusXml.append("<CmdType>MobilePosition</CmdType>\r\n"); |
| 357 | 361 | deviceStatusXml.append("<SN>" + (int)((Math.random()*9+1)*100000) + "</SN>\r\n"); |
| ... | ... | @@ -418,8 +422,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 418 | 422 | SubscribeInfo subscribeInfo, SipSubscribe.Event errorEvent, SipSubscribe.Event okEvent ) |
| 419 | 423 | throws NoSuchFieldException, IllegalAccessException, SipException, ParseException { |
| 420 | 424 | MessageFactoryImpl messageFactory = (MessageFactoryImpl) sipFactory.createMessageFactory(); |
| 425 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 421 | 426 | // 设置编码, 防止中文乱码 |
| 422 | - messageFactory.setDefaultContentEncodingCharset("gb2312"); | |
| 427 | + messageFactory.setDefaultContentEncodingCharset(characterSet); | |
| 423 | 428 | Dialog dialog = subscribeInfo.getDialog(); |
| 424 | 429 | if (dialog == null) return; |
| 425 | 430 | SIPRequest notifyRequest = (SIPRequest)dialog.createRequest(Request.NOTIFY); |
| ... | ... | @@ -462,27 +467,13 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 462 | 467 | |
| 463 | 468 | } |
| 464 | 469 | |
| 465 | -// private Request getCatalogNotifyRequestForCatalogAddOrUpdate(ParentPlatform parentPlatform, DeviceChannel channel, int size, String type, | |
| 466 | -// SubscribeInfo subscribeInfo) throws ParseException, InvalidArgumentException, | |
| 467 | -// PeerUnavailableException, NoSuchFieldException, IllegalAccessException { | |
| 468 | -// String catalogXmlContent = getCatalogXmlContentForCatalogAddOrUpdate(parentPlatform, channel, size, type, subscribeInfo); | |
| 469 | -// | |
| 470 | -// CallIdHeader callIdHeader = parentPlatform.getTransport().equals("TCP") ? tcpSipProvider.getNewCallId() | |
| 471 | -// : udpSipProvider.getNewCallId(); | |
| 472 | -// callIdHeader.setCallId(subscribeInfo.getCallId()); | |
| 473 | -// String tm = Long.toString(System.currentTimeMillis()); | |
| 474 | -// | |
| 475 | -// Request request = headerProviderPlarformProvider.createNotifyRequest(parentPlatform, catalogXmlContent, | |
| 476 | -// callIdHeader, "z9hG4bK-" + UUID.randomUUID().toString().replace("-", ""),"FromRegister" + tm, subscribeInfo); | |
| 477 | -// return request; | |
| 478 | -// } | |
| 479 | - | |
| 480 | 470 | private String getCatalogXmlContentForCatalogAddOrUpdate(ParentPlatform parentPlatform, DeviceChannel channel, int sumNum, String type, SubscribeInfo subscribeInfo) { |
| 481 | 471 | StringBuffer catalogXml = new StringBuffer(600); |
| 482 | 472 | if (parentPlatform.getServerGBId().equals(channel.getParentId())) { |
| 483 | 473 | channel.setParentId(parentPlatform.getDeviceGBId()); |
| 484 | 474 | } |
| 485 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 475 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 476 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 486 | 477 | catalogXml.append("<Notify>\r\n"); |
| 487 | 478 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 488 | 479 | catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); |
| ... | ... | @@ -554,8 +545,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 554 | 545 | if (parentPlatform.getServerGBId().equals(channel.getParentId())) { |
| 555 | 546 | channel.setParentId(parentPlatform.getDeviceGBId()); |
| 556 | 547 | } |
| 548 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 557 | 549 | StringBuffer catalogXml = new StringBuffer(600); |
| 558 | - catalogXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 550 | + catalogXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 559 | 551 | catalogXml.append("<Notify>\r\n"); |
| 560 | 552 | catalogXml.append("<CmdType>Catalog</CmdType>\r\n"); |
| 561 | 553 | catalogXml.append("<SN>" + (int) ((Math.random() * 9 + 1) * 100000) + "</SN>\r\n"); |
| ... | ... | @@ -576,8 +568,9 @@ public class SIPCommanderFroPlatform implements ISIPCommanderForPlatform { |
| 576 | 568 | return false; |
| 577 | 569 | } |
| 578 | 570 | try { |
| 571 | + String characterSet = parentPlatform.getCharacterSet(); | |
| 579 | 572 | StringBuffer recordXml = new StringBuffer(600); |
| 580 | - recordXml.append("<?xml version=\"1.0\" encoding=\"GB2312\"?>\r\n"); | |
| 573 | + recordXml.append("<?xml version=\"1.0\" encoding=\"" + characterSet + "\"?>\r\n"); | |
| 581 | 574 | recordXml.append("<Response>\r\n"); |
| 582 | 575 | recordXml.append("<CmdType>RecordInfo</CmdType>\r\n"); |
| 583 | 576 | recordXml.append("<SN>" +recordInfo.getSn() + "</SN>\r\n"); | ... | ... |
src/main/java/com/genersoft/iot/vmp/gb28181/transmit/event/request/impl/RegisterRequestProcessor.java
| ... | ... | @@ -155,7 +155,7 @@ public class RegisterRequestProcessor extends SIPRequestProcessorParent implemen |
| 155 | 155 | if (device == null) { |
| 156 | 156 | device = new Device(); |
| 157 | 157 | device.setStreamMode("UDP"); |
| 158 | - device.setCharset("gb2312"); | |
| 158 | + device.setCharset("GB2312"); | |
| 159 | 159 | device.setDeviceId(deviceId); |
| 160 | 160 | device.setFirsRegister(true); |
| 161 | 161 | }else { | ... | ... |
src/main/java/com/genersoft/iot/vmp/storager/impl/VideoManagerStoragerImpl.java
| ... | ... | @@ -141,6 +141,7 @@ public class VideoManagerStoragerImpl implements IVideoManagerStorager { |
| 141 | 141 | String now = this.format.format(System.currentTimeMillis()); |
| 142 | 142 | device.setUpdateTime(now); |
| 143 | 143 | Device deviceByDeviceId = deviceMapper.getDeviceByDeviceId(device.getDeviceId()); |
| 144 | + device.setCharset(device.getCharset().toUpperCase()); | |
| 144 | 145 | if (deviceByDeviceId == null) { |
| 145 | 146 | device.setCreateTime(now); |
| 146 | 147 | redisCatchStorage.updateDevice(device); | ... | ... |
src/main/java/com/genersoft/iot/vmp/vmanager/gb28181/platform/PlatformController.java
| ... | ... | @@ -29,6 +29,7 @@ import org.springframework.web.bind.annotation.*; |
| 29 | 29 | import com.genersoft.iot.vmp.conf.SipConfig; |
| 30 | 30 | |
| 31 | 31 | import java.util.List; |
| 32 | +import java.util.Locale; | |
| 32 | 33 | |
| 33 | 34 | /** |
| 34 | 35 | * 级联平台管理 |
| ... | ... | @@ -230,6 +231,7 @@ public class PlatformController { |
| 230 | 231 | wvpResult.setMsg("missing parameters"); |
| 231 | 232 | return new ResponseEntity<>(wvpResult, HttpStatus.BAD_REQUEST); |
| 232 | 233 | } |
| 234 | + parentPlatform.setCharacterSet(parentPlatform.getCharacterSet().toUpperCase()); | |
| 233 | 235 | ParentPlatform parentPlatformOld = storager.queryParentPlatByServerGBId(parentPlatform.getServerGBId()); |
| 234 | 236 | |
| 235 | 237 | boolean updateResult = storager.updateParentPlatform(parentPlatform); | ... | ... |
web_src/src/components/ParentPlatformList.vue
| ... | ... | @@ -43,12 +43,12 @@ |
| 43 | 43 | <el-table-column prop="channelCount" label="通道数" width="120" align="center"></el-table-column> |
| 44 | 44 | <el-table-column label="订阅信息" width="240" align="center" fixed="right"> |
| 45 | 45 | <template slot-scope="scope"> |
| 46 | - <i v-if="scope.row.alarmSubscribe" style="font-size: 1.5rem;" title="报警订阅" class="subscribe-on iconfont icon-gbaojings" ></i> | |
| 47 | - <i v-if="!scope.row.alarmSubscribe" style="font-size: 1.5rem;" title="报警订阅" class="subscribe-off iconfont icon-gbaojings" ></i> | |
| 48 | - <i v-if="scope.row.catalogSubscribe" title="目录订阅" class="subscribe-on iconfont icon-gjichus" ></i> | |
| 49 | - <i v-if="!scope.row.catalogSubscribe" title="目录订阅" class="subscribe-off iconfont icon-gjichus" ></i> | |
| 50 | - <i v-if="scope.row.gpsSubscribe" title="位置订阅" class="subscribe-on iconfont icon-gxunjians" ></i> | |
| 51 | - <i v-if="!scope.row.gpsSubscribe" title="位置订阅" class="subscribe-off iconfont icon-gxunjians" ></i> | |
| 46 | + <i v-if="scope.row.alarmSubscribe" style="font-size: 20px" title="报警订阅" class="iconfont icon-gbaojings subscribe-on " ></i> | |
| 47 | + <i v-if="!scope.row.alarmSubscribe" style="font-size: 20px" title="报警订阅" class="iconfont icon-gbaojings subscribe-off " ></i> | |
| 48 | + <i v-if="scope.row.catalogSubscribe" title="目录订阅" class="iconfont icon-gjichus subscribe-on" ></i> | |
| 49 | + <i v-if="!scope.row.catalogSubscribe" title="目录订阅" class="iconfont icon-gjichus subscribe-off" ></i> | |
| 50 | + <i v-if="scope.row.gpsSubscribe" title="位置订阅" class="iconfont icon-gxunjians subscribe-on" ></i> | |
| 51 | + <i v-if="!scope.row.gpsSubscribe" title="位置订阅" class="iconfont icon-gxunjians subscribe-off" ></i> | |
| 52 | 52 | </template> |
| 53 | 53 | </el-table-column> |
| 54 | 54 | |
| ... | ... | @@ -182,10 +182,10 @@ export default { |
| 182 | 182 | <style> |
| 183 | 183 | .subscribe-on{ |
| 184 | 184 | color: #409EFF; |
| 185 | - font-size: 1.3rem; | |
| 185 | + font-size: 18px; | |
| 186 | 186 | } |
| 187 | 187 | .subscribe-off{ |
| 188 | 188 | color: #afafb3; |
| 189 | - font-size: 1.3rem; | |
| 189 | + font-size: 18px; | |
| 190 | 190 | } |
| 191 | 191 | </style> | ... | ... |