Compare commits
2 Commits
8b955e21df
...
a68e83e4a1
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
a68e83e4a1 | ||
|
|
e3c73540bd |
266
DataMgr/src/CreateNewTableDlg.cpp
Normal file
266
DataMgr/src/CreateNewTableDlg.cpp
Normal file
|
|
@ -0,0 +1,266 @@
|
|||
#include "CreateNewTableDlg.h"
|
||||
#include "DataHelper.h"
|
||||
#include "LogIO.h"
|
||||
#include "dataslothelper.h"
|
||||
extern DEFAULTTABLE *DefauleTable;//[DefTabNum];
|
||||
extern int DefTabNum;
|
||||
/*
|
||||
CCreateNewTableDlg::CCreateNewTableDlg(QWidget *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
ui.setupUi(this);
|
||||
}
|
||||
*/
|
||||
CCreateNewTableDlg::~CCreateNewTableDlg()
|
||||
{
|
||||
|
||||
}
|
||||
CCreateNewTableDlg::CCreateNewTableDlg(QDialog *parent)
|
||||
: QDialog(parent)
|
||||
{
|
||||
//m_pUI = new Ui_CCreateNewTableDlg();
|
||||
m_pUI.setupUi(this);
|
||||
QObject::connect(m_pUI.okbtn, SIGNAL(clicked()), this, SLOT(slotSave()));
|
||||
QObject::connect(m_pUI.cancelbtn, SIGNAL(clicked()), this, SLOT(slotCancel()));
|
||||
QObject::connect(m_pUI.comboBox,SIGNAL(currentIndexChanged(int)),this, SLOT(slotChangeTableType(int)));
|
||||
QObject::connect(m_pUI.tableWidget, SIGNAL(cellClicked(int,int)), this, SLOT(slotGetCell(int,int)));
|
||||
QObject::connect(m_pUI.pushButton_Add, SIGNAL(clicked()), this, SLOT(slotAdd()));
|
||||
QObject::connect(m_pUI.pushButton_Delete, SIGNAL(clicked()), this, SLOT(slotDelete()));
|
||||
QObject::connect(m_pUI.pushButton_Up, SIGNAL(clicked()), this, SLOT(slotUp()));
|
||||
QObject::connect(m_pUI.pushButton_Down, SIGNAL(clicked()), this, SLOT(slotDown()));
|
||||
m_pUI.tableWidget->setColumnCount(6);
|
||||
QStringList header;
|
||||
header<<"字段名"<<"字段描述"<<"字段单位"<<"单位别名"<<"字段类型"<<"字段长度";
|
||||
m_pUI.tableWidget->setHorizontalHeaderLabels(header);
|
||||
m_pUI.tableWidget->horizontalHeader()->sectionResizeMode(QHeaderView::Stretch);
|
||||
for(int i=0;i<DefTabNum;i++)
|
||||
{
|
||||
m_pUI.comboBox->addItem(DefauleTable[i].TableAliasName);//系统缺省表列表
|
||||
}
|
||||
m_pUI.comboBox->setCurrentIndex(0);
|
||||
}
|
||||
void CCreateNewTableDlg::slotComboxSelectChange(int index)
|
||||
{
|
||||
if(! m_pUI.tableWidget->isActiveWindow())
|
||||
return;
|
||||
//刷新当前字段内容
|
||||
|
||||
//QWidget *widget=m_pUI.tableWidget->cellWidget(row,col);
|
||||
QComboBox *combox=(QComboBox*)sender();
|
||||
int row=combox->property("row").toInt();
|
||||
int col=combox->property("col").toInt();
|
||||
int colIndex=index;
|
||||
if(index!=5)//STRING
|
||||
{
|
||||
m_pUI.tableWidget->setItem(row,5,new QTableWidgetItem(QString::number(RepSize[index+1])));
|
||||
m_pUI.tableWidget->item(row,5)->setFlags(
|
||||
m_pUI.tableWidget->item(row,5)->flags()&(~Qt::ItemIsEditable)
|
||||
);
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pUI.tableWidget->item(row,5)->setFlags(
|
||||
m_pUI.tableWidget->item(row,5)->flags()|Qt::ItemIsEditable|Qt::ItemIsEnabled);
|
||||
//m_pUI.tableWidget->editItem(m_pUI.tableWidget->item(row,5));
|
||||
}
|
||||
//m_pUI.tableWidget->item(row,5)->setFlags(Qt::ItemIsSelectable|Qt::ItemIsEditable);
|
||||
}
|
||||
void CCreateNewTableDlg::slotGetCell(int row,int column)
|
||||
{
|
||||
if(column!=4)return;
|
||||
QString oldType=m_pUI.tableWidget->item(row,column)->text();
|
||||
QComboBox *comboBox = new QComboBox();
|
||||
for(int i=0;i<11;i++)
|
||||
{
|
||||
comboBox->addItem(QString(Rep_STR[i]));
|
||||
}
|
||||
connect(comboBox,SIGNAL(currentIndexChanged(int)),this,SLOT(slotComboxSelectChange(int)));
|
||||
comboBox->setProperty("row",row);
|
||||
comboBox->setProperty("col",column);
|
||||
for(int i=0;i<11;i++)
|
||||
{
|
||||
if(oldType==QString(Rep_STR[i]))comboBox->setCurrentIndex(i);
|
||||
}
|
||||
m_pUI.tableWidget->setCellWidget(row,column, comboBox );
|
||||
}
|
||||
void CCreateNewTableDlg::slotChangeTableType(int No)
|
||||
{
|
||||
m_pUI.lineEdit_Name->setText(DefauleTable[No].TableName);
|
||||
m_pUI.lineEdit_Name_2->setText(DefauleTable[No].TableAliasName);
|
||||
int fNum=DefauleTable[No].ZdNum;
|
||||
m_pUI.tableWidget->clearContents();
|
||||
m_pUI.tableWidget->setRowCount(fNum);
|
||||
m_rowCount=m_pUI.tableWidget->rowCount();
|
||||
for(int i=0;i<fNum;i++)
|
||||
{
|
||||
m_pUI.tableWidget->setItem(i,0,new QTableWidgetItem(QString(DefauleTable[No].tinfo[i].Name)));
|
||||
m_pUI.tableWidget->setItem(i,1,new QTableWidgetItem(QString(DefauleTable[No].tinfo[i].HZName)));
|
||||
m_pUI.tableWidget->setItem(i,2,new QTableWidgetItem(QString(DefauleTable[No].tinfo[i].Unit)));
|
||||
m_pUI.tableWidget->setItem(i,3,new QTableWidgetItem(QString(DefauleTable[No].tinfo[i].HZUnit)));
|
||||
QString DataType=QString(Rep_STR[DefauleTable[No].tinfo[i].RepCode-1]);
|
||||
m_pUI.tableWidget->setItem(i,4,new QTableWidgetItem(DataType));
|
||||
m_pUI.tableWidget->setItem(i,5,new QTableWidgetItem(QString::number(DefauleTable[No].tinfo[i].CodeLength)));
|
||||
if(DataType=="STRING")
|
||||
{
|
||||
m_pUI.tableWidget->editItem(m_pUI.tableWidget->item(i,5));
|
||||
//m_pUI.tableWidget->item(i,5)->setFlags(m_pUI.tableWidget->item(i,5)->flags()&(Qt::ItemIsEditable));//ItemIsEnabled));
|
||||
}
|
||||
else
|
||||
{
|
||||
m_pUI.tableWidget->item(i,5)->setFlags(Qt::ItemIsSelectable|Qt::NoItemFlags);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
void CCreateNewTableDlg::slotSave()
|
||||
{
|
||||
TableName=m_pUI.lineEdit_Name->text().toUpper();
|
||||
if(TableName=="")
|
||||
{
|
||||
QMessageBox::warning(NULL,"警告!","表名不能为空!");return;
|
||||
}
|
||||
int fNum=m_pUI.tableWidget->rowCount();
|
||||
if(!fNum)
|
||||
{
|
||||
QMessageBox::warning(NULL,"警告!","没有表字段!");return;
|
||||
}
|
||||
CLogIO logio(FileName.toStdString().c_str(),(unsigned int)CLogIO::modeReadWrite);
|
||||
if(!logio.mFile)
|
||||
{
|
||||
QMessageBox::warning(NULL,"警告!",FileName+"\r\n打开井次文件失败!");return ;
|
||||
}
|
||||
if(logio.FindObjectIndex(TableName.toStdString().c_str())>=0)
|
||||
{
|
||||
QMessageBox::warning(NULL,"警告!","您要产生的表名称已存在!");return;
|
||||
}
|
||||
QString TableHzName=m_pUI.lineEdit_Name_2->text();
|
||||
Slf_OBJECT_FIELD *pField=new Slf_OBJECT_FIELD[fNum];
|
||||
memset(pField,0,sizeof(Slf_OBJECT_FIELD)*fNum);
|
||||
for(int i=0;i<fNum;i++)
|
||||
{
|
||||
strcpy(pField[i].Name,m_pUI.tableWidget->item(i,0)->text().toStdString().c_str());
|
||||
strcpy(pField[i].HZName,m_pUI.tableWidget->item(i,1)->text().toStdString().c_str());
|
||||
strcpy(pField[i].Unit,m_pUI.tableWidget->item(i,2)->text().toStdString().c_str());
|
||||
strcpy(pField[i].HZUnit,m_pUI.tableWidget->item(i,3)->text().toStdString().c_str());
|
||||
pField[i].ArrayNum=1;
|
||||
pField[i].SamplePoint=1;
|
||||
QString CodeType=m_pUI.tableWidget->item(i,4)->text();
|
||||
for(int j=0;j<11;j++)
|
||||
{
|
||||
if(CodeType==QString(Rep_STR[j]))
|
||||
{
|
||||
pField[i].RepCode=j+1;
|
||||
break;
|
||||
}
|
||||
}
|
||||
pField[i].CodeLength=m_pUI.tableWidget->item(i,5)->text().toInt();
|
||||
if(QString(pField[i].Name)==""||pField[i].CodeLength<=0)
|
||||
{
|
||||
if(QString(pField[i].Name)=="")QMessageBox::warning(NULL,"警告!","字段名不能为空!");
|
||||
else QMessageBox::warning(NULL,"警告!","字段长度必须是大于0的正整数!");
|
||||
delete []pField;
|
||||
logio.Close();
|
||||
return;
|
||||
}
|
||||
}
|
||||
int table=logio.CreateTable(0,TableName.toLocal8Bit().toStdString().c_str(),TableHzName.toLocal8Bit().toStdString().c_str(),fNum,&pField[0],0);
|
||||
delete []pField;
|
||||
logio.CloseTable(table);
|
||||
logio.Close();
|
||||
accept();
|
||||
}
|
||||
void CCreateNewTableDlg::slotAdd()
|
||||
{
|
||||
int count=m_pUI.tableWidget->rowCount();
|
||||
m_rowCount++;
|
||||
QList<QTableWidgetSelectionRange> selRange=m_pUI.tableWidget->selectedRanges();
|
||||
bool isSel=selRange.size()>0;
|
||||
int index=0;
|
||||
int sRow=isSel?(selRange.value(0).bottomRow()+1):count+1;
|
||||
if(!isSel)
|
||||
{
|
||||
m_pUI.tableWidget->setRowCount(1+count);
|
||||
index=sRow-1;
|
||||
}else
|
||||
{
|
||||
m_pUI.tableWidget->insertRow(sRow);
|
||||
index=sRow;
|
||||
}
|
||||
m_pUI.tableWidget->setItem(index,0,new QTableWidgetItem("name"+QString::number(index+1)));
|
||||
m_pUI.tableWidget->setItem(index,1,new QTableWidgetItem("字段"+QString::number(index+1)));
|
||||
m_pUI.tableWidget->setItem(index,2,new QTableWidgetItem("NONE"));
|
||||
m_pUI.tableWidget->setItem(index,3,new QTableWidgetItem(""));
|
||||
m_pUI.tableWidget->setItem(index,4,new QTableWidgetItem("INT"));
|
||||
m_pUI.tableWidget->setItem(index,5,new QTableWidgetItem("4"));
|
||||
m_pUI.tableWidget->item(index,5)->setFlags(Qt::ItemIsEditable);
|
||||
}
|
||||
void CCreateNewTableDlg::slotDelete()
|
||||
{
|
||||
if(m_rowCount<=1)
|
||||
{
|
||||
return;
|
||||
}
|
||||
|
||||
int count=m_pUI.tableWidget->rowCount();
|
||||
int insertRow=m_rowCount-count;
|
||||
QList<QTableWidgetSelectionRange> selRanges=m_pUI.tableWidget->selectedRanges();
|
||||
bool isSel=selRanges.size()>0;
|
||||
if(!isSel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
int index=0;
|
||||
int sRow=0;
|
||||
int eRow=0;
|
||||
int delCount=0;
|
||||
foreach(const QTableWidgetSelectionRange &range,selRanges)
|
||||
{
|
||||
|
||||
sRow=range.topRow();
|
||||
eRow=range.bottomRow();
|
||||
index=sRow-delCount;
|
||||
delCount=0;
|
||||
for(int r=sRow;r<=eRow;r++)
|
||||
{
|
||||
--m_rowCount;
|
||||
delCount++;
|
||||
m_pUI.tableWidget->removeRow(index);
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
|
||||
void CCreateNewTableDlg::slotUp()
|
||||
{
|
||||
//选择一行或者多行往前移动,允许不连续选择,如删除1、2、3、8、10行
|
||||
//1、把选择的行向上移动一行,移动后被选择的行仍处于选中状态(可以继续上移,实现多步移动)
|
||||
//2、CurveNameList内容随之改变
|
||||
int count=m_pUI.tableWidget->rowCount();
|
||||
int insertRow=m_rowCount-count;
|
||||
QList<QTableWidgetSelectionRange> selRanges=m_pUI.tableWidget->selectedRanges();
|
||||
bool isSel=selRanges.size()>0;
|
||||
if(!isSel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataSlotHelper::instance()->movedUp(m_pUI.tableWidget);
|
||||
|
||||
}
|
||||
void CCreateNewTableDlg::slotDown()
|
||||
{
|
||||
//选择一行或者多行往后移动,允许不连续选择,如删除1、2、3、8、10行
|
||||
//1、把选择的行向上移动一行,移动后被选择的行仍处于选中状态(可以继续上移,实现多步移动)
|
||||
//2、CurveNameList内容随之改变
|
||||
int count=m_pUI.tableWidget->rowCount();
|
||||
int insertRow=m_rowCount-count;
|
||||
QList<QTableWidgetSelectionRange> selRanges=m_pUI.tableWidget->selectedRanges();
|
||||
bool isSel=selRanges.size()>0;
|
||||
if(!isSel)
|
||||
{
|
||||
return;
|
||||
}
|
||||
DataSlotHelper::instance()->movedDow(m_pUI.tableWidget);
|
||||
|
||||
}
|
||||
39
DataMgr/src/CreateNewTableDlg.h
Normal file
39
DataMgr/src/CreateNewTableDlg.h
Normal file
|
|
@ -0,0 +1,39 @@
|
|||
#ifndef CREATENEWTABLEDLG_H
|
||||
#define CREATENEWTABLEDLG_H
|
||||
|
||||
#include <QDialog>
|
||||
#include "ui_CreateNewTableDlg.h"
|
||||
#pragma execution_character_set("utf-8")
|
||||
|
||||
class CCreateNewTableDlg : public QDialog
|
||||
{
|
||||
Q_OBJECT
|
||||
|
||||
public:
|
||||
CCreateNewTableDlg(QDialog *parent = 0);
|
||||
~CCreateNewTableDlg();
|
||||
QString FileName;//slf文件名
|
||||
QString TableName;//表名
|
||||
private:
|
||||
Ui::CCreateNewTableDlg m_pUI;
|
||||
//动态表格行数
|
||||
int m_rowCount;
|
||||
private slots:
|
||||
/**
|
||||
*@brief 保存槽函数
|
||||
*/
|
||||
void slotSave();
|
||||
|
||||
/**
|
||||
*@brief 取消槽函数*/
|
||||
void slotCancel(){reject ();};
|
||||
void slotChangeTableType(int);
|
||||
void slotGetCell(int row,int column);
|
||||
void slotComboxSelectChange(int index);
|
||||
void slotAdd();
|
||||
void slotDelete();
|
||||
void slotUp();
|
||||
void slotDown();
|
||||
};
|
||||
|
||||
#endif // CREATENEWTABLEDLG_H
|
||||
203
DataMgr/src/CreateNewTableDlg.ui
Normal file
203
DataMgr/src/CreateNewTableDlg.ui
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<ui version="4.0">
|
||||
<class>CCreateNewTableDlg</class>
|
||||
<widget class="QDialog" name="CCreateNewTableDlg">
|
||||
<property name="geometry">
|
||||
<rect>
|
||||
<x>0</x>
|
||||
<y>0</y>
|
||||
<width>863</width>
|
||||
<height>425</height>
|
||||
</rect>
|
||||
</property>
|
||||
<property name="windowTitle">
|
||||
<string>产生新数据表</string>
|
||||
</property>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_4">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_3">
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout">
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout">
|
||||
<item>
|
||||
<widget class="QLabel" name="label_4">
|
||||
<property name="text">
|
||||
<string>选择表类型</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QComboBox" name="comboBox">
|
||||
<property name="sizePolicy">
|
||||
<sizepolicy hsizetype="Expanding" vsizetype="Fixed">
|
||||
<horstretch>0</horstretch>
|
||||
<verstretch>0</verstretch>
|
||||
</sizepolicy>
|
||||
</property>
|
||||
<property name="maxVisibleItems">
|
||||
<number>20</number>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label">
|
||||
<property name="text">
|
||||
<string>表名称</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Name">
|
||||
<property name="enabled">
|
||||
<bool>true</bool>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_2">
|
||||
<property name="text">
|
||||
<string>表别名</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLineEdit" name="lineEdit_Name_2"/>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QLabel" name="label_3">
|
||||
<property name="text">
|
||||
<string>表字段信息</string>
|
||||
</property>
|
||||
<property name="alignment">
|
||||
<set>Qt::AlignCenter</set>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QTableWidget" name="tableWidget">
|
||||
<property name="minimumSize">
|
||||
<size>
|
||||
<width>700</width>
|
||||
<height>200</height>
|
||||
</size>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QHBoxLayout" name="horizontalLayout_2">
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="okbtn">
|
||||
<property name="text">
|
||||
<string>确定</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="cancelbtn">
|
||||
<property name="text">
|
||||
<string>取消</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="horizontalSpacer_4">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Horizontal</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>40</width>
|
||||
<height>20</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
<item>
|
||||
<layout class="QVBoxLayout" name="verticalLayout_2">
|
||||
<property name="spacing">
|
||||
<number>10</number>
|
||||
</property>
|
||||
<item>
|
||||
<spacer name="verticalSpacer">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Add">
|
||||
<property name="text">
|
||||
<string>添加</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Delete">
|
||||
<property name="text">
|
||||
<string>删除</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Up">
|
||||
<property name="text">
|
||||
<string>上移</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<widget class="QPushButton" name="pushButton_Down">
|
||||
<property name="text">
|
||||
<string>下移</string>
|
||||
</property>
|
||||
</widget>
|
||||
</item>
|
||||
<item>
|
||||
<spacer name="verticalSpacer_2">
|
||||
<property name="orientation">
|
||||
<enum>Qt::Vertical</enum>
|
||||
</property>
|
||||
<property name="sizeHint" stdset="0">
|
||||
<size>
|
||||
<width>20</width>
|
||||
<height>40</height>
|
||||
</size>
|
||||
</property>
|
||||
</spacer>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</item>
|
||||
</layout>
|
||||
</widget>
|
||||
<layoutdefault spacing="6" margin="11"/>
|
||||
<resources/>
|
||||
<connections/>
|
||||
</ui>
|
||||
|
|
@ -27,7 +27,7 @@
|
|||
// #include "ShowCurve.h"//2020.5.12常规曲线预览
|
||||
#include <QEventLoop>
|
||||
// #include "tableproeditdlg.h"
|
||||
// #include "CreateNewTableDlg.h"
|
||||
#include "CreateNewTableDlg.h"
|
||||
#include "BaseFun.h"
|
||||
#include "DepthProgress.h"
|
||||
#include "geometryutils.h"
|
||||
|
|
@ -1217,22 +1217,22 @@ QString CDataManagger::Curve2ResultTable(const QString& wellname,const QString&
|
|||
|
||||
//whp 2020.7.21
|
||||
//创建新表
|
||||
// QString CDataManagger::CreateNewTable(const QString& wellname)
|
||||
// {
|
||||
// if(DataHelper::m_IsGc)DataHelper::InitDefauleTable();
|
||||
// CCreateNewTableDlg *pDlg=new CCreateNewTableDlg();
|
||||
// pDlg->FileName=wellname;
|
||||
// if(pDlg->exec()==QDialog::Accepted)
|
||||
// {
|
||||
// QString cs=pDlg->TableName;
|
||||
// delete pDlg;
|
||||
// return cs;
|
||||
// }
|
||||
// else {
|
||||
// delete pDlg;
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
QString CDataManagger::CreateNewTable(const QString& wellname)
|
||||
{
|
||||
if(DataHelper::m_IsGc)DataHelper::InitDefauleTable();
|
||||
CCreateNewTableDlg *pDlg=new CCreateNewTableDlg();
|
||||
pDlg->FileName=wellname;
|
||||
if(pDlg->exec()==QDialog::Accepted)
|
||||
{
|
||||
QString cs=pDlg->TableName;
|
||||
delete pDlg;
|
||||
return cs;
|
||||
}
|
||||
else {
|
||||
delete pDlg;
|
||||
return "";
|
||||
}
|
||||
}
|
||||
// QString CDataManagger::CreateNewCurve(const QString& wellname)
|
||||
// {
|
||||
// CCreateNewCurveDlg *pDlg=new CCreateNewCurveDlg();
|
||||
|
|
|
|||
|
|
@ -46,6 +46,7 @@ CONFIG(debug, debug|release){
|
|||
|
||||
|
||||
FORMS += \
|
||||
CreateNewTableDlg.ui \
|
||||
UI/InDefTable.ui \
|
||||
UI/SigelWell.ui \
|
||||
UI/MutlWell.ui\
|
||||
|
|
@ -59,24 +60,28 @@ HEADERS += \
|
|||
../../common/geometryutils.h \
|
||||
AdaptionComboBox.h \
|
||||
CheckHeadView.h \
|
||||
CreateNewTableDlg.h \
|
||||
DataHelper.h \
|
||||
DataManagger.h \
|
||||
InDefTableDlg.h\
|
||||
TiShiDlg.h\
|
||||
ConsoleOutputWidget.h \
|
||||
cdialog.h
|
||||
cdialog.h \
|
||||
dataslothelper.h
|
||||
|
||||
SOURCES += \
|
||||
../../common/geometryutils.cpp \
|
||||
AdaptionComboBox.cpp \
|
||||
CStringType.cpp \
|
||||
CheckHeadView.cpp \
|
||||
CreateNewTableDlg.cpp \
|
||||
DataHelper.cpp \
|
||||
DataManagger.cpp\
|
||||
InDefTableDlg.cpp\
|
||||
TiShiDlg.cpp\
|
||||
ConsoleOutputWidget.cpp \
|
||||
cdialog.cpp
|
||||
cdialog.cpp \
|
||||
dataslothelper.cpp
|
||||
|
||||
INCLUDEPATH += ../include
|
||||
INCLUDEPATH += ../CallManage
|
||||
|
|
|
|||
219
OSGDataModel/include/ObjWell.h
Normal file
219
OSGDataModel/include/ObjWell.h
Normal file
|
|
@ -0,0 +1,219 @@
|
|||
/**
|
||||
* @file ObjWell.h
|
||||
* @brief "井"数据模型
|
||||
* @date 2014-6-3
|
||||
* @author: liyonggang
|
||||
*/
|
||||
#ifndef PAI_FRAME_OSGWELL_H
|
||||
#define PAI_FRAME_OSGWELL_H
|
||||
#pragma warning( push ,0)
|
||||
|
||||
#include <vector>
|
||||
|
||||
#include <QUuid>
|
||||
|
||||
#include "ObjectID.h"
|
||||
// #include "LineProperty.h"
|
||||
#include "Well.h"
|
||||
#include "BaseObject.h"
|
||||
// #include "ObjWellTrack.h"
|
||||
#include "BaseFun.h"
|
||||
#include "ObjWelllogRound.h"
|
||||
// #include "ObjectViewInfo.h"
|
||||
|
||||
#pragma warning( pop )
|
||||
|
||||
BEGIN_OSGDATAMODEL_NAMESPACE;
|
||||
class CObjWellLog;
|
||||
OSGDATAMODEL_EXPORT CObjWell *GetCurrentObjWell();
|
||||
OSGDATAMODEL_EXPORT void SetCurrentObjWell( CObjWell *pObjWell );
|
||||
|
||||
class OSGDATAMODEL_EXPORT CObjWell/* : public CObjBaseObject*/
|
||||
{
|
||||
// Q_OBJECT;
|
||||
public:
|
||||
CObjWell();
|
||||
|
||||
~CObjWell();
|
||||
|
||||
public:
|
||||
QString GetWellCode() const
|
||||
{
|
||||
return m_WellCode;
|
||||
}
|
||||
void SetWellCode(QString WellCode)
|
||||
{
|
||||
m_WellCode=WellCode;
|
||||
}
|
||||
void SaveWellHead(QString filename);
|
||||
//往井次下加入曲线时,根据曲线的类型返回其对应的目录id
|
||||
QUuid GetTragetFolderID(QUuid aLogTypeid);
|
||||
//根据folderid找到对应的folder,如果没有则创建
|
||||
// CObjectFolder* GetTragetFolder(QUuid aFolderTypeid);
|
||||
//获得井次数
|
||||
int GetWellRoundCount();
|
||||
// int GetAllWellRound(QList<PaiObject*> &wellroundchildren);
|
||||
virtual QUuid GetTypeID()const;
|
||||
|
||||
// virtual bool Serialize( CObjectArchive &ar );
|
||||
// virtual bool AddChild(PaiObject* pChild, bool mountNow = true);
|
||||
|
||||
// virtual pai::ios::welllog::DataObject *GetDbObject();
|
||||
|
||||
/**
|
||||
* Well的MD得到对应的x,y,z
|
||||
*/
|
||||
// bool GetXYZByMD(float fMD,double &x,double &y,double &z );
|
||||
// bool LoadXYZ(bool isreCreateXYZ=false);
|
||||
void ClearXYZ();
|
||||
/**
|
||||
* Well的点MD对应井口位置的相对位置dx、dy、dz
|
||||
*/
|
||||
// bool GetDXDYDZByMD(float fMD,double &dx,double &dy,double &dz );
|
||||
WellHead &GetWellHead();
|
||||
/**
|
||||
* Well log的最上点MD
|
||||
*/
|
||||
double GetTopWellLogDepth();
|
||||
|
||||
double GetBottomWellLogDepth();
|
||||
CObjWelllogRound* GetCurrentObjWellRound();
|
||||
void SetCurrentObjWellRound(CObjWelllogRound*pWellRound);
|
||||
/**
|
||||
* Well x,y,z井轨迹信息
|
||||
*/
|
||||
// void Compute2DTrajectory(float _HScale=10000,float _VScale=10000);
|
||||
// void Compute2DTrajectory(float _ProjAngle,double _HorizBoreXE,double _HorizBoreYN,float _HScale=10000,float _VScale=10000);
|
||||
FLOATPROPERTY & GetDX();
|
||||
FLOATPROPERTY & GetDY();
|
||||
float GetDX(float dep);
|
||||
float GetDY(float dep);
|
||||
float GetDZ(float dep);
|
||||
FLOATPROPERTY & GetAngle();
|
||||
float GetDYToDep(float dy);
|
||||
float GetDXToDep(float dx);
|
||||
void SetDX( const FLOATPROPERTY *vDX );
|
||||
void SetDY( const FLOATPROPERTY *vDX );
|
||||
void SetAngle(const FLOATPROPERTY *Angle);
|
||||
DOUBLEPROPERTY & GetX();
|
||||
DOUBLEPROPERTY & GetY();
|
||||
DOUBLEPROPERTY & GetZ();
|
||||
void SetX( const DOUBLEPROPERTY *vX );
|
||||
void SetY( const DOUBLEPROPERTY *vX );
|
||||
void SetZ( const DOUBLEPROPERTY *vX );
|
||||
void SetStartDep(float dep);
|
||||
void SetEndDep(float dep);
|
||||
void SetRlev(float rlev);
|
||||
void SetDepth(float sdep,float edep,float rlev);
|
||||
float GetStartDep();
|
||||
float GetEndDep();
|
||||
float GetRlev();
|
||||
|
||||
void SetWellFileName(QString WellName)
|
||||
{
|
||||
m_WellFileName=WellName;
|
||||
}
|
||||
QString GetWellFileName()
|
||||
{
|
||||
CObjWelllogRound *pWR=GetCurrentObjWellRound();
|
||||
if(pWR) return pWR->GetSlfFileName();
|
||||
return m_WellFileName;
|
||||
}
|
||||
virtual QString GetWellMessageFileName()
|
||||
{
|
||||
return m_WellFileName;
|
||||
}
|
||||
|
||||
bool isUsed()
|
||||
{
|
||||
return isFLAG;
|
||||
}
|
||||
void SetUsed(bool flag)
|
||||
{
|
||||
isFLAG=flag;
|
||||
}
|
||||
// void SetDepth(CObjWell *pWell);
|
||||
|
||||
/**
|
||||
* 井符号图片
|
||||
*/
|
||||
QString GetWellSymbol();
|
||||
void SetWellSymbol(QString imagef)
|
||||
{
|
||||
m_strWellImage=imagef;
|
||||
}
|
||||
|
||||
virtual void SetDBWell(pai::ios::welllog::Well &DbWell);
|
||||
|
||||
pai::ios::welllog::Well &GetDBWell();
|
||||
|
||||
|
||||
// virtual void CopyFrom( CBaseObject *pOSGObjectOther );
|
||||
|
||||
/**
|
||||
*@brief 判断井名是否存在
|
||||
*/
|
||||
// virtual bool isExistsName(QString name);
|
||||
/************************************************************************/
|
||||
/* @brief 得到本井下的对应模板值的井曲线[遍历所有井次,拿到第一条] */
|
||||
/************************************************************************/
|
||||
// pai::datamodel::CObjWellLog* GetWellLogByTemplate(const QVariant& templateKey);
|
||||
/************************************************************************/
|
||||
/* @brief 得到本井次下的对应模板值的井曲线 */
|
||||
/************************************************************************/
|
||||
// pai::datamodel::CObjWellLog* GetWellLogByTemplate(QString wellroundPath,const QVariant& templateKey);
|
||||
// static int ComputeTrajectory(CObjWell *pWell,QString Slffilename);
|
||||
private:
|
||||
|
||||
/**
|
||||
* @brief 设置数据所属ID
|
||||
*/
|
||||
// void SetBelongID();
|
||||
private:
|
||||
|
||||
//井轨迹x,y,z,MD
|
||||
FLOATPROPERTY m_vDX;
|
||||
FLOATPROPERTY m_vDY;
|
||||
FLOATPROPERTY m_vAngle;
|
||||
|
||||
DOUBLEPROPERTY m_vX;
|
||||
DOUBLEPROPERTY m_vY;
|
||||
DOUBLEPROPERTY m_vZ;
|
||||
DOUBLEPROPERTY m_vMD;
|
||||
WellHead m_WellHead;
|
||||
double m_StartDep,m_EndDep,m_Rlev;
|
||||
QString m_strWellImage; //井类型符号
|
||||
pai::ios::welllog::Well m_DbWell; //Db 里的well对象
|
||||
QString m_WellFileName;
|
||||
QString m_WellCode; ///<井编码 API编码
|
||||
CObjWelllogRound*m_pCurrentWelllogRound;
|
||||
bool isFLAG;
|
||||
double m_XYZStartDep,m_XYZEndDep,m_XYZRlev;
|
||||
public slots:
|
||||
// void slotWellMessage(QString slffile);
|
||||
};
|
||||
|
||||
/**
|
||||
* @class CWellViewInfo3DBasemap
|
||||
* @brief well在3D窗口,Basemap窗口上的viewinfo
|
||||
*/
|
||||
// class OSGDATAMODEL_EXPORT CWellViewInfo3DBasemap: public CObjectViewInfo
|
||||
// {
|
||||
// Q_OBJECT
|
||||
// public:
|
||||
// CWellViewInfo3DBasemap();
|
||||
|
||||
// IMPLE_META_PROPERTY();
|
||||
|
||||
// GM_PROPERTY_NORMAL( CLineProperty,LineProperty );
|
||||
// Q_PROPERTY(CLineProperty LineProperty READ GetLineProperty WRITE SetLineProperty );
|
||||
|
||||
// GM_PROPERTY_NORMAL( bool,DrawWellPath);
|
||||
// Q_PROPERTY(bool DrawWellPath READ GetDrawWellPath WRITE SetDrawWellPath );
|
||||
// };
|
||||
|
||||
using namespace pai::datamodel;
|
||||
|
||||
END_OSGDATAMODEL_NAMESPACE
|
||||
|
||||
#endif
|
||||
92
OSGDataModel/include/ObjWelllogRound.h
Normal file
92
OSGDataModel/include/ObjWelllogRound.h
Normal file
|
|
@ -0,0 +1,92 @@
|
|||
/**
|
||||
* @file ObjWell.h
|
||||
* @brief "井次"数据模型
|
||||
* @date 2014-6-3
|
||||
* @author: liyonggang
|
||||
*/
|
||||
#ifndef PAI_FRAME_OSGWELLLOGROUND_H
|
||||
#define PAI_FRAME_OSGWELLLOGROUND_H
|
||||
#pragma warning( push ,0)
|
||||
#include <QUuid>
|
||||
#include "WelllogRound.h"
|
||||
#include "BaseObject.h"
|
||||
// #include "ObjectFolder.h"
|
||||
#include "ObjWelllog.h"
|
||||
#pragma warning( pop )
|
||||
|
||||
BEGIN_OSGDATAMODEL_NAMESPACE;
|
||||
|
||||
class OSGDATAMODEL_EXPORT CObjWelllogRound : public CBaseObject/*CBaseObjectImpl*/
|
||||
{
|
||||
// Q_OBJECT
|
||||
public:
|
||||
// CObjWelllogRound();
|
||||
|
||||
~CObjWelllogRound();
|
||||
|
||||
public:
|
||||
/**
|
||||
* @brief Add a child object in general way.
|
||||
* @param pChild the child object handle
|
||||
* @param mountNow 是否将其挂载到树上
|
||||
* @根据对象的类型,将其加到对应的分类上
|
||||
*/
|
||||
// virtual bool AddChild(PaiObject* pChild, bool mountNow = true);
|
||||
|
||||
virtual QUuid GetTypeID()const;
|
||||
|
||||
// virtual bool Serialize( CObjectArchive &ar );
|
||||
|
||||
virtual pai::ios::welllog::DataObject *GetDbObject();
|
||||
|
||||
pai::ios::welllog::WelllogRound &GetDBWelllogRound();
|
||||
//按名称从井次下拿测井曲线
|
||||
// CObjWellLog* GetWellLogByName(QString name);
|
||||
|
||||
// void SetDBWelllogRound( pai::ios::welllog::WelllogRound DbWelllogRound);
|
||||
|
||||
// bool isExistsName(QString name);
|
||||
// void setParent(PaiObject* pObject);
|
||||
|
||||
virtual void CopyFrom( CBaseObject *pOSGObjectOther );
|
||||
QString GetSlfFileName() const { return m_strAttachedSlfFile; }
|
||||
// void SetSlfFileName(QString val);
|
||||
CObjWell *GetWell();
|
||||
void SetWell(CObjWell *pWell);
|
||||
// QString GetWellRoundPath();
|
||||
bool isUsed()
|
||||
{
|
||||
return isFLAG;
|
||||
}
|
||||
void SetUsed(bool flag)
|
||||
{
|
||||
isFLAG=flag;
|
||||
}
|
||||
virtual QString GetDescription();
|
||||
|
||||
private:
|
||||
void SetBelongID();
|
||||
private:
|
||||
//往井次下加入曲线时,根据曲线的类型返回其对应的目录id
|
||||
QUuid GetTragetFolderID(QUuid aLogTypeid);
|
||||
//根据folderid找到对应的folder,如果没有则创建
|
||||
// CObjectFolder* GetTragetFolder(QUuid aFolderTypeid);
|
||||
|
||||
QString m_strAttachedSlfFile; //该井次附加的slf文件
|
||||
|
||||
QString m_strWellImage; //井类型符号
|
||||
pai::ios::welllog::WelllogRound m_DbWelllogRound; //Db 里的well对象
|
||||
// PaiObject* m_pObject; //
|
||||
CObjWell *m_pWell;
|
||||
bool isFLAG;
|
||||
};
|
||||
//得到当前井次
|
||||
OSGDATAMODEL_EXPORT CObjWelllogRound *GetCurrentObjWelllogRound();
|
||||
OSGDATAMODEL_EXPORT void SetCurrentObjWelllogRound( CObjWelllogRound *pObjWelllogRound );
|
||||
// OSGDATAMODEL_EXPORT QString GetCurrentWellRoundPath();
|
||||
// OSGDATAMODEL_EXPORT QString GetSingleWellFolderID();
|
||||
using namespace pai::datamodel;
|
||||
|
||||
END_OSGDATAMODEL_NAMESPACE
|
||||
|
||||
#endif
|
||||
539
OSGDataModel/include/Well.h
Normal file
539
OSGDataModel/include/Well.h
Normal file
|
|
@ -0,0 +1,539 @@
|
|||
/**
|
||||
* @file Well.h
|
||||
* @brief 测井对象基类
|
||||
*/
|
||||
|
||||
#ifndef PAI_FRAME_IOSERVICE_WELL_H
|
||||
#define PAI_FRAME_IOSERVICE_WELL_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "DataObject.h"
|
||||
#include "WelllogRound.h"
|
||||
#include "OSGDataModel.h"
|
||||
#include "MemRdWt.h"
|
||||
namespace pai {
|
||||
namespace ios {
|
||||
namespace welllog {
|
||||
|
||||
/**
|
||||
*@class Point
|
||||
*@brief 定义井轨迹点类
|
||||
*/
|
||||
class Point
|
||||
{
|
||||
public:
|
||||
double GetMd()
|
||||
{
|
||||
return m_md;
|
||||
}
|
||||
double GetAzim()
|
||||
{
|
||||
return m_azim;
|
||||
}
|
||||
double GetIncl()
|
||||
{
|
||||
return m_incl;
|
||||
}
|
||||
void SetMd(double md)
|
||||
{
|
||||
this->m_md = md;
|
||||
}
|
||||
void SetAzim(double azim)
|
||||
{
|
||||
this->m_azim = azim;
|
||||
}
|
||||
void SetIncl(double incl)
|
||||
{
|
||||
this->m_incl = incl;
|
||||
}
|
||||
private:
|
||||
double m_md; ///<测量深度
|
||||
double m_azim; ///<井斜角
|
||||
double m_incl; ///<方位角
|
||||
};
|
||||
|
||||
/**
|
||||
*@class Well
|
||||
*@brief 定义井数据类
|
||||
*/
|
||||
class OSGDATAMODEL_EXPORT Well : public DataObject
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief 构造函数
|
||||
*/
|
||||
Well():DataObject()
|
||||
{
|
||||
Init();
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
m_AreaName=""; ///<地区名
|
||||
m_CompanyName=""; ///<油公司名
|
||||
m_WellType=0; ///<井类型
|
||||
m_XCode=0; ///<X-坐标
|
||||
m_YCode=0; ///<Y-坐标
|
||||
m_Asl=0; ///<地面海拔
|
||||
m_Bsl=0; ///<补心海拔
|
||||
m_SDrillDate=""; ///<开钻日期
|
||||
m_EDrillDate=""; ///<完钻日期
|
||||
m_CompleteDate=""; ///<完井日期
|
||||
m_CWMethod=""; ///<完井方法
|
||||
m_Bit1Prog=""; ///<钻头1程序
|
||||
m_Bit2Prog=""; ///<钻头2程序
|
||||
m_Bit3Prog=""; ///<钻头3程序
|
||||
m_Bit4Prog=""; ///<钻头4程序
|
||||
m_Bit5Prog=""; ///<钻头5程序
|
||||
m_Cas1Prog=""; ///<套管1程序
|
||||
m_Cas2Prog=""; ///<套管2程序
|
||||
m_Cas3Prog=""; ///<套管3程序
|
||||
m_Cas4Prog=""; ///<套管4程序
|
||||
m_Cas5Prog=""; ///<套管5程序
|
||||
m_Cas1Shot=0; ///<段套1长度
|
||||
m_SC1SDep=0; ///<段套1起始深度
|
||||
m_SC1EDep=0; ///<段套1结束深度
|
||||
m_Cas2Shot=0; ///<段套2长度
|
||||
m_SC2SDep=0; ///<段套2起始深度
|
||||
m_SC2EDep=0; ///<段套2结束深度
|
||||
m_Remark=""; ///<备注
|
||||
m_Points.clear(); ///<井轨迹点
|
||||
TopDepth=0;
|
||||
BottomDepth=0;
|
||||
m_name="";
|
||||
memset(&filemessage,0,sizeof(filemessage));
|
||||
}
|
||||
/**
|
||||
* @brief 析构函数
|
||||
*/
|
||||
virtual ~Well()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* @brief 拷贝构造函数
|
||||
*/
|
||||
Well(const Well& well);
|
||||
/**
|
||||
* @brief 赋值
|
||||
*/
|
||||
Well & operator=(const Well& well);
|
||||
/**
|
||||
* @brief 保存数据
|
||||
*/
|
||||
virtual void Save();
|
||||
|
||||
/**
|
||||
* @brief 根据ID获取对象信息
|
||||
* @param[in] id 数据ID
|
||||
*/
|
||||
virtual void Get(long long id);
|
||||
/**
|
||||
* @brief 修改数据
|
||||
*/
|
||||
virtual void Update();
|
||||
/**
|
||||
* @brief 删除数据
|
||||
* @param[in] id 数据ID
|
||||
*/
|
||||
virtual void Delete(long long id = 0);
|
||||
/**
|
||||
* @brief 获得该井下所有的井次信息
|
||||
* @param[out] infos 井次信息
|
||||
*/
|
||||
void GetWelllogRound(std::vector<WelllogRound>& infos);
|
||||
|
||||
/**
|
||||
* @brief 同时保存多条井次数据
|
||||
* @param[in] welllogrounds 井次信息
|
||||
*/
|
||||
void SaveWelllogRound(std::vector<WelllogRound>& welllogrounds);
|
||||
|
||||
void SetTopDepth(float dep)
|
||||
{
|
||||
this->TopDepth = dep;
|
||||
}
|
||||
|
||||
void SetBottomDepth(float dep)
|
||||
{
|
||||
this->BottomDepth = dep;
|
||||
}
|
||||
|
||||
float GetTopDepth()
|
||||
{
|
||||
return TopDepth;
|
||||
}
|
||||
|
||||
float GetBottomDepth()
|
||||
{
|
||||
return BottomDepth;
|
||||
}
|
||||
|
||||
public:
|
||||
std::string GetAreaName() const
|
||||
{
|
||||
return m_AreaName;
|
||||
}
|
||||
|
||||
float GetAsl() const
|
||||
{
|
||||
return m_Asl;
|
||||
}
|
||||
|
||||
std::string GetBit1Prog() const
|
||||
{
|
||||
return m_Bit1Prog;
|
||||
}
|
||||
|
||||
std::string GetBit2Prog() const
|
||||
{
|
||||
return m_Bit2Prog;
|
||||
}
|
||||
|
||||
std::string GetBit3Prog() const
|
||||
{
|
||||
return m_Bit3Prog;
|
||||
}
|
||||
|
||||
std::string GetBit4Prog() const
|
||||
{
|
||||
return m_Bit4Prog;
|
||||
}
|
||||
|
||||
std::string GetBit5Prog() const
|
||||
{
|
||||
return m_Bit5Prog;
|
||||
}
|
||||
|
||||
float GetBsl() const
|
||||
{
|
||||
return m_Bsl;
|
||||
}
|
||||
|
||||
std::string GetCWMethod() const
|
||||
{
|
||||
return m_CWMethod;
|
||||
}
|
||||
|
||||
std::string GetCas1Prog() const
|
||||
{
|
||||
return m_Cas1Prog;
|
||||
}
|
||||
|
||||
float GetCas1Shot() const
|
||||
{
|
||||
return m_Cas1Shot;
|
||||
}
|
||||
|
||||
std::string GetCas2Prog() const
|
||||
{
|
||||
return m_Cas2Prog;
|
||||
}
|
||||
|
||||
float GetCas2Shot() const
|
||||
{
|
||||
return m_Cas2Shot;
|
||||
}
|
||||
|
||||
std::string GetCas3Prog() const
|
||||
{
|
||||
return m_Cas3Prog;
|
||||
}
|
||||
|
||||
std::string GetCas4Prog() const
|
||||
{
|
||||
return m_Cas4Prog;
|
||||
}
|
||||
|
||||
std::string GetCas5Prog() const
|
||||
{
|
||||
return m_Cas5Prog;
|
||||
}
|
||||
|
||||
std::string GetCompanyName() const
|
||||
{
|
||||
return m_CompanyName;
|
||||
}
|
||||
|
||||
std::string GetCompleteDate() const
|
||||
{
|
||||
return m_CompleteDate;
|
||||
}
|
||||
|
||||
std::string GetEDrillDate() const
|
||||
{
|
||||
return m_EDrillDate;
|
||||
}
|
||||
|
||||
std::string GetRemark() const
|
||||
{
|
||||
return m_Remark;
|
||||
}
|
||||
|
||||
float GetSC1EDep() const
|
||||
{
|
||||
return m_SC1EDep;
|
||||
}
|
||||
|
||||
float GetSC1SDep() const
|
||||
{
|
||||
return m_SC1SDep;
|
||||
}
|
||||
|
||||
float GetSC2EDep() const
|
||||
{
|
||||
return m_SC2EDep;
|
||||
}
|
||||
|
||||
float GetSC2SDep() const
|
||||
{
|
||||
return m_SC2SDep;
|
||||
}
|
||||
|
||||
std::string GetSDrillDate() const
|
||||
{
|
||||
return m_SDrillDate;
|
||||
}
|
||||
|
||||
int GetWellType() const
|
||||
{
|
||||
return m_WellType;
|
||||
}
|
||||
|
||||
double GetXCode() const
|
||||
{
|
||||
return m_XCode;
|
||||
}
|
||||
|
||||
double GetYCode() const
|
||||
{
|
||||
return m_YCode;
|
||||
}
|
||||
std::vector<Point> GetPoint() const
|
||||
{
|
||||
return m_Points;
|
||||
}
|
||||
void SetAreaName(std::string areaName)
|
||||
{
|
||||
this->m_AreaName = areaName;
|
||||
}
|
||||
|
||||
void SetAsl(float asl)
|
||||
{
|
||||
this->m_Asl = asl;
|
||||
}
|
||||
|
||||
void SetBit1Prog(std::string bit1Prog)
|
||||
{
|
||||
this->m_Bit1Prog = bit1Prog;
|
||||
}
|
||||
|
||||
void SetBit2Prog(std::string bit2Prog)
|
||||
{
|
||||
this->m_Bit2Prog = bit2Prog;
|
||||
}
|
||||
|
||||
void SetBit3Prog(std::string bit3Prog)
|
||||
{
|
||||
this->m_Bit3Prog = bit3Prog;
|
||||
}
|
||||
|
||||
void SetBit4Prog(std::string bit4Prog)
|
||||
{
|
||||
this->m_Bit4Prog = bit4Prog;
|
||||
}
|
||||
|
||||
void SetBit5Prog(std::string bit5Prog)
|
||||
{
|
||||
this->m_Bit5Prog = bit5Prog;
|
||||
}
|
||||
|
||||
void SetBsl(float bsl)
|
||||
{
|
||||
this->m_Bsl = bsl;
|
||||
}
|
||||
|
||||
void SetCWMethod(std::string cWMethod)
|
||||
{
|
||||
this->m_CWMethod = cWMethod;
|
||||
}
|
||||
|
||||
void SetCas1Prog(std::string cas1Prog)
|
||||
{
|
||||
this->m_Cas1Prog = cas1Prog;
|
||||
}
|
||||
|
||||
void SetCas1Shot(float cas1Shot)
|
||||
{
|
||||
this->m_Cas1Shot = cas1Shot;
|
||||
}
|
||||
|
||||
void SetCas2Prog(std::string cas2Prog)
|
||||
{
|
||||
this->m_Cas2Prog = cas2Prog;
|
||||
}
|
||||
|
||||
void SetCas2Shot(float cas2Shot)
|
||||
{
|
||||
this->m_Cas2Shot = cas2Shot;
|
||||
}
|
||||
|
||||
void SetCas3Prog(std::string cas3Prog)
|
||||
{
|
||||
this->m_Cas3Prog = cas3Prog;
|
||||
}
|
||||
|
||||
void SetCas4Prog(std::string cas4Prog)
|
||||
{
|
||||
this->m_Cas4Prog = cas4Prog;
|
||||
}
|
||||
|
||||
void SetCas5Prog(std::string cas5Prog)
|
||||
{
|
||||
this->m_Cas5Prog = cas5Prog;
|
||||
}
|
||||
|
||||
void SetCompanyName(std::string companyName)
|
||||
{
|
||||
this->m_CompanyName = companyName;
|
||||
}
|
||||
|
||||
void SetCompleteDate(std::string completeDate)
|
||||
{
|
||||
this->m_CompleteDate = completeDate;
|
||||
}
|
||||
|
||||
void SetEDrillDate(std::string eDrillDate)
|
||||
{
|
||||
this->m_EDrillDate = eDrillDate;
|
||||
}
|
||||
|
||||
void SetRemark(std::string remark)
|
||||
{
|
||||
this->m_Remark = remark;
|
||||
}
|
||||
|
||||
void SetSC1EDep(float sC1EDep)
|
||||
{
|
||||
this->m_SC1EDep = sC1EDep;
|
||||
}
|
||||
|
||||
void SetSC1SDep(float sC1SDep)
|
||||
{
|
||||
this->m_SC1SDep = sC1SDep;
|
||||
}
|
||||
|
||||
void SetSC2EDep(float sC2EDep)
|
||||
{
|
||||
this->m_SC2EDep = sC2EDep;
|
||||
}
|
||||
|
||||
void SetSC2SDep(float sC2SDep)
|
||||
{
|
||||
this->m_SC2SDep = sC2SDep;
|
||||
}
|
||||
|
||||
void SetSDrillDate(std::string sDrillDate)
|
||||
{
|
||||
this->m_SDrillDate = sDrillDate;
|
||||
}
|
||||
|
||||
void SetWellType(int wellType)
|
||||
{
|
||||
this->m_WellType = wellType;
|
||||
}
|
||||
|
||||
void SetXCode(double xCode)
|
||||
{
|
||||
this->m_XCode = xCode;
|
||||
}
|
||||
|
||||
void SetYCode(double yCode)
|
||||
{
|
||||
this->m_YCode = yCode;
|
||||
}
|
||||
void SetPoint(const std::vector<Point>& pts)
|
||||
{
|
||||
this->m_Points = pts;
|
||||
}
|
||||
void LoadMeesge(QString filename)
|
||||
{
|
||||
if(filename=="") return;
|
||||
CMemRdWt *logio=new CMemRdWt();
|
||||
if(filename==""||!logio->Open(filename.toStdString().c_str(),CSlfIO::modeRead))
|
||||
{
|
||||
delete logio;
|
||||
// QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes);
|
||||
return;
|
||||
}
|
||||
// FILE*fp=fopen("d:\\oa.txt","a");
|
||||
// fprintf(fp,"3-mess!\n\n");
|
||||
// fclose(fp);
|
||||
|
||||
logio->GetFileMessage(filemessage);
|
||||
// fp=fopen("d:\\oa.txt","a");
|
||||
// fprintf(fp,"4-mess!\n\n");
|
||||
// fclose(fp);
|
||||
delete logio;
|
||||
// fp=fopen("d:\\oa.txt","a");
|
||||
// fprintf(fp,"5-mess!\n\n");
|
||||
// fclose(fp);
|
||||
}
|
||||
|
||||
void SaveMeesge(QString filename)
|
||||
{
|
||||
if(filename=="") return;
|
||||
CMemRdWt *logio=new CMemRdWt();
|
||||
if(filename==""||!logio->Open(filename.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
{
|
||||
delete logio;
|
||||
// QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes);
|
||||
return;
|
||||
}
|
||||
logio->SetFileMessage(filemessage);
|
||||
delete logio;
|
||||
}
|
||||
|
||||
|
||||
private:
|
||||
std::string m_AreaName; ///<地区名
|
||||
std::string m_CompanyName; ///<油公司名
|
||||
int m_WellType; ///<井类型
|
||||
double m_XCode; ///<X-坐标
|
||||
double m_YCode; ///<Y-坐标
|
||||
float m_Asl; ///<地面海拔
|
||||
float m_Bsl; ///<补心海拔
|
||||
std::string m_SDrillDate; ///<开钻日期
|
||||
std::string m_EDrillDate; ///<完钻日期
|
||||
std::string m_CompleteDate; ///<完井日期
|
||||
std::string m_CWMethod; ///<完井方法
|
||||
std::string m_Bit1Prog; ///<钻头1程序
|
||||
std::string m_Bit2Prog; ///<钻头2程序
|
||||
std::string m_Bit3Prog; ///<钻头3程序
|
||||
std::string m_Bit4Prog; ///<钻头4程序
|
||||
std::string m_Bit5Prog; ///<钻头5程序
|
||||
std::string m_Cas1Prog; ///<套管1程序
|
||||
std::string m_Cas2Prog; ///<套管2程序
|
||||
std::string m_Cas3Prog; ///<套管3程序
|
||||
std::string m_Cas4Prog; ///<套管4程序
|
||||
std::string m_Cas5Prog; ///<套管5程序
|
||||
float m_Cas1Shot; ///<段套1长度
|
||||
float m_SC1SDep; ///<段套1起始深度
|
||||
float m_SC1EDep; ///<段套1结束深度
|
||||
float m_Cas2Shot; ///<段套2长度
|
||||
float m_SC2SDep; ///<段套2起始深度
|
||||
float m_SC2EDep; ///<段套2结束深度
|
||||
std::string m_Remark; ///<备注
|
||||
std::vector<Point> m_Points; ///<井轨迹点
|
||||
|
||||
float TopDepth;
|
||||
float BottomDepth;
|
||||
std::string m_name;
|
||||
Slf_FILE_MESSAGE filemessage;
|
||||
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
556
OSGDataModel/include/WelllogRound.h
Normal file
556
OSGDataModel/include/WelllogRound.h
Normal file
|
|
@ -0,0 +1,556 @@
|
|||
/**
|
||||
* @file WelllogRound.h
|
||||
* @brief 测井对象基类
|
||||
*/
|
||||
|
||||
#ifndef PAI_FRAME_IOSERVICE_WELLLOGROUND_H
|
||||
#define PAI_FRAME_IOSERVICE_WELLLOGROUND_H
|
||||
|
||||
#include <string>
|
||||
#include <vector>
|
||||
#include "DataObject.h"
|
||||
// #include "WelllogCurve.h"
|
||||
// #include "CoreImg.h"
|
||||
// #include "CorePhysics.h"
|
||||
// #include "DrillCore.h"
|
||||
// #include "Gujing1Result.h"
|
||||
// #include "SwallCore.h"
|
||||
// #include "OgResult.h"
|
||||
// #include "CoreDesc.h"
|
||||
// #include "Wavefile.h"
|
||||
// #include "Geostratum.h"
|
||||
// #include "OgResult2.h"
|
||||
// #include "Zone.h"
|
||||
#include "OSGDataModel.h"
|
||||
#include "MemRdWt.h"
|
||||
namespace pai {
|
||||
namespace ios {
|
||||
namespace welllog {
|
||||
|
||||
|
||||
class OSGDATAMODEL_EXPORT TableDataName
|
||||
{
|
||||
public:
|
||||
long long GetTableID() const
|
||||
{
|
||||
return m_TableID;
|
||||
}
|
||||
std::string GetTableName() const
|
||||
{
|
||||
return m_TableName;
|
||||
}
|
||||
std::string GetTableDataTableName() const
|
||||
{
|
||||
return m_TableDataTableName;
|
||||
}
|
||||
void SetTableID(long long tableID)
|
||||
{
|
||||
this->m_TableID = tableID;
|
||||
}
|
||||
void SetTableName(std::string tableName)
|
||||
{
|
||||
this->m_TableName = tableName;
|
||||
}
|
||||
void SetTableDataTableName(std::string tableDataTableName)
|
||||
{
|
||||
this->m_TableDataTableName = tableDataTableName;
|
||||
}
|
||||
private:
|
||||
long long m_TableID; ///<表数据ID
|
||||
std::string m_TableName; ///<表数据名
|
||||
std::string m_TableDataTableName; ///<表格数据所在的表名
|
||||
};
|
||||
|
||||
/**
|
||||
*@class WelllogRound
|
||||
*@brief 定义井次类
|
||||
*/
|
||||
class OSGDATAMODEL_EXPORT WelllogRound : public DataObject
|
||||
{
|
||||
public:
|
||||
/**
|
||||
* @brief 构造函数
|
||||
*/
|
||||
WelllogRound():DataObject(){
|
||||
Init();
|
||||
}
|
||||
void Init()
|
||||
{
|
||||
memset(&filemessage,0,sizeof(filemessage));
|
||||
m_CompanyName=""; ///<测井公司名
|
||||
m_Team=""; ///<测井小队
|
||||
m_Operator=""; ///<操作员
|
||||
m_Date=""; ///<测井日期
|
||||
m_Serial=""; ///<测井系列
|
||||
m_Item=""; ///<测井项目
|
||||
m_MudType=""; ///<泥浆类型
|
||||
m_MudViscosity=0; ///<泥浆粘度
|
||||
m_WaterLoss=0; ///<失水量
|
||||
m_Density=0; ///<泥浆密度
|
||||
m_Resi=0; ///<泥浆电阻率
|
||||
m_Temp=0; ///<泥浆温度
|
||||
TopDepth=0;
|
||||
BottomDepth=0;
|
||||
m_INTLog=""; ///<测井井段
|
||||
m_NITINT=""; ///<解释井段
|
||||
m_TempBot=0; ///<井底温度
|
||||
m_IntProg=""; ///<解释程序
|
||||
m_InteDress=""; ///<解释员
|
||||
m_Audit=""; ///<审核
|
||||
m_Remark=""; ///<备注
|
||||
m_name="";
|
||||
};
|
||||
|
||||
void SetTopDepth(float dep)
|
||||
{
|
||||
this->TopDepth = dep;
|
||||
}
|
||||
|
||||
void SetBottomDepth(float dep)
|
||||
{
|
||||
this->BottomDepth = dep;
|
||||
}
|
||||
|
||||
float GetTopDepth()
|
||||
{
|
||||
return TopDepth;
|
||||
}
|
||||
|
||||
float GetBottomDepth()
|
||||
{
|
||||
return BottomDepth;
|
||||
}
|
||||
|
||||
/**
|
||||
* @brief 析构函数
|
||||
*/
|
||||
virtual ~WelllogRound()
|
||||
{
|
||||
}
|
||||
/**
|
||||
* @brief 拷贝构造函数
|
||||
*/
|
||||
WelllogRound(const WelllogRound& welllogRound);
|
||||
/**
|
||||
* @brief 赋值
|
||||
*/
|
||||
WelllogRound & operator=(const WelllogRound& welllogRound);
|
||||
/**
|
||||
* @brief 保存数据
|
||||
*/
|
||||
virtual void Save();
|
||||
|
||||
/**
|
||||
* @brief 根据ID获取对象信息
|
||||
* @param[in] id 数据ID
|
||||
*/
|
||||
virtual void Get(long long id);
|
||||
/**
|
||||
* @brief 修改数据
|
||||
*/
|
||||
virtual void Update();
|
||||
/**
|
||||
* @brief 删除数据
|
||||
* @param[in] id 数据ID
|
||||
*/
|
||||
virtual void Delete(long long id = 0);
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的曲线
|
||||
// * @param[out] infos 曲线列表
|
||||
// */
|
||||
// void GetWelllogCurve(std::vector<WelllogCurve>& infos);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条曲线
|
||||
// * @param[in] welllogcurves 曲线列表
|
||||
// */
|
||||
// void SaveWelllogCurve(std::vector<WelllogCurve>& welllogcurves);
|
||||
|
||||
/**
|
||||
* @brief 获得该井次下所有表
|
||||
* @param[out] infos 井次下所有表
|
||||
*/
|
||||
// void GetTableDataName(std::vector<TableDataName>& infos);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的岩心图片数据
|
||||
// * @param[out] coreimgs 所有的岩心图片数据
|
||||
// */
|
||||
// void GetCoreimg(std::vector<Coreimg>& coreimgs);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条岩心图片数据
|
||||
// * @param[in] coreimgs 多条岩心图片数据
|
||||
// */
|
||||
// void SaveCoreimg(std::vector<Coreimg>& coreimgs);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的物性分析数据
|
||||
// * @param[out] corephysicss 物性分析数据
|
||||
// */
|
||||
// void GetCorePhysics(std::vector<CorePhysics>& corephysicss);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条物性分析数据
|
||||
// * @param[in] corephysicss 物性分析数据
|
||||
// */
|
||||
// void SaveCorePhysics(std::vector<CorePhysics>& corephysicss);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的钻井取心数据
|
||||
// * @param[out] drillcores 钻井取心数据
|
||||
// */
|
||||
// void GetDrillCore(std::vector<DrillCore>& drillcores);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条钻井取心数据
|
||||
// * @param[in] drillcores 钻井取心数据
|
||||
// */
|
||||
// void SaveDrillCore(std::vector<DrillCore>& drillcores);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的固井结论数据
|
||||
// * @param[out] gujing1results 固井结论数据
|
||||
// */
|
||||
// void GetGujing1Result(std::vector<Gujing1Result>& gujing1results);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条固井结论数据
|
||||
// * @param[in] gujing1results 固井结论数据
|
||||
// */
|
||||
// void SaveGujing1Result(std::vector<Gujing1Result>& gujing1results);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的井壁取心数据
|
||||
// * @param[out] swallcores 井壁取心数据
|
||||
// */
|
||||
// void GetSwallCore(std::vector<SwallCore>& swallcores);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条井壁取心数据
|
||||
// * @param[in] swallcores 井壁取心数据
|
||||
// */
|
||||
// void SaveSwallCore(std::vector<SwallCore>& swallcores);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的油气结论数据
|
||||
// * @param[out] ogresults 油气结论数据
|
||||
// */
|
||||
// void GetOgResult(std::vector<OgResult>& ogresults);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条油气结论数据
|
||||
// * @param[in] ogresults 油气结论数据
|
||||
// */
|
||||
// void SaveOgResult(std::vector<OgResult>& ogresults);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的岩心描述数据
|
||||
// * @param[out] coredescs 岩心描述数据
|
||||
// */
|
||||
// void GetCoreDesc(std::vector<CoreDesc>& coredescs);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条岩心描述数据
|
||||
// * @param[in] coredescs 岩心描述数据
|
||||
// */
|
||||
// void SaveCoreDesc(std::vector<CoreDesc>& coredescs);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的地质分层数据
|
||||
// * @param[out] geostratums 地质分层数据
|
||||
// */
|
||||
// void GetGeostratum(std::vector<Geostratum>& geostratums);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条地质分层数据
|
||||
// * @param[in] geostratums 地质分层数据
|
||||
// */
|
||||
// void SaveGeostratum(std::vector<Geostratum>& geostratums);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的二次解释结论数据
|
||||
// * @param[out] ogresult2s 二次解释结论数据
|
||||
// */
|
||||
// void GetOgResult2(std::vector<OgResult2>& ogresult2s);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条二次解释结论数据
|
||||
// * @param[in] ogresult2s 二次解释结论数据
|
||||
// */
|
||||
// void SaveOgResult2(std::vector<OgResult2>& ogresult2s);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的多维曲线索引
|
||||
// * @param[out] wavefiles 多维曲线索引
|
||||
// */
|
||||
// void GetWavefile(std::vector<Wavefile>& wavefiles);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条多维曲线索引
|
||||
// * @param[in] wavefiles 多维曲线索引
|
||||
// */
|
||||
// void SaveWavefile(std::vector<Wavefile>& wavefiles);
|
||||
|
||||
// /**
|
||||
// * @brief 获得该井次下所有的层段数据
|
||||
// * @param[out] zones 层段数据
|
||||
// */
|
||||
// void GetZone(std::vector<Zone>& zones);
|
||||
|
||||
// /**
|
||||
// * @brief 同时保存多条层段数据
|
||||
// * @param[in] zones 层段数据
|
||||
// */
|
||||
// void SaveZone(std::vector<Zone>& zones);
|
||||
|
||||
public:
|
||||
std::string GetAudit() const
|
||||
{
|
||||
return m_Audit;
|
||||
}
|
||||
|
||||
std::string GetCompanyName() const
|
||||
{
|
||||
return m_CompanyName;
|
||||
}
|
||||
|
||||
std::string GetDate() const
|
||||
{
|
||||
return m_Date;
|
||||
}
|
||||
|
||||
float GetDensity() const
|
||||
{
|
||||
return m_Density;
|
||||
}
|
||||
|
||||
std::string GetINTLog() const
|
||||
{
|
||||
return m_INTLog;
|
||||
}
|
||||
|
||||
std::string GetIntProg() const
|
||||
{
|
||||
return m_IntProg;
|
||||
}
|
||||
|
||||
std::string GetInteDress() const
|
||||
{
|
||||
return m_InteDress;
|
||||
}
|
||||
|
||||
std::string GetItem() const
|
||||
{
|
||||
return m_Item;
|
||||
}
|
||||
|
||||
std::string GetMudType() const
|
||||
{
|
||||
return m_MudType;
|
||||
}
|
||||
|
||||
float GetMudViscosity() const
|
||||
{
|
||||
return m_MudViscosity;
|
||||
}
|
||||
|
||||
std::string GetNITINT() const
|
||||
{
|
||||
return m_NITINT;
|
||||
}
|
||||
|
||||
std::string GetOperator() const
|
||||
{
|
||||
return m_Operator;
|
||||
}
|
||||
|
||||
std::string GetRemark() const
|
||||
{
|
||||
return m_Remark;
|
||||
}
|
||||
|
||||
float GetResi() const
|
||||
{
|
||||
return m_Resi;
|
||||
}
|
||||
|
||||
std::string GetSerial() const
|
||||
{
|
||||
return m_Serial;
|
||||
}
|
||||
|
||||
std::string GetTeam() const
|
||||
{
|
||||
return m_Team;
|
||||
}
|
||||
|
||||
float GetTemp() const
|
||||
{
|
||||
return m_Temp;
|
||||
}
|
||||
|
||||
float GetTempBot() const
|
||||
{
|
||||
return m_TempBot;
|
||||
}
|
||||
|
||||
float GetWaterLoss() const
|
||||
{
|
||||
return m_WaterLoss;
|
||||
}
|
||||
|
||||
void SetAudit(std::string audit)
|
||||
{
|
||||
this->m_Audit = audit;
|
||||
}
|
||||
|
||||
void SetCompanyName(std::string companyName)
|
||||
{
|
||||
this->m_CompanyName = companyName;
|
||||
}
|
||||
|
||||
void SetDate(std::string mdate)
|
||||
{
|
||||
this->m_Date = mdate;
|
||||
}
|
||||
|
||||
void SetDensity(float density)
|
||||
{
|
||||
this->m_Density = density;
|
||||
}
|
||||
|
||||
void SetINTLog(std::string mINTLog)
|
||||
{
|
||||
this->m_INTLog = mINTLog;
|
||||
}
|
||||
|
||||
void SetIntProg(std::string intProg)
|
||||
{
|
||||
this->m_IntProg = intProg;
|
||||
}
|
||||
|
||||
void SetInteDress(std::string inteDress)
|
||||
{
|
||||
this->m_InteDress = inteDress;
|
||||
}
|
||||
|
||||
void SetItem(std::string item)
|
||||
{
|
||||
this->m_Item = item;
|
||||
}
|
||||
|
||||
void SetMudType(std::string mudType)
|
||||
{
|
||||
this->m_MudType = mudType;
|
||||
}
|
||||
|
||||
void SetMudViscosity(float mudViscosity)
|
||||
{
|
||||
this->m_MudViscosity = mudViscosity;
|
||||
}
|
||||
|
||||
void SetNITINT(std::string mNITINT)
|
||||
{
|
||||
this->m_NITINT = mNITINT;
|
||||
}
|
||||
|
||||
void SetOperator(std::string moperator)
|
||||
{
|
||||
this->m_Operator = moperator;
|
||||
}
|
||||
|
||||
void SetRemark(std::string remark)
|
||||
{
|
||||
this->m_Remark = remark;
|
||||
}
|
||||
|
||||
void SetResi(float resi)
|
||||
{
|
||||
this->m_Resi = resi;
|
||||
}
|
||||
|
||||
void SetSerial(std::string serial)
|
||||
{
|
||||
this->m_Serial = serial;
|
||||
}
|
||||
|
||||
void SetTeam(std::string team)
|
||||
{
|
||||
this->m_Team = team;
|
||||
}
|
||||
|
||||
void SetTemp(float temp)
|
||||
{
|
||||
this->m_Temp = temp;
|
||||
}
|
||||
|
||||
void SetTempBot(float tempBot)
|
||||
{
|
||||
this->m_TempBot = tempBot;
|
||||
}
|
||||
|
||||
void SetWaterLoss(float waterLoss)
|
||||
{
|
||||
this->m_WaterLoss = waterLoss;
|
||||
}
|
||||
|
||||
void LoadMeesge(QString filename)
|
||||
{
|
||||
if(filename=="") return;
|
||||
CMemRdWt *logio=new CMemRdWt();
|
||||
if(filename==""||!logio->Open(filename.toStdString().c_str(),CSlfIO::modeRead))
|
||||
{
|
||||
delete logio;
|
||||
// QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes);
|
||||
return;
|
||||
}
|
||||
logio->GetFileMessage(filemessage);
|
||||
delete logio;
|
||||
}
|
||||
|
||||
void SaveMeesge(QString filename)
|
||||
{
|
||||
if(filename=="") return;
|
||||
CMemRdWt *logio=new CMemRdWt();
|
||||
if(filename==""||!logio->Open(filename.toStdString().c_str(),CSlfIO::modeReadWrite))
|
||||
{
|
||||
delete logio;
|
||||
// QMessageBox::information(NULL,"提示","SLF文件打开失败,请检查!!",QMessageBox::Yes);
|
||||
return;
|
||||
}
|
||||
logio->SetFileMessage(filemessage);
|
||||
delete logio;
|
||||
}
|
||||
|
||||
private:
|
||||
std::string m_CompanyName; ///<测井公司名
|
||||
std::string m_Team; ///<测井小队
|
||||
std::string m_Operator; ///<操作员
|
||||
std::string m_Date; ///<测井日期
|
||||
std::string m_Serial; ///<测井系列
|
||||
std::string m_Item; ///<测井项目
|
||||
std::string m_MudType; ///<泥浆类型
|
||||
float m_MudViscosity; ///<泥浆粘度
|
||||
float m_WaterLoss; ///<失水量
|
||||
float m_Density; ///<泥浆密度
|
||||
float m_Resi; ///<泥浆电阻率
|
||||
float m_Temp; ///<泥浆温度
|
||||
std::string m_INTLog; ///<测井井段
|
||||
std::string m_NITINT; ///<解释井段
|
||||
float m_TempBot; ///<井底温度
|
||||
std::string m_IntProg; ///<解释程序
|
||||
std::string m_InteDress; ///<解释员
|
||||
std::string m_Audit; ///<审核
|
||||
std::string m_Remark; ///<备注
|
||||
float TopDepth;
|
||||
float BottomDepth;
|
||||
std::string m_name;
|
||||
Slf_FILE_MESSAGE filemessage;
|
||||
};
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
#endif
|
||||
1441
OSGDataModel/src/ObjWell.cpp
Normal file
1441
OSGDataModel/src/ObjWell.cpp
Normal file
File diff suppressed because it is too large
Load Diff
383
OSGDataModel/src/ObjWelllogRound.cpp
Normal file
383
OSGDataModel/src/ObjWelllogRound.cpp
Normal file
|
|
@ -0,0 +1,383 @@
|
|||
#pragma warning( push ,0)
|
||||
#include <cassert>
|
||||
#include "ObjWelllogRound.h"
|
||||
#include "ObjWelllog.h"
|
||||
#include "ObjWell.h"
|
||||
#include <QFileInfo>
|
||||
// #include "WellLogWorkflowDataModel.h"
|
||||
#pragma warning( pop )
|
||||
|
||||
BEGIN_OSGDATAMODEL_NAMESPACE;
|
||||
CObjWelllogRound *g_pObjWelllogRound(NULL);
|
||||
|
||||
OSGDATAMODEL_EXPORT CObjWelllogRound *GetCurrentObjWelllogRound()
|
||||
{
|
||||
return g_pObjWelllogRound;
|
||||
}
|
||||
|
||||
OSGDATAMODEL_EXPORT void SetCurrentObjWelllogRound( CObjWelllogRound *pObjWelllogRound )
|
||||
{
|
||||
g_pObjWelllogRound = pObjWelllogRound;
|
||||
if(pObjWelllogRound)SetCurrentObjWell(pObjWelllogRound->GetWell());
|
||||
}
|
||||
// OSGDATAMODEL_EXPORT QString GetCurrentWellRoundPath()
|
||||
// {
|
||||
// if(g_pObjWelllogRound)
|
||||
// {
|
||||
// return g_pObjWelllogRound->GetWellRoundPath();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //TODO 输出日志提醒
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
// OSGDATAMODEL_EXPORT QString GetSingleWellFolderID()
|
||||
// {
|
||||
// if(g_pObjWelllogRound)
|
||||
// {
|
||||
// return g_pObjWelllogRound->GetParent()->GetChildByType(GetClassID_SingleMethodFolder())->GetID();
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// //TODO 输出日志提醒
|
||||
// return "";
|
||||
// }
|
||||
// }
|
||||
// QString CObjWelllogRound::GetWellRoundPath()
|
||||
// {
|
||||
// QString CurrentWellRoundPath=GetFullPathName();
|
||||
// QStringList strList = CurrentWellRoundPath.split("/",QString::SkipEmptyParts);
|
||||
// strList.takeFirst();
|
||||
// CurrentWellRoundPath = strList.join("/");
|
||||
// return CurrentWellRoundPath;
|
||||
// }
|
||||
QString CObjWelllogRound::GetDescription()
|
||||
{
|
||||
CLogIO *logio=new CLogIO();
|
||||
QString slfFileName=GetSlfFileName();
|
||||
if(slfFileName.isEmpty()) return "";
|
||||
if(!logio->Open(slfFileName.toStdString().c_str(),CSlfIO::modeRead))
|
||||
{
|
||||
delete logio;
|
||||
return "";
|
||||
}
|
||||
float StartDepth=999999;
|
||||
float EndDepth=-999999;
|
||||
float MinDepLevel=999999;
|
||||
float MaxDepLevel=-999999;
|
||||
int nCurve=0;
|
||||
int nTable=0;
|
||||
int nWave=0;
|
||||
int nCard=0;
|
||||
int nOther=0;
|
||||
int nDelete=0;
|
||||
int count=logio->GetObjectCount();
|
||||
for(int i=0;i<count;i++)
|
||||
{
|
||||
if(logio->GetObjectStatus(i)!=OBJECT_NORMAL) {
|
||||
nDelete++;
|
||||
continue;
|
||||
}
|
||||
short curvetype=logio->GetObjectType(i);
|
||||
short Attribute=0,SubAttribute=0;
|
||||
logio->GetObjectAttribute(i,&Attribute,&SubAttribute);
|
||||
if(curvetype==CURVE_OBJECT)
|
||||
{
|
||||
Slf_CURVE acurveinfo;
|
||||
logio->GetCurveInfo(i,&acurveinfo);
|
||||
nCurve++;
|
||||
if(acurveinfo.DepLevel>MaxDepLevel) MaxDepLevel=acurveinfo.DepLevel;
|
||||
if(acurveinfo.DepLevel<MinDepLevel) MinDepLevel=acurveinfo.DepLevel;
|
||||
if(acurveinfo.StartDepth<StartDepth) StartDepth=acurveinfo.StartDepth;
|
||||
if(acurveinfo.EndDepth>EndDepth) EndDepth=acurveinfo.EndDepth;
|
||||
}
|
||||
else if(curvetype==WAVE_OBJECT)
|
||||
{
|
||||
Slf_WAVE acurveinfo;
|
||||
logio->GetWaveInfo(i,&acurveinfo);
|
||||
nWave++;
|
||||
if(acurveinfo.DepLevel>MaxDepLevel) MaxDepLevel=acurveinfo.DepLevel;
|
||||
if(acurveinfo.DepLevel<MinDepLevel) MinDepLevel=acurveinfo.DepLevel;
|
||||
if(acurveinfo.StartDepth<StartDepth) StartDepth=acurveinfo.StartDepth;
|
||||
if(acurveinfo.EndDepth>EndDepth) EndDepth=acurveinfo.EndDepth;
|
||||
}
|
||||
else if(curvetype==CARD_OBJECT)
|
||||
{
|
||||
nCard++;
|
||||
}
|
||||
else if(curvetype==FMT_OBJECT)
|
||||
{
|
||||
nOther++;
|
||||
}
|
||||
else if(curvetype==TDT_OBJECT)
|
||||
{
|
||||
nOther++;
|
||||
}
|
||||
else if(curvetype>CARD_OBJECT||curvetype==0)
|
||||
{
|
||||
nTable++;
|
||||
}
|
||||
}
|
||||
delete logio;
|
||||
QString result="";
|
||||
result.append("对象类型:井次文件\n");
|
||||
result.append("总对象数:").append(QString::number(count)).append("\n");;
|
||||
result.append("标记为删除对象数:").append(QString::number(nDelete)).append("\n");;
|
||||
result.append("曲线数:").append(QString::number(nCurve)).append("\n");
|
||||
result.append("表格数:").append(QString::number(nTable)).append("\n");
|
||||
result.append("参数卡:").append(QString::number(nCard)).append("\n");
|
||||
result.append("其它:").append(QString::number(nOther)).append("\n");
|
||||
result.append("最小深度:").append(QString::number(StartDepth)).append("\n");
|
||||
result.append("最大深度:").append(QString::number(EndDepth)).append("\n");
|
||||
result.append("最小采样间隔:").append(QString::number(MinDepLevel)).append("\n");
|
||||
result.append("最小采样间隔:").append(QString::number(MaxDepLevel)).append("\n");
|
||||
return result;
|
||||
}
|
||||
|
||||
CObjWell *CObjWelllogRound::GetWell()
|
||||
{
|
||||
return m_pWell;
|
||||
}
|
||||
void CObjWelllogRound::SetWell(CObjWell *pWell)
|
||||
{
|
||||
m_pWell=pWell;
|
||||
}
|
||||
|
||||
// CObjWelllogRound::CObjWelllogRound()
|
||||
// {
|
||||
// SetIconName( "icon/WellRound.png");
|
||||
// m_pObject = NULL;
|
||||
// m_pWell=NULL;
|
||||
// isFLAG=false;
|
||||
// }
|
||||
// void CObjWelllogRound::SetSlfFileName(QString val)
|
||||
// {
|
||||
// QString oldf=m_strAttachedSlfFile;
|
||||
// m_strAttachedSlfFile=val;
|
||||
// std::vector<CBaseObject*> PaiObjects;
|
||||
// CPaiObjectHelper::RecursionGetAllChildren(this,PaiObjects );
|
||||
// for(int j=0;j<PaiObjects.size();j++) {
|
||||
// if(PaiObjects[j]==this) continue;
|
||||
// CObjWellLog* tempWellLog= dynamic_cast<CObjWellLog*>(PaiObjects[j]);
|
||||
// if(tempWellLog) {
|
||||
// tempWellLog->SetSlfFileName(val);
|
||||
// continue;
|
||||
// }
|
||||
// PaiObject *pObj=PaiObjects[j]->GetPaiObject()->GetObjectByType(GetClassID_WorkflowFolder());
|
||||
// if(pObj) {
|
||||
// QList<PaiObject *> childs;
|
||||
// pObj->GetChildren(childs);
|
||||
// for (int n=0;n<childs.size();n++)
|
||||
// {
|
||||
// CWellLogWorkflowDataModel* tempWellLog= dynamic_cast<CWellLogWorkflowDataModel*>(childs[n]);
|
||||
// if(tempWellLog) {
|
||||
// CBaseObject *pBaseObject=tempWellLog->GetMWVecWindowDocument();
|
||||
// if(pBaseObject) {
|
||||
// QList<PaiObject*> childObjects;
|
||||
// pBaseObject->GetPaiObject()->GetChildren(childObjects);
|
||||
// for(int i=0;i<childObjects.size();i++) {
|
||||
// CObjWellTrack *pWellTrack=dynamic_cast<CObjWellTrack *>(childObjects[i]);
|
||||
// if(pWellTrack) {
|
||||
// if(!pWellTrack->GetWelllogRound()) continue;
|
||||
// CObjWell*pWell=pWellTrack->GetWelllogRound()->GetWell();
|
||||
// if(pWell==this->GetWell()) continue;
|
||||
// if(pWell) {
|
||||
// int index0=val.lastIndexOf(".");
|
||||
// QString nf=val.left(index0);
|
||||
// QString old=pWell->GetWellMessageFileName();
|
||||
// int index=old.lastIndexOf(".");
|
||||
// int index1=oldf.lastIndexOf(".");
|
||||
// QString onf=oldf.left(index1);
|
||||
// if(old.compare(onf,Qt::CaseInsensitive)==0&&nf.compare(old,Qt::CaseInsensitive)) {
|
||||
// pWell->SetWellFileName(m_strAttachedSlfFile);
|
||||
// QList <PaiObject *> pWellRs;
|
||||
// int count=pWell->GetAllWellRound(pWellRs);
|
||||
// for(int k=0;k<count;k++)
|
||||
// {
|
||||
// CObjWelllogRound *pWellR=dynamic_cast<CObjWelllogRound *>(pWellRs[k]);
|
||||
// if(pWellR==this) continue;
|
||||
// pWellR->SetSlfFileName(val);
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
|
||||
CObjWelllogRound::~CObjWelllogRound()
|
||||
{
|
||||
if(g_pObjWelllogRound==this) g_pObjWelllogRound=NULL;
|
||||
CObjWell *pWell=GetWell();
|
||||
if(pWell) pWell->SetCurrentObjWellRound(NULL);
|
||||
return;
|
||||
}
|
||||
|
||||
// void CObjWelllogRound::setParent(PaiObject* pObject)
|
||||
// {
|
||||
// m_pObject = pObject;
|
||||
// }
|
||||
// bool CObjWelllogRound::isExistsName(QString name)
|
||||
// {
|
||||
// QList<PaiObject*> objs;
|
||||
// if(this->GetParent() != NULL)
|
||||
// {
|
||||
// GetParent()->GetChildren(objs);
|
||||
// }else
|
||||
// {
|
||||
// if(m_pObject != NULL)
|
||||
// {
|
||||
// m_pObject->GetChildren(objs);
|
||||
// }
|
||||
|
||||
// }
|
||||
|
||||
// foreach(PaiObject* obj, objs)
|
||||
// {
|
||||
// CObjWelllogRound* pTempRound = dynamic_cast<CObjWelllogRound*>(obj);
|
||||
// if(pTempRound != NULL && pTempRound != this && pTempRound->GetName().compare(name,Qt::CaseInsensitive)==0)
|
||||
// {
|
||||
// return true;
|
||||
// }
|
||||
// }
|
||||
// return false;
|
||||
// }
|
||||
|
||||
void CObjWelllogRound::SetBelongID()
|
||||
{
|
||||
// pai::objectmodel::PaiObject* paiWell = this->GetForebear(GetClassID_Well());
|
||||
// if(paiWell)
|
||||
// {
|
||||
// pai::datamodel::CObjWell *currentWell= dynamic_cast<pai::datamodel::CObjWell*>(paiWell);
|
||||
// if(currentWell)
|
||||
// {
|
||||
// pai::ios::welllog::DataObject* dbWell = currentWell->GetDbObject();
|
||||
// if(dbWell)
|
||||
// {
|
||||
// m_DbWelllogRound.SetDataBelongID(dbWell->GetDataID());
|
||||
// }
|
||||
// }
|
||||
// }
|
||||
}
|
||||
QUuid CObjWelllogRound::GetTypeID()const
|
||||
{
|
||||
return GetClassID_WellLogRound();
|
||||
}
|
||||
|
||||
|
||||
// bool CObjWelllogRound::Serialize( CObjectArchive &ar )
|
||||
// {
|
||||
// if(ar.IsStoring())
|
||||
// {
|
||||
|
||||
// BEGIN_WRITE_OBJECT( ar,1 );
|
||||
|
||||
// BEGIN_WRITE_BLOCK( ar, 1);
|
||||
|
||||
// CBaseObjectImpl::Serialize( ar );
|
||||
// ar<<m_strAttachedSlfFile;
|
||||
// END_WRITE_BLOCK( ar, 1 );
|
||||
|
||||
// END_WRITE_OBJECT( ar );
|
||||
// }
|
||||
// else
|
||||
// {
|
||||
// BEGIN_READ_OBJECT( ar,1 );
|
||||
|
||||
// BEGIN_READ_BLOCK( 1 );
|
||||
|
||||
// CBaseObjectImpl::Serialize( ar );
|
||||
// ar>>m_strAttachedSlfFile;
|
||||
// END_READ_BLOCK( 1 );
|
||||
|
||||
// END_READ_OBJECT( ar );
|
||||
// }
|
||||
// return true;
|
||||
// }
|
||||
|
||||
|
||||
// void CObjWelllogRound::SetDBWelllogRound( pai::ios::welllog::WelllogRound DbWelllogRound )
|
||||
// {
|
||||
// m_DbWelllogRound=DbWelllogRound;
|
||||
// }
|
||||
|
||||
pai::ios::welllog::WelllogRound &CObjWelllogRound::GetDBWelllogRound()
|
||||
{
|
||||
return m_DbWelllogRound;
|
||||
|
||||
}
|
||||
|
||||
pai::ios::welllog::DataObject * CObjWelllogRound::GetDbObject()
|
||||
{
|
||||
SetBelongID();
|
||||
return &m_DbWelllogRound;
|
||||
}
|
||||
|
||||
|
||||
void CObjWelllogRound::CopyFrom( CBaseObject *pOSGObjectOther )
|
||||
{
|
||||
CBaseObject::CopyFrom( pOSGObjectOther );
|
||||
|
||||
CObjWelllogRound *pWellRound = dynamic_cast<CObjWelllogRound *>( pOSGObjectOther );
|
||||
if( pWellRound )
|
||||
{
|
||||
m_DbWelllogRound= pWellRound->m_DbWelllogRound ;
|
||||
}
|
||||
}
|
||||
//
|
||||
// bool CObjWelllogRound::AddChild(PaiObject* pChild, bool mountNow )
|
||||
// {
|
||||
// if(!pChild) return false;
|
||||
// if(GetTragetFolderID(pChild->GetTypeID())!=GetClassID_GeneralFolder())
|
||||
// GetTragetFolder(GetTragetFolderID(pChild->GetTypeID()))->AddChild(pChild,mountNow);
|
||||
// else
|
||||
// CBaseObjectImpl::AddChild(pChild,true);
|
||||
// return true;
|
||||
// }
|
||||
|
||||
//往井次下加入曲线时,根据曲线的类型返回其对应的目录id
|
||||
QUuid CObjWelllogRound::GetTragetFolderID(QUuid aLogTypeid){
|
||||
if(aLogTypeid==GetClassID_WellLog()) return GetClassID_WellLogFolder();
|
||||
else if(aLogTypeid==GetClassID_WellTrajectory()) return GetClassID_WellTrajectoryFolder();
|
||||
else if(aLogTypeid==GetClassID_WellLogWavefile()) return GetClassID_WellLogWavefileFolder();
|
||||
else if(aLogTypeid==GetClassID_WellLogBIN()) return GetClassID_WellLogBINFolder();
|
||||
else if(aLogTypeid==GetClassID_WellLogFMT()) return GetClassID_WellLogFMTFolder();
|
||||
else if(aLogTypeid==GetClassID_WellLogINP()) return GetClassID_WellLogINPFolder();
|
||||
else if(aLogTypeid==GetClassID_WellLogTABLE()) return GetClassID_WellLogTABLEFolder();
|
||||
else if(aLogTypeid==GetClassID_WellLogTDT()) return GetClassID_WellLogTDTFolder();
|
||||
else return GetClassID_GeneralFolder()
|
||||
|
||||
;}
|
||||
// //根据folderid找到对应的folder,如果没有则创建
|
||||
// CObjectFolder* CObjWelllogRound::GetTragetFolder(QUuid aFolderTypeid)
|
||||
// {
|
||||
// CObjectFolder* target=dynamic_cast<CObjectFolder*>(GetChildByType(aFolderTypeid));
|
||||
// if(target==NULL){
|
||||
// target=new CObjectFolder(aFolderTypeid);
|
||||
// CBaseObjectImpl::AddChild(target,true);
|
||||
// }
|
||||
// return target;
|
||||
// }
|
||||
|
||||
|
||||
// CObjWellLog* CObjWelllogRound::GetWellLogByName(QString name)
|
||||
// {
|
||||
// CObjWellLog* result=NULL;
|
||||
// result=dynamic_cast<CObjWellLog*>(GetObjectByName(name,3));
|
||||
// return result;
|
||||
// }
|
||||
|
||||
// BEGIN_REGISTER_OBJECT(CObjWelllogRound)
|
||||
// QUuid(GetClassID_WellLogRound())
|
||||
// END_REGISTER_OBJECT( CObjWelllogRound );
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
END_OSGDATAMODEL_NAMESPACE
|
||||
329
OSGDataModel/src/Well.cpp
Normal file
329
OSGDataModel/src/Well.cpp
Normal file
|
|
@ -0,0 +1,329 @@
|
|||
#include "Well.h"
|
||||
#include "../include/WelllogRound.h"
|
||||
// #include "orm/sqlite/Persistence.h"
|
||||
// #include "orm/gen/Well.h"
|
||||
// #include "orm/gen/Wellloground.h"
|
||||
#include <string>
|
||||
|
||||
// using namespace pai::error;
|
||||
// using namespace pai::turtle;
|
||||
using namespace std;
|
||||
|
||||
namespace pai {
|
||||
namespace ios {
|
||||
namespace welllog {
|
||||
|
||||
|
||||
Well::Well(const Well& well):DataObject(well),m_AreaName(well.GetAreaName()), m_CompanyName(well.GetCompanyName()),
|
||||
m_WellType(well.GetWellType()),m_XCode(well.GetXCode()),
|
||||
m_YCode(well.GetYCode()),m_Asl(well.GetAsl()),m_Bsl(well.GetBsl()),m_SDrillDate(well.GetSDrillDate()),
|
||||
m_EDrillDate(well.GetEDrillDate()),m_CompleteDate(well.GetCompleteDate()),m_CWMethod(well.GetCWMethod()),
|
||||
m_Bit1Prog(well.GetBit1Prog()),m_Bit2Prog(well.GetBit2Prog()),m_Bit3Prog(well.GetBit3Prog()),m_Bit4Prog(well.GetBit4Prog()),
|
||||
m_Bit5Prog(well.GetBit5Prog()),m_Cas1Prog(well.GetCas1Prog()),m_Cas2Prog(well.GetCas2Prog()),m_Cas3Prog(well.GetCas3Prog()),
|
||||
m_Cas4Prog(well.GetCas4Prog()),m_Cas5Prog(well.GetCas5Prog()),m_Cas1Shot(well.GetCas1Shot()),m_SC1SDep(well.GetSC1SDep()),
|
||||
m_SC1EDep(well.GetSC1EDep()),m_Cas2Shot(well.GetCas2Shot()),m_SC2SDep(well.GetSC2SDep()),m_SC2EDep(well.GetSC2EDep()),
|
||||
m_Remark(well.GetRemark()),m_Points(well.GetPoint()),m_name(well.m_name)
|
||||
{
|
||||
filemessage=well.filemessage;
|
||||
}
|
||||
|
||||
Well & Well::operator=(const Well& well)
|
||||
{
|
||||
if(this == &well)
|
||||
return *this;
|
||||
DataObject::operator=(well);
|
||||
this->SetAreaName(well.GetAreaName());
|
||||
this->SetCompanyName(well.GetCompanyName());
|
||||
this->SetWellType(well.GetWellType());
|
||||
this->SetXCode(well.GetXCode());
|
||||
this->SetYCode(well.GetYCode());
|
||||
this->SetAsl(well.GetAsl());
|
||||
this->SetBsl(well.GetBsl());
|
||||
this->SetSDrillDate(well.GetSDrillDate());
|
||||
this->SetEDrillDate(well.GetEDrillDate());
|
||||
this->SetCompleteDate(well.GetCompleteDate());
|
||||
this->SetCWMethod(well.GetCWMethod());
|
||||
this->SetBit1Prog(well.GetBit1Prog());
|
||||
this->SetBit2Prog(well.GetBit2Prog());
|
||||
this->SetBit3Prog(well.GetBit3Prog());
|
||||
this->SetBit4Prog(well.GetBit4Prog());
|
||||
this->SetBit5Prog(well.GetBit5Prog());
|
||||
this->SetCas1Prog(well.GetCas1Prog());
|
||||
this->SetCas2Prog(well.GetCas2Prog());
|
||||
this->SetCas3Prog(well.GetCas3Prog());
|
||||
this->SetCas4Prog(well.GetCas4Prog());
|
||||
this->SetCas5Prog(well.GetCas5Prog());
|
||||
this->SetCas1Shot(well.GetCas1Shot());
|
||||
this->SetSC1SDep(well.GetSC1SDep());
|
||||
this->SetSC1EDep(well.GetSC1EDep());
|
||||
this->SetCas2Shot(well.GetCas2Shot());
|
||||
this->SetSC2SDep(well.GetSC2SDep());
|
||||
this->SetSC2EDep(well.GetSC2EDep());
|
||||
this->SetRemark(well.GetRemark());
|
||||
this->SetPoint(well.GetPoint());
|
||||
return *this;
|
||||
}
|
||||
|
||||
void Well::Save()
|
||||
{
|
||||
// pai::orm::Well well;
|
||||
|
||||
// well.SetProjectId(this->GetDataBelongID());
|
||||
// well.SetAreaName(m_AreaName);
|
||||
// well.SetCompanyName(m_CompanyName);
|
||||
// well.SetWellName(this->GetName());
|
||||
// well.SetWellType(m_WellType);
|
||||
// well.SetXCoordinate(m_XCode);
|
||||
// well.SetYCoordinate(m_YCode);
|
||||
// well.SetAsl(m_Asl);
|
||||
// well.SetBsl(m_Bsl);
|
||||
// well.SetDateSdrill(m_SDrillDate);
|
||||
// well.SetDateEdrill(m_EDrillDate);
|
||||
// well.SetDateComplete(m_CompleteDate);
|
||||
// well.SetMethodCwell(m_CWMethod);
|
||||
// well.SetBit1Prog(m_Bit1Prog);
|
||||
// well.SetBit2Prog(m_Bit2Prog);
|
||||
// well.SetBit3Prog(m_Bit3Prog);
|
||||
// well.SetBit4Prog(m_Bit4Prog);
|
||||
// well.SetBit5Prog(m_Bit5Prog);
|
||||
// well.SetCas1Prog(m_Cas1Prog);
|
||||
// well.SetCas2Prog(m_Cas2Prog);
|
||||
// well.SetCas3Prog(m_Cas3Prog);
|
||||
// well.SetCas4Prog(m_Cas4Prog);
|
||||
// well.SetCas5Prog(m_Cas5Prog);
|
||||
// well.SetShotCas1(m_Cas1Shot);
|
||||
// well.SetSc1Sdep(m_SC1SDep);
|
||||
// well.SetSc1Edep(m_SC1EDep);
|
||||
// well.SetShotCas2(m_Cas2Shot);
|
||||
// well.SetSc2Sdep(m_SC2SDep);
|
||||
// well.SetSc2Edep(m_SC2EDep);
|
||||
// well.SetRemark(m_Remark);
|
||||
// //存入井轨迹点
|
||||
// size_t bufferLength = sizeof(size_t) + m_Points.size()*sizeof(Point);
|
||||
// char *buffer = new char[bufferLength];
|
||||
// size_t pointSize = m_Points.size();
|
||||
|
||||
// memcpy(buffer, &pointSize, sizeof(size_t));
|
||||
// if (pointSize > 0)
|
||||
// {
|
||||
// memcpy(buffer+sizeof(size_t), reinterpret_cast<char*>(&(m_Points[0])), m_Points.size()*sizeof(Point));
|
||||
// }
|
||||
// pai::orm::Blob blob;
|
||||
// blob.FromBuffer(buffer, bufferLength);
|
||||
// if (buffer != NULL)
|
||||
// {
|
||||
// delete[] buffer;
|
||||
// buffer = NULL;
|
||||
// }
|
||||
|
||||
// well.SetTrajectory(blob);
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// long long wlogId = pdb.Persist(well, true);
|
||||
// this->SetDataID(wlogId);
|
||||
}
|
||||
|
||||
void Well::Get(long long id)
|
||||
{
|
||||
// if(id <= 0)
|
||||
// {
|
||||
// std::stringstream ss;
|
||||
// ss << PAI_CURRENT_FUNCTION << ": WelllogID <= 0.";
|
||||
// throw pai::error::db_error(ss.str(), ERR_PARAMETER_ERROR);
|
||||
// }
|
||||
|
||||
// pai::orm::Well well;
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Load(pai::orm::Well::Well_id == id, well, true);
|
||||
|
||||
// this->SetDataID(well.GetWellId());
|
||||
// this->SetDataBelongID(well.GetProjectId());
|
||||
// this->SetAreaName(well.GetAreaName());
|
||||
// this->SetCompanyName(well.GetCompanyName());
|
||||
// this->SetName(well.GetWellName());
|
||||
// this->SetWellType(well.GetWellType());
|
||||
// this->SetXCode(well.GetXCoordinate());
|
||||
// this->SetYCode(well.GetYCoordinate());
|
||||
// this->SetAsl(well.GetAsl());
|
||||
// this->SetBsl(well.GetBsl());
|
||||
// this->SetSDrillDate(well.GetDateSdrill());
|
||||
// this->SetEDrillDate(well.GetDateEdrill());
|
||||
// this->SetCompleteDate(well.GetDateComplete());
|
||||
// this->SetCWMethod(well.GetMethodCwell());
|
||||
// this->SetBit1Prog(well.GetBit1Prog());
|
||||
// this->SetBit2Prog(well.GetBit2Prog());
|
||||
// this->SetBit3Prog(well.GetBit3Prog());
|
||||
// this->SetBit4Prog(well.GetBit4Prog());
|
||||
// this->SetBit5Prog(well.GetBit5Prog());
|
||||
// this->SetCas1Prog(well.GetCas1Prog());
|
||||
// this->SetCas2Prog(well.GetCas2Prog());
|
||||
// this->SetCas3Prog(well.GetCas3Prog());
|
||||
// this->SetCas4Prog(well.GetCas4Prog());
|
||||
// this->SetCas5Prog(well.GetCas5Prog());
|
||||
// this->SetCas1Shot(well.GetShotCas1());
|
||||
// this->SetSC1SDep(well.GetSc1Sdep());
|
||||
// this->SetSC1EDep(well.GetSc1Edep());
|
||||
// this->SetCas2Shot(well.GetShotCas2());
|
||||
// this->SetSC2SDep(well.GetSc2Sdep());
|
||||
// this->SetSC2EDep(well.GetSc2Edep());
|
||||
// this->SetRemark(well.GetRemark());
|
||||
// //获取井轨迹点
|
||||
// pai::orm::Blob blob;
|
||||
// blob = well.GetTrajectory();
|
||||
// char *buffer = blob.GetData();
|
||||
|
||||
// size_t pointSize;
|
||||
// memcpy(&pointSize, buffer,sizeof(size_t));
|
||||
// if (pointSize > 0)
|
||||
// {
|
||||
// m_Points.resize(pointSize);
|
||||
// memcpy(&(m_Points[0]), buffer+sizeof(size_t), sizeof(Point)*pointSize);
|
||||
// }
|
||||
}
|
||||
|
||||
void Well::Update()
|
||||
{
|
||||
// pai::orm::Well well;
|
||||
// well.SetWellId(this->GetDataID());
|
||||
// well.SetProjectId(this->GetDataBelongID());
|
||||
// well.SetAreaName(m_AreaName);
|
||||
// well.SetCompanyName(m_CompanyName);
|
||||
// well.SetWellName(this->GetName());
|
||||
// well.SetWellType(m_WellType);
|
||||
// well.SetXCoordinate(m_XCode);
|
||||
// well.SetYCoordinate(m_YCode);
|
||||
// well.SetAsl(m_Asl);
|
||||
// well.SetBsl(m_Bsl);
|
||||
// well.SetDateSdrill(m_SDrillDate);
|
||||
// well.SetDateEdrill(m_EDrillDate);
|
||||
// well.SetDateComplete(m_CompleteDate);
|
||||
// well.SetMethodCwell(m_CWMethod);
|
||||
// well.SetBit1Prog(m_Bit1Prog);
|
||||
// well.SetBit2Prog(m_Bit2Prog);
|
||||
// well.SetBit3Prog(m_Bit3Prog);
|
||||
// well.SetBit4Prog(m_Bit4Prog);
|
||||
// well.SetBit5Prog(m_Bit5Prog);
|
||||
// well.SetCas1Prog(m_Cas1Prog);
|
||||
// well.SetCas2Prog(m_Cas2Prog);
|
||||
// well.SetCas3Prog(m_Cas3Prog);
|
||||
// well.SetCas4Prog(m_Cas4Prog);
|
||||
// well.SetCas5Prog(m_Cas5Prog);
|
||||
// well.SetShotCas1(m_Cas1Shot);
|
||||
// well.SetSc1Sdep(m_SC1SDep);
|
||||
// well.SetSc1Edep(m_SC1EDep);
|
||||
// well.SetShotCas2(m_Cas2Shot);
|
||||
// well.SetSc2Sdep(m_SC2SDep);
|
||||
// well.SetSc2Edep(m_SC2EDep);
|
||||
// well.SetRemark(m_Remark);
|
||||
// //存入井轨迹点
|
||||
// size_t bufferLength = sizeof(size_t) + m_Points.size()*sizeof(Point);
|
||||
// char *buffer = new char[bufferLength];
|
||||
// size_t pointSize = m_Points.size();
|
||||
// memcpy(buffer, &pointSize, sizeof(size_t));
|
||||
// if (pointSize > 0)
|
||||
// {
|
||||
// memcpy(buffer+sizeof(size_t), reinterpret_cast<char*>(&(m_Points[0])), m_Points.size()*sizeof(Point));
|
||||
// }
|
||||
// pai::orm::Blob blob;
|
||||
// blob.FromBuffer(buffer, bufferLength);
|
||||
// if (buffer != NULL)
|
||||
// {
|
||||
// delete[] buffer;
|
||||
// buffer = NULL;
|
||||
// }
|
||||
|
||||
// well.SetTrajectory(blob);
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Update(well, true);
|
||||
}
|
||||
|
||||
void Well::Delete(long long id)
|
||||
{
|
||||
// if(id <= 0)
|
||||
// {
|
||||
// std::stringstream ss;
|
||||
// ss << PAI_CURRENT_FUNCTION << ": WellID <= 0.";
|
||||
// throw pai::error::db_error(ss.str(), ERR_PARAMETER_ERROR);
|
||||
// }
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
|
||||
// pdb.Delete<pai::orm::Well>(pai::orm::Well::Well_id == id);
|
||||
}
|
||||
|
||||
void Well::GetWelllogRound(std::vector<WelllogRound>& infos)
|
||||
{
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
|
||||
// vector<pai::orm::Wellloground> wRounds;
|
||||
|
||||
// pdb.Load((pai::orm::Wellloground::Well_id == this->GetDataID()), wRounds);
|
||||
// for(size_t i = 0; i < wRounds.size(); i++)
|
||||
// {
|
||||
// WelllogRound welllogRound;
|
||||
// welllogRound.SetDataID(wRounds[i].GetWelllogroundId());
|
||||
// welllogRound.SetDataBelongID(wRounds[i].GetWellId());
|
||||
// welllogRound.SetName(wRounds[i].GetWelllogroundName());
|
||||
// welllogRound.SetCompanyName(wRounds[i].GetLogCompanyName());
|
||||
// welllogRound.SetTeam(wRounds[i].GetTeam());
|
||||
// welllogRound.SetOperator(wRounds[i].GetOperator());
|
||||
// welllogRound.SetDate(wRounds[i].GetDate());
|
||||
// welllogRound.SetSerial(wRounds[i].GetSerial());
|
||||
// welllogRound.SetItem(wRounds[i].GetItem());
|
||||
// welllogRound.SetMudType(wRounds[i].GetMudType());
|
||||
// welllogRound.SetMudViscosity(wRounds[i].GetMudViscosity());
|
||||
// welllogRound.SetWaterLoss(wRounds[i].GetWaterLoss());
|
||||
// welllogRound.SetDensity(wRounds[i].GetMudDensity());
|
||||
// welllogRound.SetResi(wRounds[i].GetMudResi());
|
||||
// welllogRound.SetTemp(wRounds[i].GetMudTemp());
|
||||
// welllogRound.SetINTLog(wRounds[i].GetIntLog());
|
||||
// welllogRound.SetNITINT(wRounds[i].GetNitInt());
|
||||
// welllogRound.SetTempBot(wRounds[i].GetTempBot());
|
||||
// welllogRound.SetIntProg(wRounds[i].GetIntProg());
|
||||
// welllogRound.SetInteDress(wRounds[i].GetInteDress());
|
||||
// welllogRound.SetAudit(wRounds[i].GetAudit());
|
||||
// welllogRound.SetRemark(wRounds[i].GetRemark());
|
||||
// infos.push_back(welllogRound);
|
||||
// }
|
||||
}
|
||||
|
||||
void Well::SaveWelllogRound(std::vector<WelllogRound>& welllogrounds)
|
||||
{
|
||||
// std::vector<pai::orm::Wellloground> ormwelllogrounds;
|
||||
// pai::orm::Wellloground ormwellloground;
|
||||
// for(size_t i = 0; i < welllogrounds.size(); ++i)
|
||||
// {
|
||||
// ormwellloground.SetWelllogroundId(welllogrounds[i].GetDataID());
|
||||
// ormwellloground.SetWellId(welllogrounds[i].GetDataBelongID());
|
||||
// ormwellloground.SetWelllogroundName(welllogrounds[i].GetName());
|
||||
// ormwellloground.SetLogCompanyName(welllogrounds[i].GetCompanyName());
|
||||
// ormwellloground.SetTeam(welllogrounds[i].GetTeam());
|
||||
// ormwellloground.SetOperator(welllogrounds[i].GetOperator());
|
||||
// ormwellloground.SetDate(welllogrounds[i].GetDate());
|
||||
// ormwellloground.SetSerial(welllogrounds[i].GetSerial());
|
||||
// ormwellloground.SetItem(welllogrounds[i].GetItem());
|
||||
// ormwellloground.SetMudType(welllogrounds[i].GetMudType());
|
||||
// ormwellloground.SetMudViscosity(welllogrounds[i].GetMudViscosity());
|
||||
// ormwellloground.SetWaterLoss(welllogrounds[i].GetWaterLoss());
|
||||
// ormwellloground.SetMudDensity(welllogrounds[i].GetDensity());
|
||||
// ormwellloground.SetMudResi(welllogrounds[i].GetResi());
|
||||
// ormwellloground.SetMudTemp(welllogrounds[i].GetTemp());
|
||||
// ormwellloground.SetIntLog(welllogrounds[i].GetINTLog());
|
||||
// ormwellloground.SetNitInt(welllogrounds[i].GetNITINT());
|
||||
// ormwellloground.SetTempBot(welllogrounds[i].GetTempBot());
|
||||
// ormwellloground.SetIntProg(welllogrounds[i].GetIntProg());
|
||||
// ormwellloground.SetInteDress(welllogrounds[i].GetInteDress());
|
||||
// ormwellloground.SetAudit(welllogrounds[i].GetAudit());
|
||||
// ormwellloground.SetRemark(welllogrounds[i].GetRemark());
|
||||
|
||||
// ormwelllogrounds.push_back(ormwellloground);
|
||||
// }
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormwelllogrounds);
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
801
OSGDataModel/src/WelllogRound.cpp
Normal file
801
OSGDataModel/src/WelllogRound.cpp
Normal file
|
|
@ -0,0 +1,801 @@
|
|||
#include "WelllogRound.h"
|
||||
// #include "WelllogCurve.h"
|
||||
// #include "TableData.h"
|
||||
// #include "orm/sqlite/Persistence.h"
|
||||
// #include "orm/gen/Wellloground.h"
|
||||
// #include "orm/gen/Welllogcurve.h"
|
||||
// #include "orm/gen/Tableinfo.h"
|
||||
// #include "orm/WelllogResultSet.h"
|
||||
// #include "orm/gen/Coreimg.h"
|
||||
// #include "orm/gen/CorePhysics.h"
|
||||
// #include "orm/gen/DrillCore.h"
|
||||
// #include "orm/gen/Gujing1Result.h"
|
||||
// #include "orm/gen/SwallCore.h"
|
||||
// #include "orm/gen/OgResult.h"
|
||||
// #include "orm/gen/CoreDesc.h"
|
||||
// #include "orm/gen/Geostratum.h"
|
||||
// #include "orm/gen/OgResult2.h"
|
||||
// #include "orm/gen/Wavefile.h"
|
||||
// #include "orm/gen/Zone.h"
|
||||
#include <iostream>
|
||||
|
||||
using namespace std;
|
||||
// using namespace pai::error;
|
||||
// using namespace pai::turtle;
|
||||
|
||||
namespace pai {
|
||||
namespace ios {
|
||||
namespace welllog {
|
||||
|
||||
/**
|
||||
* @brief 构造函数
|
||||
*/
|
||||
|
||||
WelllogRound::WelllogRound(const WelllogRound& welllogRound):DataObject(welllogRound),m_CompanyName(welllogRound.GetCompanyName()),m_Team(welllogRound.GetTeam()),
|
||||
m_Operator(welllogRound.GetOperator()),m_Date(welllogRound.GetDate()),m_Serial(welllogRound.GetSerial()),m_Item(welllogRound.GetItem()),
|
||||
m_MudType(welllogRound.GetMudType()),m_MudViscosity(welllogRound.GetMudViscosity()),m_WaterLoss(welllogRound.GetWaterLoss()),m_Density(welllogRound.GetDensity()),
|
||||
m_Resi(welllogRound.GetResi()),m_Temp(welllogRound.GetTemp()),m_INTLog(welllogRound.GetINTLog()),m_NITINT(welllogRound.GetNITINT()),
|
||||
m_TempBot(welllogRound.GetTempBot()),m_IntProg(welllogRound.GetIntProg()),m_InteDress(welllogRound.GetInteDress()),m_Audit(welllogRound.GetAudit()),
|
||||
m_Remark(welllogRound.GetRemark()),filemessage(welllogRound.filemessage),m_name(welllogRound.m_name)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
WelllogRound & WelllogRound::operator=(const WelllogRound& welllogRound)
|
||||
{
|
||||
if(this == &welllogRound)
|
||||
return *this;
|
||||
DataObject::operator=(welllogRound);
|
||||
this->SetCompanyName(welllogRound.GetCompanyName());
|
||||
this->SetTeam(welllogRound.GetTeam());
|
||||
this->SetOperator(welllogRound.GetOperator());
|
||||
this->SetDate(welllogRound.GetDate());
|
||||
this->SetSerial(welllogRound.GetSerial());
|
||||
this->SetItem(welllogRound.GetItem());
|
||||
this->SetMudType(welllogRound.GetMudType());
|
||||
this->SetMudViscosity(welllogRound.GetMudViscosity());
|
||||
this->SetWaterLoss(welllogRound.GetWaterLoss());
|
||||
this->SetDensity(welllogRound.GetDensity());
|
||||
this->SetResi(welllogRound.GetResi());
|
||||
this->SetTemp(welllogRound.GetTemp());
|
||||
this->SetINTLog(welllogRound.GetINTLog());
|
||||
this->SetNITINT(welllogRound.GetNITINT());
|
||||
this->SetTempBot(welllogRound.GetTempBot());
|
||||
this->SetIntProg(welllogRound.GetIntProg());
|
||||
this->SetInteDress(welllogRound.GetInteDress());
|
||||
this->SetAudit(welllogRound.GetAudit());
|
||||
this->SetRemark(welllogRound.GetRemark());
|
||||
return *this;
|
||||
}
|
||||
|
||||
void WelllogRound::Save()
|
||||
{
|
||||
// pai::orm::Wellloground wRound;
|
||||
// wRound.SetWellId(this->GetDataBelongID());
|
||||
// wRound.SetWelllogroundName(this->GetName());
|
||||
// wRound.SetLogCompanyName(m_CompanyName);
|
||||
// wRound.SetTeam(m_Team);
|
||||
// wRound.SetOperator(m_Operator);
|
||||
// wRound.SetDate(m_Date);
|
||||
// wRound.SetSerial(m_Serial);
|
||||
// wRound.SetItem(m_Item);
|
||||
// wRound.SetMudType(m_MudType);
|
||||
// wRound.SetMudViscosity(m_MudViscosity);
|
||||
// wRound.SetWaterLoss(m_WaterLoss);
|
||||
// wRound.SetMudDensity(m_Density);
|
||||
// wRound.SetMudResi(m_Resi);
|
||||
// wRound.SetMudTemp(m_Temp);
|
||||
// wRound.SetIntLog(m_INTLog);
|
||||
// wRound.SetNitInt(m_NITINT);
|
||||
// wRound.SetTempBot(m_TempBot);
|
||||
// wRound.SetIntProg(m_IntProg);
|
||||
// wRound.SetInteDress(m_InteDress);
|
||||
// wRound.SetAudit(m_Audit);
|
||||
// wRound.SetRemark(m_Remark);
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// long long wroundId = pdb.Persist(wRound);
|
||||
// this->SetDataID(wroundId);
|
||||
}
|
||||
|
||||
void WelllogRound::Get(long long id)
|
||||
{
|
||||
// if(id <= 0)
|
||||
// {
|
||||
// std::stringstream ss;
|
||||
// ss << PAI_CURRENT_FUNCTION << ": WelllogRoundID <= 0.";
|
||||
// throw pai::error::db_error(ss.str(), ERR_PARAMETER_ERROR);
|
||||
// }
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
|
||||
// pai::orm::Wellloground wRound;
|
||||
// pdb.Load(pai::orm::Wellloground::Wellloground_id == id, wRound);
|
||||
// this->SetDataID(wRound.GetWelllogroundId());
|
||||
// this->SetDataBelongID(wRound.GetWellId());
|
||||
// this->SetName(wRound.GetWelllogroundName());
|
||||
// this->SetCompanyName(wRound.GetLogCompanyName());
|
||||
// this->SetTeam(wRound.GetTeam());
|
||||
// this->SetOperator(wRound.GetOperator());
|
||||
// this->SetDate(wRound.GetDate());
|
||||
// this->SetSerial(wRound.GetSerial());
|
||||
// this->SetItem(wRound.GetItem());
|
||||
// this->SetMudType(wRound.GetMudType());
|
||||
// this->SetMudViscosity(wRound.GetMudViscosity());
|
||||
// this->SetWaterLoss(wRound.GetWaterLoss());
|
||||
// this->SetDensity(wRound.GetMudDensity());
|
||||
// this->SetResi(wRound.GetMudResi());
|
||||
// this->SetTemp(wRound.GetMudTemp());
|
||||
// this->SetINTLog(wRound.GetIntLog());
|
||||
// this->SetNITINT(wRound.GetNitInt());
|
||||
// this->SetTempBot(wRound.GetTempBot());
|
||||
// this->SetIntProg(wRound.GetIntProg());
|
||||
// this->SetInteDress(wRound.GetInteDress());
|
||||
// this->SetAudit(wRound.GetAudit());
|
||||
// this->SetRemark(wRound.GetRemark());
|
||||
}
|
||||
|
||||
void WelllogRound::Update()
|
||||
{
|
||||
// pai::orm::Wellloground wRound;
|
||||
// wRound.SetWelllogroundId(this->GetDataID());
|
||||
// wRound.SetWellId(this->GetDataBelongID());
|
||||
// wRound.SetWelllogroundName(this->GetName());
|
||||
// wRound.SetLogCompanyName(m_CompanyName);
|
||||
// wRound.SetTeam(m_Team);
|
||||
// wRound.SetOperator(m_Operator);
|
||||
// wRound.SetDate(m_Date);
|
||||
// wRound.SetSerial(m_Serial);
|
||||
// wRound.SetItem(m_Item);
|
||||
// wRound.SetMudType(m_MudType);
|
||||
// wRound.SetMudViscosity(m_MudViscosity);
|
||||
// wRound.SetWaterLoss(m_WaterLoss);
|
||||
// wRound.SetMudDensity(m_Density);
|
||||
// wRound.SetMudResi(m_Resi);
|
||||
// wRound.SetMudTemp(m_Temp);
|
||||
// wRound.SetIntLog(m_INTLog);
|
||||
// wRound.SetNitInt(m_NITINT);
|
||||
// wRound.SetTempBot(m_TempBot);
|
||||
// wRound.SetIntProg(m_IntProg);
|
||||
// wRound.SetInteDress(m_InteDress);
|
||||
// wRound.SetAudit(m_Audit);
|
||||
// wRound.SetRemark(m_Remark);
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Update(wRound);
|
||||
}
|
||||
|
||||
void WelllogRound::Delete(long long id)
|
||||
{
|
||||
// if(id <= 0)
|
||||
// {
|
||||
// std::stringstream ss;
|
||||
// ss << PAI_CURRENT_FUNCTION << ": WelllogRoundID <= 0.";
|
||||
// throw pai::error::db_error(ss.str(), ERR_PARAMETER_ERROR);
|
||||
// }
|
||||
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
|
||||
// pdb.Delete<pai::orm::Wellloground>(pai::orm::Wellloground::Wellloground_id == id);
|
||||
}
|
||||
|
||||
// void WelllogRound::GetWelllogCurve(std::vector<WelllogCurve>& infos)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::Welllogcurve> wCurves;
|
||||
// pdb.Load(pai::orm::Welllogcurve::Wellloground_id == this->GetDataID(), wCurves, true);
|
||||
// for(size_t i = 0; i < wCurves.size(); i++)
|
||||
// {
|
||||
// WelllogCurve welllogCurve;
|
||||
// welllogCurve.SetDataID(wCurves[i].GetWelllogcurveId());
|
||||
// welllogCurve.SetDataBelongID(wCurves[i].GetWelllogroundId());
|
||||
// welllogCurve.SetName(wCurves[i].GetCurveName());
|
||||
// welllogCurve.SetCurveAlias(wCurves[i].GetCurveAlias());
|
||||
// welllogCurve.SetUnit(wCurves[i].GetUnit());
|
||||
// welllogCurve.SetUnitAlias(wCurves[i].GetUnitAlias());
|
||||
// welllogCurve.SetFamilyType(wCurves[i].GetFamilytype());
|
||||
// welllogCurve.SetDepUnit(wCurves[i].GetDepUnit());
|
||||
// welllogCurve.SetSampleInterval(wCurves[i].GetSpInterval());
|
||||
// welllogCurve.SetDim2Name(wCurves[i].GetDim2Name());
|
||||
// welllogCurve.SetDim2Unit(wCurves[i].GetDim2Unit());
|
||||
// welllogCurve.SetDim2Start(wCurves[i].GetDim2S());
|
||||
// welllogCurve.SetDim2Increment(wCurves[i].GetDim2Increment());
|
||||
// welllogCurve.SetDim2Max(wCurves[i].GetDim2Max());
|
||||
// welllogCurve.SetDim2PointNum(wCurves[i].GetDim2Pnum());
|
||||
// welllogCurve.SetRemark(wCurves[i].GetRemark());
|
||||
|
||||
// pai::orm::Blob blob;
|
||||
// blob = wCurves[i].GetCurveData();
|
||||
// char *buffer = blob.GetData();
|
||||
// size_t depLeng;
|
||||
// memcpy(&depLeng,buffer,sizeof(size_t));
|
||||
// if(depLeng >0)
|
||||
// {
|
||||
// std::vector<float> tmpDimDepData;
|
||||
// tmpDimDepData.resize(depLeng);
|
||||
// memcpy(&(tmpDimDepData[0]), buffer+sizeof(size_t), depLeng*sizeof(float));
|
||||
// welllogCurve.SetDimDepData(tmpDimDepData);
|
||||
// }
|
||||
|
||||
// size_t tmpSize = sizeof(size_t) + welllogCurve.GetDimDepData().size()*sizeof(float); //m_DimDepData占用的buffer长度
|
||||
// size_t dimDataLeng;
|
||||
// memcpy(&dimDataLeng, buffer+tmpSize, sizeof(size_t));
|
||||
// if(dimDataLeng >0)
|
||||
// {
|
||||
// std::vector<float> tmpDimData;
|
||||
// tmpDimData.resize(dimDataLeng);
|
||||
// memcpy(&(tmpDimData[0]), buffer+tmpSize+sizeof(size_t), dimDataLeng*sizeof(float));
|
||||
// welllogCurve.SetDimData(tmpDimData);
|
||||
// }
|
||||
|
||||
// tmpSize += sizeof(size_t) + welllogCurve.GetDimData().size()*sizeof(float); //m_DimInfo占用的buffer长度
|
||||
// size_t dimInfoLeng;
|
||||
// memcpy(&dimInfoLeng, buffer+tmpSize, sizeof(size_t));
|
||||
// if(dimInfoLeng >0)
|
||||
// {
|
||||
// std::vector<int> tmpDimInfo;
|
||||
// tmpDimInfo.resize(dimInfoLeng);
|
||||
// memcpy(&(tmpDimInfo[0]), buffer+tmpSize+sizeof(size_t), dimInfoLeng*sizeof(float));
|
||||
// welllogCurve.SetDimInfo(tmpDimInfo);
|
||||
// }
|
||||
// infos.push_back(welllogCurve);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveWelllogCurve(std::vector<WelllogCurve>& welllogcurves)
|
||||
// {
|
||||
// std::vector<pai::orm::Welllogcurve> ormwelllogcurves;
|
||||
// pai::orm::Welllogcurve ormwelllogcurve;
|
||||
// for(size_t i = 0; i < welllogcurves.size(); ++i)
|
||||
// {
|
||||
// ormwelllogcurve.SetWelllogroundId(welllogcurves[i].GetDataBelongID());
|
||||
// ormwelllogcurve.SetCurveName(welllogcurves[i].GetName());
|
||||
// ormwelllogcurve.SetCurveAlias(welllogcurves[i].GetCurveAlias());
|
||||
// ormwelllogcurve.SetUnit(welllogcurves[i].GetUnit());
|
||||
// ormwelllogcurve.SetUnitAlias(welllogcurves[i].GetUnitAlias());
|
||||
// ormwelllogcurve.SetFamilytype(welllogcurves[i].GetFamilyType());
|
||||
// ormwelllogcurve.SetDepUnit(welllogcurves[i].GetDepUnit());
|
||||
// ormwelllogcurve.SetSpInterval(welllogcurves[i].GetSampleInterval());
|
||||
// ormwelllogcurve.SetDim2Name(welllogcurves[i].GetDim2Name());
|
||||
// ormwelllogcurve.SetDim2Unit(welllogcurves[i].GetDim2Unit());
|
||||
// ormwelllogcurve.SetDim2S(welllogcurves[i].GetDim2Start());
|
||||
// ormwelllogcurve.SetDim2Increment(welllogcurves[i].GetDim2Increment());
|
||||
// ormwelllogcurve.SetDim2Max(welllogcurves[i].GetDim2Max());
|
||||
// ormwelllogcurve.SetDim2Pnum(welllogcurves[i].GetDim2PointNum());
|
||||
// ormwelllogcurve.SetRemark(welllogcurves[i].GetRemark());
|
||||
|
||||
// int bufferLength = sizeof(size_t) + welllogcurves[i].GetDimDepData().size()*sizeof(float)
|
||||
// + sizeof(size_t) + welllogcurves[i].GetDimData().size()*sizeof(float)
|
||||
// + sizeof(size_t) + welllogcurves[i].GetDimInfo().size()*sizeof(int);
|
||||
// char *buffer = new char[bufferLength];
|
||||
|
||||
// size_t size1 = welllogcurves[i].GetDimDepData().size();
|
||||
// memcpy(buffer, &size1, sizeof(size_t));
|
||||
// if(size1 >0)
|
||||
// {
|
||||
// memcpy(buffer+sizeof(size_t), reinterpret_cast<char*>(&(welllogcurves[i].GetDimDepData()[0])), welllogcurves[i].GetDimDepData().size()*sizeof(float));
|
||||
// }
|
||||
|
||||
// size_t size2 = welllogcurves[i].GetDimData().size();
|
||||
// size_t tmpSize = sizeof(size_t) + welllogcurves[i].GetDimDepData().size()*sizeof(float); //m_DimDepData已占用的buffer长度
|
||||
// memcpy(buffer+tmpSize, &size2, sizeof(size_t));
|
||||
// if(size2 >0)
|
||||
// {
|
||||
// memcpy(buffer+tmpSize+sizeof(size_t), reinterpret_cast<char*>(&(welllogcurves[i].GetDimData()[0])), welllogcurves[i].GetDimData().size()*sizeof(float));
|
||||
// }
|
||||
|
||||
// size_t size3 = welllogcurves[i].GetDimInfo().size();
|
||||
// size_t tmpSize2 = sizeof(size_t) + welllogcurves[i].GetDimDepData().size()*sizeof(float) + sizeof(size_t) + welllogcurves[i].GetDimData().size()*sizeof(float); //m_DimDepData+m_DimData已占用的buffer长度
|
||||
// memcpy(buffer+tmpSize2, &size3, sizeof(size_t));
|
||||
// if(size3 >0)
|
||||
// {
|
||||
// memcpy(buffer+tmpSize2+sizeof(size_t), reinterpret_cast<char*>(&(welllogcurves[i].GetDimInfo()[0])), welllogcurves[i].GetDimInfo().size()*sizeof(float));
|
||||
// }
|
||||
|
||||
// pai::orm::Blob blob;
|
||||
// blob.FromBuffer(buffer, bufferLength);
|
||||
// if(buffer !=NULL)
|
||||
// {
|
||||
// delete[] buffer;
|
||||
// buffer = NULL;
|
||||
// }
|
||||
// ormwelllogcurve.SetCurveData(blob);
|
||||
|
||||
// ormwelllogcurves.push_back(ormwelllogcurve);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormwelllogcurves);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetTableDataName(std::vector<TableDataName>& infos)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
|
||||
// std::string tdtName;
|
||||
// tdtName = TableData::GetDBTableName(this->GetDataID());
|
||||
// TableDataName tableDataName;
|
||||
// tableDataName.SetTableDataTableName(tdtName);
|
||||
|
||||
// std::stringstream sql;
|
||||
// sql << "select distinct FILE_ID,FILE_NAME from \"" << tdtName << "\" where WELLLOGROUND_ID = " << this->GetDataID() << " order by FILE_ID";
|
||||
// pai::orm::sqlite::WelllogResultSet wrSet;
|
||||
// try{
|
||||
// pdb.SetSQL(sql.str());
|
||||
// pdb.ExecuteQuery(wrSet);
|
||||
// while(wrSet.HasNext())
|
||||
// {
|
||||
// long long tabId = wrSet.GetLongLong(0);
|
||||
// std::string dataname = wrSet.GetString(1);
|
||||
|
||||
// tableDataName.SetTableID(tabId);
|
||||
// tableDataName.SetTableName(dataname);
|
||||
|
||||
// infos.push_back(tableDataName);
|
||||
// }
|
||||
// }
|
||||
// catch(pai::error::db_error& e)
|
||||
// {
|
||||
// std::stringstream ss;
|
||||
// ss << PAI_CURRENT_FUNCTION << ": Can't get table data name.";
|
||||
// throw pai::error::db_error(ss.str(), ERR_NO_RESULT);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetCoreimg(std::vector<Coreimg>& coreimgs)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::Coreimg> ormcoreimgs;
|
||||
// pdb.Load(pai::orm::Coreimg::Wellloground_id == this->GetDataID(), ormcoreimgs, true);
|
||||
// for(size_t i = 0; i < ormcoreimgs.size(); i++)
|
||||
// {
|
||||
// Coreimg coreimg;
|
||||
// coreimg.SetDataID(ormcoreimgs[i].GetCoreimgId());
|
||||
// coreimg.SetWellId(ormcoreimgs[i].GetWellId());
|
||||
// coreimg.SetDataBelongID(ormcoreimgs[i].GetWelllogroundId());
|
||||
// coreimg.SetNo(ormcoreimgs[i].GetNo());
|
||||
// coreimg.SetSdep(ormcoreimgs[i].GetSdep());
|
||||
// coreimg.SetEdep(ormcoreimgs[i].GetEdep());
|
||||
// coreimg.SetImgfullname(ormcoreimgs[i].GetImgfullname());
|
||||
|
||||
// coreimgs.push_back(coreimg);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveCoreimg(std::vector<Coreimg>& coreimgs)
|
||||
// {
|
||||
// std::vector<pai::orm::Coreimg> ormcoreimgs;
|
||||
// pai::orm::Coreimg ormcoreimg;
|
||||
// for(size_t i = 0; i < coreimgs.size(); ++i)
|
||||
// {
|
||||
// ormcoreimg.SetWelllogroundId(coreimgs[i].GetDataBelongID());
|
||||
// ormcoreimg.SetWellId(coreimgs[i].GetWellId());
|
||||
// ormcoreimg.SetNo(coreimgs[i].GetNo());
|
||||
// ormcoreimg.SetSdep(coreimgs[i].GetSdep());
|
||||
// ormcoreimg.SetEdep(coreimgs[i].GetEdep());
|
||||
// ormcoreimg.SetImgfullname(coreimgs[i].GetImgfullname());
|
||||
|
||||
// ormcoreimgs.push_back(ormcoreimg);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormcoreimgs);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetCorePhysics(std::vector<CorePhysics>& corephysicss)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::CorePhysics> ormcorephysicss;
|
||||
// pdb.Load(pai::orm::CorePhysics::Wellloground_id == this->GetDataID(), ormcorephysicss, true);
|
||||
// for(size_t i = 0; i < ormcorephysicss.size(); i++)
|
||||
// {
|
||||
// CorePhysics corephysics;
|
||||
// corephysics.SetDataID(ormcorephysicss[i].GetCorePhysicsId());
|
||||
// corephysics.SetDataBelongID(ormcorephysicss[i].GetWelllogroundId());
|
||||
// corephysics.SetWellId(ormcorephysicss[i].GetWellId());
|
||||
// corephysics.SetNo(ormcorephysicss[i].GetNo());
|
||||
// corephysics.SetDepth(ormcorephysicss[i].GetDepth());
|
||||
// corephysics.SetCorrDepth(ormcorephysicss[i].GetCorrdepth());
|
||||
// corephysics.SetDen(ormcorephysicss[i].GetDen());
|
||||
// corephysics.SetPor(ormcorephysicss[i].GetPor());
|
||||
// corephysics.SetPerm(ormcorephysicss[i].GetPerm());
|
||||
// corephysics.SetSw(ormcorephysicss[i].GetSw());
|
||||
// corephysics.SetVcal(ormcorephysicss[i].GetVcal());
|
||||
// corephysics.SetXmd(ormcorephysicss[i].GetXmd());
|
||||
|
||||
// corephysicss.push_back(corephysics);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveCorePhysics(std::vector<CorePhysics>& corephysicss)
|
||||
// {
|
||||
// std::vector<pai::orm::CorePhysics> ormcorephysicss;
|
||||
// pai::orm::CorePhysics ormcorephysics;
|
||||
// for(size_t i = 0; i < corephysicss.size(); ++i)
|
||||
// {
|
||||
// ormcorephysics.SetWelllogroundId(corephysicss[i].GetDataBelongID());
|
||||
// ormcorephysics.SetWellId(corephysicss[i].GetWellId());
|
||||
// ormcorephysics.SetNo(corephysicss[i].GetNo());
|
||||
// ormcorephysics.SetDepth(corephysicss[i].GetDepth());
|
||||
// ormcorephysics.SetCorrdepth(corephysicss[i].GetCorrDepth());
|
||||
// ormcorephysics.SetDen(corephysicss[i].GetDen());
|
||||
// ormcorephysics.SetPor(corephysicss[i].GetPor());
|
||||
// ormcorephysics.SetPerm(corephysicss[i].GetPerm());
|
||||
// ormcorephysics.SetSw(corephysicss[i].GetSw());
|
||||
// ormcorephysics.SetVcal(corephysicss[i].GetVcal());
|
||||
// ormcorephysics.SetXmd(corephysicss[i].GetXmd());
|
||||
|
||||
// ormcorephysicss.push_back(ormcorephysics);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormcorephysicss);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetDrillCore(std::vector<DrillCore>& drillcores)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::DrillCore> ormdrillcores;
|
||||
// pdb.Load(pai::orm::DrillCore::Wellloground_id == this->GetDataID(), ormdrillcores, true);
|
||||
// for(size_t i = 0; i < ormdrillcores.size(); i++)
|
||||
// {
|
||||
// DrillCore drillcore;
|
||||
// drillcore.SetDataID(ormdrillcores[i].GetDrillCoreId());
|
||||
// drillcore.SetDataBelongID(ormdrillcores[i].GetWelllogroundId());
|
||||
// drillcore.SetWellId(ormdrillcores[i].GetWellId());
|
||||
// drillcore.SetNum(ormdrillcores[i].GetNo());
|
||||
// drillcore.SetSdep(ormdrillcores[i].GetSdep());
|
||||
// drillcore.SetEdep(ormdrillcores[i].GetEdep());
|
||||
// drillcore.SetFootage(ormdrillcores[i].GetFootage());
|
||||
// drillcore.SetCoreLen(ormdrillcores[i].GetCoreLen());
|
||||
// drillcore.SetOilLen(ormdrillcores[i].GetOilLen());
|
||||
// drillcore.SetDescribe(ormdrillcores[i].GetDescribe());
|
||||
|
||||
// drillcores.push_back(drillcore);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveDrillCore(std::vector<DrillCore>& drillcores)
|
||||
// {
|
||||
// std::vector<pai::orm::DrillCore> ormdrillcores;
|
||||
// pai::orm::DrillCore ormdrillcore;
|
||||
// for(size_t i = 0; i < drillcores.size(); ++i)
|
||||
// {
|
||||
// ormdrillcore.SetWelllogroundId(drillcores[i].GetDataBelongID());
|
||||
// ormdrillcore.SetWellId(drillcores[i].GetWellId());
|
||||
// ormdrillcore.SetNo(drillcores[i].GetNum());
|
||||
// ormdrillcore.SetSdep(drillcores[i].GetSdep());
|
||||
// ormdrillcore.SetEdep(drillcores[i].GetEdep());
|
||||
// ormdrillcore.SetFootage(drillcores[i].GetFootage());
|
||||
// ormdrillcore.SetCoreLen(drillcores[i].GetCoreLen());
|
||||
// ormdrillcore.SetOilLen(drillcores[i].GetOilLen());
|
||||
// ormdrillcore.SetDescribe(drillcores[i].GetDescribe());
|
||||
|
||||
// ormdrillcores.push_back(ormdrillcore);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormdrillcores);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetGujing1Result(std::vector<Gujing1Result>& gujing1results)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::Gujing1Result> ormgujing1results;
|
||||
// pdb.Load(pai::orm::Gujing1Result::Wellloground_id == this->GetDataID(), ormgujing1results, true);
|
||||
// for(size_t i = 0; i < ormgujing1results.size(); i++)
|
||||
// {
|
||||
// Gujing1Result ormgujing1result;
|
||||
// ormgujing1result.SetDataID(ormgujing1results[i].GetGujing1ResultId());
|
||||
// ormgujing1result.SetDataBelongID(ormgujing1results[i].GetWelllogroundId());
|
||||
// ormgujing1result.SetWellId(ormgujing1results[i].GetWellId());
|
||||
// ormgujing1result.SetNo(ormgujing1results[i].GetNo());
|
||||
// ormgujing1result.SetSdep(ormgujing1results[i].GetSdep());
|
||||
// ormgujing1result.SetEdep(ormgujing1results[i].GetEdep());
|
||||
// ormgujing1result.SetResult(ormgujing1results[i].GetResult());
|
||||
|
||||
// gujing1results.push_back(ormgujing1result);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveGujing1Result(std::vector<Gujing1Result>& gujing1results)
|
||||
// {
|
||||
// std::vector<pai::orm::Gujing1Result> ormgujing1results;
|
||||
// pai::orm::Gujing1Result ormgujing1result;
|
||||
// for(size_t i = 0; i < gujing1results.size(); ++i)
|
||||
// {
|
||||
// ormgujing1result.SetWelllogroundId(gujing1results[i].GetDataBelongID());
|
||||
// ormgujing1result.SetWellId(gujing1results[i].GetWellId());
|
||||
// ormgujing1result.SetNo(gujing1results[i].GetNo());
|
||||
// ormgujing1result.SetSdep(gujing1results[i].GetSdep());
|
||||
// ormgujing1result.SetEdep(gujing1results[i].GetEdep());
|
||||
// ormgujing1result.SetResult(gujing1results[i].GetResult());
|
||||
|
||||
// ormgujing1results.push_back(ormgujing1result);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormgujing1results);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetSwallCore(std::vector<SwallCore>& swallcores)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::SwallCore> ormswallcores;
|
||||
// pdb.Load(pai::orm::SwallCore::Wellloground_id == this->GetDataID(), ormswallcores, true);
|
||||
// for(size_t i = 0; i < ormswallcores.size(); i++)
|
||||
// {
|
||||
// SwallCore swallcore;
|
||||
// swallcore.SetDataID(ormswallcores[i].GetSwallCoreId());
|
||||
// swallcore.SetDataBelongID(ormswallcores[i].GetWelllogroundId());
|
||||
// swallcore.SetWellId(ormswallcores[i].GetWellId());
|
||||
// swallcore.SetNo(ormswallcores[i].GetNo());
|
||||
// swallcore.SetDepth(ormswallcores[i].GetDepth());
|
||||
// swallcore.SetOil(ormswallcores[i].GetOil());
|
||||
// swallcore.SetLith(ormswallcores[i].GetLith());
|
||||
// swallcore.SetColor(ormswallcores[i].GetColor());
|
||||
|
||||
// swallcores.push_back(swallcore);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveSwallCore(std::vector<SwallCore>& swallcores)
|
||||
// {
|
||||
// std::vector<pai::orm::SwallCore> ormswallcores;
|
||||
// pai::orm::SwallCore ormswallcore;
|
||||
// for(size_t i = 0; i < swallcores.size(); ++i)
|
||||
// {
|
||||
// ormswallcore.SetWelllogroundId(swallcores[i].GetDataBelongID());
|
||||
// ormswallcore.SetWellId(swallcores[i].GetWellId());
|
||||
// ormswallcore.SetNo(swallcores[i].GetNo());
|
||||
// ormswallcore.SetDepth(swallcores[i].GetDepth());
|
||||
// ormswallcore.SetOil(swallcores[i].GetOil());
|
||||
// ormswallcore.SetLith(swallcores[i].GetLith());
|
||||
// ormswallcore.SetColor(swallcores[i].GetColor());
|
||||
|
||||
// ormswallcores.push_back(ormswallcore);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormswallcores);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetOgResult(std::vector<OgResult>& ogresults)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::OgResult> ormogresults;
|
||||
// pdb.Load(pai::orm::OgResult::Wellloground_id == this->GetDataID(), ormogresults, true);
|
||||
// for(size_t i = 0; i < ormogresults.size(); i++)
|
||||
// {
|
||||
// OgResult ogresult;
|
||||
// ogresult.SetDataID(ormogresults[i].GetOgResultId());
|
||||
// ogresult.SetDataBelongID(ormogresults[i].GetWelllogroundId());
|
||||
// ogresult.SetWellId(ormogresults[i].GetWellId());
|
||||
// ogresult.SetNo(ormogresults[i].GetNo());
|
||||
// ogresult.SetSdep(ormogresults[i].GetSdep());
|
||||
// ogresult.SetEdep(ormogresults[i].GetEdep());
|
||||
// ogresult.SetResultNo(ormogresults[i].GetResultno());
|
||||
// ogresult.SetResult(ormogresults[i].GetResult());
|
||||
// ogresult.SetThick(ormogresults[i].GetThick());
|
||||
// ogresult.SetTt(ormogresults[i].GetTt());
|
||||
|
||||
// ogresults.push_back(ogresult);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveOgResult(std::vector<OgResult>& ogresults)
|
||||
// {
|
||||
// std::vector<pai::orm::OgResult> ormogresults;
|
||||
// pai::orm::OgResult ormogresult;
|
||||
// for(size_t i = 0; i < ogresults.size(); ++i)
|
||||
// {
|
||||
// ormogresult.SetWelllogroundId(ogresults[i].GetDataBelongID());
|
||||
// ormogresult.SetWellId(ogresults[i].GetWellId());
|
||||
// ormogresult.SetNo(ogresults[i].GetNo());
|
||||
// ormogresult.SetSdep(ogresults[i].GetSdep());
|
||||
// ormogresult.SetEdep(ogresults[i].GetEdep());
|
||||
// ormogresult.SetResultno(ogresults[i].GetResultNo());
|
||||
// ormogresult.SetResult(ogresults[i].GetResult());
|
||||
// ormogresult.SetThick(ogresults[i].GetThick());
|
||||
// ormogresult.SetTt(ogresults[i].GetTt());
|
||||
|
||||
// ormogresults.push_back(ormogresult);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormogresults);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetCoreDesc(std::vector<CoreDesc>& coredescs)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::CoreDesc> ormcoredescs;
|
||||
// pdb.Load(pai::orm::CoreDesc::Wellloground_id == this->GetDataID(), ormcoredescs, true);
|
||||
// for(size_t i = 0; i < ormcoredescs.size(); i++)
|
||||
// {
|
||||
// CoreDesc coredesc;
|
||||
// coredesc.SetDataID(ormcoredescs[i].GetCoreDescId());
|
||||
// coredesc.SetWellId(ormcoredescs[i].GetWellId());
|
||||
// coredesc.SetDataBelongID(ormcoredescs[i].GetWelllogroundId());
|
||||
// coredesc.SetSdep(ormcoredescs[i].GetSdep());
|
||||
// coredesc.SetEdep(ormcoredescs[i].GetEdep());
|
||||
// coredesc.SetDesc(ormcoredescs[i].GetDesc());
|
||||
|
||||
// coredescs.push_back(coredesc);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveCoreDesc(std::vector<CoreDesc>& coredescs)
|
||||
// {
|
||||
// std::vector<pai::orm::CoreDesc> ormcoredescs;
|
||||
// pai::orm::CoreDesc ormcoredesc;
|
||||
// for(size_t i = 0; i < coredescs.size(); ++i)
|
||||
// {
|
||||
// ormcoredesc.SetWelllogroundId(coredescs[i].GetDataBelongID());
|
||||
// ormcoredesc.SetWellId(coredescs[i].GetWellId());
|
||||
// ormcoredesc.SetSdep(coredescs[i].GetSdep());
|
||||
// ormcoredesc.SetEdep(coredescs[i].GetEdep());
|
||||
// ormcoredesc.SetDesc(coredescs[i].GetDesc());
|
||||
|
||||
// ormcoredescs.push_back(ormcoredesc);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormcoredescs);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetGeostratum(std::vector<Geostratum>& geostratums)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::Geostratum> ormgeostratums;
|
||||
// pdb.Load(pai::orm::Geostratum::Wellloground_id == this->GetDataID(), ormgeostratums, true);
|
||||
// for(size_t i = 0; i < ormgeostratums.size(); i++)
|
||||
// {
|
||||
// Geostratum geostratum;
|
||||
// geostratum.SetDataID(ormgeostratums[i].GetGeostratumId());
|
||||
// geostratum.SetWellId(ormgeostratums[i].GetWellId());
|
||||
// geostratum.SetDataBelongID(ormgeostratums[i].GetWelllogroundId());
|
||||
// geostratum.SetName(ormgeostratums[i].GetName());
|
||||
// geostratum.SetType(ormgeostratums[i].GetType());
|
||||
// geostratum.SetSdep(ormgeostratums[i].GetSdep());
|
||||
// geostratum.SetEdep(ormgeostratums[i].GetEdep());
|
||||
// geostratum.SetLith(ormgeostratums[i].GetLith());
|
||||
|
||||
// geostratums.push_back(geostratum);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveGeostratum(std::vector<Geostratum>& geostratums)
|
||||
// {
|
||||
// std::vector<pai::orm::Geostratum> ormgeostratums;
|
||||
// pai::orm::Geostratum ormgeostratum;
|
||||
// for(size_t i = 0; i < geostratums.size(); ++i)
|
||||
// {
|
||||
// ormgeostratum.SetWellId(geostratums[i].GetWellId());
|
||||
// ormgeostratum.SetWelllogroundId(geostratums[i].GetDataBelongID());
|
||||
// ormgeostratum.SetName(geostratums[i].GetName());
|
||||
// ormgeostratum.SetType(geostratums[i].GetType());
|
||||
// ormgeostratum.SetSdep(geostratums[i].GetSdep());
|
||||
// ormgeostratum.SetEdep(geostratums[i].GetEdep());
|
||||
// ormgeostratum.SetLith(geostratums[i].GetLith());
|
||||
|
||||
// ormgeostratums.push_back(ormgeostratum);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormgeostratums);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetOgResult2(std::vector<OgResult2>& ogresult2s)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::OgResult2> ormogresult2s;
|
||||
// pdb.Load(pai::orm::OgResult2::Wellloground_id == this->GetDataID(), ormogresult2s, true);
|
||||
// for(size_t i = 0; i < ormogresult2s.size(); i++)
|
||||
// {
|
||||
// OgResult2 ogresult2;
|
||||
// ogresult2.SetDataID(ormogresult2s[i].GetOgResult2Id());
|
||||
// ogresult2.SetDataBelongID(ormogresult2s[i].GetWelllogroundId());
|
||||
// ogresult2.SetWellId(ormogresult2s[i].GetWellId());
|
||||
// ogresult2.SetNo(ormogresult2s[i].GetNo());
|
||||
// ogresult2.SetSdep(ormogresult2s[i].GetSdep());
|
||||
// ogresult2.SetEdep(ormogresult2s[i].GetEdep());
|
||||
// ogresult2.SetResultno(ormogresult2s[i].GetResultno());
|
||||
// ogresult2.SetResult(ormogresult2s[i].GetResult());
|
||||
// ogresult2.SetThick(ormogresult2s[i].GetThick());
|
||||
// ogresult2.SetTt(ormogresult2s[i].GetTt());
|
||||
|
||||
// ogresult2s.push_back(ogresult2);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveOgResult2(std::vector<OgResult2>& ogresult2s)
|
||||
// {
|
||||
// std::vector<pai::orm::OgResult2> ormogresult2s;
|
||||
// pai::orm::OgResult2 ormogresult2;
|
||||
// for(size_t i = 0; i < ogresult2s.size(); ++i)
|
||||
// {
|
||||
// ormogresult2.SetWelllogroundId(ogresult2s[i].GetDataBelongID());
|
||||
// ormogresult2.SetWellId(ogresult2s[i].GetWellId());
|
||||
// ormogresult2.SetNo(ogresult2s[i].GetNo());
|
||||
// ormogresult2.SetSdep(ogresult2s[i].GetSdep());
|
||||
// ormogresult2.SetEdep(ogresult2s[i].GetEdep());
|
||||
// ormogresult2.SetResultno(ogresult2s[i].GetResultno());
|
||||
// ormogresult2.SetResult(ogresult2s[i].GetResult());
|
||||
// ormogresult2.SetThick(ogresult2s[i].GetThick());
|
||||
// ormogresult2.SetTt(ogresult2s[i].GetTt());
|
||||
|
||||
// ormogresult2s.push_back(ormogresult2);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormogresult2s);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetWavefile(std::vector<Wavefile>& wavefiles)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::Wavefile> ormwavefiles;
|
||||
// pdb.Load(pai::orm::Wavefile::Wellloground_id == this->GetDataID(), ormwavefiles, true);
|
||||
// for(size_t i = 0; i < ormwavefiles.size(); i++)
|
||||
// {
|
||||
// Wavefile wavefile;
|
||||
// wavefile.SetDataID(ormwavefiles[i].GetWavefileId());
|
||||
// wavefile.SetWellId(ormwavefiles[i].GetWellId());
|
||||
// wavefile.SetDataBelongID(ormwavefiles[i].GetWelllogroundId());
|
||||
// wavefile.SetPath(ormwavefiles[i].GetPath());
|
||||
// wavefile.SetFilename(ormwavefiles[i].GetFilename());
|
||||
// wavefile.SetRemark(ormwavefiles[i].GetRemark());
|
||||
|
||||
// wavefiles.push_back(wavefile);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveWavefile(std::vector<Wavefile>& wavefiles)
|
||||
// {
|
||||
// std::vector<pai::orm::Wavefile> ormwavefiles;
|
||||
// pai::orm::Wavefile ormwavefile;
|
||||
// for(size_t i = 0; i < wavefiles.size(); ++i)
|
||||
// {
|
||||
// ormwavefile.SetWellId(wavefiles[i].GetWellId());
|
||||
// ormwavefile.SetWelllogroundId(wavefiles[i].GetDataBelongID());
|
||||
// ormwavefile.SetPath(wavefiles[i].GetPath());
|
||||
// ormwavefile.SetFilename(wavefiles[i].GetFilename());
|
||||
// ormwavefile.SetRemark(wavefiles[i].GetRemark());
|
||||
|
||||
// ormwavefiles.push_back(ormwavefile);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormwavefiles);
|
||||
// }
|
||||
|
||||
// void WelllogRound::GetZone(std::vector<Zone>& zones)
|
||||
// {
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// std::vector<pai::orm::Zone> ormzones;
|
||||
// pdb.Load(pai::orm::Zone::Wellloground_id == this->GetDataID(), ormzones, true);
|
||||
// for(size_t i = 0; i < ormzones.size(); i++)
|
||||
// {
|
||||
// Zone zone;
|
||||
// zone.SetDataID(ormzones[i].GetZoneId());
|
||||
// zone.SetWellId(ormzones[i].GetWellId());
|
||||
// zone.SetDataBelongID(ormzones[i].GetWelllogroundId());
|
||||
// zone.SetName(ormzones[i].GetName());
|
||||
// zone.SetSdep(ormzones[i].GetSdep());
|
||||
// zone.SetEdep(ormzones[i].GetEdep());
|
||||
|
||||
// zones.push_back(zone);
|
||||
// }
|
||||
// }
|
||||
|
||||
// void WelllogRound::SaveZone(std::vector<Zone>& zones)
|
||||
// {
|
||||
// std::vector<pai::orm::Zone> ormzones;
|
||||
// pai::orm::Zone ormzone;
|
||||
// for(size_t i = 0; i < zones.size(); ++i)
|
||||
// {
|
||||
// ormzone.SetWelllogroundId(zones[i].GetDataBelongID());
|
||||
// ormzone.SetWellId(zones[i].GetWellId());
|
||||
// ormzone.SetName(zones[i].GetName());
|
||||
// ormzone.SetSdep(zones[i].GetSdep());
|
||||
// ormzone.SetEdep(zones[i].GetEdep());
|
||||
|
||||
// ormzones.push_back(ormzone);
|
||||
// }
|
||||
// pai::orm::sqlite::Persistence &pdb = pai::orm::sqlite::Persistence::Get();
|
||||
// pdb.Persist(ormzones);
|
||||
// }
|
||||
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
@ -6,6 +6,8 @@
|
|||
#include "slf.h"
|
||||
#include <QDir>
|
||||
#include <QDateTime>
|
||||
#include <QString>
|
||||
#pragma execution_character_set("utf-8")
|
||||
int RepSize[12]={4,
|
||||
sizeof(int),
|
||||
sizeof(short),
|
||||
|
|
@ -3369,7 +3371,9 @@ int CSlfIO::FindSlfObjectIndex(const char* namee,int status)
|
|||
char name[128];
|
||||
strcpy(name,namee);
|
||||
for(int i=0;i<m_SlfHead.TableNumber;i++) {
|
||||
if(stricmp(name,m_SlfObjectEntry[i].Name)==0||stricmp(name,m_SlfObjectEntry[i].HZName)==0) {
|
||||
QString strName =QString::fromLocal8Bit(m_SlfObjectEntry[i].Name);
|
||||
QString strHZName =QString::fromLocal8Bit(m_SlfObjectEntry[i].HZName);
|
||||
if(stricmp(name,strName.toStdString().c_str())==0||stricmp(name,strHZName.toStdString().c_str())==0) {
|
||||
if(status==-1) return i;
|
||||
if(status==m_SlfObjectEntry[i].Status) return i;
|
||||
}
|
||||
|
|
|
|||
|
|
@ -604,6 +604,9 @@ void QtProjectWidgets::initMenu()
|
|||
_menuSlfName = new QMenu(ui->treeWidget);
|
||||
initSlfNameTreeMenu(_menuSlfName, ui->treeWidget);
|
||||
|
||||
_menuTableFolder = new QMenu(ui->treeWidget);
|
||||
initTableFolderTreeMenu(_menuTableFolder, ui->treeWidget);
|
||||
|
||||
// //评估方案-右键菜单
|
||||
// _menuEvaluate = new QMenu(ui->treeWidget);
|
||||
// initEvaluateTreeMenu(_menuEvaluate, ui->treeWidget);
|
||||
|
|
@ -677,6 +680,15 @@ void QtProjectWidgets::initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
|||
menu->addAction(action_New);
|
||||
}
|
||||
|
||||
//初始化根节点(表目录)-右键菜单
|
||||
void QtProjectWidgets::initTableFolderTreeMenu(QMenu *menu, QTreeWidget *treeWidget)
|
||||
{
|
||||
QAction* action_New = new QAction("创建新表", treeWidget);
|
||||
action_New->setIcon(QIcon(":/image/u174.png")); // 设置图标
|
||||
connect(action_New, SIGNAL(triggered(bool)), this, SLOT(onCreateNewTable()));
|
||||
menu->addAction(action_New);
|
||||
}
|
||||
|
||||
//新建项目
|
||||
void QtProjectWidgets::onNewProject(bool checked)
|
||||
{
|
||||
|
|
@ -741,6 +753,65 @@ void QtProjectWidgets::onShowTable(bool checked)
|
|||
void QtProjectWidgets::onWelllogInformation()
|
||||
{
|
||||
emit CallManage::getInstance()->sig_WelllogInformation(m_strSlfName, m_strCurveObjectName);
|
||||
foreach(QTreeWidgetItem *pItem, ui->treeWidget->selectedItems())
|
||||
{
|
||||
QTreeWidgetItem *parentItem = pItem;
|
||||
if (parentItem && m_strSlfName == parentItem->data(0, Qt::UserRole+1).toString())
|
||||
{
|
||||
// qDeleteAll(parentItem->takeChildren());
|
||||
QTreeWidgetItem *pWellItem = parentItem->parent();
|
||||
QString Wellname = parentItem->text(0);
|
||||
// parentItem->setExpanded(false);
|
||||
loadWellTree(parentItem->parent(), m_strSlfName, Wellname);
|
||||
pWellItem->removeChild(parentItem);
|
||||
pWellItem->setExpanded(true);
|
||||
|
||||
int WellCount = pWellItem->childCount();
|
||||
for (int i = 0; i < WellCount; ++i)
|
||||
{
|
||||
QTreeWidgetItem *childItem = pWellItem->child(i);
|
||||
childItem->setExpanded(true);
|
||||
int childCount = childItem->childCount();
|
||||
for (int j = 0; j < childCount; ++j)
|
||||
{
|
||||
childItem->child(j)->setExpanded(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
//创建新表
|
||||
void QtProjectWidgets::onCreateNewTable()
|
||||
{
|
||||
CDataManagger DataManagger;
|
||||
DataManagger.CreateNewTable(m_strSlfName);
|
||||
foreach(QTreeWidgetItem *pItem, ui->treeWidget->selectedItems())
|
||||
{
|
||||
QTreeWidgetItem *parentItem = pItem->parent();
|
||||
if (parentItem && m_strSlfName == parentItem->data(0, Qt::UserRole+1).toString())
|
||||
{
|
||||
// qDeleteAll(parentItem->takeChildren());
|
||||
QTreeWidgetItem *pWellItem = parentItem->parent();
|
||||
QString Wellname = parentItem->text(0);
|
||||
// parentItem->setExpanded(false);
|
||||
loadWellTree(parentItem->parent(), m_strSlfName, Wellname);
|
||||
pWellItem->removeChild(parentItem);
|
||||
pWellItem->setExpanded(true);
|
||||
|
||||
int WellCount = pWellItem->childCount();
|
||||
for (int i = 0; i < WellCount; ++i)
|
||||
{
|
||||
QTreeWidgetItem *childItem = pWellItem->child(i);
|
||||
childItem->setExpanded(true);
|
||||
int childCount = childItem->childCount();
|
||||
for (int j = 0; j < childCount; ++j)
|
||||
{
|
||||
childItem->child(j)->setExpanded(true);
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
void QtProjectWidgets::onEditWelllogRound()
|
||||
|
|
@ -889,6 +960,12 @@ void QtProjectWidgets::onItemClicked(QTreeWidgetItem* item, int index)
|
|||
popMenu = _menuSlfName;
|
||||
m_strSlfName = item->data(0, Qt::UserRole+1).toString();
|
||||
}
|
||||
else if (strTreeTag == "Sheet")
|
||||
{
|
||||
//根节点(项目名称)-右键菜单
|
||||
popMenu = _menuTableFolder;
|
||||
m_strSlfName = item->parent()->data(0, Qt::UserRole+1).toString();
|
||||
}
|
||||
|
||||
//
|
||||
if (qApp->mouseButtons() == Qt::RightButton) // 只针对鼠标右键,弹出菜单
|
||||
|
|
|
|||
|
|
@ -45,6 +45,7 @@ public slots:
|
|||
void onImportSlfTable();
|
||||
void onOutWellLogRound();
|
||||
void onWelllogInformation(); //编辑测井信息
|
||||
void onCreateNewTable(); //创建新表
|
||||
public:
|
||||
//初始化树图控件
|
||||
void initTreeWidget(QString fullPath, QString strProjectName);
|
||||
|
|
@ -52,10 +53,11 @@ public:
|
|||
public:
|
||||
//右键菜单
|
||||
QMenu *_menuRoot;
|
||||
QMenu *_menuCurveObject;//曲线对象(AC、BS...)
|
||||
QMenu *_menuTableObject;//表格对象
|
||||
QMenu *_menuWellName; //井名
|
||||
QMenu *_menuSlfName; //井次
|
||||
QMenu *_menuCurveObject; //曲线对象(AC、BS...)
|
||||
QMenu *_menuTableObject; //表格对象
|
||||
QMenu *_menuWellName; //井名
|
||||
QMenu *_menuSlfName; //井次
|
||||
QMenu *_menuTableFolder; //表目录
|
||||
|
||||
//根节点(项目名称)-右键菜单
|
||||
QAction* m_action_New;
|
||||
|
|
@ -86,6 +88,8 @@ public:
|
|||
void initWellNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||
//初始化根节点(井次名称)-右键菜单
|
||||
void initSlfNameTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||
//初始化根节点(表目录)-右键菜单
|
||||
void initTableFolderTreeMenu(QMenu *menu, QTreeWidget *treeWidget);
|
||||
private:
|
||||
|
||||
};
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user