package thyyxxk.webserver.controller.medicalinsurance.costcontrol;

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.medicalinsurance.costcontrol.YbkfShareDto;
import thyyxxk.webserver.service.medicalinsurance.costcontrol.YbCssTjService;

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

/**
 * @ClassName YbCssybTjController
 * @Description 长沙市医保数据统计
 * @Author hsh
 * @Date 2022/8/31 8:38
 **/
@RestController
@RequestMapping("/cssYbTj")
public class YbCssTjController {

    private final YbCssTjService service;

    @Autowired
    public YbCssTjController(YbCssTjService service) {
        this.service = service;
    }

    /**
     *@Author hsh
     *@Description // 长沙市医保数据统计
     *@Date 2022/8/31 10:42
     *@Param [dto]
     *@Return thyyxxk.webserver.entity.ResultVo<java.util.List<java.util.Map<java.lang.String,java.lang.Object>>>
     **/
    @PostMapping("/selectCssYbJsTj")
    public ResultVo<List<Map<String, Object>>> selectCssYbJsTj(@RequestBody @Validated YbkfShareDto dto){
        return service.selectCssYbJsTj(dto);
    }

    /**
     * 长沙市医保数据-医生统计
     * @param dto
     * @return
     */
    @PostMapping("/selectYsJsTj")
    public ResultVo<List<Map<String, Object>>> selectYsJsTj(@RequestBody @Validated YbkfShareDto dto){
        return service.selectYsJsTj(dto);
    }

    /**
     * 长沙市医保数据-病人统计
     * @param dto
     * @return
     */
    @PostMapping("/selectBrJsTj")
    public ResultVo<Map<String, Object>> selectBrJsTj(@RequestBody @Validated YbkfShareDto dto){
        return service.selectBrJsTj(dto);
    }

    /**
     *@Author hsh
     *@Description // 长沙市医保数据导入
     *@Date 2022/8/31 11:02
     *@Param [dto]
     *@Return thyyxxk.webserver.entity.ResultVo<java.util.List<java.util.Map<java.lang.String,java.lang.Object>>>
     **/
    @PostMapping("/ybCssImp")
    public ResultVo<String> ybCssImp(@Validated YbkfShareDto dto){
        return service.ybCssImp(dto);
    }

    /**
     * 导出科室数据
     * @param response
     * @param dto
     * @return
     */
    @PostMapping("/exportKsYbSetlExcel")
    public void exportKsYbSetlExcel(HttpServletResponse response, @RequestBody @Validated YbkfShareDto dto){
        service.exportKsYbSetlExcel(response, dto);
    }

    /**
     * 导出医生数据
     * @param response
     * @param dto
     * @return
     */
    @PostMapping("/exportYsYbSetlExcel")
    public void exportYsYbSetlExcel(HttpServletResponse response, @RequestBody @Validated YbkfShareDto dto){
        service.exportYsYbSetlExcel(response, dto);
    }

    /**
     * 导出病人数据
     * @param response
     * @param dto
     * @return
     */
    @PostMapping("/exportBrYbSetlExcel")
    public void exportBrYbSetlExcel(HttpServletResponse response, @RequestBody @Validated YbkfShareDto dto){
        service.exportBrYbSetlExcel(response, dto);
    }

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

}
