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
417dcd4e
Commit
417dcd4e
authored
May 08, 2024
by
ruyun.zhang
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
科室大屏绩效发放占比支持核算组别
parent
8b6a7ec3
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
15 additions
and
13 deletions
+15
-13
performance/Performance.Api/GraphQLSchema/PerformanceQuery.cs
+2
-10
performance/Performance.Services/GraphQLService.cs
+13
-3
No files found.
performance/Performance.Api/GraphQLSchema/PerformanceQuery.cs
View file @
417dcd4e
...
@@ -10,7 +10,7 @@ namespace Performance.Api
...
@@ -10,7 +10,7 @@ namespace Performance.Api
{
{
public
class
PerformanceQuery
:
ObjectGraphType
public
class
PerformanceQuery
:
ObjectGraphType
{
{
public
PerformanceQuery
(
GraphQLService
service
,
ClaimService
claimService
,
PerforUserRepository
userRepository
)
public
PerformanceQuery
(
GraphQLService
service
,
ClaimService
claimService
)
{
{
Field
<
ListGraphType
<
ReportDataType
>>(
"info"
,
Field
<
ListGraphType
<
ReportDataType
>>(
"info"
,
resolve
:
context
=>
resolve
:
context
=>
...
@@ -60,16 +60,8 @@ public PerformanceQuery(GraphQLService service, ClaimService claimService, Perfo
...
@@ -60,16 +60,8 @@ public PerformanceQuery(GraphQLService service, ClaimService claimService, Perfo
:
0
;
:
0
;
var
parameters
=
GetDynamicParameters
(
context
.
Arguments
,
QueryParams
.
hospitalId
,
QueryParams
.
year
,
QueryParams
.
month
,
QueryParams
.
accountingUnit
,
QueryParams
.
category
,
QueryParams
.
itemName
);
var
parameters
=
GetDynamicParameters
(
context
.
Arguments
,
QueryParams
.
hospitalId
,
QueryParams
.
year
,
QueryParams
.
month
,
QueryParams
.
accountingUnit
,
QueryParams
.
category
,
QueryParams
.
itemName
);
var
userId
=
claimService
.
GetUserId
();
var
userId
=
claimService
.
GetUserId
();
var
userInfo
=
userRepository
.
GetUser
(
userId
);
return
service
.
GetReportPerformance
(
reportId
,
parameters
,
userId
);
if
(
userInfo
?.
URole
!=
null
)
{
var
unitTypes
=
UnitTypeUtil
.
GetMaps
(
userInfo
?.
URole
.
Type
??
0
);
if
(
unitTypes
.
Any
())
parameters
.
Add
(
"unittype"
,
unitTypes
);
}
return
service
.
GetReportPerformance
(
reportId
,
parameters
);
}
}
);
);
}
}
...
...
performance/Performance.Services/GraphQLService.cs
View file @
417dcd4e
...
@@ -16,18 +16,20 @@ public class GraphQLService : IAutoInjection
...
@@ -16,18 +16,20 @@ public class GraphQLService : IAutoInjection
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforPeremployeeRepository
peremployeeRepository
;
private
readonly
PerforRepreportRepository
repreportRepository
;
private
readonly
PerforRepreportRepository
repreportRepository
;
private
readonly
PerforReportperformanceRepository
reportperformanceRepository
;
private
readonly
PerforReportperformanceRepository
reportperformanceRepository
;
private
readonly
PerforUserRepository
_userRepository
;
public
GraphQLService
(
public
GraphQLService
(
ILogger
<
GraphQLService
>
logger
,
ILogger
<
GraphQLService
>
logger
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforPeremployeeRepository
peremployeeRepository
,
PerforRepreportRepository
repreportRepository
,
PerforRepreportRepository
repreportRepository
,
PerforReportperformanceRepository
reportperformanceRepository
PerforReportperformanceRepository
reportperformanceRepository
,
)
PerforUserRepository
userRepository
)
{
{
this
.
logger
=
logger
;
this
.
logger
=
logger
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
peremployeeRepository
=
peremployeeRepository
;
this
.
repreportRepository
=
repreportRepository
;
this
.
repreportRepository
=
repreportRepository
;
this
.
reportperformanceRepository
=
reportperformanceRepository
;
this
.
reportperformanceRepository
=
reportperformanceRepository
;
_userRepository
=
userRepository
;
}
}
public
List
<
ReportData
>
GetReportsInfo
()
public
List
<
ReportData
>
GetReportsInfo
()
...
@@ -74,7 +76,7 @@ public List<ChartData> GetChartData(int reportId, DynamicParameters parameters)
...
@@ -74,7 +76,7 @@ public List<ChartData> GetChartData(int reportId, DynamicParameters parameters)
}
}
}
}
public
List
<
ReportTable
>
GetReportPerformance
(
int
reportId
,
DynamicParameters
parameters
)
public
List
<
ReportTable
>
GetReportPerformance
(
int
reportId
,
DynamicParameters
parameters
,
int
userId
)
{
{
if
(
reportId
==
0
)
return
new
List
<
ReportTable
>();
if
(
reportId
==
0
)
return
new
List
<
ReportTable
>();
...
@@ -86,6 +88,14 @@ public List<ReportTable> GetReportPerformance(int reportId, DynamicParameters pa
...
@@ -86,6 +88,14 @@ public List<ReportTable> GetReportPerformance(int reportId, DynamicParameters pa
var
sql
=
report
.
Content
.
ToLower
();
var
sql
=
report
.
Content
.
ToLower
();
string
where
=
GetQueryCondition
(
sql
,
parameters
);
string
where
=
GetQueryCondition
(
sql
,
parameters
);
sql
=
sql
.
Replace
(
"{wh}"
,
where
);
sql
=
sql
.
Replace
(
"{wh}"
,
where
);
// 在科室查看报表ID=50时,明确指明需要使用unittype字段时起效,防止{wh}错误带入
var
userInfo
=
_userRepository
.
GetUser
(
userId
);
if
(
userInfo
?.
URole
!=
null
)
{
var
unitTypes
=
UnitTypeUtil
.
GetMaps
(
userInfo
?.
URole
.
Type
??
0
);
if
(
unitTypes
.
Any
())
parameters
.
Add
(
"unittype"
,
unitTypes
);
}
var
chartData
=
repreportRepository
.
DapperQuery
<
ReportTable
>(
sql
,
parameters
,
60
*
5
);
var
chartData
=
repreportRepository
.
DapperQuery
<
ReportTable
>(
sql
,
parameters
,
60
*
5
);
...
...
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