Browse Source

导入导出

2024年10月18日16:43:02
thing_master
lishuai 1 year ago
parent
commit
2f28bd99e5
  1. 3
      modules/thing/src/main/java/com/thing/thing/relation/detail/service/impl/IotThingRelationDetailServiceImpl.java

3
modules/thing/src/main/java/com/thing/thing/relation/detail/service/impl/IotThingRelationDetailServiceImpl.java

@ -28,7 +28,6 @@ import com.thing.thing.cache.service.ThingCache;
import com.thing.thing.entity.dto.IotThingEntityDTO;
import com.thing.thing.entity.dto.IotThingEntityInfoDTO;
import com.thing.thing.entity.entity.IotThingEntity;
import com.thing.thing.entity.excel.IotThingViewExcel;
import com.thing.thing.entity.service.IotThingEntityService;
import com.thing.thing.model.service.IotThingModelService;
import com.thing.thing.relation.detail.dto.IotThingRelationDetailDTO;
@ -1040,7 +1039,6 @@ public class IotThingRelationDetailServiceImpl extends BaseServiceImpl<IotThingR
IotThingEntity fromEntity = entities.stream().filter(e -> e.getCode().equals(excel.getFromCode())).findFirst().get();
IotThingEntity toEntity = entities.stream().filter(e -> e.getCode().equals(excel.getToCode())).findFirst().get();
IotThingEntity rootEntity = entities.stream().filter(e -> e.getCode().equals(excel.getRootThingCode())).findFirst().get();
entity.setRootId(rootDTO.getId());
entity.setFromCode(excel.getFromCode());
entity.setFromCode(excel.getName());
@ -1055,7 +1053,6 @@ public class IotThingRelationDetailServiceImpl extends BaseServiceImpl<IotThingR
entity.setUrl(excel.getUrl());
entity.setTag(excel.getTag());
mapper.insert(entity);
ObjectNode node = JsonConverter.convertToJsonObjectObjectNode(ConvertUtils.sourceToTarget(entity, IotThingRelationDetailDTO.class));
List<ObjectNode> mapAccurateKey = cache.findMapAccurateKey(CacheNameEnum.THING_MODEL, entity.getToCode());
if (CollectionUtils.isNotEmpty(mapAccurateKey)) {

Loading…
Cancel
Save