录入科室验证

parent 71e669b7
...@@ -1461,7 +1461,7 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather) ...@@ -1461,7 +1461,7 @@ public void CheckGatherData(int allotId, SaveGatherData saveGather)
var departments = perdeptdicRepository.GetEntities(w => w.HospitalId == allot.HospitalId); var departments = perdeptdicRepository.GetEntities(w => w.HospitalId == allot.HospitalId);
if (departments == null || !departments.Any()) throw new PerformanceException("未配置科室字典"); if (departments == null || !departments.Any()) throw new PerformanceException("未配置科室字典");
var notExistsDeptData = data.Where(w => !departments.Select(t => t.Department).Contains(w[0])); var notExistsDeptData = data.Where(w => !departments.Select(t => t.HISDeptName).Contains(w[0]));
if (notExistsDeptData != null && notExistsDeptData.Any()) if (notExistsDeptData != null && notExistsDeptData.Any())
throw new PerformanceException($"科室字典中不存在科室[{string.Join(",", notExistsDeptData.Select(t => t[0]).Distinct())}]"); throw new PerformanceException($"科室字典中不存在科室[{string.Join(",", notExistsDeptData.Select(t => t[0]).Distinct())}]");
......
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