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.BedDaysService;

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

/**
 * @ClassName BedDaysController
 * @Description 统计管床日数
 * @Author hsh
 * @Date 2022/8/24 9:04
 **/
@RestController
@RequestMapping("/bedDays")
public class BedDaysController {

    private final BedDaysService service;

    @Autowired
    public BedDaysController(BedDaysService service) {
        this.service = service;
    }

    @PostMapping("/selectBedDays")
    public ResultVo<List<Map>> selectBedDays(@RequestBody @Validated YbkfShareDto dto){
        return service.selectBedDays(dto);
    }

    @PostMapping("/selectYsDaysDetails")
    public ResultVo<List<Map>> selectYsDaysDetails(@RequestBody @Validated YbkfShareDto dto){
        return service.selectYsDaysDetails(dto);
    }

}
