Commit 67e9a4a3 by lcx

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

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