修复产品名称不能为空的问题
This commit is contained in:
parent
a5d59bf73b
commit
c842317d10
|
|
@ -369,9 +369,12 @@ public class DeviceInstanceController implements
|
|||
.flatMap(DeviceProductOperator::getMetadata)
|
||||
.map(metadata -> new DeviceWrapper(metadata.getTags()))
|
||||
.defaultIfEmpty(DeviceWrapper.empty)
|
||||
.zipWith(productService.findById(productId))
|
||||
.flatMapMany(wrapper -> importExportService
|
||||
.getInputStream(fileUrl)
|
||||
.flatMapMany(inputStream -> ReactorExcel.read(inputStream, FileUtils.getExtension(fileUrl), wrapper)))
|
||||
.flatMapMany(inputStream -> ReactorExcel.read(inputStream, FileUtils.getExtension(fileUrl), wrapper.getT1()))
|
||||
.doOnNext(info -> info.setProductName(wrapper.getT2().getName()))
|
||||
)
|
||||
.map(info -> {
|
||||
DeviceInstanceEntity entity = FastBeanCopier.copy(info, new DeviceInstanceEntity());
|
||||
entity.setProductId(productId);
|
||||
|
|
|
|||
Loading…
Reference in New Issue