Commit ab0f72c6 authored by 刘乐's avatar 刘乐

1, 接口调试

parent b2d67b34
...@@ -6,6 +6,7 @@ ...@@ -6,6 +6,7 @@
#include "time.h" #include "time.h"
#include "string.h" #include "string.h"
using namespace std; using namespace std;
int main(int argc, char* argv[]) int main(int argc, char* argv[])
{ {
...@@ -24,6 +25,7 @@ int main(int argc, char* argv[]) ...@@ -24,6 +25,7 @@ int main(int argc, char* argv[])
bool msg = simulation(findUri, net, flag); bool msg = simulation(findUri, net, flag);
std::cout << msg << std::endl; std::cout << msg << std::endl;
// bool flag = getDataByInterval(findUri,'2020-06-18',)
return 0; return 0;
} }
\ No newline at end of file
...@@ -15,6 +15,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EPNAET2", "EPNAET2\EPNAET2. ...@@ -15,6 +15,8 @@ Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "EPNAET2", "EPNAET2\EPNAET2.
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "funcDemo", "funcDemo\funcDemo.vcxproj", "{6A4F723D-C24B-4B16-A230-9C39A379F082}" Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "funcDemo", "funcDemo\funcDemo.vcxproj", "{6A4F723D-C24B-4B16-A230-9C39A379F082}"
EndProject EndProject
Project("{8BC9CEB8-8B4A-11D0-8D11-00A0C91BC942}") = "pandasUtils", "pandasUtils\pandasUtils.vcxproj", "{7786A13A-338A-4D91-B6BF-DC751E55F018}"
EndProject
Global Global
GlobalSection(SolutionConfigurationPlatforms) = preSolution GlobalSection(SolutionConfigurationPlatforms) = preSolution
Debug|Any CPU = Debug|Any CPU Debug|Any CPU = Debug|Any CPU
...@@ -65,6 +67,16 @@ Global ...@@ -65,6 +67,16 @@ Global
{6A4F723D-C24B-4B16-A230-9C39A379F082}.Release|x64.Build.0 = Release|x64 {6A4F723D-C24B-4B16-A230-9C39A379F082}.Release|x64.Build.0 = Release|x64
{6A4F723D-C24B-4B16-A230-9C39A379F082}.Release|x86.ActiveCfg = Release|Win32 {6A4F723D-C24B-4B16-A230-9C39A379F082}.Release|x86.ActiveCfg = Release|Win32
{6A4F723D-C24B-4B16-A230-9C39A379F082}.Release|x86.Build.0 = Release|Win32 {6A4F723D-C24B-4B16-A230-9C39A379F082}.Release|x86.Build.0 = Release|Win32
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Debug|Any CPU.ActiveCfg = Debug|Win32
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Debug|x64.ActiveCfg = Debug|x64
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Debug|x64.Build.0 = Debug|x64
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Debug|x86.ActiveCfg = Debug|Win32
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Debug|x86.Build.0 = Debug|Win32
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Release|Any CPU.ActiveCfg = Release|Win32
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Release|x64.ActiveCfg = Release|x64
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Release|x64.Build.0 = Release|x64
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Release|x86.ActiveCfg = Release|Win32
{7786A13A-338A-4D91-B6BF-DC751E55F018}.Release|x86.Build.0 = Release|Win32
EndGlobalSection EndGlobalSection
GlobalSection(SolutionProperties) = preSolution GlobalSection(SolutionProperties) = preSolution
HideSolutionNode = FALSE HideSolutionNode = FALSE
......
...@@ -3,6 +3,7 @@ ...@@ -3,6 +3,7 @@
#include "CivTypes.h" #include "CivTypes.h"
#include "Epanet2.h" #include "Epanet2.h"
#include "CivInp.h" #include "CivInp.h"
#include "../pandaDbManager/CivCommonUtils.h"
#include <time.h> #include <time.h>
#include <iostream> #include <iostream>
...@@ -50,6 +51,7 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile ...@@ -50,6 +51,7 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
float dHStep; float dHStep;
ENGetVal(4, &dHStep); ENGetVal(4, &dHStep);
bool isFirst = true; bool isFirst = true;
// 计算 // 计算
do do
...@@ -72,7 +74,8 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile ...@@ -72,7 +74,8 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
ENnextH(&tstep); ENnextH(&tstep);
if (isFirst) if (isFirst)
{ {
mDbConn->deleteByDate(NODERESULTTABLE, "日期", currentDate()); mDbConn->deleteByDate(NODERESULTTABLE, "日期", CurrentDate);
mDbConn->deleteByDate(PIPERESULTTABLE, "日期", CurrentDate);
isFirst = false; isFirst = false;
} }
// 获取当前节点和管段数据 // 获取当前节点和管段数据
...@@ -80,6 +83,8 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile ...@@ -80,6 +83,8 @@ bool CivHydrCalc::hydrSimulation(char* fileName, char* rptFile, char* binOutFile
getLinkResult(iTime); getLinkResult(iTime);
iTime++; iTime++;
} while (tstep > 0); } while (tstep > 0);
(void)mDbConn->updateNodeByInterval(CurrentDate, CurrentHour);
(void)mDbConn->updateLinkByInterval(CurrentDate,CurrentHour);
return true; return true;
} }
...@@ -112,6 +117,7 @@ bool CivHydrCalc::exportInp(char* fileName) ...@@ -112,6 +117,7 @@ bool CivHydrCalc::exportInp(char* fileName)
for (int i=0;i<total;i++) for (int i=0;i<total;i++)
{ {
std::string table = tables[i]; std::string table = tables[i];
std::cout << table << std::endl;
if (PIPELINE == table) if (PIPELINE == table)
continue; continue;
...@@ -121,7 +127,7 @@ bool CivHydrCalc::exportInp(char* fileName) ...@@ -121,7 +127,7 @@ bool CivHydrCalc::exportInp(char* fileName)
// 设置曲线 // 设置曲线
Componets curves = mDbConn->getComponets(CURVETABLE); // Componets curves = mDbConn->getComponets(CURVETABLE);
// 初始化参数 // 初始化参数
Options options; Options options;
...@@ -175,7 +181,7 @@ void CivHydrCalc::assemble(const std::string& table, CivInp& inp) ...@@ -175,7 +181,7 @@ void CivHydrCalc::assemble(const std::string& table, CivInp& inp)
auto iter = filter.find(PIPELINE); auto iter = filter.find(PIPELINE);
if (iter != filter.end()) if (iter != filter.end())
{ {
auto lineFilter = filter.find(PIPELINE)->second; auto lineFilter = iter->second;
if (lineFilter.count(number) > 0) if (lineFilter.count(number) > 0)
continue; continue;
} }
...@@ -453,21 +459,17 @@ void CivHydrCalc::assemble(const std::string& table, CivInp& inp) ...@@ -453,21 +459,17 @@ void CivHydrCalc::assemble(const std::string& table, CivInp& inp)
} }
} }
std::string CivHydrCalc::currentDate() bool CivHydrCalc::getDataByInterval(char* date, char* interval)
{ {
time_t rawtime; if (!mDbConn->updateNodeByInterval(date, interval))
struct tm* timeinfo; return false;
char s[100];
time(&rawtime);
timeinfo = localtime(&rawtime); if (!mDbConn->updateLinkByInterval(date, interval))
time_t tick = mktime(timeinfo); return false;
strftime(s, sizeof(s), "%Y-%m-%d", timeinfo);
return s; return true;
} }
void CivHydrCalc::getNodeResult(short time) void CivHydrCalc::getNodeResult(short time)
{ {
int nNodeCount; int nNodeCount;
...@@ -495,6 +497,8 @@ void CivHydrCalc::getNodeResult(short time) ...@@ -495,6 +497,8 @@ void CivHydrCalc::getNodeResult(short time)
ENgetnodevalue(i, EN_MAXVOLUME, &nodeItem.dTankMaxVolume); ENgetnodevalue(i, EN_MAXVOLUME, &nodeItem.dTankMaxVolume);
// 液位高度 // 液位高度
ENgetnodevalue(i, EN_TANKLEVEL, &nodeItem.dTankLevel); ENgetnodevalue(i, EN_TANKLEVEL, &nodeItem.dTankLevel);
nodeItem.dInterval = time; nodeItem.dInterval = time;
nodeItems.push_back(nodeItem); nodeItems.push_back(nodeItem);
......
...@@ -30,6 +30,8 @@ public: ...@@ -30,6 +30,8 @@ public:
*/ */
bool qualitySimulation(char* inpFile, char* rptFile, char* binOutFile); bool qualitySimulation(char* inpFile, char* rptFile, char* binOutFile);
bool getDataByInterval( char* date, char* interval);
/** /**
*@brief 导出inp文件 *@brief 导出inp文件
*/ */
...@@ -41,7 +43,6 @@ private: ...@@ -41,7 +43,6 @@ private:
*@inp: inp文件对象 *@inp: inp文件对象
*/ */
void assemble(const std::string& table, CivInp& inp); void assemble(const std::string& table, CivInp& inp);
std::string currentDate();
/* /*
*@brief 获取节点计算结果 *@brief 获取节点计算结果
*@time: 时间 *@time: 时间
......
#include "CivHydrFuncInter.h" #include "CivHydrFuncInter.h"
#include "CivHydrCalc.h" #include "CivHydrCalc.h"
#include "CivDbConnection.h"
bool DLLEXPORT simulation(char* uri, char* netName, char* flag) bool DLLEXPORT simulation(char* uri, char* netName, char* flag)
{ {
...@@ -26,10 +24,10 @@ bool DLLEXPORT simulation(char* uri, char* netName, char* flag) ...@@ -26,10 +24,10 @@ bool DLLEXPORT simulation(char* uri, char* netName, char* flag)
return msg; return msg;
} }
bool DLLEXPORT getDataByInterval(char* uri,char* date, char* interval) bool DLLEXPORT getDataByInterval(char* uri, char* date, char* interval)
{ {
CivDbConnection* dbConn = new CivDbConnection(uri); CivHydrCalc* calc = new CivHydrCalc(uri, "");
bool flag = dbConn->updateLinkByInterval(date, interval); bool flag = calc->getDataByInterval(date, interval);
delete dbConn; delete calc;
return flag; return flag;
} }
\ No newline at end of file
...@@ -19,7 +19,7 @@ extern "C" { ...@@ -19,7 +19,7 @@ extern "C" {
*@date: 日期 *@date: 日期
*@interval: 时段,整数 *@interval: 时段,整数
*/ */
bool DLLEXPORT getDataByInterval(char* uri,char* date, char* interval); bool DLLEXPORT getDataByInterval(char* uri, char* date, char* interval);
#if defined(__cplusplus) #if defined(__cplusplus)
} }
......
...@@ -152,6 +152,7 @@ ...@@ -152,6 +152,7 @@
</PostBuildEvent> </PostBuildEvent>
</ItemDefinitionGroup> </ItemDefinitionGroup>
<ItemGroup> <ItemGroup>
<ClCompile Include="..\pandaDbManager\CivCommonUtils.cpp" />
<ClCompile Include="CivComponent.cpp" /> <ClCompile Include="CivComponent.cpp" />
<ClCompile Include="CivHydrCalc.cpp" /> <ClCompile Include="CivHydrCalc.cpp" />
<ClCompile Include="CivHydrFuncInter.cpp" /> <ClCompile Include="CivHydrFuncInter.cpp" />
......
...@@ -27,6 +27,9 @@ ...@@ -27,6 +27,9 @@
<ClCompile Include="CivHydrFuncInter.cpp"> <ClCompile Include="CivHydrFuncInter.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="..\pandaDbManager\CivCommonUtils.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup> </ItemGroup>
<ItemGroup> <ItemGroup>
<ClInclude Include="CivHydrCalc.h"> <ClInclude Include="CivHydrCalc.h">
......
...@@ -95,5 +95,34 @@ std::string CivCommonUtils::currentHour() ...@@ -95,5 +95,34 @@ std::string CivCommonUtils::currentHour()
time_t tick = mktime(timeinfo); time_t tick = mktime(timeinfo);
strftime(s, sizeof(s), "%H", timeinfo); strftime(s, sizeof(s), "%H", timeinfo);
return s; std::string res = lstrip(s,'0');
return res;
}
std::string CivCommonUtils::lstrip(char aa[], char c)
{
int i = 0, j = 0, k = 0, z = 0;
k = strlen(aa);
z = k - 1;
while (aa[z] == c)
{
--z;
}
int x = 0, y = 0;
while (aa[y] == c)
{
y++;
}
char bb[256];
int leng = 0;
for (x = y; x < z + 1; x++)
{
bb[leng] = aa[x];
leng++;
}
std::string res = bb;
return res;
} }
\ No newline at end of file
...@@ -6,7 +6,7 @@ ...@@ -6,7 +6,7 @@
// 字符串转编码 // 字符串转编码
#define TransUTFCoding(name) CivCommonUtils::string_To_UTF8(name) #define TransUTFCoding(name) CivCommonUtils::string_To_UTF8(name)
#define UTFTransCoding(name) CivCommonUtils::UTF8_To_string(name)
// 当前系统日期 // 当前系统日期
#define CurrentDate CivCommonUtils::currentDate() #define CurrentDate CivCommonUtils::currentDate()
...@@ -41,6 +41,8 @@ public: ...@@ -41,6 +41,8 @@ public:
static std::string currentHour(); static std::string currentHour();
static std::string lstrip(char str[],char c);
///** ///**
//*@brief 将json字符串解析为 //*@brief 将json字符串解析为
//*/ //*/
......
...@@ -74,7 +74,7 @@ Tables CivDbConnection::getTables(StrQuote netName,StrQuote schema) ...@@ -74,7 +74,7 @@ Tables CivDbConnection::getTables(StrQuote netName,StrQuote schema)
for (int j = 0; j < columns; j++) for (int j = 0; j < columns; j++)
{ {
char* item =PQgetvalue(mResult, i, j); char* item =PQgetvalue(mResult, i, j);
std::string ss = CivCommonUtils::UTF8_To_string(item); std::string ss = UTFTransCoding(item);
tables.push_back(ss); tables.push_back(ss);
} }
} }
...@@ -113,7 +113,7 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems) ...@@ -113,7 +113,7 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
if (createTable(NODERESULTTABLE, "public", NODE_TABLE)) if (createTable(NODERESULTTABLE, "public", NODE_TABLE))
{ {
os << "INSERT INTO public."<< NODERESULTTABLE<<" ( "; os << "INSERT INTO public."<< NODERESULTTABLE<<" ( ";
os <<filedNames.Number<<","; os << filedNames.Number<<",";
os<< filedNames.dDemand << ","; os<< filedNames.dDemand << ",";
os<< filedNames.dHead<<","; os<< filedNames.dHead<<",";
os<< filedNames.dElevation<< ","; os<< filedNames.dElevation<< ",";
...@@ -146,7 +146,7 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems) ...@@ -146,7 +146,7 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
os << item.dTankVolume << ","; os << item.dTankVolume << ",";
os <<"'"<< CurrentDate <<"',"; os <<"'"<< CurrentDate <<"',";
os << item.dInterval<<","; os << item.dInterval<<",";
os << "'"<<CurrentTime<<"'"; os << "'"<< CurrentTime <<"'";
if (i == (total - 1)) if (i == (total - 1))
{ {
os << ")"; os << ")";
...@@ -157,17 +157,12 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems) ...@@ -157,17 +157,12 @@ bool CivDbConnection::updateNode(const NodeResultItems& nodeItems)
} }
} }
std::string sql = TransUTFCoding(preSql) + os.str(); std::string sql = TransUTFCoding(preSql) + os.str();
os.clear(); os.clear();
os.str(""); os.str("");
if (!execSql(sql)) if (!execSql(sql))
return false; return false;
} }
// 更新管网数据表
if (!updateNodeByInterval(CurrentDate, CurrentHour))
return false;
return true; return true;
} }
...@@ -200,10 +195,11 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems) ...@@ -200,10 +195,11 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems)
os<< ") VALUES"; os<< ") VALUES";
std::string preSql = os.str(); std::string preSql = os.str();
os.flush();
os.clear(); os.clear();
os.str(""); os.str("");
// 2, 参数值 // 2, 参数值
size_t total = lineItems.size(); size_t total = lineItems.size();
for (int i = 0; i < total; i++) for (int i = 0; i < total; i++)
...@@ -222,7 +218,7 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems) ...@@ -222,7 +218,7 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems)
os<< "'"<<TransUTFCoding(item.szStatus)<<"'"<<","; os<< "'"<<TransUTFCoding(item.szStatus)<<"'"<<",";
os <<"'"<< CurrentDate << "',"; os <<"'"<< CurrentDate << "',";
os<< item.dInterval<<","; os<< item.dInterval<<",";
os <<"'" <<CurrentTime<<"'"; os <<"'" << CurrentTime <<"'";
if (i == (total - 1)) if (i == (total - 1))
os << ")"; os << ")";
else else
...@@ -231,7 +227,6 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems) ...@@ -231,7 +227,6 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems)
std::string utf8Sql = TransUTFCoding(preSql); std::string utf8Sql = TransUTFCoding(preSql);
std::string sql = utf8Sql + os.str(); std::string sql = utf8Sql + os.str();
os.flush();
os.clear(); os.clear();
os.str(""); os.str("");
...@@ -239,8 +234,6 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems) ...@@ -239,8 +234,6 @@ bool CivDbConnection::updateLink(const LinkResultItems& lineItems)
return false; return false;
} }
if (!updateLinkByInterval(CurrentDate, CurrentHour))
return false;
return true; return true;
} }
...@@ -257,20 +250,22 @@ bool CivDbConnection::updateNodeByInterval(StrQuote currDate, StrQuote interval) ...@@ -257,20 +250,22 @@ bool CivDbConnection::updateNodeByInterval(StrQuote currDate, StrQuote interval)
<< TransUTFCoding(PIPENODE) << " AS tb1 set (" << TransUTFCoding(PIPENODE) << " AS tb1 set ("
<< TransUTFCoding("总水头") << "," << TransUTFCoding("总水头") << ","
<< TransUTFCoding("压力") << "," << TransUTFCoding("压力") << ","
<< TransUTFCoding("实际需水量") << ")=(select " << TransUTFCoding("实际需水量")
<< TransUTFCoding(filedNames.dHead) << "," << ")=( "
<< TransUTFCoding(filedNames.dPressure) << "," << "tb2." << TransUTFCoding(filedNames.dHead) << ","
<< TransUTFCoding(filedNames.dDemand) << " from " << "tb2." << TransUTFCoding(filedNames.dPressure) << ","
<< "tb2." << TransUTFCoding(filedNames.dDemand) << ")" << " from "
<< TransUTFCoding(NODERESULTTABLE) << " AS tb2 where tb1." << TransUTFCoding(NODERESULTTABLE) << " AS tb2 where tb1."
<< TransUTFCoding(filedNames.Number) << "= tb2." << TransUTFCoding(filedNames.Number) << "= tb2."
<< TransUTFCoding(filedNames.Number) << " AND tb2." << TransUTFCoding(filedNames.Number) << " AND tb2."
<< TransUTFCoding(filedNames.dDate) << "='" << currDate << "' AND tb2." << TransUTFCoding(filedNames.dDate) << "='" << currDate << "' AND tb2."
<< TransUTFCoding(filedNames.dInterval) << "=" << interval << ")"; << TransUTFCoding(filedNames.dInterval) << "=" << interval;
std::string updateSql = os.str(); std::string updateSql = os.str();
std::cout << updateSql << std::endl; std::cout << updateSql << std::endl;
os.clear(); os.clear();
os.str(""); os.str("");
if (!execSql(updateSql)) if (!execSql(updateSql))
return false; return false;
...@@ -285,7 +280,6 @@ bool CivDbConnection::updateLinkByInterval(StrQuote currDate, StrQuote interval) ...@@ -285,7 +280,6 @@ bool CivDbConnection::updateLinkByInterval(StrQuote currDate, StrQuote interval)
std::stringstream os; std::stringstream os;
LinkFiledName filedNames; LinkFiledName filedNames;
os << "UPDATE " os << "UPDATE "
<< TransUTFCoding(PIPELINE) << " AS tb1 set (" << TransUTFCoding(PIPELINE) << " AS tb1 set ("
<< TransUTFCoding("流量") << "," << TransUTFCoding("流量") << ","
...@@ -296,24 +290,26 @@ bool CivDbConnection::updateLinkByInterval(StrQuote currDate, StrQuote interval) ...@@ -296,24 +290,26 @@ bool CivDbConnection::updateLinkByInterval(StrQuote currDate, StrQuote interval)
<< TransUTFCoding("上点水头")<<"," << TransUTFCoding("上点水头")<<","
<< TransUTFCoding("本点水头")<<"," << TransUTFCoding("本点水头")<<","
<< TransUTFCoding("局部水头损") << TransUTFCoding("局部水头损")
<<")=(select " <<")=( "
<< TransUTFCoding(filedNames.dFlow) << "," << "tb2." <<TransUTFCoding(filedNames.dFlow) << ","
<< TransUTFCoding(filedNames.dVelocity) << "," << "tb2." << TransUTFCoding(filedNames.dVelocity) << ","
<< TransUTFCoding(filedNames.dUnitHeadloss)<<"," << "tb2." << TransUTFCoding(filedNames.dUnitHeadloss)<<","
<< TransUTFCoding(filedNames.dFrictionHeadloss) << "," << "tb2." << TransUTFCoding(filedNames.dHeadloss)<<","
<< TransUTFCoding(filedNames.dFromNodHeadloss) << "," << "tb2." << TransUTFCoding(filedNames.dFrictionHeadloss) << ","
<< TransUTFCoding(filedNames.dToNodHeadloss) << "," << "tb2." << TransUTFCoding(filedNames.dFromNodHeadloss) << ","
<< TransUTFCoding(filedNames.dLocalHeadloss) << " from " << "tb2." << TransUTFCoding(filedNames.dToNodHeadloss) << ","
<< "tb2." << TransUTFCoding(filedNames.dLocalHeadloss) <<")"<< " from "
<< TransUTFCoding(PIPERESULTTABLE) << " AS tb2 where tb1." << TransUTFCoding(PIPERESULTTABLE) << " AS tb2 where tb1."
<< TransUTFCoding(filedNames.szNo) << "= tb2." << TransUTFCoding(filedNames.szNo) << "= tb2."
<< TransUTFCoding(filedNames.szNo) << " AND tb2." << TransUTFCoding(filedNames.szNo) << " AND tb2."
<< TransUTFCoding(filedNames.dDate) << "='" << currDate << "' AND tb2." << TransUTFCoding(filedNames.dDate) << "='" << currDate << "' AND tb2."
<< TransUTFCoding(filedNames.dInterval) << "=" << interval << ")"; << TransUTFCoding(filedNames.dInterval) << "=" << interval;
std::string updateSql = os.str(); std::string updateSql = os.str();
std::cout << updateSql << std::endl; std::cout << updateSql << std::endl;
os.clear(); os.clear();
os.str(""); os.str("");
if (!execSql(updateSql)) if (!execSql(updateSql))
return false; return false;
...@@ -380,8 +376,8 @@ void CivDbConnection::getData(PGresult* result, Componets& comp) ...@@ -380,8 +376,8 @@ void CivDbConnection::getData(PGresult* result, Componets& comp)
char* item = PQgetvalue(result, i, j); char* item = PQgetvalue(result, i, j);
char* fieldName = PQfname(result, j); // 获取列表字段名 char* fieldName = PQfname(result, j); // 获取列表字段名
std::string itemStr = CivCommonUtils::UTF8_To_string(item); std::string itemStr = UTFTransCoding(item);
std::string fieldStr = CivCommonUtils::UTF8_To_string(fieldName); std::string fieldStr = UTFTransCoding(fieldName);
node.insert(std::pair<std::string, std::string>(fieldStr, itemStr)); node.insert(std::pair<std::string, std::string>(fieldStr, itemStr));
} }
...@@ -502,7 +498,7 @@ Componets CivDbConnection::getLikelyPipes(StrQuote tableName) ...@@ -502,7 +498,7 @@ Componets CivDbConnection::getLikelyPipes(StrQuote tableName)
{ {
Componet componet = nodes[i]; Componet componet = nodes[i];
Str bendianhao = componet.find("本点号")->second; Str bendianhao = componet.find("本点号")->second;
if (bendianhao.empty() || bendianhao == "") if (bendianhao.empty() )
{ {
Str ID = componet.find("id")->second; Str ID = componet.find("id")->second;
Str type = mValvesMap.find(tableName)->second; Str type = mValvesMap.find(tableName)->second;
...@@ -515,69 +511,16 @@ Componets CivDbConnection::getLikelyPipes(StrQuote tableName) ...@@ -515,69 +511,16 @@ Componets CivDbConnection::getLikelyPipes(StrQuote tableName)
Str code = componet.find("code")->second; Str code = componet.find("code")->second;
// 跟点
Componets lines = getLineByCode(PIPELINE, code); Componets lines = getLineByCode(PIPELINE, code);
size_t lTotal = lines.size(); size_t lTotal = lines.size();
for (int j = 0; j < lTotal; j++) if (lTotal == 2)
{ {
Componet lin = lines[j]; Componet lin = lines[0];
Str fromCode = lin.find("from_code")->second;
Str toCode = lin.find("to_code")->second;
Componets codeNodes; nodes[i]["上点号"] = lin.find("本点号")->second;
if (fromCode == code) nodes[i]["本点号"] = lin.find("上点号")->second;
{
size_t size = tables.size();
for (int i = 0; i < size; i++)
{
codeNodes = getNodeByCode(tables[i], toCode);
if (codeNodes.size() > 0)
break;
}
if (codeNodes.size() > 0)
{
Componet comp = codeNodes[0];
Str pointNo = comp.find("本点号")->second;
nodes[i]["本点号"] = pointNo;
}
}
else if (toCode == code)
{
size_t size = tables.size();
Str currTable;
for (int i = 0; i < size; i++)
{
currTable = tables[i];
codeNodes = getNodeByCode(tables[i], fromCode);
if (codeNodes.size() > 0)
break;
}
// 查询
// codeNodes = getNodeByCode(PIPENODE, fromCode);
if (codeNodes.size() > 0)
{
Componet comp = codeNodes[0];
Str pointNo = comp.find("本点号")->second;
if (currTable == RESIVOIR || currTable == TANK)
{
// 水源必须为起点:点转换为管线过程需要纠正方向
Str lastPoint = nodes[i]["本点号"];
nodes[i]["本点号"] = pointNo;
if (nodes[i]["上点号"].empty())
nodes[i]["上点号"] = lastPoint;
}
else
{
nodes[i]["上点号"] = pointNo;
}
}
}
Str diameter = lin.find("管径")->second; Str diameter = lin.find("管径")->second;
nodes[i]["管径"] = diameter; nodes[i]["管径"] = diameter;
...@@ -697,6 +640,7 @@ bool CivDbConnection::execSql(std::string sql) ...@@ -697,6 +640,7 @@ bool CivDbConnection::execSql(std::string sql)
mResult = PQexec(mConn, sql.c_str()); mResult = PQexec(mConn, sql.c_str());
char* error = PQresultErrorMessage(mResult); char* error = PQresultErrorMessage(mResult);
std::string errorStr = error; std::string errorStr = error;
if ( !errorStr.empty()) if ( !errorStr.empty())
{ {
mLastError = error; mLastError = error;
......
...@@ -199,13 +199,13 @@ struct NodeFieldName ...@@ -199,13 +199,13 @@ struct NodeFieldName
{ {
Str Number = "本点号"; Str Number = "本点号";
Str dFlow = "流量"; Str dFlow = "流量";
Str dHead = " 水头"; Str dHead = "水头";
Str dPressure=" 压力"; Str dPressure="压力";
Str dElevation=" 标高"; Str dElevation="标高";
Str dDemand=" 实际需水量"; Str dDemand="实际需水量";
Str dTankVolume=" 水池容量"; Str dTankVolume="水池容量";
Str dTankMaxVolume=" 水池最大容量"; Str dTankMaxVolume="水池最大容量";
Str dTankLevel=" 液位高度"; Str dTankLevel="液位高度";
Str dQuality = "水质"; Str dQuality = "水质";
Str dDate = "日期"; Str dDate = "日期";
Str dInterval = "时段"; Str dInterval = "时段";
...@@ -215,7 +215,7 @@ struct NodeFieldName ...@@ -215,7 +215,7 @@ struct NodeFieldName
struct LinkFiledName struct LinkFiledName
{ {
Str szNo = "编号"; Str szNo = "编号";
Str dFlow = " 流量"; Str dFlow = "流量";
Str nFlowDirect = "流向"; Str nFlowDirect = "流向";
Str dVelocity="流速"; Str dVelocity="流速";
Str dHeadloss="水头损失"; Str dHeadloss="水头损失";
......
...@@ -144,7 +144,7 @@ ...@@ -144,7 +144,7 @@
<EnableCOMDATFolding>true</EnableCOMDATFolding> <EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences> <OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation> <GenerateDebugInformation>true</GenerateDebugInformation>
<AdditionalDependencies>libpq.lib;json_vc71_libmt.lib;%(AdditionalDependencies)</AdditionalDependencies> <AdditionalDependencies>libpq.lib;%(AdditionalDependencies)</AdditionalDependencies>
<AdditionalLibraryDirectories>$(OUTDIR)..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories> <AdditionalLibraryDirectories>$(OUTDIR)..\lib;%(AdditionalLibraryDirectories)</AdditionalLibraryDirectories>
<ImportLibrary>$(OutDir)..\lib\$(TargetName).lib</ImportLibrary> <ImportLibrary>$(OutDir)..\lib\$(TargetName).lib</ImportLibrary>
</Link> </Link>
......
...@@ -21,10 +21,10 @@ ...@@ -21,10 +21,10 @@
<ClInclude Include="CivTypes.h"> <ClInclude Include="CivTypes.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="CivCommonUtils.h"> <ClInclude Include="CivTableTemp.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
<ClInclude Include="CivTableTemp.h"> <ClInclude Include="CivCommonUtils.h">
<Filter>头文件</Filter> <Filter>头文件</Filter>
</ClInclude> </ClInclude>
</ItemGroup> </ItemGroup>
...@@ -32,10 +32,10 @@ ...@@ -32,10 +32,10 @@
<ClCompile Include="CivDbConnection.cpp"> <ClCompile Include="CivDbConnection.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="CivCommonUtils.cpp"> <ClCompile Include="CivTableTemp.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
<ClCompile Include="CivTableTemp.cpp"> <ClCompile Include="CivCommonUtils.cpp">
<Filter>源文件</Filter> <Filter>源文件</Filter>
</ClCompile> </ClCompile>
</ItemGroup> </ItemGroup>
......
#include "CivCommonUtils.h"
#include <Windows.h>
#include <wchar.h>
#include <time.h>
std::string string_To_UTF8(const std::string& str)
{
int nwLen = ::MultiByteToWideChar(CP_ACP, 0, str.c_str(), -1, NULL, 0);
wchar_t* pwBuf = new wchar_t[nwLen + 1]; //一定要加1,不然会出现尾巴
ZeroMemory(pwBuf, nwLen * 2 + 2);
::MultiByteToWideChar(CP_ACP, 0, str.c_str(), str.length(), pwBuf, nwLen);
int nLen = ::WideCharToMultiByte(CP_UTF8, 0, pwBuf, -1, NULL, NULL, NULL, NULL);
char* pBuf = new char[nLen + 1];
ZeroMemory(pBuf, nLen + 1);
::WideCharToMultiByte(CP_UTF8, 0, pwBuf, nwLen, pBuf, nLen, NULL, NULL);
std::string strRet(pBuf);
delete[]pwBuf;
delete[]pBuf;
pwBuf = NULL;
pBuf = NULL;
return strRet;
}
std::string UTF8_To_string(const std::string& str)
{
int nwLen = MultiByteToWideChar(CP_UTF8, 0, str.c_str(), -1, NULL, 0);
wchar_t* pwBuf = new wchar_t[nwLen + 1]; //一定要加1,不然会出现尾巴
memset(pwBuf, 0, nwLen * 2 + 2);
MultiByteToWideChar(CP_UTF8, 0, str.c_str(), str.length(), pwBuf, nwLen);
int nLen = WideCharToMultiByte(CP_ACP, 0, pwBuf, -1, NULL, NULL, NULL, NULL);
char* pBuf = new char[nLen + 1];
memset(pBuf, 0, nLen + 1);
WideCharToMultiByte(CP_ACP, 0, pwBuf, nwLen, pBuf, nLen, NULL, NULL);
std::string strRet = pBuf;
delete[]pBuf;
delete[]pwBuf;
pBuf = NULL;
pwBuf = NULL;
return strRet;
}
//std::map<std::string, std::string> CivCommonUtils::parseJson(std::string jsonStr)
//{
// std::map<std::string, std::string> map;
//
// return map;
//}
std::string currentTime()
{
time_t rawtime;
struct tm* timeinfo;
char s[100];
time(&rawtime);
timeinfo = localtime(&rawtime);
time_t tick = mktime(timeinfo);
strftime(s, sizeof(s), "%Y-%m-%d %H:%M:%S", timeinfo);
return s;
}
std::string currentDate()
{
time_t rawtime;
struct tm* timeinfo;
char s[100];
time(&rawtime);
timeinfo = localtime(&rawtime);
time_t tick = mktime(timeinfo);
strftime(s, sizeof(s), "%Y-%m-%d", timeinfo);
return s;
}
std::string currentHour()
{
time_t rawtime;
struct tm* timeinfo;
char s[100];
time(&rawtime);
timeinfo = localtime(&rawtime);
time_t tick = mktime(timeinfo);
strftime(s, sizeof(s), "%H", timeinfo);
std::string res = lstrip(s,'0');
return res;
}
std::string lstrip(char aa[], char c)
{
int i = 0, j = 0, k = 0, z = 0;
k = strlen(aa);
z = k - 1;
while (aa[z] == c)
{
--z;
}
int x = 0, y = 0;
while (aa[y] == c)
{
y++;
}
char bb[256];
int leng = 0;
for (x = y; x < z + 1; x++)
{
bb[leng] = aa[x];
}
std::string res = bb;
return res;
}
\ No newline at end of file
#pragma once
#include<string>
#include<map>
// #include<json/reader.h>
#define LIBEXPORT extern
// 字符串转编码
#define TransUTFCoding(name) string_To_UTF8(name)
#define UTFTransCoding(name) UTF8_To_string(name)
// 当前系统日期
#define CurrentDate currentDate()
// 获取当前系统时间
#define CurrentTime currentTime()
#define CurrentHour currentHour()
// std:string转UTF8
LIBEXPORT std::string string_To_UTF8(const std::string& str);
/**
* UTF8转std:string
* 转换过程:先将utf8转双字节Unicode编码,
* 再通过WideCharToMultiByte将宽字符转换为多字节。
*/
LIBEXPORT std::string UTF8_To_string(const std::string& str);
/**
*@brief 获取系统当前时间
*/
LIBEXPORT std::string currentTime();
/**
*@brief 获取系统当前日期
*/
LIBEXPORT std::string currentDate();
LIBEXPORT std::string currentHour();
LIBEXPORT std::string lstrip(char str[], char c);
<?xml version="1.0" encoding="utf-8"?>
<Project DefaultTargets="Build" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup Label="ProjectConfigurations">
<ProjectConfiguration Include="Debug|Win32">
<Configuration>Debug</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|Win32">
<Configuration>Release</Configuration>
<Platform>Win32</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Debug|x64">
<Configuration>Debug</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
<ProjectConfiguration Include="Release|x64">
<Configuration>Release</Configuration>
<Platform>x64</Platform>
</ProjectConfiguration>
</ItemGroup>
<PropertyGroup Label="Globals">
<VCProjectVersion>16.0</VCProjectVersion>
<Keyword>Win32Proj</Keyword>
<ProjectGuid>{7786a13a-338a-4d91-b6bf-dc751e55f018}</ProjectGuid>
<RootNamespace>pandasUtils</RootNamespace>
<WindowsTargetPlatformVersion>10.0</WindowsTargetPlatformVersion>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.Default.props" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'" Label="Configuration">
<ConfigurationType>Application</ConfigurationType>
<UseDebugLibraries>true</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'" Label="Configuration">
<ConfigurationType>StaticLibrary</ConfigurationType>
<UseDebugLibraries>false</UseDebugLibraries>
<PlatformToolset>v142</PlatformToolset>
<WholeProgramOptimization>true</WholeProgramOptimization>
<CharacterSet>Unicode</CharacterSet>
</PropertyGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.props" />
<ImportGroup Label="ExtensionSettings">
</ImportGroup>
<ImportGroup Label="Shared">
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<ImportGroup Label="PropertySheets" Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<Import Project="$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props" Condition="exists('$(UserRootDir)\Microsoft.Cpp.$(Platform).user.props')" Label="LocalAppDataPlatform" />
</ImportGroup>
<PropertyGroup Label="UserMacros" />
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<LinkIncremental>false</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<LinkIncremental>true</LinkIncremental>
</PropertyGroup>
<PropertyGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<LinkIncremental>false</LinkIncremental>
<OutDir>..\..\hModelProgram\lib</OutDir>
</PropertyGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|Win32'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>WIN32;NDEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Debug|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>_DEBUG;_CONSOLE;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
</ItemDefinitionGroup>
<ItemDefinitionGroup Condition="'$(Configuration)|$(Platform)'=='Release|x64'">
<ClCompile>
<WarningLevel>Level3</WarningLevel>
<FunctionLevelLinking>true</FunctionLevelLinking>
<IntrinsicFunctions>true</IntrinsicFunctions>
<SDLCheck>true</SDLCheck>
<PreprocessorDefinitions>NDEBUG;_CONSOLE;_CRT_SECURE_NO_WARNINGS;%(PreprocessorDefinitions)</PreprocessorDefinitions>
<ConformanceMode>true</ConformanceMode>
</ClCompile>
<Link>
<SubSystem>Console</SubSystem>
<EnableCOMDATFolding>true</EnableCOMDATFolding>
<OptimizeReferences>true</OptimizeReferences>
<GenerateDebugInformation>true</GenerateDebugInformation>
</Link>
<PostBuildEvent>
<Command>copy CivCommonUtils.h $(OutDir)..\include /y</Command>
</PostBuildEvent>
</ItemDefinitionGroup>
<ItemGroup>
<ClInclude Include="CivCommonUtils.h" />
</ItemGroup>
<ItemGroup>
<ClCompile Include="CivCommonUtils.cpp" />
</ItemGroup>
<Import Project="$(VCTargetsPath)\Microsoft.Cpp.targets" />
<ImportGroup Label="ExtensionTargets">
</ImportGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="4.0" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<ItemGroup>
<Filter Include="源文件">
<UniqueIdentifier>{4FC737F1-C7A5-4376-A066-2A32D752A2FF}</UniqueIdentifier>
<Extensions>cpp;c;cc;cxx;c++;def;odl;idl;hpj;bat;asm;asmx</Extensions>
</Filter>
<Filter Include="头文件">
<UniqueIdentifier>{93995380-89BD-4b04-88EB-625FBE52EBFB}</UniqueIdentifier>
<Extensions>h;hh;hpp;hxx;h++;hm;inl;inc;ipp;xsd</Extensions>
</Filter>
<Filter Include="资源文件">
<UniqueIdentifier>{67DA6AB6-F800-4c08-8B7A-83BB121AAD01}</UniqueIdentifier>
<Extensions>rc;ico;cur;bmp;dlg;rc2;rct;bin;rgs;gif;jpg;jpeg;jpe;resx;tiff;tif;png;wav;mfcribbon-ms</Extensions>
</Filter>
</ItemGroup>
<ItemGroup>
<ClInclude Include="CivCommonUtils.h">
<Filter>头文件</Filter>
</ClInclude>
</ItemGroup>
<ItemGroup>
<ClCompile Include="CivCommonUtils.cpp">
<Filter>源文件</Filter>
</ClCompile>
</ItemGroup>
</Project>
\ No newline at end of file
<?xml version="1.0" encoding="utf-8"?>
<Project ToolsVersion="Current" xmlns="http://schemas.microsoft.com/developer/msbuild/2003">
<PropertyGroup />
</Project>
\ No newline at end of file
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.pdb
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\civcommonutils.obj
e:\work\workspace\hydraulicmodelcode\hmodelprogram\lib\pandasutils.lib
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\..\..\hmodelprogram\lib\pandasutils.lib
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.tlog\cl.command.1.tlog
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.tlog\cl.read.1.tlog
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.tlog\cl.write.1.tlog
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.tlog\lib-link.read.1.tlog
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.tlog\lib-link.write.1.tlog
e:\work\workspace\hydraulicmodelcode\hydraulicmodel\pandasutils\x64\release\pandasutils.tlog\lib.command.1.tlog
d:\Program Files (x86)\Microsoft Visual Studio\2019\Enterprise\MSBuild\Microsoft\VC\v160\Microsoft.CppBuild.targets(453,5): warning MSB8004: Output 目录未以斜杠结尾。 此生成实例将添加斜杠,因为必须有这个斜杠才能正确计算 Output 目录。
CivCommonUtils.cpp
E:\work\workspace\hydraulicModelCode\hydraulicModel\pandasUtils\CivCommonUtils.cpp(13,77): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据
E:\work\workspace\hydraulicModelCode\hydraulicModel\pandasUtils\CivCommonUtils.cpp(36,76): warning C4267: “参数”: 从“size_t”转换到“int”,可能丢失数据
E:\work\workspace\hydraulicModelCode\hydraulicModel\pandasUtils\CivCommonUtils.cpp(107,19): warning C4267: “=”: 从“size_t”转换到“int”,可能丢失数据
pandasUtils.vcxproj -> E:\work\workspace\hydraulicModelCode\hydraulicModel\pandasUtils\..\..\hModelProgram\lib\pandasUtils.lib
已复制 1 个文件。
B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\CIVCOMMONUTILS.CPP B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\CIVCOMMONUTILS.CPP
B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\CIVCOMMONUTILS.CPP B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\CIVCOMMONUTILS.CPP
B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\CIVCOMMONUTILS.CPP B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\CIVCOMMONUTILS.CPP
B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\X64\RELEASE\CIVCOMMONUTILS.OBJ B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\X64\RELEASE\CIVCOMMONUTILS.OBJ
B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\X64\RELEASE\CIVCOMMONUTILS.OBJ B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\X64\RELEASE\CIVCOMMONUTILS.OBJ
B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\X64\RELEASE\CIVCOMMONUTILS.OBJ B^E:\WORK\WORKSPACE\HYDRAULICMODELCODE\HYDRAULICMODEL\PANDASUTILS\X64\RELEASE\CIVCOMMONUTILS.OBJ
PlatformToolSet=v142:VCToolArchitecture=Native32Bit:VCToolsVersion=14.26.28801:TargetPlatformVersion=10.0.18362.0:
Release|x64|E:\work\workspace\hydraulicModelCode\hydraulicModel\|
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