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
2229a0a9
Commit
2229a0a9
authored
May 22, 2024
by
wyc
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院其他绩效审核(角色配置)
parent
0993a77f
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
14 deletions
+23
-14
performance/Performance.Api/appsettings.Development.json
+2
-1
performance/Performance.Services/EmployeeService.cs
+21
-13
No files found.
performance/Performance.Api/appsettings.Development.json
View file @
2229a0a9
...
...
@@ -23,7 +23,8 @@
//
抽取结果Excel文件保存地址
"AbsolutePath"
:
"E:
\\
wwwroot
\\
testjx.suvalue.com"
,
//
抽取结果Excel文件保存地址
更替的
网络地址
"HttpPath"
:
"http://testjx.suvalue.com:81"
"HttpPath"
:
"http://testjx.suvalue.com:81"
,
"RoleId"
:
[
1
,
2
,
5
,
8
,
14
,
15
,
16
]
},
"WebapiUrl"
:
{
//
抽取结果保存地址
...
...
performance/Performance.Services/EmployeeService.cs
View file @
2229a0a9
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
System.Text.RegularExpressions
;
using
AutoMapper
;
using
AutoMapper
;
using
Microsoft.Extensions.Configuration
;
using
Microsoft.Extensions.Logging
;
using
Newtonsoft.Json
;
using
NPOI.HSSF.UserModel
;
...
...
@@ -18,6 +13,13 @@
using
Performance.Infrastructure
;
using
Performance.Repository
;
using
Performance.Repository.Repository
;
using
System
;
using
System.Collections.Generic
;
using
System.IO
;
using
System.Linq
;
using
System.Linq.Expressions
;
using
System.Text.RegularExpressions
;
namespace
Performance.Services
{
...
...
@@ -50,6 +52,7 @@ public class EmployeeService : IAutoInjection
private
readonly
DownloadService
downloadService
;
private
readonly
PerAprAmountTypeRepository
perAprAmountTypeRepository
;
private
readonly
PerAprAmountTypeHideRepository
perAprAmountTypeHIdeRepository
;
private
readonly
IConfiguration
_configuration
;
...
...
@@ -83,7 +86,9 @@ public class EmployeeService : IAutoInjection
UserService
userService
,
DownloadService
downloadService
,
PerAprAmountTypeRepository
perAprAmountTypeRepository
,
PerAprAmountTypeHideRepository
perAprAmountTypeHideRepository
PerAprAmountTypeHideRepository
perAprAmountTypeHideRepository
,
IConfiguration
configuration
)
{
_mapper
=
mapper
;
...
...
@@ -113,6 +118,7 @@ PerAprAmountTypeHideRepository perAprAmountTypeHideRepository
this
.
downloadService
=
downloadService
;
this
.
perAprAmountTypeRepository
=
perAprAmountTypeRepository
;
this
.
perAprAmountTypeHIdeRepository
=
perAprAmountTypeHideRepository
;
_configuration
=
configuration
;
}
#
region
行政人员
...
...
@@ -452,7 +458,8 @@ public List<OhterAmountAuditResponse> GetAprList(int allotId, int userId, int is
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
Expression
<
Func
<
per_apr_amount
,
bool
>>
expression
=
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
Amount
??
0
)
!=
0
;
var
roles
=
new
int
[]
{
(
int
)
Role
.
绩效管理员
,
(
int
)
Role
.
医院管理员
,
(
int
)
Role
.
绩效核算办
,
(
int
)
Role
.
院领导
,
(
int
)
Role
.
审计
};
int
[]
roles
=
_configuration
.
GetSection
(
"Application:RoleId"
).
Get
<
int
[
]>
()
??
new
int
[]
{
(
int
)
Role
.
绩效管理员
,
(
int
)
Role
.
医院管理员
,
(
int
)
Role
.
绩效核算办
,
(
int
)
Role
.
院领导
,
(
int
)
Role
.
审计
};
if
(!
roles
.
Contains
(
userrole
.
RoleID
))
// 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据
expression
=
expression
.
And
(
t
=>
t
.
CreateUser
==
userId
);
...
...
@@ -460,7 +467,7 @@ public List<OhterAmountAuditResponse> GetAprList(int allotId, int userId, int is
expression
=
expression
.
And
(
t
=>
new
int
[]
{
2
,
3
}.
Contains
(
t
.
Status
??
1
));
var
list
=
perapramountRepository
.
GetEntities
(
expression
)
??
new
List
<
per_apr_amount
>();
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
.
Any
())
list
=
list
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
DoctorName
).
ToList
();
var
result
=
list
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
,
t
.
CreateDate
})
...
...
@@ -1099,7 +1106,8 @@ public List<OhterAmountAuditResponse> GetAprHideList(int allotId, int userId, in
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
Expression
<
Func
<
per_apr_amount_hide
,
bool
>>
expression
=
t
=>
t
.
AllotId
==
allotId
&&
(
t
.
Amount
??
0
)
!=
0
;
var
roles
=
new
int
[]
{
(
int
)
Role
.
绩效管理员
,
(
int
)
Role
.
医院管理员
,
(
int
)
Role
.
绩效核算办
,
(
int
)
Role
.
院领导
,
(
int
)
Role
.
审计
};
int
[]
roles
=
_configuration
.
GetSection
(
"Application:RoleId"
).
Get
<
int
[
]>
()
??
new
int
[]
{
(
int
)
Role
.
绩效管理员
,
(
int
)
Role
.
医院管理员
,
(
int
)
Role
.
绩效核算办
,
(
int
)
Role
.
院领导
,
(
int
)
Role
.
审计
};
if
(!
roles
.
Contains
(
userrole
.
RoleID
))
// 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
expression
=
expression
.
And
(
t
=>
t
.
CreateUser
==
userId
);
...
...
@@ -1107,7 +1115,7 @@ public List<OhterAmountAuditResponse> GetAprHideList(int allotId, int userId, in
expression
=
expression
.
And
(
t
=>
new
int
[]
{
2
,
3
}.
Contains
(
t
.
Status
??
1
));
var
list
=
_hideRepository
.
GetEntities
(
expression
)
??
new
List
<
per_apr_amount_hide
>();
if
(
list
!=
null
&&
list
.
Any
())
if
(
list
.
Any
())
list
=
list
.
OrderBy
(
w
=>
w
.
IsVerify
).
ThenBy
(
t
=>
t
.
DoctorName
).
ToList
();
var
result
=
list
.
GroupBy
(
t
=>
new
{
TypeInDepartment
=
t
.
TypeInDepartment
??
""
,
t
.
CreateDate
})
...
...
@@ -1132,7 +1140,7 @@ public List<OhterAmountAuditResponse> GetAprHideList(int allotId, int userId, in
ShowCommit
=
(
new
int
[]
{
1
,
4
}).
Contains
(
status
)
&&
t
.
FirstOrDefault
(
t
=>
t
.
CreateUser
.
HasValue
).
CreateUser
==
userId
,
};
});
if
(
result
!=
null
&&
result
.
Any
())
if
(
result
.
Any
())
result
=
result
.
OrderByDescending
(
o
=>
o
.
CreateDate
).
ToList
();
return
result
.
ToList
();
...
...
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