Commit 34ffa4da by lcx

返回消息修改

parent 0de87fec
......@@ -170,8 +170,6 @@ public List<ExtractConfigResponse> GetExtractTypeAndScript(int hospitalId)
}).OrderBy(t => t.Source).ToList();
if (result == null || !result.Any()) return new List<ExtractConfigResponse>();
if (result.Any(t => t.Value == (int)SheetType.Employee)) result.First(w => w.Value == (int)SheetType.Employee).Title = "HRP人员";
var list = mapper.Map<List<ExtractConfigResponse>>(data);
var scripts = exscriptRepository.GetEntities(w => data.Select(x => x.Id).Contains(w.TypeId)) ?? new List<ex_script>();
var configs = hospitalconfigRepository.GetEntities(w => w.HospitalId == hospitalId) ?? new List<sys_hospitalconfig>();
......@@ -362,7 +360,7 @@ public dynamic ExecsqlAndGetResult(ConsumeTimeRequest request)
script.Description = ex.Message;
}
throw new PerformanceException("查询语句时发生异常");
throw new PerformanceException(ex.Message);
}
finally
{
......@@ -405,11 +403,14 @@ public static List<TitleValue<int>> GetSheettypes()
(int)SheetType.OnlyExtract
};
var list = EnumHelper.GetItems<SheetType>().Where(w => showItems.Contains(w.Value));
return list.Select(t => new TitleValue<int>
var data = list.Select(t => new TitleValue<int>
{
Title = t.Description,
Value = t.Value
}).ToList();
data.First(w => w.Value == (int)SheetType.Employee).Title = "HRP人员";
return data;
}
public List<TitleValue<int>> GetExTypes(int hospitalId)
......
......@@ -198,7 +198,11 @@ private List<ex_result> ExtractModuleData(per_allot allot, string groupName, boo
foreach (var script in scripts.Where(t => t.TypeId == typeId))
{
var config = configs.FirstOrDefault(t => t.Id == script.ConfigId);
if (config == null) continue;
if (config == null)
{
logService.ReturnTheLog(allot.ID, groupName, 2, "提取数据", $"未正确配置数据库连接", 2, isSingle);
continue;
}
try
{
......@@ -272,7 +276,12 @@ private List<ex_result> ExtractItemData(per_allot allot, string groupName, bool
foreach (var script in scripts.Where(t => t.TypeId == typeId))
{
var config = configs.FirstOrDefault(t => t.Id == script.ConfigId);
if (config == null) continue;
if (config == null)
{
logService.ReturnTheLog(allot.ID, groupName, 2, "提取数据", $"未正确配置数据库连接", 2, isSingle);
continue;
}
try
{
var querydata = QueryData<ExtractDto>(config, script.ExecScript, allot, isSingle);
......@@ -342,7 +351,12 @@ private List<ex_result> ExtractSpecialData(per_allot allot, string groupName, bo
foreach (var script in scripts.Where(t => t.TypeId == typeId))
{
var config = configs.FirstOrDefault(t => t.Id == script.ConfigId);
if (config == null) continue;
if (config == null)
{
logService.ReturnTheLog(allot.ID, groupName, 2, "提取数据", $"未正确配置数据库连接", 2, isSingle);
continue;
}
try
{
var querydata = QueryData<ExtractDto>(config, script.ExecScript, allot, isSingle);
......
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