parent
4ca82e54a4
commit
6a69040854
|
@ -144,11 +144,19 @@ public class DisposeAbilityRouterServiceImpl implements DisposeAbilityRouterServ
|
|||
@Override
|
||||
public ErrorCode addDisposeAbilityDevice(DisposeDevice dev) {
|
||||
DisposeAbility db;
|
||||
|
||||
String urlSpiltChar = "/";
|
||||
String url;
|
||||
String httpType = dev.getUrlType() == HttpType.HTTP ? "http://" : "https://";
|
||||
String addr = (dev.getIpPort() == null || dev.getIpPort()
|
||||
.length() == 0) ? dev.getIpAddr() : (dev.getIpAddr() + ":" + dev.getIpPort());
|
||||
String url = httpType + addr + "/" + dev.getUrlPath();
|
||||
|
||||
if (dev.getUrlPath().length() == 0) {
|
||||
url = httpType + addr + urlSpiltChar;
|
||||
} else if (dev.getUrlPath().endsWith(urlSpiltChar)) {
|
||||
url = httpType + addr + urlSpiltChar + dev.getUrlPath();
|
||||
} else {
|
||||
url = httpType + addr + urlSpiltChar + dev.getUrlPath() + urlSpiltChar;
|
||||
}
|
||||
|
||||
switch (dev.getDeviceType()) {
|
||||
case DPTECH_UMC:
|
||||
|
|
Loading…
Reference in New Issue