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.config.auth.PassToken;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.medicalinsurance.costcontrol.YbkfShareDto;
import thyyxxk.webserver.service.medicalinsurance.costcontrol.YbClnTimesAvgService;

import java.util.List;
import java.util.Map;

/**
 * @Description: 长浏宁次均控费
 * @Author: hsh
 * @CreateTime: 2022-10-26  10:44
 * @Version: 1.0
 */
@RestController
@RequestMapping("/clnTimesAvg")
public class YbClnTimesAvgController {

    private final YbClnTimesAvgService service;

    @Autowired
    public YbClnTimesAvgController(YbClnTimesAvgService service) {
        this.service = service;
    }

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

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

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

}
