|
@@ -117,6 +117,7 @@ public class IotCommonBomMaterialServiceImpl implements IotCommonBomMaterialServ
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public Long addMaterials(List<IotCommonBomMaterialSaveReqVO> materials) {
|
|
public Long addMaterials(List<IotCommonBomMaterialSaveReqVO> materials) {
|
|
|
|
+ Long resultCount = 0L;
|
|
if (CollUtil.isEmpty(materials)) {
|
|
if (CollUtil.isEmpty(materials)) {
|
|
throw exception(IOT_COMMON_BOM_MATERIAL_NOT_EXISTS);
|
|
throw exception(IOT_COMMON_BOM_MATERIAL_NOT_EXISTS);
|
|
}
|
|
}
|
|
@@ -150,10 +151,11 @@ public class IotCommonBomMaterialServiceImpl implements IotCommonBomMaterialServ
|
|
tobeAddedMaterials.add(iotCommonBomMaterial);
|
|
tobeAddedMaterials.add(iotCommonBomMaterial);
|
|
});
|
|
});
|
|
iotCommonBomMaterialMapper.insertBatch(tobeAddedMaterials);
|
|
iotCommonBomMaterialMapper.insertBatch(tobeAddedMaterials);
|
|
|
|
+ resultCount = Long.valueOf(tobeAddedMaterials.size());
|
|
// 将设备分类BOM及BOM节点挂载的物料同步到设备BOM
|
|
// 将设备分类BOM及BOM节点挂载的物料同步到设备BOM
|
|
iotBomService.syncDeviceBomAndMaterials(tobeAddedMaterials.get(0).getDeviceCategoryId());
|
|
iotBomService.syncDeviceBomAndMaterials(tobeAddedMaterials.get(0).getDeviceCategoryId());
|
|
}
|
|
}
|
|
- return 1L;
|
|
|
|
|
|
+ return resultCount;
|
|
}
|
|
}
|
|
|
|
|
|
}
|
|
}
|