...
|
...
|
@@ -335,6 +335,17 @@ public class ThingsModelServiceImpl |
335
|
335
|
}
|
336
|
336
|
if (Objects.equals(importThingsModel.getFunctionType(), FunctionTypeEnum.all)
|
337
|
337
|
|| Objects.equals(importThingsModel.getFunctionType(), FunctionTypeEnum.properties)) {
|
|
338
|
+ if(transportType.equals("TCP")){
|
|
339
|
+ List<AttributeModelDTO> dto = importThingsModel.getData().getProperties();
|
|
340
|
+ if (null != dto && !dto.isEmpty()) {
|
|
341
|
+ for (AttributeModelDTO model : dto) {
|
|
342
|
+ String dataType = model.getSpecs().path("dataType").path("type").asText();
|
|
343
|
+ if(!StringUtils.isEmpty(dataType)&&!dataType.equals("INT")&&!dataType.equals("DOUBLE")&&!dataType.equals("TEXT")&&!dataType.equals("BOOL")){
|
|
344
|
+ throw new TkDataValidationException(ErrorMessage.IMPORT_TCP_ERROR.getMessage());
|
|
345
|
+ }
|
|
346
|
+ }
|
|
347
|
+ }
|
|
348
|
+ }
|
338
|
349
|
importAttribute(
|
339
|
350
|
identifiers,
|
340
|
351
|
importThingsModel.getData().getProperties(),
|
...
|
...
|
|