logplus/OSGDataModel/src/WelllogRound.cpp
2025-11-26 10:21:39 +08:00

802 lines
32 KiB
C++

#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);
// }
}
}
}