|
|
@@ -130,7 +130,16 @@ public class WebGatewayImpl implements WebGateway {
|
|
|
devInfoImportVoList = devInfoImportVoList.stream().filter(item -> !existClientIds.contains(item.getClientId())).collect(Collectors.toList());
|
|
|
}
|
|
|
|
|
|
+ List<String> importedClientIds = new ArrayList<>();
|
|
|
devInfoService.saveOrUpdateBatch(devInfoImportVoList.stream().filter(item -> StringUtils.hasText(item.getClientId())).map(item -> {
|
|
|
+
|
|
|
+ if (importedClientIds.contains(item.getClientId())) {
|
|
|
+ existClientIds.add(item.getClientId());
|
|
|
+ return null;
|
|
|
+ } else {
|
|
|
+ importedClientIds.add(item.getClientId());
|
|
|
+ }
|
|
|
+
|
|
|
DevInfo devInfo = new DevInfo();
|
|
|
devInfo.setClientId(item.getClientId());
|
|
|
devInfo.setDevType(item.getDevType());
|
|
|
@@ -142,7 +151,7 @@ public class WebGatewayImpl implements WebGateway {
|
|
|
devInfo.setY(BigDecimal.ZERO);
|
|
|
devInfo.setNorthAngle(BigDecimal.ZERO);
|
|
|
return devInfo;
|
|
|
- }).collect(Collectors.toList()));
|
|
|
+ }).filter(Objects::nonNull).collect(Collectors.toList()));
|
|
|
|
|
|
UploadRes uploadRes = new UploadRes();
|
|
|
if (!CollectionUtils.isEmpty(existClientIds)) {
|