Commit b04e7959 by Licx

审核列表只查看已提交、审核通过的数据

parent 34972b5a
......@@ -280,16 +280,17 @@ public ApiResponse GetAprList([FromBody] AprAmountAuditRequest request)
/// <summary>
/// 医院其他绩效审核
/// </summary>
/// <param name="isAudit">0 其他绩效列表 1 审核列表</param>
/// <param name="request"></param>
/// <returns></returns>
[Route("apr/getdeptlist")]
[Route("apr/getdeptlist/{isAudit}")]
[HttpPost]
public ApiResponse GetAprGroupList([FromBody] AllotIdRequest request)
public ApiResponse GetAprGroupList([FromRoute] int isAudit, [FromBody] AllotIdRequest request)
{
if (request.AllotId == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetAprList(request.AllotId, claim.GetUserId());
var employee = employeeService.GetAprList(request.AllotId, claim.GetUserId(), isAudit);
if (employee == null || !employee.Any())
return new ApiResponse(ResponseType.OK, "ok", employee);
......@@ -620,16 +621,17 @@ public ApiResponse GetAprHideList([FromBody] AprAmountAuditRequest request)
/// <summary>
/// 不公示其他绩效审核
/// </summary>
/// <param name="isAudit"></param>
/// <param name="request"></param>
/// <returns></returns>
[Route("apr/hide/getdeptlist")]
[Route("apr/hide/getdeptlist/{isAudit}")]
[HttpPost]
public ApiResponse GetAprHideGroupList([FromBody] AllotIdRequest request)
public ApiResponse GetAprHideGroupList([FromRoute] int isAudit, [FromBody] AllotIdRequest request)
{
if (request.AllotId == 0)
return new ApiResponse(ResponseType.ParameterError, "参数AllotId无效!");
var employee = employeeService.GetAprHideList(request.AllotId, claim.GetUserId());
var employee = employeeService.GetAprHideList(request.AllotId, claim.GetUserId(), isAudit);
if (employee == null || !employee.Any())
return new ApiResponse(ResponseType.OK, "ok", employee);
......
......@@ -1143,10 +1143,11 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetAprGroupList(Performance.DtoModels.AllotIdRequest)">
<member name="M:Performance.Api.Controllers.EmployeeController.GetAprGroupList(System.Int32,Performance.DtoModels.AllotIdRequest)">
<summary>
医院其他绩效审核
</summary>
<param name="isAudit">0 其他绩效列表 1 审核列表</param>
<param name="request"></param>
<returns></returns>
</member>
......@@ -1254,10 +1255,11 @@
<param name="request"></param>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.GetAprHideGroupList(Performance.DtoModels.AllotIdRequest)">
<member name="M:Performance.Api.Controllers.EmployeeController.GetAprHideGroupList(System.Int32,Performance.DtoModels.AllotIdRequest)">
<summary>
不公示其他绩效审核
</summary>
<param name="isAudit"></param>
<param name="request"></param>
<returns></returns>
</member>
......
......@@ -430,17 +430,20 @@ public bool Audit(int allotId)
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public List<per_apr_amount> GetAprList(int allotId, int userId)
public List<per_apr_amount> GetAprList(int allotId, int userId, int isAudit)
{
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
if (userrole == null) throw new PerformanceException("用户未绑定角色");
var list = new List<per_apr_amount>();
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.审计 };
if (roles.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据
list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0);
else
list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId);
if (!roles.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据
expression = expression.And(t => t.CreateUser == userId);
if (isAudit == 1)
expression = expression.And(t => new int[] { 2, 3 }.Contains(t.Status ?? 1));
var list = perapramountRepository.GetEntities(expression);
if (list != null && list.Any())
list = list.OrderBy(w => w.IsVerify).ThenBy(t => t.DoctorName).ToList();
......@@ -898,18 +901,20 @@ public string GetTypeInDepartment(int userId)
/// <param name="allotId"></param>
/// <param name="userId"></param>
/// <returns></returns>
public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId)
public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId, int isAudit)
{
var userrole = userroleRepository.GetEntity(t => t.UserID == userId);
if (userrole == null) throw new PerformanceException("用户未绑定角色");
var list = new List<per_apr_amount_hide>();
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.审计 };
if (roles.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
list = _hideRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0);
else
list = _hideRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId);
if (!roles.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据
expression = expression.And(t => t.CreateUser == userId);
if (isAudit == 1)
expression = expression.And(t => new int[] { 2, 3 }.Contains(t.Status ?? 1));
var list = _hideRepository.GetEntities(expression);
if (list != null && list.Any())
list = list.OrderBy(w => w.IsVerify).ThenBy(t => t.DoctorName).ToList();
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment