package thyyxxk.webserver.controller.dashboard;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.dashboard.InpatientBrief;
import thyyxxk.webserver.service.dashboard.DashboardService;

import java.util.List;

@RestController
@RequestMapping("/dashboard")
public class DashboardController {
    private final DashboardService service;

    @Autowired
    public DashboardController(DashboardService service) {
        this.service = service;
    }

    @GetMapping("/selectInpatientBriefs")
    public ResultVo<List<InpatientBrief>> selectInpatientBriefs(@RequestParam("deptCode") String deptCode) {
        return service.selectInpatientBriefs(deptCode);
    }

}
