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
b2576190
Commit
b2576190
authored
Mar 19, 2020
by
ruyun.zhang@suvalue.com
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
功能完善
parent
a8ab812c
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
8 additions
and
12 deletions
+8
-12
performance/Performance.Api/Controllers/ReportController.cs
+1
-1
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+1
-1
performance/Performance.DtoModels/Request/SelectionRequest.cs
+1
-1
performance/Performance.Services/ReportDataService.cs
+5
-9
No files found.
performance/Performance.Api/Controllers/ReportController.cs
View file @
b2576190
...
@@ -48,7 +48,7 @@ public ApiResponse Info([FromBody]SelectionRequest report)
...
@@ -48,7 +48,7 @@ public ApiResponse Info([FromBody]SelectionRequest report)
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
Search
([
FromBody
]
SearchReportRequest
report
)
public
ApiResponse
Search
([
FromBody
]
SearchReportRequest
report
)
{
{
var
result
=
reportDataService
.
GetReportData
(
report
.
HospitalId
,
report
.
GroupId
,
report
.
Values
);
var
result
=
reportDataService
.
GetReportData
(
report
.
HospitalId
,
report
.
GroupId
,
report
.
ReportId
,
report
.
Values
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
return
new
ApiResponse
(
ResponseType
.
OK
,
result
);
}
}
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
b2576190
...
@@ -2599,7 +2599,7 @@
...
@@ -2599,7 +2599,7 @@
绩效系数
绩效系数
</summary>
</summary>
</member>
</member>
<member
name=
"P:Performance.DtoModels.SelectionOptions.ID"
>
<member
name=
"P:Performance.DtoModels.SelectionOptions.
Selection
ID"
>
<summary>
<summary>
ID
ID
</summary>
</summary>
...
...
performance/Performance.DtoModels/Request/SelectionRequest.cs
View file @
b2576190
...
@@ -7,13 +7,13 @@ namespace Performance.DtoModels
...
@@ -7,13 +7,13 @@ namespace Performance.DtoModels
{
{
public
class
SelectionRequest
public
class
SelectionRequest
{
{
public
int
HospitalId
{
get
;
set
;
}
public
int
GroupId
{
get
;
set
;
}
public
int
GroupId
{
get
;
set
;
}
}
}
public
class
SearchReportRequest
public
class
SearchReportRequest
{
{
public
int
HospitalId
{
get
;
set
;
}
public
int
HospitalId
{
get
;
set
;
}
public
int
GroupId
{
get
;
set
;
}
public
int
GroupId
{
get
;
set
;
}
public
int
ReportId
{
get
;
set
;
}
public
List
<
SelectionValues
>
Values
{
get
;
set
;
}
public
List
<
SelectionValues
>
Values
{
get
;
set
;
}
}
}
public
class
SelectionValues
public
class
SelectionValues
...
...
performance/Performance.Services/ReportDataService.cs
View file @
b2576190
...
@@ -90,7 +90,7 @@ public object GetReportInfo(int groupId)
...
@@ -90,7 +90,7 @@ public object GetReportInfo(int groupId)
/// <param name="groupId"></param>
/// <param name="groupId"></param>
/// <param name="values"></param>
/// <param name="values"></param>
/// <returns></returns>
/// <returns></returns>
public
List
<
ReportData
>
GetReportData
(
int
hospitalId
,
int
groupId
,
List
<
SelectionValues
>
values
)
public
List
<
ReportData
>
GetReportData
(
int
hospitalId
,
int
groupId
,
int
reportId
,
List
<
SelectionValues
>
values
)
{
{
var
groups
=
groupRepository
.
GetEntities
(
w
=>
w
.
GroupId
==
groupId
);
var
groups
=
groupRepository
.
GetEntities
(
w
=>
w
.
GroupId
==
groupId
);
var
arr1
=
groups
.
Select
(
w
=>
w
.
ReportId
);
var
arr1
=
groups
.
Select
(
w
=>
w
.
ReportId
);
...
@@ -99,6 +99,9 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, List<Selectio
...
@@ -99,6 +99,9 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, List<Selectio
if
(
reports
==
null
||
!
reports
.
Any
())
if
(
reports
==
null
||
!
reports
.
Any
())
throw
new
PerformanceException
(
"报表信息无效"
);
throw
new
PerformanceException
(
"报表信息无效"
);
if
(
reportId
>
0
)
reports
=
reports
.
Where
(
w
=>
w
.
ID
==
reportId
).
ToList
();
var
formats
=
GetParameterFormats
();
var
formats
=
GetParameterFormats
();
var
groupSelections
=
groupselectionRepository
.
GetEntities
(
w
=>
w
.
GroupId
==
groupId
);
var
groupSelections
=
groupselectionRepository
.
GetEntities
(
w
=>
w
.
GroupId
==
groupId
);
var
arr2
=
groupSelections
.
Select
(
w
=>
w
.
SelectionId
);
var
arr2
=
groupSelections
.
Select
(
w
=>
w
.
SelectionId
);
...
@@ -116,6 +119,7 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, List<Selectio
...
@@ -116,6 +119,7 @@ public List<ReportData> GetReportData(int hospitalId, int groupId, List<Selectio
string
@where
=
GetFilterSelection
(
selections
,
values
);
string
@where
=
GetFilterSelection
(
selections
,
values
);
var
pairs
=
PredefinePlaceholder
(
values
);
var
pairs
=
PredefinePlaceholder
(
values
);
pairs
.
Add
(
"hospitalid"
,
hospitalId
);
pairs
.
Add
(
"wh"
,
@where
);
pairs
.
Add
(
"wh"
,
@where
);
pairs
.
Add
(
"w"
,
$"where 1=1
{
@where
}
"
);
pairs
.
Add
(
"w"
,
$"where 1=1
{
@where
}
"
);
...
@@ -282,14 +286,6 @@ private string AddSelectionToReportTitle(List<rep_selection> selections, List<Se
...
@@ -282,14 +286,6 @@ private string AddSelectionToReportTitle(List<rep_selection> selections, List<Se
pairs
.
Add
(
"lastmonth"
,
val
-
1
);
pairs
.
Add
(
"lastmonth"
,
val
-
1
);
}
}
string
[]
keys3
=
new
string
[]
{
"hospitalid"
};
foreach
(
var
key
in
keys3
)
{
var
vals
=
values
.
FirstOrDefault
(
w
=>
w
.
Title
.
ToLower
()
==
key
)?.
Values
;
if
(
vals
!=
null
&&
vals
.
Any
())
pairs
.
Add
(
key
,
string
.
Join
(
","
,
vals
));
}
return
pairs
;
return
pairs
;
}
}
...
...
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