Commit 32f2250b by lcx

修改判断条件

parent 02c4f684
......@@ -274,8 +274,8 @@ public bool Applicat(CostTransferRequest request)
if (request.Adopted.Department == request.Applicant.Department && request.Adopted.UnitType == request.Applicant.UnitType)
throw new PerformanceException("参数错误,提交科室相同");
var item = request.Items.Where(t => string.IsNullOrEmpty(t.Source) || string.IsNullOrEmpty(t.Category));
if (item.Count() > 0) throw new PerformanceException("参数错误,申请信息填写不完整");
if (request.Items.Any(t => string.IsNullOrEmpty(t.Category))
|| request.Items.Any(t => t.IsUseRatio == 1 && string.IsNullOrEmpty(t.Source))) throw new PerformanceException("参数错误,申请信息填写不完整");
var allot = perallotRepository.GetEntity(t => t.ID == request.AllotId);
var allotStatus = new[] { (int)AllotStates.GenerateSucceed, (int)AllotStates.Archive };
......
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