package thyyxxk.webserver.controller.highreport;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PostMapping;
import org.springframework.web.bind.annotation.RequestBody;
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.highreport.HighReportDto;
import thyyxxk.webserver.service.highreport.DeptBusinessService;

import java.util.Map;

/**
 * @ClassName DeptBusinessController
 * @Author hsh
 * @Date 2025/4/2 15:35
 * @Version 1.0
 * @Description 科室经营报表
 **/
@RestController
@RequestMapping("/deptBusiness")
public class DeptBusinessController {

    private final DeptBusinessService service;

    @Autowired
    public DeptBusinessController(DeptBusinessService service) {
        this.service = service;
    }

    @GetMapping("/selectReportTypeList")
    public ResultVo<Map<String, Object>> selectReportTypeList(@RequestParam("flag") String flag){
        return service.selectReportTypeList(flag);
    }

    @PostMapping("/selectDeptReportList")
    public ResultVo<Map<String, Object>> selectDeptReportList(@RequestBody @Validated HighReportDto dto){
        return service.selectDeptReportList(dto);
    }

}
