Commit b3f6e8c3 by ruyun.zhang@suvalue.com

Merge branch 'feature/userextract' into feature/dongfang

parents 8b824519 0c6d3a67
......@@ -1810,6 +1810,11 @@
是否可以下载
</summary>
</member>
<member name="P:Performance.DtoModels.AllotResponse.HasConfig">
<summary>
3 提取数据
</summary>
</member>
<member name="P:Performance.DtoModels.AssessDataResponse.AssessID">
<summary>
考核类别ID
......
......@@ -57,5 +57,9 @@ public class AllotResponse
/// 是否可以下载
/// </summary>
public bool IsDown { get; set; }
/// <summary>
/// 3 提取数据
/// </summary>
public int HasConfig { get; set; }
}
}
......@@ -35,6 +35,7 @@ public class AllotService : IAutoInjection
private PerforLogcheckRepository perforLogcheckRepository;
private readonly PerforHospitalRepository perforHospitalRepository;
private readonly PerforResbaiscnormRepository perforResbaiscnormRepository;
private PerforHospitalconfigRepository perforHospitalconfigRepository;
//private readonly IHubContext<AllotLogHub> hubContext;
private readonly LogManageService logManageService;
......@@ -55,6 +56,7 @@ public class AllotService : IAutoInjection
PerforLogcheckRepository perforLogcheckRepository,
PerforHospitalRepository perforHospitalRepository,
PerforResbaiscnormRepository perforResbaiscnormRepository,
PerforHospitalconfigRepository perforHospitalconfigRepository,
//IHubContext<AllotLogHub> hubContext
LogManageService logManageService,
ReportService reportService)
......@@ -75,6 +77,7 @@ public class AllotService : IAutoInjection
this.perforLogcheckRepository = perforLogcheckRepository;
this.perforHospitalRepository = perforHospitalRepository;
this.perforResbaiscnormRepository = perforResbaiscnormRepository;
this.perforHospitalconfigRepository = perforHospitalconfigRepository;
//this.hubContext = hubContext;
this.logManageService = logManageService;
this.reportService = reportService;
......@@ -92,12 +95,15 @@ public List<AllotResponse> GetAllotList(int? hospitalId)
throw new PerformanceException("hospitalId无效");
var allotList = _allotRepository.GetEntities(t => t.HospitalId == hospitalId);
allotList = allotList == null ? allotList : allotList.OrderByDescending(t => t.ID).ToList();
var isconfig = perforHospitalconfigRepository.GetEntity(t => t.HospitalId == hospitalId) == null ? false : true;
var reuslt = Mapper.Map<List<AllotResponse>>(allotList);
reuslt?.ForEach(t =>
{
t.IsDown = !string.IsNullOrEmpty(t.ExtractPath);
if (!string.IsNullOrEmpty(t.ExtractPath))
t.ExtractPath = t.ExtractPath.Replace(options.Value.AbsolutePath, options.Value.HttpPath).Replace("\\", "/");
t.HasConfig = isconfig ? 3 : 0;
});
return reuslt;
}
......
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