Commit 1987d1a7 by lcx

修改提取日志

parent dd95d912
......@@ -62,12 +62,12 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
var types = extypeRepository.GetEntities(t => t.HospitalId == hospitalId && new int[] { (int)SheetType.Employee, (int)SheetType.OnlyExtract }.Contains(t.Source));
if (types != null && types.Any())
{
logService.ReturnTheLog(allot.ID, groupName, 2, "提取数据", $"提取人员信息数据", isSingle: isSingle);
var scripts = exscriptRepository.GetEntities(t => types.Select(s => s.Id).Contains(t.TypeId) && t.IsEnable == 1);
if (scripts != null && scripts.Any())
{
if (types.Any(t => t.Source == (int)SheetType.Employee)) //人员字典抽取配置
{
logService.ReturnTheLog(allot.ID, groupName, 2, "提取数据", $"提取人员信息数据", isSingle: isSingle);
var typeIds = types.Where(t => t.Source == (int)SheetType.Employee).Select(t => t.Id);
var script = scripts.FirstOrDefault(t => typeIds.Contains(t.TypeId));
if (script != null)
......@@ -75,6 +75,7 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
}
if (types.Any(t => t.Source == (int)SheetType.OnlyExtract)) //不写入Excel的提取数据
{
logService.ReturnTheLog(allot.ID, groupName, 2, "提取数据", $"提取通用工作量数据", isSingle: isSingle);
foreach (var type in types.Where(t => t.Source == (int)SheetType.OnlyExtract))
{
var thisTypeScripts = scripts.Where(t => t.TypeId == type.Id);
......@@ -82,6 +83,7 @@ public void Handler(int hospitalId, per_allot allot, string groupName, bool isSi
foreach (var script in thisTypeScripts)
{
logger.LogInformation($"提取sql: {script.ExecScript}");
ExResult(allot, configs.FirstOrDefault(t => t.Id == script.ConfigId), script.ExecScript, type.EName);
}
}
......
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