Commit 6b93e79f by lcx

其他绩效驳回时,去除校验

parent 094634d6
...@@ -502,20 +502,23 @@ public bool DeleteApr(int id) ...@@ -502,20 +502,23 @@ 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 || !request.Members.Any()) if (request.IsPass == 1)
throw new PerformanceException("审核信息无效,请确认");
foreach (var item in request.Members)
{ {
if (string.IsNullOrEmpty(item.DoctorName) && string.IsNullOrEmpty(item.PersonnelNumber)) if (request?.Members == null || !request.Members.Any())
throw new PerformanceException("审核信息无效,请确认"); throw new PerformanceException("审核信息无效,请确认");
foreach (var item in request.Members)
{
if (string.IsNullOrEmpty(item.DoctorName) && string.IsNullOrEmpty(item.PersonnelNumber))
throw new PerformanceException("审核信息无效,请确认");
}
} }
var allApramounts = perapramountRepository.GetEntities(t => t.AllotId == request.AllotId); var allApramounts = perapramountRepository.GetEntities(t => t.AllotId == request.AllotId);
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 || !apramounts.Any()) if (request.IsPass == 1 && (apramounts == null || !apramounts.Any()))
throw new PerformanceException($"工号为“{member.PersonnelNumber}”的审核信息无效,请确认"); throw new PerformanceException($"工号为“{member.PersonnelNumber}”的审核信息无效,请确认");
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