package thyyxxk.webserver.controller.reports;


import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.validation.annotation.Validated;
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.RestController;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.querydata.InquiryOfConsultationFee;
import thyyxxk.webserver.service.reports.InquiryOfConsultationFeeService;

import javax.servlet.http.HttpServletResponse;
import java.util.Map;

/**
 * @author 肖蟾
 * @description: 医嘱修改
 */
@RestController
@RequestMapping("/queryData")
public class InquiryOfConsultationFeeController {

    private final InquiryOfConsultationFeeService server;

    @Autowired
    public InquiryOfConsultationFeeController(InquiryOfConsultationFeeService server) {
        this.server = server;
    }

    @PostMapping("InquiryOfConsultationFee")
    public ResultVo<Map<String, Object>> inquiryOfConsultationFee(@RequestBody InquiryOfConsultationFee param) {
        return server.inquiryOfConsultationFee(param);
    }

    @PostMapping("/ExportConsultationFee")
    public void exportExcel(HttpServletResponse response,
                            @RequestBody @Validated InquiryOfConsultationFee param) {
        server.exportExcel(response, param);
    }
}
