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
05c1a203
Commit
05c1a203
authored
Jul 21, 2020
by
lcx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
演示信息接口,二次绩效其他来源带出人员信息,抽取数据时伪删除历史数据,二次绩效根据年月倒序排序
parent
72039365
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
178 additions
and
19 deletions
+178
-19
performance/Performance.Api/Controllers/AccountController.cs
+48
-7
performance/Performance.Api/Controllers/SecondAllotController.cs
+1
-1
performance/Performance.Api/wwwroot/Performance.Api.xml
+13
-0
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
+33
-3
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
+10
-0
performance/Performance.EntityModels/Entity/ex_result.cs
+5
-0
performance/Performance.EntityModels/Entity/sys_role.cs
+5
-0
performance/Performance.Services/AllotService.cs
+7
-3
performance/Performance.Services/DFExtractService - 副本.cs
+3
-3
performance/Performance.Services/SecondAllotService.cs
+22
-2
performance/Performance.Services/UserService.cs
+31
-0
No files found.
performance/Performance.Api/Controllers/AccountController.cs
View file @
05c1a203
...
...
@@ -49,7 +49,7 @@ public class AccountController : Controller
[
HttpPost
]
[
Route
(
"login"
)]
[
AllowAnonymous
]
public
ApiResponse
<
JwtToken
>
Login
([
FromBody
]
LoginRequest
request
)
public
ApiResponse
<
JwtToken
>
Login
([
FromBody
]
LoginRequest
request
)
{
var
user
=
_userService
.
Login
(
request
);
if
(
user
==
null
)
...
...
@@ -122,7 +122,7 @@ public ApiResponse SelfInfo()
/// <returns></returns>
[
Route
(
"updateself"
)]
[
HttpPost
]
public
ApiResponse
<
UserResponse
>
UpdateSelf
([
CustomizeValidator
(
RuleSet
=
"Self"
),
FromBody
]
UserRequest
request
)
public
ApiResponse
<
UserResponse
>
UpdateSelf
([
CustomizeValidator
(
RuleSet
=
"Self"
),
FromBody
]
UserRequest
request
)
{
request
.
ID
=
_claim
.
GetUserId
();
var
user
=
_userService
.
UpdateSelf
(
request
);
...
...
@@ -148,7 +148,7 @@ public ApiResponse<List<UserResponse>> List()
/// <returns></returns>
[
Route
(
"insert"
)]
[
HttpPost
]
public
ApiResponse
<
UserResponse
>
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
UserRequest
request
)
public
ApiResponse
<
UserResponse
>
Insert
([
CustomizeValidator
(
RuleSet
=
"Insert"
),
FromBody
]
UserRequest
request
)
{
var
userId
=
_claim
.
GetUserId
();
var
user
=
_userService
.
Insert
(
request
,
userId
);
...
...
@@ -163,7 +163,7 @@ public ApiResponse<UserResponse> Insert([CustomizeValidator(RuleSet = "Insert"),
/// <returns></returns>
[
Route
(
"delete"
)]
[
HttpPost
]
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
UserRequest
request
)
public
ApiResponse
Delete
([
CustomizeValidator
(
RuleSet
=
"Delete"
),
FromBody
]
UserRequest
request
)
{
return
_userService
.
Delete
(
request
.
ID
);
}
...
...
@@ -175,7 +175,7 @@ public ApiResponse Delete([CustomizeValidator(RuleSet = "Delete"), FromBody]User
/// <returns></returns>
[
Route
(
"update"
)]
[
HttpPost
]
public
ApiResponse
<
UserResponse
>
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
UserRequest
request
)
public
ApiResponse
<
UserResponse
>
Update
([
CustomizeValidator
(
RuleSet
=
"Update"
),
FromBody
]
UserRequest
request
)
{
var
userId
=
_claim
.
GetUserId
();
...
...
@@ -195,7 +195,7 @@ public ApiResponse<UserResponse> Update([CustomizeValidator(RuleSet = "Update"),
/// <returns></returns>
[
Route
(
"password"
)]
[
HttpPost
]
public
ApiResponse
<
UserResponse
>
Password
([
FromBody
]
PasswordRequest
request
)
public
ApiResponse
<
UserResponse
>
Password
([
FromBody
]
PasswordRequest
request
)
{
var
userid
=
_claim
.
GetUserId
();
var
user
=
_userService
.
UpdatePwd
(
request
,
userid
);
...
...
@@ -222,10 +222,51 @@ public ApiResponse<List<sys_role>> RoleList()
/// <returns></returns>
[
Route
(
"department"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
TitleValue
>>
Department
([
FromBody
]
SetDepartmentRequest
request
)
public
ApiResponse
<
List
<
TitleValue
>>
Department
([
FromBody
]
SetDepartmentRequest
request
)
{
var
department
=
_userService
.
Department
(
request
.
HospitalID
);
return
new
ApiResponse
<
List
<
TitleValue
>>(
ResponseType
.
OK
,
"ok"
,
department
);
}
/// <summary>
/// 演示用户
/// </summary>
/// <returns></returns>
[
Route
(
"demo/users"
)]
[
HttpPost
]
public
ApiResponse
<
List
<
TitleValue
<
int
>>>
DemoUsers
()
{
var
users
=
_userService
.
GetDemoUsers
();
return
new
ApiResponse
<
List
<
TitleValue
<
int
>>>(
ResponseType
.
OK
,
users
);
}
/// <summary>
/// 更换角色获取Token
/// </summary>
/// <param name="userId"></param>
/// <returns></returns>
[
Route
(
"demo/token/{userId}"
)]
[
HttpPost
]
public
ApiResponse
<
JwtToken
>
DemoUsers
(
int
userId
)
{
if
(
userId
<
1
)
return
new
ApiResponse
<
JwtToken
>(
ResponseType
.
ParameterError
,
"用户不存在,请先创建!"
);
var
user
=
_userService
.
GetDemoUserIdentity
(
userId
);
var
userClaim
=
_claim
.
GetUserClaim
();
var
claims
=
new
Claim
[]
{
new
Claim
(
JwtClaimTypes
.
Id
,
user
.
UserID
.
ToString
()),
new
Claim
(
JwtClaimTypes
.
Login
,
user
.
Login
),
new
Claim
(
JwtClaimTypes
.
RealName
,
user
.
RealName
),
new
Claim
(
JwtClaimTypes
.
Mail
,
user
.
Mail
),
new
Claim
(
JwtClaimTypes
.
AppName
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
AppName
).
Value
),
new
Claim
(
JwtClaimTypes
.
Device
,
userClaim
.
FirstOrDefault
(
t
=>
t
.
Type
==
JwtClaimTypes
.
Device
).
Value
),
new
Claim
(
JwtClaimTypes
.
Department
,
user
.
Department
??
""
),
};
var
jwtToken
=
JwtTokenHelper
.
GenerateToken
(
claims
,
_options
.
ExpirationMinutes
);
return
new
ApiResponse
<
JwtToken
>(
ResponseType
.
OK
,
jwtToken
);
}
}
}
performance/Performance.Api/Controllers/SecondAllotController.cs
View file @
05c1a203
...
...
@@ -330,7 +330,7 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
[
HttpPost
]
public
ApiResponse
OtherList
([
FromBody
]
AgOtherRequest
request
)
{
var
result
=
secondAllotService
.
OtherList
(
request
.
SecondId
);
var
result
=
secondAllotService
.
OtherList
(
request
.
SecondId
,
claimService
.
GetUserId
()
);
var
obj
=
new
{
header
=
secondAllotService
.
OtherListHeader
(
request
.
SecondId
,
result
?.
Sum
(
t
=>
t
.
RealAmount
)),
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
05c1a203
...
...
@@ -77,6 +77,19 @@
<param
name=
"request"
></param>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AccountController.DemoUsers"
>
<summary>
演示用户
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.AccountController.DemoUsers(System.Int32)"
>
<summary>
更换角色获取Token
</summary>
<param
name=
"userId"
></param>
<returns></returns>
</member>
<member
name=
"T:Performance.Api.Controllers.AgainAllotController"
>
<summary>
科室二次分配
...
...
performance/Performance.Api/wwwroot/Performance.DtoModels.xml
View file @
05c1a203
...
...
@@ -2822,19 +2822,49 @@
姓名
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.Department"
>
<summary>
科室
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.WorkPost"
>
<summary>
职称
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.TitlePerfor"
>
<summary>
职称绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.WorkPerfor"
>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.WorkPerfor
mance
"
>
<summary>
工作量绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.RealGiveFee"
>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.DeptReward"
>
<summary>
科室单项奖励
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.DistPerformance"
>
<summary>
可分配绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.OtherPerformance"
>
<summary>
医院其他绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.NightWorkPerformance"
>
<summary>
夜班工作量绩效
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.RealAmount"
>
<summary>
实发
工资
实发
绩效工资金额
</summary>
</member>
<member
name=
"P:Performance.DtoModels.SecPrintResponse.Sign"
>
...
...
performance/Performance.Api/wwwroot/Performance.EntityModels.xml
View file @
05c1a203
...
...
@@ -1598,6 +1598,11 @@
数据库配置Id
</summary>
</member>
<member
name=
"P:Performance.EntityModels.ex_result.IsDelete"
>
<summary>
1 删除 0 未删除
</summary>
</member>
<member
name=
"T:Performance.EntityModels.ex_script"
>
<summary>
...
...
@@ -4558,6 +4563,11 @@
父级角色
</summary>
</member>
<member
name=
"P:Performance.EntityModels.sys_role.Sort"
>
<summary>
</summary>
</member>
<member
name=
"T:Performance.EntityModels.sys_role_menu"
>
<summary>
角色菜单关联表
...
...
performance/Performance.EntityModels/Entity/ex_result.cs
View file @
05c1a203
...
...
@@ -55,5 +55,10 @@ public class ex_result
/// 数据库配置Id
/// </summary>
public
int
ConfigId
{
get
;
set
;
}
/// <summary>
/// 1 删除 0 未删除
/// </summary>
public
int
IsDelete
{
get
;
set
;
}
}
}
performance/Performance.EntityModels/Entity/sys_role.cs
View file @
05c1a203
...
...
@@ -50,5 +50,10 @@ public class sys_role
/// 父级角色
/// </summary>
public
string
ParentRoles
{
get
;
set
;
}
/// <summary>
///
/// </summary>
public
int
Sort
{
get
;
set
;
}
}
}
performance/Performance.Services/AllotService.cs
View file @
05c1a203
...
...
@@ -102,8 +102,8 @@ public List<AllotResponse> GetAllotList(int? hospitalId)
var
allotList
=
_allotRepository
.
GetEntities
(
t
=>
t
.
HospitalId
==
hospitalId
);
allotList
=
allotList
==
null
?
allotList
:
allotList
.
OrderByDescending
(
t
=>
t
.
ID
).
ToList
();
var
isconfig
=
perforHospitalconfigRepository
.
GetEntity
(
t
=>
t
.
HospitalId
==
hospitalId
)
==
null
?
false
:
true
;
var
re
us
lt
=
Mapper
.
Map
<
List
<
AllotResponse
>>(
allotList
);
re
us
lt
?.
ForEach
(
t
=>
var
re
su
lt
=
Mapper
.
Map
<
List
<
AllotResponse
>>(
allotList
);
re
su
lt
?.
ForEach
(
t
=>
{
t
.
IsDown
=
!
string
.
IsNullOrEmpty
(
t
.
ExtractPath
);
if
(!
string
.
IsNullOrEmpty
(
t
.
ExtractPath
))
...
...
@@ -111,7 +111,11 @@ public List<AllotResponse> GetAllotList(int? hospitalId)
t
.
HasConfig
=
isconfig
?
3
:
0
;
});
return
reuslt
;
if
(
result
!=
null
&&
result
.
Any
())
{
result
=
result
.
OrderByDescending
(
t
=>
t
.
Year
).
OrderByDescending
(
t
=>
t
.
Month
).
ToList
();
}
return
result
;
}
/// <summary>
...
...
performance/Performance.Services/DFExtractService - 副本.cs
View file @
05c1a203
usin
g
Dapper
;
usin
g
Dapper
;
...
...
@@ -274,8 +274,8 @@ private void ClearHistData(per_allot allot)
var
data
=
perforExresultRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allot
.
ID
);
if
(
data
==
null
||
!
data
.
Any
(
t
=>
t
.
Id
>
0
))
return
;
perforExresultRepository
.
Remov
eRange
(
data
.
ToArray
());
data
.
ForEach
(
t
=>
t
.
IsDelete
=
1
);
perforExresultRepository
.
Updat
eRange
(
data
.
ToArray
());
}
/// <summary>
...
...
performance/Performance.Services/SecondAllotService.cs
View file @
05c1a203
...
...
@@ -1295,10 +1295,30 @@ public List<BodyItem> GetBodyItems(List<HeadItem> headItems, int source, List<co
#
endregion
#
region
二次绩效其他来源
public
List
<
ag_othersource
>
OtherList
(
int
secondId
)
public
List
<
ag_othersource
>
OtherList
(
int
secondId
,
int
userId
)
{
var
otherSecondList
=
perforAgothersourceRepository
.
GetEntities
(
t
=>
t
.
SecondId
==
secondId
);
return
otherSecondList
?.
OrderBy
(
t
=>
t
.
Id
).
ToList
();
if
(
otherSecondList
!=
null
&&
otherSecondList
.
Any
())
{
return
otherSecondList
.
OrderBy
(
t
=>
t
.
Id
).
ToList
();
}
else
{
var
second
=
perforAgsecondallotRepository
.
GetEntity
(
t
=>
t
.
Id
==
secondId
);
if
(
second
==
null
)
throw
new
PerformanceException
(
"二次绩效信息无效!"
);
var
employees
=
personService
.
GetPersons
(
second
.
AllotId
.
Value
,
userId
);
if
(
employees
==
null
||
!
employees
.
Any
())
return
new
List
<
ag_othersource
>();
return
employees
.
Select
(
t
=>
new
ag_othersource
{
SecondId
=
secondId
,
WorkNumber
=
t
.
PersonnelNumber
,
Name
=
t
.
DoctorName
,
Department
=
t
.
Department
,
WorkPost
=
t
.
JobTitle
}).
ToList
();
}
}
public
Dictionary
<
string
,
string
>
OtherListHeader
(
int
secondId
,
decimal
?
amount
)
...
...
performance/Performance.Services/UserService.cs
View file @
05c1a203
...
...
@@ -385,5 +385,36 @@ private void GetChildrenRole(List<sys_role> roles, int roleId, List<sys_role> re
}
}
}
public
List
<
TitleValue
<
int
>>
GetDemoUsers
()
{
var
roles
=
_roleRepository
.
GetEntities
();
if
(
roles
==
null
||
!
roles
.
Any
())
return
new
List
<
TitleValue
<
int
>>();
roles
=
roles
.
OrderBy
(
t
=>
t
.
Sort
).
ToList
();
roles
.
RemoveAll
(
t
=>
t
.
Type
==
1
);
var
users
=
_userhospitalRepository
.
GetEntities
(
t
=>
t
.
HospitalID
==
13
);
if
(
users
==
null
||
!
users
.
Any
())
return
roles
.
Select
(
t
=>
new
TitleValue
<
int
>
{
Title
=
t
.
RoleName
,
Value
=
0
}).
ToList
();
var
userrole
=
_userroleRepository
.
GetEntities
(
t
=>
users
.
Select
(
u
=>
u
.
UserID
).
Contains
(
t
.
UserID
));
if
(
userrole
==
null
||
!
userrole
.
Any
())
return
roles
.
Select
(
t
=>
new
TitleValue
<
int
>
{
Title
=
t
.
RoleName
,
Value
=
0
}).
ToList
();
return
roles
.
Select
(
t
=>
new
TitleValue
<
int
>
{
Title
=
t
.
RoleName
,
Value
=
userrole
.
FirstOrDefault
(
ur
=>
ur
.
RoleID
==
t
.
ID
)?.
UserID
??
0
}).
ToList
();
;
}
public
UserIdentity
GetDemoUserIdentity
(
int
userId
)
{
var
user
=
_userRepository
.
GetEntity
(
t
=>
t
.
ID
==
userId
);
if
(
user
==
null
)
throw
new
PerformanceException
(
$"用户不存在,请先创建!"
);
var
data
=
Mapper
.
Map
<
UserIdentity
>(
user
);
data
.
Token
=
Guid
.
NewGuid
().
ToString
(
"N"
);
return
data
;
}
}
}
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