Commit 7e05214c authored by 刘乐's avatar 刘乐

1,方案管理规划和表创建接口

parent bb7193b7
......@@ -43,7 +43,7 @@
#ifndef DLLEXPORT
#ifdef WINDOWS
#ifdef __cplusplus
#define DLLEXPORT extern "C" __declspec(dllexport)
#define DLLEXPORT __declspec(dllexport)
#else
#define DLLEXPORT __declspec(dllexport) __stdcall
#endif // __cplusplus
......
......@@ -86,7 +86,7 @@ void CivDownStreamTrackingTest::test(char* uri)
{
// 追踪节点编号
char sn[32];
strcpy(sn, "JD00000047");
strcpy(sn, "JD00000016");
char result[1024 * 128];
......
......@@ -36,12 +36,12 @@ int main(int argc, char* argv[])
context.contextTest(findUri);*/
// 上游追踪
/* CivTestContext context(new CivUpstreamTrackingTest());
context.contextTest(findUri);*/
CivTestContext context(new CivUpstreamTrackingTest());
context.contextTest(findUri);
// 下游追踪
CivTestContext context(new CivDownStreamTrackingTest());
context.contextTest(findUri);
/*CivTestContext context(new CivDownStreamTrackingTest());
context.contextTest(findUri);*/
// 水源供水范围分析
......
......@@ -7,7 +7,6 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pandaDbManager", "pandaDbMa
EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pandaAnalysis", "pandaAnalysis\pandaAnalysis.vcxproj", "{47F29C6C-9170-4188-A7AF-6BBCF38BFF6F}"
ProjectSection(ProjectDependencies) = postProject
{BE73E098-3D8C-4F80-88DD-B36A2BB68B64} = {BE73E098-3D8C-4F80-88DD-B36A2BB68B64}
{2B673FBC-3F91-4952-BDD3-4B802A761162} = {2B673FBC-3F91-4952-BDD3-4B802A761162}
EndProjectSection
EndProject
......
......@@ -6,7 +6,7 @@
#include "CivHydrSimulation.h"
#include "CivTrackingAnalysis.h"
bool DLLEXPORT getDataByInterval(char* uri, char* date, char* interval)
bool __declspec(dllexport) getDataByInterval(char* uri, char* date, char* interval)
{
CivDbConn* dbConn = new CivPgConn(uri);
if (!dbConn->open())
......@@ -31,7 +31,7 @@ bool DLLEXPORT getDataByInterval(char* uri, char* date, char* interval)
return true;
}
bool DLLEXPORT hdyrSimulation(char* uri)
bool __declspec(dllexport) hdyrSimulation(char* uri)
{
// 创建数据库连接
CivDbConn* pgConn = new CivPgConn(uri);
......@@ -48,7 +48,7 @@ bool DLLEXPORT hdyrSimulation(char* uri)
return flag;
}
bool DLLEXPORT qualitySimulation(char* uri)
bool __declspec(dllexport) qualitySimulation(char* uri)
{
// 创建数据库连接
CivDbConn* pgConn = new CivPgConn(uri);
......@@ -66,7 +66,7 @@ bool DLLEXPORT qualitySimulation(char* uri)
return flag;
}
bool DLLEXPORT trackingSimulation(char* uri, char* sN, int hours, char* result)
bool __declspec(dllexport) trackingSimulation(char* uri, char* sN, int hours, char* result)
{
// 创建数据库连接
......@@ -92,7 +92,7 @@ bool DLLEXPORT trackingSimulation(char* uri, char* sN, int hours, char* result)
return flag;
}
bool DLLEXPORT getRptByCondition(char* uri, char* type, char* condition, char* result)
bool __declspec(dllexport) getRptByCondition(char* uri, char* type, char* condition, char* result)
{
CivDbConn* dbConn = new CivPgConn(uri);
if (!dbConn->open())
......@@ -176,7 +176,7 @@ bool DLLEXPORT getRptByCondition(char* uri, char* type, char* condition, char* r
return true;
}
bool DLLEXPORT upstreamTracking(char* uri, char* sn, char* result)
bool __declspec(dllexport) upstreamTracking(char* uri, char* sn, char* result)
{
// 创建数据库连接
CivDbConn* pgConn = new CivPgConn(uri);
......@@ -199,7 +199,7 @@ bool DLLEXPORT upstreamTracking(char* uri, char* sn, char* result)
return true;
}
bool DLLEXPORT downstreamTracking(char* uri, char* sn, char* result)
bool __declspec(dllexport) downstreamTracking(char* uri, char* sn, char* result)
{
// 创建数据库连接
CivDbConn* pgConn = new CivPgConn(uri);
......@@ -222,7 +222,7 @@ bool DLLEXPORT downstreamTracking(char* uri, char* sn, char* result)
return true;
}
bool DLLEXPORT waterSupplyScopeAnalysis(char* uri, char* sn, char* result)
bool __declspec(dllexport) waterSupplyScopeAnalysis(char* uri, char* sn, char* result)
{
// 创建数据库连接
CivDbConn* pgConn = new CivPgConn(uri);
......
#ifndef CIVHYDRFUNCINTER_H
#define CIVHYDRFUNCINTER_H
#define DLLEXPORT __declspec(dllexport)
#define FUNEXPORT extern "C" __declspec(dllexport)
#if defined(__cplusplus)
extern "C" {
......@@ -12,7 +13,7 @@ extern "C" {
*@param sn 追踪节点本点号
*@param result 追踪结果
*/
bool DLLEXPORT upstreamTracking(char* uri, char* sn, char* result);
bool __declspec(dllexport) upstreamTracking(char* uri, char* sn, char* result);
/**
*@brief 下游追踪
......@@ -20,7 +21,7 @@ extern "C" {
*@param sn 追踪节点本点号
*@param result 追踪结果
*/
bool DLLEXPORT downstreamTracking(char* uri, char* sn, char* result);
bool __declspec(dllexport) downstreamTracking(char* uri, char* sn, char* result);
/**
*@brief 供水范围追踪
......@@ -28,7 +29,7 @@ extern "C" {
*@param sn 追踪节点本点号
*@param result 追踪结果
*/
bool DLLEXPORT waterSupplyScopeAnalysis(char* uri, char* sn, char* result);
bool __declspec(dllexport) waterSupplyScopeAnalysis(char* uri, char* sn, char* result);
/**
*@brief 获取当前日期和时段的结果值
......@@ -38,21 +39,21 @@ extern "C" {
*@param result 获取的结果值
*@return 1: 成功,其他值失败
*/
bool DLLEXPORT getRptByCondition(char* uri, char* type, char* condition, char* result);
bool __declspec(dllexport) getRptByCondition(char* uri, char* type, char* condition, char* result);
/**
*@brief 水力计算服务
*@param uri:数据库连接地址
*@return 1:成功,其他值失败
*/
bool DLLEXPORT hdyrSimulation(char* uri);
bool __declspec(dllexport) hdyrSimulation(char* uri);
/**
*@brief 水质计算
*@param uri:数据库连接地址
*@return 1:成功,其他值失败
*/
bool DLLEXPORT qualitySimulation(char* uri);
bool __declspec(dllexport) qualitySimulation(char* uri);
/**
*@brief 水质追踪分析,扩散分析
......@@ -62,7 +63,7 @@ extern "C" {
*@param result:输出结果:json字符串
*@return 1:成功,其他值失败
*/
bool DLLEXPORT trackingSimulation(char* uri, char* sN, int hours,char* result);
bool __declspec(dllexport) trackingSimulation(char* uri, char* sN, int hours,char* result);
/**
*@brief 获取管网计算特定时段的结果
......@@ -71,7 +72,7 @@ extern "C" {
*@param interval: 时段,整数
*@return 成功,失败
*/
bool DLLEXPORT getDataByInterval(char* uri, char* date, char* interval);
bool __declspec(dllexport) getDataByInterval(char* uri, char* date, char* interval);
#if defined(__cplusplus)
}
......
#ifndef CIVMIDDLEWAREQUERY_H
#define CIVMIDDLEWAREQUERY_H
/**
ݿѯ
*/
class CivMiddlewareQuery
{
public:
};
#endif // !CIVMIDDLEWAREQUERY_H
#include "CivSimulResultCache.h"
#include"CivSysLog.h"
#include "CivDbConn.h"
void CivSimulResultCache::addNodeQuality(float quality, int interval, Str sNo)
{
......@@ -13,6 +14,11 @@ void CivSimulResultCache::addNodeQuality(float quality, int interval, Str sNo)
mNodeItemsMap[interval][sNo].dQuality = quality;
}
bool CivSimulResultCache::updateToDb(CivDbConn* dbConn)
{
return true;
}
void CivSimulResultCache::addLinkQuality(float quality, int interval, Str sNo)
{
if (mLinkItemsMap.find(interval) == mLinkItemsMap.end())
......@@ -35,69 +41,6 @@ void CivSimulResultCache::addLinkItems(const LinkResultItem& linkItem)
mLinkItemsMap[linkItem.dInterval][linkItem.szNo] = linkItem;
}
bool CivSimulResultCache::updateToDb(CivDbConn* dbConn)
{
CivSysLog::getInstance()->error("开始写入数据库", "CivSimulResultCache", __FUNCTION__);
if (dbConn == nullptr)
{
CivSysLog::getInstance()->error("dbConn == nullptr", "CivSimulResultCache", __FUNCTION__);
return false;
}
for (auto iter = mNodeItemsMap.begin(); iter != mNodeItemsMap.end(); iter++)
{
NodeResultItems nodeItems = iter->second;
if (!dbConn->updateNode(nodeItems))
{
CivSysLog::getInstance()->error("存储节点数据失败", "CivSimulResultCache", __FUNCTION__);
}
}
for (auto iter = mLinkItemsMap.begin(); iter != mLinkItemsMap.end(); iter++)
{
LinkResultItems nodeItems = iter->second;
if (!dbConn->updateLink(nodeItems))
{
CivSysLog::getInstance()->error("存储管段数据失败", "CivSimulResultCache", __FUNCTION__);
}
}
CivSysLog::getInstance()->error("写入数据库完成", "CivSimulResultCache", __FUNCTION__);
return true;
}
bool CivSimulResultCache::updateToDb(CivDbConnection* dbConn)
{
CivSysLog::getInstance()->error("开始写入数据库", "CivSimulResultCache", __FUNCTION__);
if (dbConn == nullptr)
{
CivSysLog::getInstance()->error("dbConn == nullptr", "CivSimulResultCache", __FUNCTION__);
return false;
}
for (auto iter = mNodeItemsMap.begin(); iter != mNodeItemsMap.end(); iter++)
{
NodeResultItems nodeItems = iter->second;
if (!dbConn->updateNode(nodeItems))
{
CivSysLog::getInstance()->error("存储节点数据失败", "CivSimulResultCache", __FUNCTION__);
}
}
for (auto iter = mLinkItemsMap.begin(); iter != mLinkItemsMap.end(); iter++)
{
LinkResultItems nodeItems = iter->second;
if (!dbConn->updateLink(nodeItems))
{
CivSysLog::getInstance()->error("存储管段数据失败", "CivSimulResultCache", __FUNCTION__);
}
}
CivSysLog::getInstance()->error("写入数据库完成", "CivSimulResultCache", __FUNCTION__);
clear();
return true;
}
void CivSimulResultCache::getResultByTime(int time, NodeResultItems& nodeItems, LinkResultItems& linkItems)
{
nodeItems.clear();
......
......@@ -2,10 +2,10 @@
#define CIVSIMULRESULTCACHE_H
#include <map>
#include "CivDbConn.h"
#include "CivDbConnection.h"
#include "CivTypes.h"
class CivDbConn;
/**
模拟结果缓存类
*/
......@@ -49,8 +49,6 @@ public:
*@brief 缓存数据更新到数据库
*@param dbConn:数据库连接对象
*/
bool updateToDb(CivDbConnection* dbConn);
bool updateToDb(CivDbConn* dbConn);
/**
......
......@@ -2,6 +2,7 @@
#include "CivSimulResultCache.h"
#include "CivHydrSimulation.h"
#include "CivGraphFactory.h"
#include "CivDbConn.h"
CivTrackingAnalysis::CivTrackingAnalysis()
:mGraph(new ALGraph<CivGraphJunction, CivGraphEdage>())
......@@ -92,28 +93,28 @@ bool CivTrackingAnalysis::transformJson(const std::vector<CivGraphJunction>& jun
const std::vector<CivGraphEdage>& pipes, std::string& jsonResult)
{
jsonResult.append("{\"node\":[");
// 节点
size_t juncTotal = junctions.size();
for (int i = 0; i < juncTotal; i++)
{
CivGraphJunction junction = junctions.at(i);
std::string sn = junction.getSn();
std::string xCoord = junction.getXCoord();
std::string yCoord = junction.getYCoord();
jsonResult.append("[");
jsonResult.append(sn);
jsonResult.append(",");
jsonResult.append(xCoord);
jsonResult.append(",");
jsonResult.append(yCoord);
jsonResult.append("],");
}
jsonResult = jsonResult.substr(0, jsonResult.length() - 1);
jsonResult.append("],\"pipes\":[");
jsonResult.append("[");
//// 节点
//size_t juncTotal = junctions.size();
//for (int i = 0; i < juncTotal; i++)
//{
// CivGraphJunction junction = junctions.at(i);
// std::string sn = junction.getSn();
// std::string xCoord = junction.getXCoord();
// std::string yCoord = junction.getYCoord();
// jsonResult.append("[");
// jsonResult.append(sn);
// jsonResult.append(",");
// jsonResult.append(xCoord);
// jsonResult.append(",");
// jsonResult.append(yCoord);
// jsonResult.append("],");
//}
//jsonResult = jsonResult.substr(0, jsonResult.length() - 1);
//jsonResult.append("],\"pipes\":[");
// 管段
size_t pipesTotal = pipes.size();
......@@ -124,22 +125,18 @@ bool CivTrackingAnalysis::transformJson(const std::vector<CivGraphJunction>& jun
if (edge.getSN().empty())
continue;
jsonResult.append("[");
jsonResult.append(edge.getSN());
jsonResult.append(",");
jsonResult.append(edge.getLength());
jsonResult.append(",");
jsonResult.append("[[");
jsonResult.append(edge.getStartX());
jsonResult.append(",");
jsonResult.append(edge.getStartY());
jsonResult.append(",");
jsonResult.append("],[");
jsonResult.append(edge.getEndX());
jsonResult.append(",");
jsonResult.append(edge.getEndY());
jsonResult.append("],");
jsonResult.append("]],");
}
jsonResult = jsonResult.substr(0, jsonResult.length() - 1);
jsonResult.append("]}");
jsonResult.append("]");
return true;
}
......@@ -184,6 +181,7 @@ bool CivTrackingAnalysis::downstreamTracking(const std::string& sN, std::string&
bool CivTrackingAnalysis::waterSupplyScopeAnalysis(const std::string& sN, std::string& jsonResult)
{
return true;
}
......@@ -194,9 +192,9 @@ bool CivTrackingAnalysis::upstreamTracking(const std::string& sN,
// 上溯,图反向
ALGraph<CivGraphJunction, CivGraphEdage>* graph = mGraph->reverseGraph();
CivGraphJunction junction(sN);
graph->getVisitedResult(junction, junctions, pipes);
delete graph;
return true;
}
......
......@@ -171,7 +171,6 @@
<ClInclude Include="CivHydrSimulation.h" />
<ClInclude Include="CivBuilder.h" />
<ClInclude Include="CivInpDirector.h" />
<ClInclude Include="CivMiddlewareQuery.h" />
<ClInclude Include="CivNewInp.h" />
<ClInclude Include="CivSimulResultCache.h" />
<ClInclude Include="CivTrackingAnalysis.h" />
......
......@@ -62,9 +62,6 @@
<ClInclude Include="CivSimulResultCache.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivMiddlewareQuery.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivHydrSimulation.h">
<Filter>头文件</Filter>
</ClInclude>
......
#include "CivConnection.h"
CivConnection::CivConnection()
:mValid(false)
{
}
CivConnection::~CivConnection()
{
}
bool CivConnection::isValid() const
{
return mValid;
}
std::string CivConnection::getLastError() const
{
return mLastError;
}
#pragma once
#include <string>
/**
数据库连接类
*/
class CivConnection
{
public:
CivConnection();
virtual ~CivConnection();
virtual bool connect(const std::string url) = 0;
/**
*@brief 建立数据,与具体的数据有关子类实现
*/
virtual bool open() = 0;
/**
*@brief 关闭数据,与具体的数据有关子类实现
*/
virtual bool close() = 0;
/**
*@brief 执行sql, 非查询操作,与具体的数据有关子类实现
*@param 非查询类,sql语句
*/
virtual bool execNoQquery(const std::string& sql) = 0;
/**
*@brief 执行查询操作,与具体的数据有关子类实现
*@param sql 查询sql语句
*/
virtual bool execQuery(const std::string& sql) = 0;
// 检查连接
bool isValid() const;
// 获取信息
std::string getLastError() const;
private:
bool mValid;
std::string mLastError;
};
This diff is collapsed.
#pragma once
#include "CivTypes.h"
#include <vector>
#include <set>
#include <libpq-fe.h>
#include "CivTableTemp.h"
#include "CivSysLog.h"
#define DLLEXPORT __declspec(dllexport)
class CivDbConnection;
/**
数据库连接类,获取数据,写入数据接口
*/
class DLLEXPORT CivDbConnection
{
public:
CivDbConnection(char* uri);
~CivDbConnection();
/**
*@brief 获取管网的所有表
*@netName: 管网名
*/
Tables getTables(StrQuote netName, StrQuote schema = "public");
/**
*@brief 获取管网组件数据:管线,节点,水源等(必须组件)
*@tableName: 组件表
*/
Componets getComponets(StrQuote tableName);
Componets getComponetsByWhere(StrQuote tableName, StrQuote where);
/**
*@brief 水泵,阀门 (节点转换为管线)
*@tableName: 组件表
*/
Componets getLikelyPipes(StrQuote tableName);
bool tableExist(StrQuote tableName);
/**
*@brief 创建表格
*@tableName: 表名
*@schema:
*@tableType:表类型,点结果,线结果
*/
bool createTable(CivTableTemp& temp);
bool deleteByDate(StrQuote table, StrQuote filedName, StrQuote fieldValue);
bool updateNodeByInterval(StrQuote currDate, StrQuote interval);
bool updateLinkByInterval(StrQuote currDate, StrQuote interval);
/**
*@brief 刷新模拟的水质字段值
*@quality: 水质
*@currDate: 模拟的日期
*@StrQuote: 模拟的次数
*/
bool updateNodeQuality(const NodeResultItems& nodeItems);
bool updatePipeQuality(const LinkResultItems& lineItems);
/**
*@brief 更新点表数据
*@nodeItems:需要更新的值
*/
bool updateNode(const NodeResultItems& nodeItems);
/**
*@brief 更新线表的数据
*@lineItems: 线数据
*/
bool updateLink(const LinkResultItems& lineItems);
bool open();
void close();
void addFilter(Str type, Str number);
FiledFilter getFilter() const;
private:
bool isValid() const;
/**
*@brief 查询与点连接的线
*@table: 线表
*@code:
*/
Componets getLineByCode(StrQuote table, StrQuote code);
Componets getNodeByCode(StrQuote table, StrQuote code);
/**
*@brief 执行sql语句
*@sql: 需要执行的sql语句
*/
bool execSql(std::string sql);
void clearResult();
/**
*@brief 从查询集取出数据
*@result: 查询结果集
*@comp: 数据容器
*/
void getData( Componets& comp);
private:
PGconn* mConn;
PGresult* mResult;
bool mIsOpen = false;
char* mUri;
char* mLastError;
FiledFilter mFilter; // 表名:对应的编号
};
\ No newline at end of file
#include "CivDbUtils.h"
CivDbUtils::CivDbUtils()
{
}
\ No newline at end of file
#pragma once
class CivDbUtils
{
public:
CivDbUtils();
private:
};
#include "CivMaintainModel.h"
CivMaintainModel::CivMaintainModel()
{
}
void CivMaintainModel::maintain()
{
}
void CivMaintainModel::addNecessaryTable(const std::string& table)
{
}
bool CivMaintainModel::checkTable(const std::string& table)
{
return true;
}
bool CivMaintainModel::checkTableFiled(const std::string& talbe, const std::string& filed, const std::string& filedType)
{
return true;
}
void CivMaintainModel::addTableFiled(const std::string& table, const std::string& filed, const std::string& filedType)
{
}
void CivMaintainModel::deleteTableFiled(const std::string& table, const std::string& filed)
{
}
\ No newline at end of file
#pragma once
#include "CivDbConn.h"
#include <vector>
/**
维护水力模型必要的表
*/
class DBEXPORT CivMaintainModel
{
public:
CivMaintainModel();
/**
*@brief 维护模型必要的表
*/
void maintain();
/**
*@brief 添加模型所必须的表
*@param table 表名
*/
void addNecessaryTable(const std::string& table);
private:
/**
*@brief 检查表是否存在
*/
bool checkTable(const std::string& table);
/**
*@brief 检查表字段
*@param table 表名
*@param filed 表字段
*@param filedType 表字段类型
*/
bool checkTableFiled(const std::string& table, const std::string& filed, const std::string& filedType);
/**
*@brief 添加表字段
*@param table 表名
*@param filed 表字段
*@param filedType 表字段类型
*/
void addTableFiled(const std::string& table, const std::string& filed, const std::string& filedType);
/**
*@brief 删除表字段
*@param table 表名
*@param filed 表字段
*/
void deleteTableFiled(const std::string& table, const std::string& filed);
private:
std::vector<std::string> mNecessTables;
};
This diff is collapsed.
......@@ -30,9 +30,13 @@ public:
FILED_VARCHAR64,
FILED_VARCHAR128,
FILED_VARCHAR256,
FILED_BOOLEAN,
FILED_CHARACTER_VARYING,
FILED_DATETIME,
FILED_JSON,
FILED_DATE
FILED_DATE,
FILED_GEOM_POINT,
FILED_GEOM_LINE
};
explicit CivTableTemp();
......@@ -395,6 +399,202 @@ public:
explicit CivCurveTableTemp();
};
/**
方案点表
*/
class CivProjNodeTableTemp :public CivTableTemp
{
public:
typedef struct TableField
{
Str ProjCode = "方案编号";
Str ProjType = "修改类型";
Str ProjGeom = "geom";
Str ProjSn = "本点号";
Str ProjXcoord = "横坐标";
Str ProjYcoord = "纵坐标 ";
Str ProjDesc = "描述";
Str ProjLabel = "标签";
Str ProElev = "高程";
Str ProjBaseDemand = "基本需水量";
Str ProjPattern = "需水量模式";
Str ProjDemandType = "需水量类型";
Str ProjDiffuserCoeff = "扩散器系数";
Str ProjInitQuality = "初始水质 ";
Str ProjSourceQuality = "源头水质 ";
Str ProjDmaID = "DMAID";
Str ProjDemand = "实际需水量";
Str ProjConsumption = "用水量";
Str ProjLackWater = "用水缺额";
Str ProjLackWaterPer = "用水缺额(%)";
Str ProjTotalWater = "总水量";
Str ProjTotalHead = "总水头";
Str ProjPressure = "压力";
Str ProjQuality = "水质";
}ProjNodeTable;
explicit CivProjNodeTableTemp();
};
/**
方案线表
*/
class CivProjPipeTableTemp :public CivTableTemp
{
public:
typedef struct TableField
{
Str ProjCode = "方案名";
Str ProjType = "修改类型";
Str ProjGeom = "Geom";
Str ProjSn = "编号";
Str ProjStartID = "起始节点";
Str ProjEndID = "终止节点";
Str ProjDesc = "描述";
Str ProjLabel= "标签";
Str ProjLength = "管长";
Str ProjDiameter = "管径";
Str ProjMaterial = "管材";
Str ProjFractionCoeff = "摩阻系数";
Str ProjLoclLossCoeff = "局损系数";
Str ProjInitStatus = "初始状态";
Str ProjMainstreamCoeff = "主流系数";
Str ProjWallCoeff = "管壁系数";
Str ProjLeakageCoeff1 = "漏水系数1";
Str ProLeakageCoeff2 = "漏水系数2";
Str ProjDmaID = "DMAID";
Str ProjFlow = "流量";
Str ProjVelocity = "流速";
Str ProjUnitLoss = "单位水损";
Str ProjStatus = "状态";
Str ProjQuality = "水质";
Str ProjWaterLeakage = "漏水量";
}ProjPipeTable;
explicit CivProjPipeTableTemp();
};
/**
方案表
*/
class CivProjTableTemp :public CivTableTemp
{
public:
typedef struct TableField
{
Str ProjName = "方案名";
Str ProjCode = "方案编号";
Str ProjType = "方案类型";
Str ProjCreator = "创建人";
Str ProjAddTime = "创建时间";
Str ProjUpdateTime = "更新时间";
Str ProjTime = "方案时间";
Str ProjScore = "评分";
Str ProDescribe = "评价";
Str ProjEvaluate = "评估";
Str ProjDemand = "水量调整";
Str ProjWorkCode = "作业编号";
Str ProjDetection = "关注检测点";
}ProjTable;
explicit CivProjTableTemp();
};
/**
检测压力表
*/
class CivMonitorPressureTableTemp :public CivTableTemp
{
public:
typedef struct TableField
{
Str MonitorScard = "SCADAID";
Str MonitorXCoord = "横坐标";
Str MonitorYCoord = "纵坐标 ";
Str MonitorDesc = "描述";
Str MonitorLabel = "标签";
Str MonitorNode = "节点ID ";
Str MonitorMonitor = "检测值 ";
Str MonitorCalc = "计算值 ";
Str MonitorError = "误差";
Str MonitorMonitorAverage = "检测平均值";
Str MonitorCalcAverage = "计算平均值";
Str MonitorErrorAverage = "平均误差 ";
Str MonitorAbsErrirAverage = "平均绝对误差";
Str MonitorSquareError = "均方根误差";
Str MonitorErrorFlu = "误差波动";
Str MonitorNashCoeff = "纳什系数";
Str MonitorScore = "分数";
Str MonitorReliability = "可靠度";
}MonitorPressureTable;
explicit CivMonitorPressureTableTemp();
};
/**
检测流量表
*/
class CivMonitorFlowTableTemp :public CivTableTemp
{
public:
typedef struct TableField
{
Str MonitorScard = "SCADAID";
Str MonitorXCoord = "横坐标";
Str MonitorYCoord = "纵坐标 ";
Str MonitorDesc = "描述";
Str MonitorLabel = "标签";
Str MonitorPipe= "管段ID ";
Str MonitorMonitor = "检测值 ";
Str MonitorCalc = "计算值 ";
Str MonitorError = "误差";
Str MonitorMonitorAverage = "检测平均值";
Str MonitorCalcAverage = "计算平均值";
Str MonitorErrorAverage = "平均误差 ";
Str MonitorAbsErrirAverage = "平均绝对误差";
Str MonitorSquareError = "均方根误差";
Str MonitorErrorFlu = "误差波动";
Str MonitorNashCoeff = "纳什系数";
Str MonitorScore = "分数";
Str MonitorReliability = "可靠度";
}MonitorFlowTable;
explicit CivMonitorFlowTableTemp();
};
/**
检测水质表
*/
class CivMonitorQualityTableTemp :public CivTableTemp
{
public:
typedef struct TableField
{
Str MonitorScard = "SCADAID";
Str MonitorXCoord = "横坐标";
Str MonitorYCoord = "纵坐标 ";
Str MonitorDesc = "描述";
Str MonitorLabel = "标签";
Str MonitorNode = "节点ID ";
Str MonitorMonitor = "检测值 ";
Str MonitorCalc = "计算值 ";
Str MonitorError = "误差";
Str MonitorMonitorAverage = "检测平均值";
Str MonitorCalcAverage = "计算平均值";
Str MonitorErrorAverage = "平均误差 ";
Str MonitorAbsErrirAverage = "平均绝对误差";
Str MonitorSquareError = "均方根误差";
Str MonitorErrorFlu = "误差波动";
Str MonitorNashCoeff = "纳什系数";
Str MonitorScore = "分数";
Str MonitorReliability = "可靠度";
}MonitorQualityTable;
explicit CivMonitorQualityTableTemp();
};
#endif // !CIVTABLETEMP_H
......
......@@ -24,6 +24,21 @@ typedef const std::string& StrQuote;
#define CURVETABLE Str("__curve__")
#define OPTIONTTABLE Str("__parameter__")
/**
方案规划相关表定义
*/
#define PROJTABLE Str("__proj__")
#define PROJNODETABLE Str("__proj_node__")
#define PROJPIPETABLE Str("__proj_pipe__")
/*
监测点表系列
*/
#define PRESSURETABLE Str("__monitor_pressure__")
#define FLOWTABLE Str("__monitor_flow __")
#define QUALITYTABLE Str("__monitor_quality __")
#define PRV_TYPE Str("稳压阀")
#define PSV_TYPE Str("减压阀")
#define PBV_TYPE Str("压力制动阀")
......
......@@ -149,18 +149,20 @@
<ImportLibrary>$(OutDir)..\lib\$(TargetName).lib</ImportLibrary>
</Link>
<PostBuildEvent>
<Command>copy CivDbConnection.h $(OutDir)..\include /y
copy CivTypes.h $(OutDir)..\include /y
<Command>copy CivTypes.h $(OutDir)..\include /y
copy CivPgConn.h $(OutDir)..\include /y
copy CivAssembly.h $(OutDir)..\include /y
copy CivDbConn.h $(OutDir)..\include /y
</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="CivAssembly.h" />
<ClInclude Include="CivCommonUtils.h" />
<ClInclude Include="CivConnection.h" />
<ClInclude Include="CivDbConn.h" />
<ClInclude Include="CivDbConnection.h" />
<ClInclude Include="CivDbUtils.h" />
<ClInclude Include="CivMaintainModel.h" />
<ClInclude Include="CivPgConn.h" />
<ClInclude Include="CivTableTemp.h" />
<ClInclude Include="CivTrackingResultCache.h" />
......@@ -169,8 +171,10 @@ copy CivAssembly.h $(OutDir)..\include /y
<ItemGroup>
<ClCompile Include="CivAssembly.cpp" />
<ClCompile Include="CivCommonUtils.cpp" />
<ClCompile Include="CivConnection.cpp" />
<ClCompile Include="CivDbConn.cpp" />
<ClCompile Include="CivDbConnection.cpp" />
<ClCompile Include="CivDbUtils.cpp" />
<ClCompile Include="CivMaintainModel.cpp" />
<ClCompile Include="CivPgConn.cpp" />
<ClCompile Include="CivTableTemp.cpp" />
<ClCompile Include="CivTrackingResultCache.cpp" />
......
......@@ -15,9 +15,6 @@
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CivDbConnection.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivTypes.h">
<Filter>头文件</Filter>
</ClInclude>
......@@ -39,11 +36,17 @@
<ClInclude Include="CivTrackingResultCache.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivDbUtils.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivConnection.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivMaintainModel.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CivDbConnection.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivTableTemp.cpp">
<Filter>源文件</Filter>
</ClCompile>
......@@ -62,5 +65,14 @@
<ClCompile Include="CivTrackingResultCache.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivConnection.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivMaintainModel.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivDbUtils.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment