Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
H
hydraulicModel
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
刘乐
hydraulicModel
Commits
b5aaae5e
Commit
b5aaae5e
authored
Jul 16, 2020
by
刘乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1, 接口修改
parent
2a411181
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
48 additions
and
6 deletions
+48
-6
CivBuilder.cpp
pandaAnalysis/CivBuilder.cpp
+1
-1
CivHydrSimulation.cpp
pandaAnalysis/CivHydrSimulation.cpp
+5
-5
CivDbConn.h
pandaDbManager/CivDbConn.h
+1
-0
CivPgConn.cpp
pandaDbManager/CivPgConn.cpp
+39
-0
CivPgConn.h
pandaDbManager/CivPgConn.h
+2
-0
水力模型产品数据库表.xlsx
建模文档/水力模型产品数据库表.xlsx
+0
-0
水力模型数据库.docx
建模文档/水力模型数据库.docx
+0
-0
No files found.
pandaAnalysis/CivBuilder.cpp
View file @
b5aaae5e
...
...
@@ -10,7 +10,7 @@ CivBuilder::CivBuilder()
CivBuilder
::~
CivBuilder
()
{
delete
mNewInp
;
}
CivNewInp
*
CivBuilder
::
getNewInp
()
...
...
pandaAnalysis/CivHydrSimulation.cpp
View file @
b5aaae5e
...
...
@@ -24,7 +24,8 @@ CivHydrSimulation::CivHydrSimulation(CivDbConn* dbConn)
mRptFile
(
"test.rpt"
),
mBinFile
(
"test.bin"
)
{
if
(
dbConn
)
dbConn
->
checkHyDrNetTable
();
}
CivHydrSimulation
::~
CivHydrSimulation
()
...
...
@@ -85,6 +86,8 @@ void CivHydrSimulation::setBinFile(const std::string& binFile)
void
CivHydrSimulation
::
registDb
(
CivDbConn
*
dbConn
)
{
mDbConn
=
dbConn
;
if
(
mDbConn
)
mDbConn
->
checkHyDrNetTable
();
}
bool
CivHydrSimulation
::
convertInp
(
const
QualityAnalyType
analyType
,
const
std
::
string
&
qulityName
)
...
...
@@ -105,12 +108,10 @@ bool CivHydrSimulation::convertInp(const QualityAnalyType analyType, const std::
&&
!
newInp
->
writeToFile
(
inpFileName
))
{
delete
builder
;
delete
newInp
;
return
false
;
}
delete
builder
;
delete
newInp
;
return
true
;
}
...
...
@@ -636,4 +637,4 @@ void CivHydrSimulation::getLinkQuality(short time)
}
free
(
typeCode
);
free
(
quality
);
}
\ No newline at end of file
}
pandaDbManager/CivDbConn.h
View file @
b5aaae5e
...
...
@@ -118,6 +118,7 @@ public:
const
std
::
vector
<
std
::
string
>&
fileds
,
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>&
result
)
=
0
;
virtual
void
checkHyDrNetTable
()
=
0
;
// 获取当前执行错误信息
Str
getLastError
()
const
;
...
...
pandaDbManager/CivPgConn.cpp
View file @
b5aaae5e
...
...
@@ -944,3 +944,42 @@ bool CivPgConn::getValuesFromTableByCondition(
return
true
;
}
void
CivPgConn
::
checkHyDrNetTable
()
{
// 创建曲线表
CivCurveTableTemp
temp
;
if
(
!
tableExist
(
temp
.
name
()))
{
createTable
(
temp
);
}
// 参数表
CivParametorTableTemp
paraTemp
;
if
(
!
tableExist
(
paraTemp
.
name
()))
{
createTable
(
paraTemp
);
}
// 模式表
CivPatternTableTemp
patternTemp
;
if
(
!
tableExist
(
patternTemp
.
name
()))
{
createTable
(
patternTemp
);
}
// 结果点表
CivNodeResultTableTemp
nodeTemp
;
if
(
!
tableExist
(
nodeTemp
.
name
()))
{
createTable
(
nodeTemp
);
}
// 结果线表
CivPipeResultTableTemp
pipeTemp
;
if
(
!
tableExist
(
pipeTemp
.
name
()))
{
createTable
(
pipeTemp
);
}
}
pandaDbManager/CivPgConn.h
View file @
b5aaae5e
...
...
@@ -91,6 +91,8 @@ public:
const
std
::
string
&
condition
,
const
std
::
vector
<
std
::
string
>&
fileds
,
std
::
vector
<
std
::
map
<
std
::
string
,
std
::
string
>>&
result
)
override
;
void
checkHyDrNetTable
()
override
;
private
:
PGconn
*
mConn
;
// 连接对象
...
...
建模文档/水力模型产品数据库表.xlsx
View file @
b5aaae5e
No preview for this file type
建模文档/水力模型数据库.docx
View file @
b5aaae5e
No preview for this file type
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment