Commit 8d0a7b15 by 李承祥

获取绩效列表

parent e3528a8d
...@@ -47,4 +47,6 @@ ...@@ -47,4 +47,6 @@
</Content> </Content>
</ItemGroup> </ItemGroup>
<ProjectExtensions><VisualStudio><UserProperties appsettings_1json__JSONSchema="" /></VisualStudio></ProjectExtensions>
</Project> </Project>
...@@ -58,10 +58,10 @@ public class AllotService : IAutoInjection ...@@ -58,10 +58,10 @@ public class AllotService : IAutoInjection
/// <returns></returns> /// <returns></returns>
public List<AllotResponse> GetAllotList(int? hospitalId) public List<AllotResponse> GetAllotList(int? hospitalId)
{ {
var allotList = (hospitalId.HasValue && hospitalId.Value > 0) if (!hospitalId.HasValue || hospitalId.Value <= 0)
? _allotRepository.GetEntities(t => t.HospitalId == hospitalId).OrderByDescending(t => t.ID).ToList() throw new PerformanceException("hospitalId无效");
: _allotRepository.GetEntities().OrderByDescending(t => t.ID).ToList(); var allotList = _allotRepository.GetEntities(t => t.HospitalId == hospitalId);
allotList = allotList == null ? allotList : allotList.OrderByDescending(t => t.ID).ToList();
return Mapper.Map<List<AllotResponse>>(allotList); return Mapper.Map<List<AllotResponse>>(allotList);
} }
......
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