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
1390990c
Commit
1390990c
authored
Aug 23, 2022
by
Licx
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
医院其他绩效添加提交撤销功能
parent
2126f8d4
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
98 additions
and
19 deletions
+98
-19
performance/Performance.Api/Controllers/EmployeeController.cs
+34
-3
performance/Performance.Api/wwwroot/Performance.Api.xml
+12
-0
performance/Performance.Services/EmployeeService.cs
+52
-16
No files found.
performance/Performance.Api/Controllers/EmployeeController.cs
View file @
1390990c
...
@@ -393,6 +393,21 @@ public ApiResponse DeleteApr([FromBody] IdRequest request)
...
@@ -393,6 +393,21 @@ public ApiResponse DeleteApr([FromBody] IdRequest request)
}
}
/// <summary>
/// <summary>
/// 医院其他绩效提交、撤销
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"apr/commit"
)]
public
ApiResponse
CommitResult
([
FromBody
]
AprAmountAuditRequest
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
CommitApr
(
request
.
AllotId
,
claim
.
GetUserId
(),
request
.
IsPass
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// 医院其他绩效审核;驳回、成功
/// 医院其他绩效审核;驳回、成功
/// </summary>
/// </summary>
/// <returns></returns>
/// <returns></returns>
...
@@ -695,6 +710,22 @@ public ApiResponse DeleteAprHide([FromBody] IdRequest request)
...
@@ -695,6 +710,22 @@ public ApiResponse DeleteAprHide([FromBody] IdRequest request)
return
new
ApiResponse
(
ResponseType
.
OK
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
}
/// <summary>
/// 医院其他绩效提交、撤销
/// </summary>
/// <returns></returns>
[
HttpPost
]
[
Route
(
"apr/hide/commit"
)]
public
ApiResponse
CommitResultHide
([
FromBody
]
AprAmountAuditRequest
request
)
{
if
(
request
.
AllotId
==
0
)
return
new
ApiResponse
(
ResponseType
.
ParameterError
,
"参数AllotId无效!"
);
var
result
=
employeeService
.
CommitAprHide
(
request
.
AllotId
,
claim
.
GetUserId
(),
request
.
IsPass
);
return
new
ApiResponse
(
ResponseType
.
OK
);
}
/// <summary>
/// <summary>
/// 不公示其他绩效审核;驳回、成功
/// 不公示其他绩效审核;驳回、成功
/// </summary>
/// </summary>
...
@@ -916,7 +947,7 @@ public ApiResponse SaveGatherHands([FromRoute] int allotId, [FromBody] SaveGathe
...
@@ -916,7 +947,7 @@ public ApiResponse SaveGatherHands([FromRoute] int allotId, [FromBody] SaveGathe
[
HttpPost
]
[
HttpPost
]
public
ApiResponse
GetGather
([
FromBody
]
Gather
gather
)
public
ApiResponse
GetGather
([
FromBody
]
Gather
gather
)
{
{
if
(
gather
.
AllotId
<=
0
||
string
.
IsNullOrEmpty
(
gather
.
Source
)
||
string
.
IsNullOrEmpty
(
gather
.
Category
)
||
string
.
IsNullOrEmpty
(
gather
.
Department
)
)
if
(
gather
.
AllotId
<=
0
||
string
.
IsNullOrEmpty
(
gather
.
Source
)
||
string
.
IsNullOrEmpty
(
gather
.
Category
)
||
string
.
IsNullOrEmpty
(
gather
.
Department
)
)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"请检查allotId,source,category,department是否正确"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"请检查allotId,source,category,department是否正确"
);
var
result
=
employeeService
.
GetGather
(
gather
);
var
result
=
employeeService
.
GetGather
(
gather
);
...
@@ -955,7 +986,7 @@ public ApiResponse DeleteGather([FromBody] Gather gather)
...
@@ -955,7 +986,7 @@ public ApiResponse DeleteGather([FromBody] Gather gather)
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"请检查allotId,source,category,department是否正确"
);
return
new
ApiResponse
(
ResponseType
.
Fail
,
"参数错误"
,
"请检查allotId,source,category,department是否正确"
);
var
result
=
employeeService
.
DeleteGather
(
gather
);
var
result
=
employeeService
.
DeleteGather
(
gather
);
if
(
result
)
return
new
ApiResponse
(
ResponseType
.
OK
,
"删除成功"
);
if
(
result
)
return
new
ApiResponse
(
ResponseType
.
OK
,
"删除成功"
);
else
return
new
ApiResponse
(
ResponseType
.
Fail
,
"删除失败"
);
else
return
new
ApiResponse
(
ResponseType
.
Fail
,
"删除失败"
);
}
}
...
@@ -970,7 +1001,7 @@ public ApiResponse DeleteGather([FromBody] Gather gather)
...
@@ -970,7 +1001,7 @@ public ApiResponse DeleteGather([FromBody] Gather gather)
public
ApiResponse
AuditGather
([
FromBody
]
List
<
Gather
>
gather
)
public
ApiResponse
AuditGather
([
FromBody
]
List
<
Gather
>
gather
)
{
{
employeeService
.
AuditGather
(
gather
);
employeeService
.
AuditGather
(
gather
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
);
return
new
ApiResponse
(
ResponseType
.
OK
,
""
);
}
}
#
endregion
#
endregion
}
}
...
...
performance/Performance.Api/wwwroot/Performance.Api.xml
View file @
1390990c
...
@@ -1178,6 +1178,12 @@
...
@@ -1178,6 +1178,12 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.CommitResult(Performance.DtoModels.AprAmountAuditRequest)"
>
<summary>
医院其他绩效提交、撤销
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.AuditResult(Performance.DtoModels.AprAmountAuditRequest)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.AuditResult(Performance.DtoModels.AprAmountAuditRequest)"
>
<summary>
<summary>
医院其他绩效审核;驳回、成功
医院其他绩效审核;驳回、成功
...
@@ -1276,6 +1282,12 @@
...
@@ -1276,6 +1282,12 @@
<param
name=
"request"
></param>
<param
name=
"request"
></param>
<returns></returns>
<returns></returns>
</member>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.CommitResultHide(Performance.DtoModels.AprAmountAuditRequest)"
>
<summary>
医院其他绩效提交、撤销
</summary>
<returns></returns>
</member>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.AuditResultHide(Performance.DtoModels.AprAmountAuditRequest)"
>
<member
name=
"M:Performance.Api.Controllers.EmployeeController.AuditResultHide(Performance.DtoModels.AprAmountAuditRequest)"
>
<summary>
<summary>
不公示其他绩效审核;驳回、成功
不公示其他绩效审核;驳回、成功
...
...
performance/Performance.Services/EmployeeService.cs
View file @
1390990c
...
@@ -446,6 +446,7 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
...
@@ -446,6 +446,7 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
return
list
;
return
list
;
}
}
/// <summary>
/// <summary>
/// 医院其他绩效审核详情
/// 医院其他绩效审核详情
/// </summary>
/// </summary>
...
@@ -522,6 +523,7 @@ public bool UpdateApr(per_apr_amount request)
...
@@ -522,6 +523,7 @@ public bool UpdateApr(per_apr_amount request)
return
perapramountRepository
.
Update
(
data
);
return
perapramountRepository
.
Update
(
data
);
}
}
/// <summary>
/// <summary>
/// 删除医院其他绩效
/// 删除医院其他绩效
/// </summary>
/// </summary>
...
@@ -537,6 +539,22 @@ public bool DeleteApr(int id)
...
@@ -537,6 +539,22 @@ public bool DeleteApr(int id)
}
}
/// <summary>
/// <summary>
/// 提交、撤销医院其他绩效
/// </summary>
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public
bool
CommitApr
(
int
allotId
,
int
userId
,
int
status
)
{
var
list
=
GetAprList
(
allotId
,
userId
);
if
(
list
==
null
)
return
true
;
list
.
ForEach
(
t
=>
t
.
Status
=
status
);
perapramountRepository
.
UpdateRange
(
list
.
ToArray
());
return
true
;
}
/// <summary>
/// 审核医院其他绩效
/// 审核医院其他绩效
/// </summary>
/// </summary>
/// <param name="userid"></param>
/// <param name="userid"></param>
...
@@ -618,15 +636,15 @@ public string ImpoerAprEmployees(int allotid, string path, int userid)
...
@@ -618,15 +636,15 @@ public string ImpoerAprEmployees(int allotid, string path, int userid)
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userid
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userid
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
var
data
=
new
List
<
per_apr_amount
>();
//
var data = new List<per_apr_amount>();
var
roles
=
new
int
[]
{
(
int
)
Role
.
绩效管理员
,
(
int
)
Role
.
医院管理员
,
(
int
)
Role
.
绩效核算办
,
(
int
)
Role
.
院领导
,
(
int
)
Role
.
审计
};
//
var roles = new int[] { (int)Role.绩效管理员, (int)Role.医院管理员, (int)Role.绩效核算办, (int)Role.院领导, (int)Role.审计 };
if
(
roles
.
Contains
(
userrole
.
RoleID
))
// 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
//
if (roles.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
data
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotid
&&
(
t
.
Amount
??
0
)
!=
0
);
//
data = perapramountRepository.GetEntities(t => t.AllotId == allotid && (t.Amount ?? 0) != 0);
else
//
else
data
=
perapramountRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotid
&&
(
t
.
Amount
??
0
)
!=
0
&&
t
.
CreateUser
==
userid
);
//
data = perapramountRepository.GetEntities(t => t.AllotId == allotid && (t.Amount ?? 0) != 0 && t.CreateUser == userid);
if
(
data
!=
null
&&
data
.
Any
())
//
if (data != null && data.Any())
perapramountRepository
.
RemoveRange
(
data
.
ToArray
());
//
perapramountRepository.RemoveRange(data.ToArray());
try
try
{
{
...
@@ -989,6 +1007,24 @@ public bool DeleteAprHide(int id)
...
@@ -989,6 +1007,24 @@ public bool DeleteAprHide(int id)
return
true
;
return
true
;
}
}
/// <summary>
/// 提交、撤销医院不公示其他绩效
/// </summary>
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <param name="status"></param>
/// <returns></returns>
public
bool
CommitAprHide
(
int
allotId
,
int
userId
,
int
status
)
{
var
list
=
GetAprHideList
(
allotId
,
userId
);
if
(
list
==
null
)
return
true
;
list
.
ForEach
(
t
=>
t
.
Status
=
status
);
_hideRepository
.
UpdateRange
(
list
.
ToArray
());
return
true
;
}
/// <summary>
/// <summary>
/// 审核医院其他绩效
/// 审核医院其他绩效
/// </summary>
/// </summary>
...
@@ -1071,15 +1107,15 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid)
...
@@ -1071,15 +1107,15 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid)
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userid
);
var
userrole
=
userroleRepository
.
GetEntity
(
t
=>
t
.
UserID
==
userid
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
if
(
userrole
==
null
)
throw
new
PerformanceException
(
"用户未绑定角色"
);
var
data
=
new
List
<
per_apr_amount_hide
>();
//
var data = new List<per_apr_amount_hide>();
var
roles
=
new
int
[]
{
(
int
)
Role
.
绩效管理员
,
(
int
)
Role
.
医院管理员
,
(
int
)
Role
.
绩效核算办
,
(
int
)
Role
.
院领导
,
(
int
)
Role
.
审计
};
//
var roles = new int[] { (int)Role.绩效管理员, (int)Role.医院管理员, (int)Role.绩效核算办, (int)Role.院领导, (int)Role.审计 };
if
(
roles
.
Contains
(
userrole
.
RoleID
))
// 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
//
if (roles.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
data
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotid
&&
(
t
.
Amount
??
0
)
!=
0
);
//
data = _hideRepository.GetEntities(t => t.AllotId == allotid && (t.Amount ?? 0) != 0);
else
//
else
data
=
_hideRepository
.
GetEntities
(
t
=>
t
.
AllotId
==
allotid
&&
(
t
.
Amount
??
0
)
!=
0
&&
t
.
CreateUser
==
userid
);
//
data = _hideRepository.GetEntities(t => t.AllotId == allotid && (t.Amount ?? 0) != 0 && t.CreateUser == userid);
if
(
data
!=
null
&&
data
.
Any
())
//
if (data != null && data.Any())
_hideRepository
.
RemoveRange
(
data
.
ToArray
());
//
_hideRepository.RemoveRange(data.ToArray());
try
try
{
{
...
...
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