1.不再需要apiUrl

2.扩展信息里面没有的,才从外面拿
master
LAPTOP-S9HJSOEB\昊天 15 hours ago
parent bd0dc4e95f
commit 7a42e4e941

@ -190,7 +190,7 @@ public class MyInitializer {
executorService.submit(() -> {
Map<String,Map<Integer,RtspSessionResponse>> zlmConfMap = new HashMap<>();
String zlmApiUrl = dictDataService.parseDictData("ZLMediaKit_conf", "Apiurl").getValue();
String zlmApiSecret = dictDataService.parseDictData("ZLMediaKit_conf", "secret").getValue();
try {
@ -200,6 +200,8 @@ public class MyInitializer {
RtspSessionResponse rtspSessionResponse;
// 按 rtcServer(流媒体IP) + rtcServerPort(端口) 缓存 getMediaList 结果,同一台流媒体只查询一次
Map<Integer, RtspSessionResponse> portMap = zlmConfMap.get(camera.getRtcServer());
String zlmApiUrl = "http://"+camera.getRtcServer()+":"+camera.getRtcServerPort()+"/index/api/";
if (portMap != null && portMap.containsKey(camera.getRtcServerPort())) {
// 命中缓存,直接复用
rtspSessionResponse = portMap.get(camera.getRtcServerPort());

@ -50,20 +50,22 @@ public class KsecDataInfo {
private Map<String,String> wmsExtendInfo =new HashMap<>();
public void setWmsExtendInfoIsEmpty(){
if (wmsExtendInfo.isEmpty()){
if (this.itemCode!=null){
if (isEmpty(wmsExtendInfo.get("itemCode")) && this.itemCode!=null){
wmsExtendInfo.put("itemCode",this.itemCode);
}
if (this.shelfCode!=null) {
if (isEmpty(wmsExtendInfo.get("shelfCode")) && this.shelfCode!=null) {
wmsExtendInfo.put("shelfCode",this.shelfCode);
}
if (this.pltCode!=null) {
if (isEmpty(wmsExtendInfo.get("pltCode")) && this.pltCode!=null) {
wmsExtendInfo.put("pltCode",this.pltCode);
}
if (this.countNumber!=null) {
if (isEmpty(wmsExtendInfo.get("countNumber")) && this.countNumber!=null) {
wmsExtendInfo.put("countNumber", new java.math.BigDecimal(this.countNumber.trim()).stripTrailingZeros().toPlainString());
}
}
private boolean isEmpty(String str) {
return str == null || str.trim().isEmpty();
}
//

Loading…
Cancel
Save