Commit 2b546d06 authored by 刘乐's avatar 刘乐

水力接口修改

parent 7370923b
......@@ -6,6 +6,8 @@
#include "string.h"
#include "CivTestContext.h"
#include "CivHydrTest.h"
#include <vector>
#include <string>
using namespace std;
......@@ -47,14 +49,24 @@ int main(int argc, char* argv[])
context.contextTest(findUri);*/
// 下游追踪
CivTestContext context(new CivDownStreamTrackingTest());
context.contextTest(findUri);
/*CivTestContext context(new CivDownStreamTrackingTest());
context.contextTest(findUri);*/
// 水源供水范围分析
/* CivTestContext context(new CivWaterSupplyScopeTest());
context.contextTest(findUri);*/
int base = 10000001;
std::vector<std::string> vec;
for (int i = base; i < base + 730; i++)
{
std::string res = std::to_string(i);
res ="JD"+ res.substr(1, res.length());
vec.push_back(res);
std::cout << res << std::endl;
}
getchar();
return 0;
}
\ No newline at end of file
......@@ -116,7 +116,7 @@ bool FUNEXPORT getRptByCondition(char* uri, char* type, char* condition, char* r
if (type == PIPENODE)
{
table = "__node_result__";
table = NODERESULTTABLE;
CivNodeResultTableTemp::NodeResultTable tableTemp;
fileds.push_back(tableTemp.Number);
......@@ -129,7 +129,7 @@ bool FUNEXPORT getRptByCondition(char* uri, char* type, char* condition, char* r
}
else if (type == PIPELINE)
{
table = "__pipe_result__";
table = PIPERESULTTABLE;
CivPipeResultTableTemp::PipeResultTable pipeTable;
fileds.push_back(pipeTable.szNo);
......
......@@ -25,12 +25,7 @@ bool CivProjSimulation::flowChangeDMA()
return true;
}
bool CivProjSimulation::getDMANodes(std::map<std::string, std::vector<std::string>>& nodes)
void CivProjSimulation::getDMADatas(std::map<std::string, std::vector<std::string>>& nodes)
{
return true;
}
bool CivProjSimulation::getDMAPipes(std::map<std::string, std::vector<std::string>>& pipes)
{
return true;
}
\ No newline at end of file
......@@ -4,7 +4,7 @@
#include <string>
/**
方案模拟
方案模拟
*/
class CivProjSimulation
{
......@@ -21,14 +21,12 @@ public:
bool flowChangeDMA();
private:
/**
*@brief 获取dma分区所对应的点
*/
bool getDMANodes(std::map<std::string, std::vector<std::string>>& nodes);
*@brief 获取dma分区所对应的点
*/
void getDMADatas(std::map<std::string, std::vector<std::string>>& nodes);
/**
*@brief 获取dma分区所对管段
*/
bool getDMAPipes(std::map<std::string, std::vector<std::string>>& pipes);
private:
std::map<std::string, std::string> m;
};
......@@ -64,20 +64,6 @@ public:
*/
virtual bool deleteByField(StrQuote table, StrQuote filedName, StrQuote fieldValue) =0 ;
/**
*@brief 根据时段将结果电表的数据回填到管网节点表
*@param currDate 日期字符串, 格式: xxxx-xx-xx
*@param interval 时段
*/
virtual bool updateNodeByInterval(StrQuote currDate, StrQuote interval)=0;
/**
*@brief 根据时段将结果线表的数据回填到管网管线表
*@param currDate 日期字符串, 格式: xxxx-xx-xx
*@param interval 时段
*/
virtual bool updateLinkByInterval(StrQuote currDate, StrQuote interval)=0;
/**
*@brief 更新点表数据
*@param nodeItems:需要更新的值
......
#include "CivDbUtils.h"
#include "CivConnection.h"
CivConnection* CivDbUtils::getConnection()
{
return nullptr;
}
\ No newline at end of file
#pragma once
class CivConnection;
/**
ݿ
*/
class CivDbUtils
{
public:
static CivConnection* getConnection();
};
This diff is collapsed.
......@@ -68,8 +68,6 @@ public:
*@paramfieldValue:字段值
*/
bool deleteByField(StrQuote table, StrQuote filedName, StrQuote fieldValue) override;
bool updateNodeByInterval(StrQuote currDate, StrQuote interval) override;
bool updateLinkByInterval(StrQuote currDate, StrQuote interval) override;
/**
*@brief 更新点表数据
......
#include "CivSimuResDbHelper.h"
CivSimuResDbHelper::CivSimuResDbHelper()
{
}
bool CivSimuResDbHelper::saveNode()
{
return true;
}
bool CivSimuResDbHelper::saveLink()
{
return true;
}
\ No newline at end of file
#pragma once
#include<string>
class CivConnection;
/**
ģ洢
*/
class CivSimuResDbHelper
{
public:
CivSimuResDbHelper();
CivConnection* getConnection(const std::string& uri);
bool saveNode();
bool saveLink();
private:
};
......@@ -161,12 +161,14 @@ copy CivDbConn.h $(OutDir)..\include /y
<ClInclude Include="CivCommonUtils.h" />
<ClInclude Include="CivConnection.h" />
<ClInclude Include="CivDbConn.h" />
<ClInclude Include="CivDbUtils.h" />
<ClInclude Include="CivInpDbHelper.h" />
<ClInclude Include="CivInpHelperAbs.h" />
<ClInclude Include="CivMaintainModel.h" />
<ClInclude Include="CivPgConn.h" />
<ClInclude Include="CivPgDbConnection.h" />
<ClInclude Include="CivProjInpDbHelper.h" />
<ClInclude Include="CivSimuResDbHelper.h" />
<ClInclude Include="CivTableTemp.h" />
<ClInclude Include="CivTrackingResultCache.h" />
<ClInclude Include="CivTypes.h" />
......@@ -176,12 +178,14 @@ copy CivDbConn.h $(OutDir)..\include /y
<ClCompile Include="CivCommonUtils.cpp" />
<ClCompile Include="CivConnection.cpp" />
<ClCompile Include="CivDbConn.cpp" />
<ClCompile Include="CivDbUtils.cpp" />
<ClCompile Include="CivInpDbHelper.cpp" />
<ClCompile Include="CivInpHelperAbs.cpp" />
<ClCompile Include="CivMaintainModel.cpp" />
<ClCompile Include="CivPgConn.cpp" />
<ClCompile Include="CivPgDbConnection.cpp" />
<ClCompile Include="CivProjInpDbHelper.cpp" />
<ClCompile Include="CivSimuResDbHelper.cpp" />
<ClCompile Include="CivTableTemp.cpp" />
<ClCompile Include="CivTrackingResultCache.cpp" />
</ItemGroup>
......
......@@ -48,6 +48,18 @@
<ClInclude Include="CivInpDbHelper.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivInpHelperAbs.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivProjInpDbHelper.h">
<Filter>头文件</Filter>
</ClInclude>
<ClInclude Include="CivSimuResDbHelper.h">
<Filter>源文件</Filter>
</ClInclude>
<ClInclude Include="CivDbUtils.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CivTableTemp.cpp">
......@@ -80,5 +92,17 @@
<ClCompile Include="CivInpDbHelper.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivInpHelperAbs.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivProjInpDbHelper.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivSimuResDbHelper.cpp">
<Filter>源文件</Filter>
</ClCompile>
<ClCompile Include="CivDbUtils.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
......@@ -4,7 +4,8 @@
<Workspace>
<Local Expanded="Yes">
<Model Expanded="Yes" ID="{580FE8E0-39C2-4622-A220-B5F2A502195E}" Name="数据库表" Selected="Yes" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" URL="../../水力模型文档/数据库表.pdm"/>
<Model Expanded="Yes" ID="{580FE8E0-39C2-4622-A220-B5F2A502195E}" Name="数据库表" Type="{CDE44E21-9669-11D1-9914-006097355D9B}" URL="数据库表.pdm"/>
<Model Expanded="Yes" ID="{86B7DF8B-722D-43D4-BE7C-02CA3D801BF9}" Name="方案管理类结构" Type="{18112060-1A4B-11D1-83D9-444553540000}" URL="方案管理类结构.oom"/>
</Local>
<BrowserModule Name="Repository"/>
</Workspace>
This diff is collapsed.
This diff is collapsed.
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