Commit 725c5e5b by 纪旭 韦

新增用户的粘贴数据添加“未找到分配医院”的错误信息

parent 02e18942
...@@ -782,6 +782,9 @@ public string SaveUserHandsFlat(UserCollectData request) ...@@ -782,6 +782,9 @@ public string SaveUserHandsFlat(UserCollectData request)
{ {
if (item == null) return "必填项为空"; if (item == null) return "必填项为空";
var HospitalId = hospitals.FirstOrDefault(w => w.HosName == item)?.ID; var HospitalId = hospitals.FirstOrDefault(w => w.HosName == item)?.ID;
if (HospitalId == null) return "未找到分配医院";
var allot = _perallotRepository.GetEntities(t => t.HospitalId == HospitalId); var allot = _perallotRepository.GetEntities(t => t.HospitalId == HospitalId);
var accountingUnits = accounts?.Join(allot, t => t.AllotId, w => w.ID, (t, w) => t.AccountingUnit).Distinct().ToList(); var accountingUnits = accounts?.Join(allot, t => t.AllotId, w => w.ID, (t, w) => t.AccountingUnit).Distinct().ToList();
res.Add(item, accountingUnits); res.Add(item, accountingUnits);
......
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