|
|
|
@ -1180,44 +1180,83 @@ QVector<nmDataWellBase*> nmDataAnalyzeManager::getWellDataList() const
|
|
|
|
|
|
|
|
|
|
|
|
void nmDataAnalyzeManager::updateVerticalWells(const QVector<nmDataVerticalWell>& wells)
|
|
|
|
void nmDataAnalyzeManager::updateVerticalWells(const QVector<nmDataVerticalWell>& wells)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool bWellUpdated = false;
|
|
|
|
foreach(const auto& newWell, wells) {
|
|
|
|
foreach(const auto& newWell, wells) {
|
|
|
|
|
|
|
|
const QString sWellInstanceId = newWell.getWellInstanceId();
|
|
|
|
|
|
|
|
if(sWellInstanceId.isEmpty()) {
|
|
|
|
|
|
|
|
qWarning() << "Cannot update vertical well without UUID:"
|
|
|
|
|
|
|
|
<< newWell.getWellName();
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
foreach(auto* existingWell, m_vWellData) {
|
|
|
|
foreach(auto* existingWell, m_vWellData) {
|
|
|
|
if(auto * vWell = dynamic_cast<nmDataVerticalWell * >(existingWell)) {
|
|
|
|
if(auto * vWell = dynamic_cast<nmDataVerticalWell * >(existingWell)) {
|
|
|
|
if(vWell->getWellName() == newWell.getWellName()) {
|
|
|
|
// UUID 是井实例的唯一身份,禁止同名新井覆盖旧井。
|
|
|
|
|
|
|
|
if(vWell->getWellInstanceId() == sWellInstanceId) {
|
|
|
|
*vWell = newWell; // 调用赋值运算符
|
|
|
|
*vWell = newWell; // 调用赋值运算符
|
|
|
|
|
|
|
|
bWellUpdated = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 井赋值不复制快照绑定,并会解除目标井的弱引用,回写后必须由 Manager 统一恢复。
|
|
|
|
|
|
|
|
if(bWellUpdated) {
|
|
|
|
|
|
|
|
rebindPebiResultSnapshotToWells();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmDataAnalyzeManager::updateVerticalFracturedWells(const QVector<nmDataVerticalFracturedWell>& wells)
|
|
|
|
void nmDataAnalyzeManager::updateVerticalFracturedWells(const QVector<nmDataVerticalFracturedWell>& wells)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool bWellUpdated = false;
|
|
|
|
foreach(const auto& newWell, wells) {
|
|
|
|
foreach(const auto& newWell, wells) {
|
|
|
|
|
|
|
|
const QString sWellInstanceId = newWell.getWellInstanceId();
|
|
|
|
|
|
|
|
if(sWellInstanceId.isEmpty()) {
|
|
|
|
|
|
|
|
qWarning() << "Cannot update vertical fractured well without UUID:"
|
|
|
|
|
|
|
|
<< newWell.getWellName();
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
foreach(auto* existingWell, m_vWellData) {
|
|
|
|
foreach(auto* existingWell, m_vWellData) {
|
|
|
|
if(auto * vWell = dynamic_cast<nmDataVerticalFracturedWell * >(existingWell)) {
|
|
|
|
if(auto * vWell = dynamic_cast<nmDataVerticalFracturedWell * >(existingWell)) {
|
|
|
|
if(vWell->getWellName() == newWell.getWellName()) {
|
|
|
|
// UUID 是井实例的唯一身份,禁止同名新井覆盖旧井。
|
|
|
|
|
|
|
|
if(vWell->getWellInstanceId() == sWellInstanceId) {
|
|
|
|
*vWell = newWell; // 调用赋值运算符
|
|
|
|
*vWell = newWell; // 调用赋值运算符
|
|
|
|
|
|
|
|
bWellUpdated = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 井赋值不复制快照绑定,并会解除目标井的弱引用,回写后必须由 Manager 统一恢复。
|
|
|
|
|
|
|
|
if(bWellUpdated) {
|
|
|
|
|
|
|
|
rebindPebiResultSnapshotToWells();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
void nmDataAnalyzeManager::updateHorizontalFracturedWells(const QVector<nmDataHorizontalFracturedWell>& wells)
|
|
|
|
void nmDataAnalyzeManager::updateHorizontalFracturedWells(const QVector<nmDataHorizontalFracturedWell>& wells)
|
|
|
|
{
|
|
|
|
{
|
|
|
|
|
|
|
|
bool bWellUpdated = false;
|
|
|
|
foreach(const auto& newWell, wells) {
|
|
|
|
foreach(const auto& newWell, wells) {
|
|
|
|
|
|
|
|
const QString sWellInstanceId = newWell.getWellInstanceId();
|
|
|
|
|
|
|
|
if(sWellInstanceId.isEmpty()) {
|
|
|
|
|
|
|
|
qWarning() << "Cannot update horizontal fractured well without UUID:"
|
|
|
|
|
|
|
|
<< newWell.getWellName();
|
|
|
|
|
|
|
|
continue;
|
|
|
|
|
|
|
|
}
|
|
|
|
foreach(auto* existingWell, m_vWellData) {
|
|
|
|
foreach(auto* existingWell, m_vWellData) {
|
|
|
|
if(auto * vWell = dynamic_cast<nmDataHorizontalFracturedWell * >(existingWell)) {
|
|
|
|
if(auto * vWell = dynamic_cast<nmDataHorizontalFracturedWell * >(existingWell)) {
|
|
|
|
if(vWell->getWellName() == newWell.getWellName()) {
|
|
|
|
// UUID 是井实例的唯一身份,禁止同名新井覆盖旧井。
|
|
|
|
|
|
|
|
if(vWell->getWellInstanceId() == sWellInstanceId) {
|
|
|
|
*vWell = newWell; // 调用赋值运算符
|
|
|
|
*vWell = newWell; // 调用赋值运算符
|
|
|
|
|
|
|
|
bWellUpdated = true;
|
|
|
|
break;
|
|
|
|
break;
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
// 井赋值不复制快照绑定,并会解除目标井的弱引用,回写后必须由 Manager 统一恢复。
|
|
|
|
|
|
|
|
if(bWellUpdated) {
|
|
|
|
|
|
|
|
rebindPebiResultSnapshotToWells();
|
|
|
|
|
|
|
|
}
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
// 获取所有直井数据
|
|
|
|
// 获取所有直井数据
|
|
|
|
|