Commit 67e9a4a3 by lcx

其他绩效审核修改判断条件

parent dddb73c3
......@@ -502,7 +502,7 @@ public bool DeleteApr(int id)
/// <returns></returns>
public bool ConfirmAudit(int userid, AprAmountAuditRequest request)
{
if (request?.Members == null)
if (request?.Members == null || !request.Members.Any())
throw new PerformanceException("审核信息无效,请确认");
foreach (var item in request.Members)
......@@ -515,8 +515,8 @@ public bool ConfirmAudit(int userid, AprAmountAuditRequest request)
foreach (var member in request.Members)
{
var apramounts = allApramounts?.Where(t => (t.DoctorName ?? "") == member.DoctorName && (t.PersonnelNumber ?? "") == member.PersonnelNumber);
if (apramounts == null)
throw new PerformanceException("审核信息无效,请确认");
if (apramounts == null || !apramounts.Any())
throw new PerformanceException($"工号为“{member.PersonnelNumber}”的审核信息无效,请确认");
foreach (var item in apramounts)
{
......@@ -665,7 +665,7 @@ public List<TitleValue> GetPerforTypeDict(int allotId)
/// </summary>
/// <param name="allotId"></param>
/// <returns></returns>
public List<Dictionary<string, string>> GetOtherPerStats(int allotId, string department=null)
public List<Dictionary<string, string>> GetOtherPerStats(int allotId, string department = null)
{
var others = new List<Dictionary<string, string>>();
var aprAmountList = perapramountRepository.GetFullAmount(w => w.AllotId == allotId && w.Status == 3);
......@@ -894,7 +894,7 @@ public bool DeleteAprHide(int id)
/// <returns></returns>
public bool ConfirmAuditHide(int userid, AprAmountAuditRequest request)
{
if (request?.Members == null)
if (request?.Members == null || !request.Members.Any())
throw new PerformanceException("审核信息无效,请确认");
foreach (var item in request.Members)
......@@ -907,7 +907,7 @@ public bool ConfirmAuditHide(int userid, AprAmountAuditRequest request)
foreach (var member in request.Members)
{
var apramounts = allApramounts?.Where(t => (t.DoctorName ?? "") == member.DoctorName && (t.PersonnelNumber ?? "") == member.PersonnelNumber);
if (apramounts == null)
if (apramounts == null || !apramounts.Any())
throw new PerformanceException("审核信息无效,请确认");
foreach (var item in apramounts)
......
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