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
f1ea02ef
Commit
f1ea02ef
authored
Sep 24, 2020
by
刘乐
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
文档更改
parent
6b0c5bcb
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
36 additions
and
10 deletions
+36
-10
CivHydrTest.cpp
funcDemo/CivHydrTest.cpp
+2
-2
funcDemo.vcxproj.user
funcDemo/funcDemo.vcxproj.user
+4
-1
CivPgDbConnection.cpp
pandaDbManager/CivPgDbConnection.cpp
+4
-0
CivProjInpDbHelper.cpp
pandaDbManager/CivProjInpDbHelper.cpp
+2
-2
pandaDbManager.vcxproj.user
pandaDbManager/pandaDbManager.vcxproj.user
+2
-1
StringUtils.cpp
pandaLog/StringUtils.cpp
+11
-0
StringUtils.h
pandaLog/StringUtils.h
+9
-3
pandaLog.vcxproj.user
pandaLog/pandaLog.vcxproj.user
+2
-1
~$力模型数据库.docx
建模文档/~$力模型数据库.docx
+0
-0
水力模型工作计划(2020-10月份).xlsx
建模文档/水力模型工作计划(2020-10月份).xlsx
+0
-0
No files found.
funcDemo/CivHydrTest.cpp
View file @
f1ea02ef
...
@@ -86,10 +86,10 @@ void CivProjSimulationTest::test(char* uri)
...
@@ -86,10 +86,10 @@ void CivProjSimulationTest::test(char* uri)
{
{
// 追踪节点编号
// 追踪节点编号
char
projCode
[
512
];
char
projCode
[
512
];
strcpy
(
projCode
,
"
57cae198-838d-4776-8ec1-c195df12b00b
"
);
strcpy
(
projCode
,
"
ba01c9a8-f113-4131-b566-5f7f1ce25e5c
"
);
char
time
[
512
];
char
time
[
512
];
strcpy
(
time
,
"2020-09-
16
09:00:00"
);
strcpy
(
time
,
"2020-09-
24
09:00:00"
);
bool
isSucc
=
projSimulation
(
uri
,
projCode
,
time
);
bool
isSucc
=
projSimulation
(
uri
,
projCode
,
time
);
...
...
funcDemo/funcDemo.vcxproj.user
View file @
f1ea02ef
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup
/>
<PropertyGroup>
<ShowAllFiles>
false
</ShowAllFiles>
</PropertyGroup>
</Project>
</Project>
\ No newline at end of file
pandaDbManager/CivPgDbConnection.cpp
View file @
f1ea02ef
#include "CivPgDbConnection.h"
#include "CivPgDbConnection.h"
#include "CivCommonUtils.h"
#include "CivCommonUtils.h"
#include "StringUtils.h"
#include <iostream>
#include <iostream>
...
@@ -49,6 +50,9 @@ bool CivPgDbConnection::queryResult(std::vector<std::map<std::string,std::string
...
@@ -49,6 +50,9 @@ bool CivPgDbConnection::queryResult(std::vector<std::map<std::string,std::string
std
::
string
filedName
=
CivCommonUtils
::
UTF8_To_string
(
PQfname
(
mResult
,
j
));
std
::
string
filedName
=
CivCommonUtils
::
UTF8_To_string
(
PQfname
(
mResult
,
j
));
std
::
string
filedValue
=
CivCommonUtils
::
UTF8_To_string
(
PQgetvalue
(
mResult
,
i
,
j
));
std
::
string
filedValue
=
CivCommonUtils
::
UTF8_To_string
(
PQgetvalue
(
mResult
,
i
,
j
));
StringUtils
::
trim
(
filedName
);
StringUtils
::
trim
(
filedValue
);
map
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
filedName
,
filedValue
));
map
.
insert
(
std
::
pair
<
std
::
string
,
std
::
string
>
(
filedName
,
filedValue
));
}
}
result
.
push_back
(
map
);
result
.
push_back
(
map
);
...
...
pandaDbManager/CivProjInpDbHelper.cpp
View file @
f1ea02ef
...
@@ -20,7 +20,7 @@ void CivProjInpDbHelper::setProjCode(const std::string& projCode)
...
@@ -20,7 +20,7 @@ void CivProjInpDbHelper::setProjCode(const std::string& projCode)
void
CivProjInpDbHelper
::
handlePump
()
void
CivProjInpDbHelper
::
handlePump
()
{
{
// 处理水泵连接的管段
}
}
void
CivProjInpDbHelper
::
sortProjDeatil
()
void
CivProjInpDbHelper
::
sortProjDeatil
()
...
@@ -273,7 +273,7 @@ void CivProjInpDbHelper::handleValve()
...
@@ -273,7 +273,7 @@ void CivProjInpDbHelper::handleValve()
pipeStruct
.
Length
=
"2"
;
pipeStruct
.
Length
=
"2"
;
pipeStruct
.
Diameter
=
valveMap
.
find
(
"阀门直径"
)
->
second
;
pipeStruct
.
Diameter
=
valveMap
.
find
(
"阀门直径"
)
->
second
;
pipeStruct
.
Roughness
=
std
::
string
(
"130"
);
//valveMap.find("摩阻系数")->second;
pipeStruct
.
Roughness
=
std
::
string
(
"130"
);
//valveMap.find("摩阻系数")->second;
pipeStruct
.
Status
=
(
valveStatus
==
"开"
)
?
"
Open"
:
"CV
"
;
pipeStruct
.
Status
=
(
valveStatus
==
"开"
)
?
"
CV"
:
"Open
"
;
pipeStruct
.
MinorLoss
=
"0"
;
pipeStruct
.
MinorLoss
=
"0"
;
auto
pter
=
std
::
make_pair
(
valveSn
,
pipeStruct
);
auto
pter
=
std
::
make_pair
(
valveSn
,
pipeStruct
);
...
...
pandaDbManager/pandaDbManager.vcxproj.user
View file @
f1ea02ef
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<PropertyGroup>
<ShowAllFiles>
tru
e
</ShowAllFiles>
<ShowAllFiles>
fals
e
</ShowAllFiles>
</PropertyGroup>
</PropertyGroup>
</Project>
</Project>
\ No newline at end of file
pandaLog/StringUtils.cpp
View file @
f1ea02ef
...
@@ -18,3 +18,14 @@ void StringUtils::split(std::string sourceStr, std::vector<std::string>& res, co
...
@@ -18,3 +18,14 @@ void StringUtils::split(std::string sourceStr, std::vector<std::string>& res, co
ptr
=
NULL
;
ptr
=
NULL
;
}
}
}
}
void
StringUtils
::
trim
(
std
::
string
&
s
)
{
if
(
!
s
.
empty
())
{
s
.
erase
(
0
,
s
.
find_first_not_of
(
" "
));
s
.
erase
(
s
.
find_last_not_of
(
" "
)
+
1
);
}
}
pandaLog/StringUtils.h
View file @
f1ea02ef
...
@@ -12,9 +12,15 @@ class PANDALOG_API StringUtils
...
@@ -12,9 +12,15 @@ class PANDALOG_API StringUtils
public
:
public
:
/**
/**
*@brief 将字符串按照分隔符分割成字符串数组
*@brief 将字符串按照分隔符分割成字符串数组
*@param [
std::string]
源字符串
*@param [
in] sourceStr
源字符串
*@param [
std::vector]
分割后的字符串数组
*@param [
in] res
分割后的字符串数组
*@param [
std::string
] delim 分割符,默认空格分割
*@param [
in
] delim 分割符,默认空格分割
*/
*/
static
void
split
(
std
::
string
sourceStr
,
std
::
vector
<
std
::
string
>&
res
,
const
std
::
string
&
delim
=
" "
);
static
void
split
(
std
::
string
sourceStr
,
std
::
vector
<
std
::
string
>&
res
,
const
std
::
string
&
delim
=
" "
);
/**
*@brief 去除字符串首尾空格
*@param [in] s 源字符串
*/
static
void
trim
(
std
::
string
&
s
);
};
};
pandaLog/pandaLog.vcxproj.user
View file @
f1ea02ef
<?xml version="1.0" encoding="utf-8"?>
<?xml version="1.0" encoding="utf-8"?>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<Project
ToolsVersion=
"Current"
xmlns=
"http://schemas.microsoft.com/developer/msbuild/2003"
>
<PropertyGroup>
<PropertyGroup>
<ShowAllFiles>
tru
e
</ShowAllFiles>
<ShowAllFiles>
fals
e
</ShowAllFiles>
</PropertyGroup>
</PropertyGroup>
</Project>
</Project>
\ No newline at end of file
建模文档/~$力模型数据库.docx
deleted
100644 → 0
View file @
6b0c5bcb
File deleted
建模文档/水力模型工作计划(2020-10月份).xlsx
0 → 100644
View file @
f1ea02ef
File added
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