Commit e4cebb08 authored by 赵啸非's avatar 赵啸非

Merge remote-tracking branch 'origin/master'

parents e833b407 1de1fc98
...@@ -620,6 +620,19 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D ...@@ -620,6 +620,19 @@ public class DeviceServiceImpl extends AbstractCRUDCacheServiceImpl<DeviceDao, D
entity.setPlatformName(platformEntity.getPlatformName()); entity.setPlatformName(platformEntity.getPlatformName());
} }
} }
}else if (!ObjectUtils.isEmpty(entity.getProductName())) {
ProductEntity productEntity = productService.selectOne(new ProductQuery().productName(entity.getProductName()));
if (!ObjectUtils.isEmpty(productEntity)) {
entity.setProductId(productEntity.getId());
entity.setProductCode(productEntity.getProductCode());
//根据产品查询平台
if (!ObjectUtils.isEmpty(productEntity.getPlatformId())) {
PlatformEntity platformEntity = platformService.getCache(productEntity.getPlatformId().toString());
entity.setPlatformId(platformEntity.getId());
entity.setPlatformCode(platformEntity.getPlatformSn());
entity.setPlatformName(platformEntity.getPlatformName());
}
}
} }
if (!ObjectUtils.isEmpty(entity.getPlatformCode())) { if (!ObjectUtils.isEmpty(entity.getPlatformCode())) {
PlatformEntity platformEntity = platformService.selectOne(new PlatformQuery().platformSn(entity.getPlatformCode())); PlatformEntity platformEntity = platformService.selectOne(new PlatformQuery().platformSn(entity.getPlatformCode()));
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment