540 lines
11 KiB
C++
540 lines
11 KiB
C++
/**
|
||
* @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
|