新增绩效年月列表

parent d4048578
......@@ -15,19 +15,37 @@ namespace Performance.Api.Controllers
[Route("api/report")]
public class ReportController : Controller
{
private AllotService allotService;
private ReportService reportService;
private readonly ReportDataService reportDataService;
private ReportDataService reportDataService;
private ClaimService claimService;
public ReportController(
ClaimService claimService,
AllotService allotService,
ReportService reportService,
ReportDataService reportDataService)
{
this.allotService = allotService;
this.reportService = reportService;
this.reportDataService = reportDataService;
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")]
[HttpPost]
public ApiResponse Selection([FromBody]SelectionRequest report)
......
......@@ -5,6 +5,10 @@
namespace Performance.DtoModels
{
public class HospitalIdRequest
{
public int HospitalId { get; set; }
}
public class SelectionRequest
{
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