Commit 70ae6d36 by ruyun.zhang@suvalue.com

Merge branch 'feature/审计' into develop

parents 09660823 e575e3e0
...@@ -4,6 +4,7 @@ ...@@ -4,6 +4,7 @@
using Microsoft.AspNetCore.Mvc; using Microsoft.AspNetCore.Mvc;
using Performance.DtoModels; using Performance.DtoModels;
using Performance.DtoModels.Request; using Performance.DtoModels.Request;
using Performance.DtoModels.Response;
using Performance.EntityModels; using Performance.EntityModels;
using Performance.Infrastructure; using Performance.Infrastructure;
using Performance.Services; using Performance.Services;
...@@ -294,11 +295,13 @@ public ApiResponse GetAprGroupList([FromBody] AllotIdRequest request) ...@@ -294,11 +295,13 @@ public ApiResponse GetAprGroupList([FromBody] AllotIdRequest request)
return new ApiResponse(ResponseType.OK, "ok", employee); return new ApiResponse(ResponseType.OK, "ok", employee);
var result = employee.GroupBy(t => new { TypeInDepartment = t.TypeInDepartment ?? "" }) var result = employee.GroupBy(t => new { TypeInDepartment = t.TypeInDepartment ?? "" })
.Select(t => new per_apr_amount .Select(t => new OhterAmountAuditResponse
{ {
TypeInDepartment = t.Key.TypeInDepartment, TypeInDepartment = t.Key.TypeInDepartment,
Amount = t.Sum(s => s.Amount ?? 0), Amount = t.Sum(s => s.Amount ?? 0),
Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status, Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status,
AuditTime = t.Any(s => s.Status == 2) ? "" : t.Max(w => w.AuditTime)?.ToString("yyyy-MM-dd HH:mm:ss"),
Remark = t.Any(s => !s.MarkStatus.HasValue) ? "" : $"已审计({t.Max(w => w.MarkTime)?.ToString("yyyy-MM-dd HH:mm:ss")})"
}); });
return new ApiResponse(ResponseType.OK, "ok", result); return new ApiResponse(ResponseType.OK, "ok", result);
} }
...@@ -401,6 +404,18 @@ public ApiResponse AuditResult([FromBody] AprAmountAuditRequest request) ...@@ -401,6 +404,18 @@ public ApiResponse AuditResult([FromBody] AprAmountAuditRequest request)
} }
/// <summary> /// <summary>
/// 医院其他绩效审计
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("apr/mark")]
public ApiResponse AprMark([FromBody] AprAmountMarkRequest request)
{
var userid = claim.GetUserId();
return employeeService.AprMark(userid, request);
}
/// <summary>
/// 上传医院其他绩效文件 /// 上传医院其他绩效文件
/// </summary> /// </summary>
/// <param name="form"></param> /// <param name="form"></param>
...@@ -582,11 +597,13 @@ public ApiResponse GetAprHideGroupList([FromBody] AllotIdRequest request) ...@@ -582,11 +597,13 @@ public ApiResponse GetAprHideGroupList([FromBody] AllotIdRequest request)
return new ApiResponse(ResponseType.OK, "ok", employee); return new ApiResponse(ResponseType.OK, "ok", employee);
var result = employee.GroupBy(t => new { TypeInDepartment = t.TypeInDepartment ?? "" }) var result = employee.GroupBy(t => new { TypeInDepartment = t.TypeInDepartment ?? "" })
.Select(t => new per_apr_amount .Select(t => new OhterAmountAuditResponse
{ {
TypeInDepartment = t.Key.TypeInDepartment, TypeInDepartment = t.Key.TypeInDepartment,
Amount = t.Sum(s => s.Amount ?? 0), Amount = t.Sum(s => s.Amount ?? 0),
Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status, Status = t.Any(s => s.Status == 2) ? 2 : t.Any(s => s.Status == 4) ? 4 : t.FirstOrDefault().Status,
AuditTime = t.Any(s => s.Status == 2) ? "" : t.Max(w => w.AuditTime)?.ToString("yyyy-MM-dd HH:mm:ss"),
Remark = t.Any(s => !s.MarkStatus.HasValue) ? "" : $"已审计({t.Max(w => w.MarkTime)?.ToString("yyyy-MM-dd HH:mm:ss")})"
}); });
return new ApiResponse(ResponseType.OK, "ok", result); return new ApiResponse(ResponseType.OK, "ok", result);
} }
...@@ -688,6 +705,18 @@ public ApiResponse AuditResultHide([FromBody] AprAmountAuditRequest request) ...@@ -688,6 +705,18 @@ public ApiResponse AuditResultHide([FromBody] AprAmountAuditRequest request)
} }
/// <summary> /// <summary>
/// 不公示其他绩效审计
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("apr/hide/mark")]
public ApiResponse AprMarkHide([FromBody] AprAmountMarkRequest request)
{
var userid = claim.GetUserId();
return employeeService.AprMarkHide(userid, request);
}
/// <summary>
/// 上传不公示其他绩效 /// 上传不公示其他绩效
/// </summary> /// </summary>
/// <param name="form"></param> /// <param name="form"></param>
......
...@@ -371,6 +371,11 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request) ...@@ -371,6 +371,11 @@ public ApiResponse SubmitAudit(SubmitAuditRequest request)
public ApiResponse<List<ag_secondallot>> AuditList([FromBody] AllotDeptRequest request) public ApiResponse<List<ag_secondallot>> AuditList([FromBody] AllotDeptRequest request)
{ {
var list = secondAllotService.AuditList(request.AllotId); var list = secondAllotService.AuditList(request.AllotId);
foreach (var item in list)
{
item.Remark += item.MarkStatus.HasValue ? " " : $" 已审计({item.MarkTime?.ToString("yyyy-MM-dd HH:mm:ss")})";
}
return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list); return new ApiResponse<List<ag_secondallot>>(ResponseType.OK, "审核列表", list);
} }
...@@ -392,6 +397,22 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request) ...@@ -392,6 +397,22 @@ public ApiResponse AuditResult([FromBody] SecondAuditRequest request)
} }
/// <summary> /// <summary>
/// 二次绩效审计
/// </summary>
/// <returns></returns>
[HttpPost]
[Route("/api/second/mark")]
public ApiResponse SecondMark([FromBody] SecondMarkRequest request)
{
if (request?.SecondIds == null || !request.SecondIds.Any())
return new ApiResponse(ResponseType.ParameterError, "参数SecondIds无效!");
var userid = claimService.GetUserId();
var result = secondAllotService.SecondMark(userid, request.SecondIds);
return result ? new ApiResponse(ResponseType.OK, "操作成功") : new ApiResponse(ResponseType.Fail, "操作失败");
}
/// <summary>
/// 护理部二次绩效审核列表 /// 护理部二次绩效审核列表
/// </summary> /// </summary>
/// <returns></returns> /// <returns></returns>
......
...@@ -1174,6 +1174,12 @@ ...@@ -1174,6 +1174,12 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.AprMark(Performance.DtoModels.AprAmountMarkRequest)">
<summary>
医院其他绩效审计
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.Import(Microsoft.AspNetCore.Http.IFormCollection)"> <member name="M:Performance.Api.Controllers.EmployeeController.Import(Microsoft.AspNetCore.Http.IFormCollection)">
<summary> <summary>
上传医院其他绩效文件 上传医院其他绩效文件
...@@ -1266,6 +1272,12 @@ ...@@ -1266,6 +1272,12 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.EmployeeController.AprMarkHide(Performance.DtoModels.AprAmountMarkRequest)">
<summary>
不公示其他绩效审计
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.EmployeeController.ImportAprHide(Microsoft.AspNetCore.Http.IFormCollection)"> <member name="M:Performance.Api.Controllers.EmployeeController.ImportAprHide(Microsoft.AspNetCore.Http.IFormCollection)">
<summary> <summary>
上传不公示其他绩效 上传不公示其他绩效
...@@ -2139,6 +2151,12 @@ ...@@ -2139,6 +2151,12 @@
</summary> </summary>
<returns></returns> <returns></returns>
</member> </member>
<member name="M:Performance.Api.Controllers.SecondAllotController.SecondMark(Performance.DtoModels.SecondMarkRequest)">
<summary>
二次绩效审计
</summary>
<returns></returns>
</member>
<member name="M:Performance.Api.Controllers.SecondAllotController.NursingDeptlist(Performance.DtoModels.AllotDeptRequest)"> <member name="M:Performance.Api.Controllers.SecondAllotController.NursingDeptlist(Performance.DtoModels.AllotDeptRequest)">
<summary> <summary>
护理部二次绩效审核列表 护理部二次绩效审核列表
......
...@@ -1918,6 +1918,9 @@ ...@@ -1918,6 +1918,9 @@
<member name="P:Performance.DtoModels.AprAmountAuditRequest.Remark"> <member name="P:Performance.DtoModels.AprAmountAuditRequest.Remark">
<summary> 备注 </summary> <summary> 备注 </summary>
</member> </member>
<member name="P:Performance.DtoModels.AprAmountMarkRequest.AllotId">
<summary> 绩效ID </summary>
</member>
<member name="P:Performance.DtoModels.Request.BatchDetail.UnitType"> <member name="P:Performance.DtoModels.Request.BatchDetail.UnitType">
<summary> <summary>
核算单元分类 核算单元分类
...@@ -2436,6 +2439,9 @@ ...@@ -2436,6 +2439,9 @@
<member name="P:Performance.DtoModels.SecondAuditRequest.Remark"> <member name="P:Performance.DtoModels.SecondAuditRequest.Remark">
<summary> 备注 </summary> <summary> 备注 </summary>
</member> </member>
<member name="P:Performance.DtoModels.SecondMarkRequest.SecondIds">
<summary> 二次绩效Id </summary>
</member>
<member name="T:Performance.DtoModels.SetDepartmentRequest"> <member name="T:Performance.DtoModels.SetDepartmentRequest">
<summary> <summary>
登录请求 登录请求
......
...@@ -1070,11 +1070,6 @@ ...@@ -1070,11 +1070,6 @@
二次绩效列表 二次绩效列表
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.ag_secondallot.Id">
<summary>
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.AllotId"> <member name="P:Performance.EntityModels.ag_secondallot.AllotId">
<summary> <summary>
绩效ID 绩效ID
...@@ -1115,26 +1110,6 @@ ...@@ -1115,26 +1110,6 @@
预发金额 预发金额
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.ag_secondallot.Efficiency">
<summary>
效率绩效
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.Scale">
<summary>
规模绩效
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.Grant">
<summary>
发放系数
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.ShouldGiveFee">
<summary>
应发管理绩效
</summary>
</member>
<member name="P:Performance.EntityModels.ag_secondallot.Status"> <member name="P:Performance.EntityModels.ag_secondallot.Status">
<summary> <summary>
状态 1 未提交 2 等待审核 3 审核通过 4 驳回 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
...@@ -1190,6 +1165,11 @@ ...@@ -1190,6 +1165,11 @@
夜班绩效 夜班绩效
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.ag_secondallot.MarkStatus">
<summary>
审计状态 1 已审计
</summary>
</member>
<member name="T:Performance.EntityModels.ag_temp"> <member name="T:Performance.EntityModels.ag_temp">
<summary> <summary>
二次绩效模板 二次绩效模板
...@@ -6040,6 +6020,11 @@ ...@@ -6040,6 +6020,11 @@
验证失败描述 验证失败描述
</summary> </summary>
</member> </member>
<member name="P:Performance.EntityModels.per_apr_amount.MarkStatus">
<summary>
审计状态 1 已审计
</summary>
</member>
<member name="T:Performance.EntityModels.per_apr_amount_hide"> <member name="T:Performance.EntityModels.per_apr_amount_hide">
<summary> <summary>
医院其他绩效 医院其他绩效
......
...@@ -134,6 +134,7 @@ public enum Role ...@@ -134,6 +134,7 @@ public enum Role
数据收集 = 11, 数据收集 = 11,
护理部审核 = 12, 护理部审核 = 12,
绩效查询 = 13, 绩效查询 = 13,
审计 = 14,
} }
public class Background public class Background
......
using FluentValidation;
using System;
using System.Collections.Generic;
using System.Text;
namespace Performance.DtoModels
{
public class AprAmountMarkRequest
{
/// <summary> 绩效ID </summary>
public int AllotId { get; set; }
public string[] TypeInDepartments { get; set; }
}
}
namespace Performance.DtoModels
{
public class SecondMarkRequest
{
/// <summary> 二次绩效Id </summary>
public int[] SecondIds { get; set; }
}
}
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace Performance.DtoModels.Response
{
public class OhterAmountAuditResponse
{
public string TypeInDepartment { get; set; }
public decimal Amount { get; set; }
public int? Status { get; set; }
public string AuditTime { get; set; }
public string Remark { get; set; }
}
}
...@@ -15,9 +15,6 @@ namespace Performance.EntityModels ...@@ -15,9 +15,6 @@ namespace Performance.EntityModels
[Table("ag_secondallot")] [Table("ag_secondallot")]
public class ag_secondallot public class ag_secondallot
{ {
/// <summary>
///
/// </summary>
[Key] [Key]
public int Id { get; set; } public int Id { get; set; }
...@@ -60,25 +57,25 @@ public class ag_secondallot ...@@ -60,25 +57,25 @@ public class ag_secondallot
/// 预发金额 /// 预发金额
/// </summary> /// </summary>
public Nullable<decimal> PreRealGiveFee { get; set; } public Nullable<decimal> PreRealGiveFee { get; set; }
/// <summary> ///// <summary>
/// 效率绩效 ///// 效率绩效
/// </summary> ///// </summary>
public Nullable<decimal> Efficiency { get; set; } //public Nullable<decimal> Efficiency { get; set; }
/// <summary> ///// <summary>
/// 规模绩效 ///// 规模绩效
/// </summary> ///// </summary>
public Nullable<decimal> Scale { get; set; } //public Nullable<decimal> Scale { get; set; }
/// <summary> ///// <summary>
/// 发放系数 ///// 发放系数
/// </summary> ///// </summary>
public Nullable<decimal> Grant { get; set; } //public Nullable<decimal> Grant { get; set; }
/// <summary> ///// <summary>
/// 应发管理绩效 ///// 应发管理绩效
/// </summary> ///// </summary>
public Nullable<decimal> ShouldGiveFee { get; set; } //public Nullable<decimal> ShouldGiveFee { get; set; }
/// <summary> /// <summary>
/// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回 /// 状态 1 未提交 2 等待审核 3 审核通过 4 驳回
...@@ -134,5 +131,12 @@ public class ag_secondallot ...@@ -134,5 +131,12 @@ public class ag_secondallot
/// 夜班绩效 /// 夜班绩效
/// </summary> /// </summary>
public Nullable<decimal> NightShiftWorkPerforFee { get; set; } public Nullable<decimal> NightShiftWorkPerforFee { get; set; }
/// <summary>
/// 审计状态 1 已审计
/// </summary>
public Nullable<int> MarkStatus { get; set; }
public Nullable<int> MarkUser { get; set; }
public Nullable<DateTime> MarkTime { get; set; }
} }
} }
...@@ -95,5 +95,11 @@ public class per_apr_amount ...@@ -95,5 +95,11 @@ public class per_apr_amount
/// 验证失败描述 /// 验证失败描述
/// </summary> /// </summary>
public string VerifyMessage { get; set; } public string VerifyMessage { get; set; }
/// <summary>
/// 审计状态 1 已审计
/// </summary>
public Nullable<int> MarkStatus { get; set; }
public Nullable<int> MarkUser { get; set; }
public Nullable<DateTime> MarkTime { get; set; }
} }
} }
...@@ -90,5 +90,11 @@ public class per_apr_amount_hide ...@@ -90,5 +90,11 @@ public class per_apr_amount_hide
/// 验证失败描述 /// 验证失败描述
/// </summary> /// </summary>
public string VerifyMessage { get; set; } public string VerifyMessage { get; set; }
/// <summary>
/// 审计状态 1 已审计
/// </summary>
public Nullable<int> MarkStatus { get; set; }
public Nullable<int> MarkUser { get; set; }
public Nullable<DateTime> MarkTime { get; set; }
} }
} }
...@@ -434,7 +434,8 @@ public List<per_apr_amount> GetAprList(int allotId, int userId) ...@@ -434,7 +434,8 @@ public List<per_apr_amount> GetAprList(int allotId, int userId)
if (userrole == null) throw new PerformanceException("用户未绑定角色"); if (userrole == null) throw new PerformanceException("用户未绑定角色");
var list = new List<per_apr_amount>(); var list = new List<per_apr_amount>();
if (new int[] { 1, 2, 5, 6 }.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据 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); list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0);
else else
list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId); list = perapramountRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId);
...@@ -582,6 +583,37 @@ public ApiResponse ConfirmAudit(int userid, AprAmountAuditRequest request) ...@@ -582,6 +583,37 @@ public ApiResponse ConfirmAudit(int userid, AprAmountAuditRequest request)
} }
return new ApiResponse(ResponseType.OK, ""); return new ApiResponse(ResponseType.OK, "");
} }
/// <summary>
/// 医院其他绩效审计
/// </summary>
/// <param name="userid"></param>
/// <param name="request"></param>
/// <returns></returns>
public ApiResponse AprMark(int userid, AprAmountMarkRequest request)
{
List<Dictionary<string, string>> error = new List<Dictionary<string, string>>();
if (request?.TypeInDepartments == null || !request.TypeInDepartments.Any())
throw new PerformanceException("审计信息无效,请确认");
var allApramounts = perapramountRepository.GetEntities(t => t.AllotId == request.AllotId);
foreach (var department in request.TypeInDepartments)
{
var apramounts = allApramounts?.Where(t => t.TypeInDepartment == department);
if (apramounts != null && apramounts.Any())
{
foreach (var item in apramounts)
{
item.MarkStatus = 1;
item.MarkUser = userid;
item.MarkTime = DateTime.Now;
perapramountRepository.UpdateRange(apramounts.ToArray());
}
}
}
return new ApiResponse(ResponseType.OK, "");
}
/// <summary> /// <summary>
/// 上传导入医院其他绩效 /// 上传导入医院其他绩效
/// </summary> /// </summary>
...@@ -594,7 +626,8 @@ public string ImpoerAprEmployees(int allotid, string path, int userid) ...@@ -594,7 +626,8 @@ public string ImpoerAprEmployees(int allotid, string path, int 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>();
if (new int[] { 1, 2, 5 }.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据 var roles = new int[] { (int)Role.绩效管理员, (int)Role.医院管理员, (int)Role.绩效核算办, (int)Role.院领导, (int)Role.审计 };
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);
...@@ -862,7 +895,9 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId) ...@@ -862,7 +895,9 @@ public List<per_apr_amount_hide> GetAprHideList(int allotId, int userId)
if (userrole == null) throw new PerformanceException("用户未绑定角色"); if (userrole == null) throw new PerformanceException("用户未绑定角色");
var list = new List<per_apr_amount_hide>(); var list = new List<per_apr_amount_hide>();
if (new int[] { 1, 2, 5, 6 }.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办、院领导查看所有科室的数据
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); list = _hideRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0);
else else
list = _hideRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId); list = _hideRepository.GetEntities(t => t.AllotId == allotId && (t.Amount ?? 0) != 0 && t.CreateUser == userId);
...@@ -1007,6 +1042,36 @@ public ApiResponse ConfirmAuditHide(int userid, AprAmountAuditRequest request) ...@@ -1007,6 +1042,36 @@ public ApiResponse ConfirmAuditHide(int userid, AprAmountAuditRequest request)
} }
return new ApiResponse(ResponseType.OK, ""); return new ApiResponse(ResponseType.OK, "");
} }
/// <summary>
/// 不公示其他绩效审计
/// </summary>
/// <param name="userid"></param>
/// <param name="request"></param>
/// <returns></returns>
public ApiResponse AprMarkHide(int userid, AprAmountMarkRequest request)
{
List<Dictionary<string, string>> error = new List<Dictionary<string, string>>();
if (request?.TypeInDepartments == null || !request.TypeInDepartments.Any())
throw new PerformanceException("审计信息无效,请确认");
var allApramounts = _hideRepository.GetEntities(t => t.AllotId == request.AllotId);
foreach (var department in request.TypeInDepartments)
{
var apramounts = allApramounts?.Where(t => t.TypeInDepartment == department);
if (apramounts != null && apramounts.Any())
{
foreach (var item in apramounts)
{
item.MarkStatus = 1;
item.MarkUser = userid;
item.MarkTime = DateTime.Now;
_hideRepository.UpdateRange(apramounts.ToArray());
}
}
}
return new ApiResponse(ResponseType.OK, "");
}
/// <summary> /// <summary>
/// 上传导入医院其他绩效 /// 上传导入医院其他绩效
...@@ -1020,7 +1085,8 @@ public void ImpoerAprHideEmployees(int allotid, string path, int userid) ...@@ -1020,7 +1085,8 @@ public void ImpoerAprHideEmployees(int allotid, string path, int 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>();
if (new int[] { 1, 2, 5 }.Contains(userrole.RoleID)) // 绩效管理员、医院管理员、绩效核算办查看所有科室的数据 var roles = new int[] { (int)Role.绩效管理员, (int)Role.医院管理员, (int)Role.绩效核算办, (int)Role.院领导, (int)Role.审计 };
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);
......
...@@ -1742,6 +1742,26 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request) ...@@ -1742,6 +1742,26 @@ public bool ConfirmAudit(int userId, SecondAuditRequest request)
return result; return result;
} }
/// <summary>
/// 审计
/// </summary>
/// <param name="userId"></param>
/// <param name="secondIds"></param>
/// <returns></returns>
public bool SecondMark(int userId, int[] secondIds)
{
var seconds = agsecondallotRepository.GetEntities(t => secondIds.Contains(t.Id));
if (seconds == null || !seconds.Any())
throw new PerformanceException("未能找到二次分配核算记录!");
foreach (var item in seconds)
{
item.MarkStatus = 1;
item.MarkUser = userId;
item.MarkTime = DateTime.Now;
}
return agsecondallotRepository.UpdateRange(seconds.ToArray());
}
///// <summary> ///// <summary>
///// 审核结束 添加至二次绩效汇总 ///// 审核结束 添加至二次绩效汇总
///// </summary> ///// </summary>
......
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