文案修改

parent e7a7edb4
......@@ -642,8 +642,20 @@ public ApiResponse SaveReportPersonTag(int hospitalId, int allotId, int userId,
{
index++;
if (!item.ContainsKey("PersonnelNumber") || string.IsNullOrEmpty(item["PersonnelNumber"]))
if (item.TryGetValue("PersonnelNumber", out string personnelNumber) && string.IsNullOrEmpty(personnelNumber))
{
if (item.Values.Any(w => !string.IsNullOrEmpty(w)))
{
error.Add(new Dictionary<string, string>
{
{ "行号", $"第{index}行" },
{ "人员工号", item["PersonnelNumber"] },
{ "姓名", item["DoctorName"] },
{ "错误原因", "“人员工号”不存在请删除" },
});
}
continue;
}
var employee = employees.FirstOrDefault(t => t.PersonnelNumber == item["PersonnelNumber"]);
if (employee == null)
{
......@@ -652,8 +664,7 @@ public ApiResponse SaveReportPersonTag(int hospitalId, int allotId, int userId,
{ "行号", $"第{index}行" },
{ "人员工号", item["PersonnelNumber"] },
{ "姓名", item["DoctorName"] },
{ "来源", "人员标签配置" },
{ "错误原因", "“人员工号不存在”请删除" },
{ "错误原因", "“人员工号”不存在请删除" },
});
continue;
}
......@@ -664,8 +675,7 @@ public ApiResponse SaveReportPersonTag(int hospitalId, int allotId, int userId,
{ "行号", $"第{index}行" },
{ "人员工号", item["PersonnelNumber"] },
{ "姓名", item["DoctorName"] },
{ "来源", "人员标签配置" },
{ "错误原因", "“姓名与字典不一致”请修改" },
{ "错误原因", "“姓名”字典不一致请修改" },
});
continue;
}
......@@ -716,7 +726,6 @@ public ApiResponse SaveReportPersonTag(int hospitalId, int allotId, int userId,
newTags.Add(tdata);
#endregion
}
if (error.Count > 0)
return new ApiResponse(ResponseType.WarningTable, "验证不通过,当前操作已拒绝", error);
......
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