Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
P
performance
Overview
Overview
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
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
zry
performance
Commits
e8c37b1d
Commit
e8c37b1d
authored
Sep 14, 2022
by
纪旭 韦
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'develop' of
http://192.168.18.110:8880/zry/performance
into develop
parents
35c40108
757d567d
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
31 additions
and
10 deletions
+31
-10
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
+7
-7
performance/Performance.Services/StatisticsService.cs
+24
-3
No files found.
performance/Performance.Services/ExtractExcelService/DictionaryService.cs
View file @
e8c37b1d
...
@@ -95,6 +95,13 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
...
@@ -95,6 +95,13 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
var
hisScrips
=
hisscriptRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
var
hisScrips
=
hisscriptRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
if
(
hisScrips
==
null
||
!
hisScrips
.
Any
())
return
;
if
(
hisScrips
==
null
||
!
hisScrips
.
Any
())
return
;
var
hisdata
=
hisdataRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
);
if
(
hisdata
!=
null
&&
hisdata
.
Any
())
{
hisdataRepository
.
RemoveRange
(
hisdata
.
ToArray
());
}
foreach
(
var
item
in
hisScrips
)
foreach
(
var
item
in
hisScrips
)
{
{
HisData
(
allot
,
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
item
.
ConfigId
),
item
,
groupName
,
isSingle
);
HisData
(
allot
,
configs
.
FirstOrDefault
(
t
=>
t
.
Id
==
item
.
ConfigId
),
item
,
groupName
,
isSingle
);
...
@@ -241,13 +248,6 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
...
@@ -241,13 +248,6 @@ private void HisData(per_allot allot, sys_hospitalconfig config, his_script scri
var
data
=
queryService
.
QueryData
<
HisData
>(
config
,
script
.
ExecScript
,
allot
,
isSingle
);
var
data
=
queryService
.
QueryData
<
HisData
>(
config
,
script
.
ExecScript
,
allot
,
isSingle
);
if
(
data
==
null
||
!
data
.
Any
())
return
;
if
(
data
==
null
||
!
data
.
Any
())
return
;
var
hisdata
=
hisdataRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
allot
.
HospitalId
&&
t
.
Year
==
allot
.
Year
&&
t
.
Month
==
allot
.
Month
&&
t
.
SourceType
==
script
.
SourceType
&&
t
.
Category
==
script
.
Category
);
if
(
hisdata
!=
null
&&
hisdata
.
Any
())
{
hisdataRepository
.
RemoveRange
(
hisdata
.
ToArray
());
}
var
insertData
=
data
.
Select
(
t
=>
new
his_data
var
insertData
=
data
.
Select
(
t
=>
new
his_data
{
{
HospitalId
=
allot
.
HospitalId
,
HospitalId
=
allot
.
HospitalId
,
...
...
performance/Performance.Services/StatisticsService.cs
View file @
e8c37b1d
...
@@ -355,12 +355,33 @@ private StatisticsQueryResultDto StatisticsTreeQuery(StatisticsQuery query, List
...
@@ -355,12 +355,33 @@ private StatisticsQueryResultDto StatisticsTreeQuery(StatisticsQuery query, List
{
{
// 通过层级查询固定SQL
// 通过层级查询固定SQL
var
(
sql
,
param
)
=
GetSqlQuery
(
item
.
TotalScript
,
pairs
);
var
(
sql
,
param
)
=
GetSqlQuery
(
item
.
TotalScript
,
pairs
);
var
data
=
connection
.
QueryFirstOrDefault
<
decimal
?>(
sql
,
param
);
var
data
=
connection
.
Query
(
sql
,
param
);
if
(
data
==
null
||
!
data
.
Any
())
continue
;
var
val
=
""
;
if
(
data
.
Count
()
<
2
)
{
val
=
data
.
FirstOrDefault
().
数值
?.
ToString
()
??
""
;
}
else
{
val
=
data
.
Sum
(
t
=>
(
decimal
?)
t
.
数值
??
0
).
ToString
()
??
""
;
DateTime
dateStart
=
new
DateTime
(
1970
,
1
,
1
,
8
,
0
,
0
);
var
children
=
data
.
Select
(
t
=>
new
Dictionary
<
string
,
object
>
{
{
"ID"
,
Convert
.
ToInt32
((
DateTime
.
Now
-
dateStart
).
TotalSeconds
)
},
{
"ParentID"
,
item
.
ID
},
{
"项目"
,
t
.
项目
},
{
"数值"
,
t
.
数值
},
});
table
.
AddRange
(
children
);
}
if
(
row
.
ContainsKey
(
"数值"
))
if
(
row
.
ContainsKey
(
"数值"
))
row
[
"数值"
]
=
data
?.
ToString
()
??
""
;
row
[
"数值"
]
=
val
;
else
else
row
.
Add
(
"数值"
,
data
?.
ToString
()
??
""
);
row
.
Add
(
"数值"
,
val
);
}
}
}
}
table
.
Add
(
row
);
table
.
Add
(
row
);
...
...
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