新增绩效年月列表

parent d4048578
...@@ -15,19 +15,37 @@ namespace Performance.Api.Controllers ...@@ -15,19 +15,37 @@ namespace Performance.Api.Controllers
[Route("api/report")] [Route("api/report")]
public class ReportController : Controller public class ReportController : Controller
{ {
private AllotService allotService;
private ReportService reportService; private ReportService reportService;
private readonly ReportDataService reportDataService; private ReportDataService reportDataService;
private ClaimService claimService; private ClaimService claimService;
public ReportController( public ReportController(
ClaimService claimService, ClaimService claimService,
AllotService allotService,
ReportService reportService, ReportService reportService,
ReportDataService reportDataService) ReportDataService reportDataService)
{ {
this.allotService = allotService;
this.reportService = reportService; this.reportService = reportService;
this.reportDataService = reportDataService; this.reportDataService = reportDataService;
this.claimService = claimService; this.claimService = claimService;
} }
[Route("rank")]
[HttpPost]
public ApiResponse Rank([FromBody]HospitalIdRequest request)
{
var allots = allotService.GetAllotList(request.HospitalId);
int[] states = new int[] { 6, 8 };
var result = allots.Where(w => states.Contains(w.States))
.Select(w => new { w.Year, w.Month })
.OrderByDescending(w => w.Year)
.ThenByDescending(w => w.Month);
return new ApiResponse(ResponseType.OK, result);
}
[Route("selection")] [Route("selection")]
[HttpPost] [HttpPost]
public ApiResponse Selection([FromBody]SelectionRequest report) public ApiResponse Selection([FromBody]SelectionRequest report)
......
...@@ -5,6 +5,10 @@ ...@@ -5,6 +5,10 @@
namespace Performance.DtoModels namespace Performance.DtoModels
{ {
public class HospitalIdRequest
{
public int HospitalId { get; set; }
}
public class SelectionRequest public class SelectionRequest
{ {
public int GroupId { get; set; } public int GroupId { get; set; }
......
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