88 lines
3.4 KiB
C++
88 lines
3.4 KiB
C++
#ifndef AFX_C_LOGGING_DATA_OPER_H__20190829__INCLUDED_
|
|
#define AFX_C_LOGGING_DATA_OPER_H__20190829__INCLUDED_
|
|
|
|
#if _MSC_VER > 1000
|
|
#pragma once
|
|
#endif // _MSC_VER > 1000
|
|
|
|
#include "GUCodeCreator.h"
|
|
#include <vector>
|
|
#include "CtrlProtocolDef.h"
|
|
|
|
#define MAX_LENGHT_LITHOLOGY_NAME (40) //岩性名称最大长度
|
|
#define MAX_LENGHT_LITHOLOGY_PICTURE (250) //岩性图片最大长度
|
|
#define GRID_X_DIRECTION_SIZE (50) //网格X方向50个单元格
|
|
#define GRID_Y_DIRECTION_SIZE (40) //网格Y方向40个单元格
|
|
#define MAX_LENGTH_TASK_NAME (60) //任务名
|
|
#define MAX_LENGTH_TASK_LOCATION (100) //测试地点
|
|
typedef struct ST_LOGGING_LITHOLOGY_INFO
|
|
{
|
|
//int iLithologyType; //岩性类型
|
|
char szLithologyType[MAX_LENGHT_LITHOLOGY_NAME]; //岩性类型
|
|
char szLithologyName[MAX_LENGHT_LITHOLOGY_NAME]; //岩性名称
|
|
char szLithologyPic[MAX_LENGHT_LITHOLOGY_PICTURE]; //岩性图片
|
|
ST_LOGGING_LITHOLOGY_INFO()
|
|
{
|
|
memset(this, 0, sizeof(ST_LOGGING_LITHOLOGY_INFO));
|
|
}
|
|
}STLoggingLithologyInfo;
|
|
|
|
typedef struct ST_LOGGING_TASK_INFO
|
|
{
|
|
char szTaskName[MAX_LENGTH_TASK_NAME]; //任务名
|
|
char szLocation[MAX_LENGTH_TASK_LOCATION]; //测试地点
|
|
BYTE byLogType; //工作模式
|
|
BYTE byTrace; //迭代次数0-255
|
|
BYTE byWaveform; //发射波形
|
|
BYTE byLogDirection; //测井方向
|
|
float fSamplingInterval; //采样频率
|
|
float fInitDepth; //初始深度
|
|
float fEndDepth; //结束深度
|
|
float fLoggingDistance; //测试距离,测距距离
|
|
float fInstrumentZeroLength; //仪器零长
|
|
float fPeriod; //周期
|
|
ST_LOGGING_TASK_INFO()
|
|
{
|
|
memset(this, 0, sizeof(ST_LOGGING_TASK_INFO));
|
|
}
|
|
}STLoggingTaskInfo;
|
|
|
|
class CLoggingDataOper
|
|
{
|
|
public:
|
|
static CLoggingDataOper* GetInstance();
|
|
|
|
//查询岩性列表
|
|
map<CString, STLoggingLithologyInfo> QueryLithologyInfo();
|
|
|
|
//根据岩性名称查找数据库相关信息
|
|
STLoggingLithologyInfo QueryLithologyInfoByName(CString strLithologyName);
|
|
|
|
//数据库删除岩性图片
|
|
BOOL DeleteDBLithologyBitmap(CString strLithologyType);
|
|
|
|
//数据库新增岩性图片
|
|
BOOL InsertDBLithologyBitmap(CString strLithologyType, CString strLithologyName, CString strLithologyPicPath, map<int, map<int, bool>> mapPictureCode);
|
|
|
|
//加载数据库图片信息
|
|
map<int, map<int, bool>> LoadLithologyBitmapFromDB(CString strLithologyName);
|
|
|
|
//logging新建任务写入数据库
|
|
BOOL SaveTaskInfoIntoDB(CString strTaskName, CString strTestLocation, BYTE byLogTypes, CString strTrace, int iWaveform, CString strSamplingInterval, CString strInitialDepth, CString strEndDepth, int iLogDir, CString strLoggingInterval, CString strInstrumentZeroLength, CString strPeriod);
|
|
//修改logging任务信息
|
|
BOOL UpdateTaskInfoIntoDB(CString strTaskName, CString strTestLocation, BYTE byLogTypes, CString strTrace, int iWaveform, CString strSamplingInterval, CString strInitialDepth, CString strEndDepth, int iLogDir, CString strLoggingInterval, CString strInstrumentZeroLength, CString strPeriod);
|
|
//查询logging任务名列表
|
|
map<CString, STLoggingTaskInfo> QueryTaskListFromDB();
|
|
//查询单个任务信息通过任务名
|
|
STLoggingTaskInfo QueryTaskInfoByName(CString strTaskName);
|
|
protected:
|
|
//岩性图片类型 对应 岩性信息
|
|
map<CString, STLoggingLithologyInfo> m_mapLithologyInfo;
|
|
|
|
private:
|
|
CLoggingDataOper();
|
|
virtual ~CLoggingDataOper();
|
|
};
|
|
|
|
#endif // !defined(AFX_C_LOGGING_DATA_OPER_H__20190829__INCLUDED_)
|