【客户端生成逻辑修改】
This commit is contained in:
parent
efb68f9496
commit
c16b415c86
@ -431,9 +431,12 @@ public class RtsMapFunctionServiceImpl implements RtsMapFunctionService {
|
||||
if (StringUtils.hasText(defaultClientType)) {
|
||||
String deviceCode = defaultMember != null ? defaultMember.getDeviceCode() : null;
|
||||
Optional<MapClientVO> defaultClientOptional = clientVOList.stream()
|
||||
.filter(c -> Objects.equals(c.getType(), defaultClientType)
|
||||
&& (StringUtils.isEmpty(deviceCode) || Objects.equals(deviceCode, c.getDeviceCode())
|
||||
)).findFirst();
|
||||
.filter(c -> Objects.equals(c.getType(), defaultClientType) && Objects.equals(deviceCode, c.getDeviceCode()))
|
||||
.findFirst();
|
||||
// 没有找到默认获取一个
|
||||
if (defaultClientOptional.isEmpty()) {
|
||||
defaultClientOptional = clientVOList.stream().filter(c -> Objects.equals(c.getType(), defaultClientType)).findFirst();
|
||||
}
|
||||
if (defaultClientOptional.isEmpty()) {
|
||||
msgList.add(String.format("地图[名:%s]设备[%s]不存在客户端类型[%s]", mapDetail.getName(), deviceCode, defaultClientType));
|
||||
} else {
|
||||
|
Loading…
Reference in New Issue
Block a user