Commit c563119a by ruyun.zhang@suvalue.com

Merge remote-tracking branch 'origin/develop' into develop

parents b0119dbe 86f7f5bb
......@@ -762,8 +762,6 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
var hosConfig = hospitalconfigRepository.GetEntities(t => scriptConfig.Contains(t.Id));
if (hosConfig == null) return null;
Dictionary<string, object> paramtemers = new Dictionary<string, object>();
StringBuilder stringBuilder = new StringBuilder();
List<string> deparmants = new List<string>();
List<string> drugs = new List<string>();
List<per_dept_dic> deptList = new List<per_dept_dic>();
......@@ -820,21 +818,27 @@ public string Judge(int allotId, int hospitalId, int useTemplate, ref bool isSin
}
}
bool hasErrors = false;
Dictionary<string, object> paramtemers = new Dictionary<string, object>();
StringBuilder stringBuilder = new StringBuilder();
if (deparmants != null && deparmants.Any())
{
var distinctedDept = deptList.ToDistinct().ToList();
distinctedDept.ForEach(t => t.CreateTime = DateTime.Now); //在去重前添加时间,可能造成时间不一致,无法去重
perdeptdicRepository.AddRange(distinctedDept.ToArray());
stringBuilder.AppendLine($"新增科室:{string.Join(",", deparmants.Distinct())}");
hasErrors = true;
}
if (drugs != null && drugs.Any())
{
cofdrugtypeRepository.AddRange(drugTypeList.ToDistinct().ToArray());
stringBuilder.AppendLine($"新增费用类型:{string.Join(",", drugs.Distinct())}");
hasErrors = true;
}
paramtemers.Add("新增科室或费用类型", stringBuilder.ToString());
if (hasErrors)
paramtemers.Add("新增科室或费用类型", stringBuilder.ToString());
return paramtemers;
}
......
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