package thyyxxk.webserver.controller.datamodify;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
import thyyxxk.webserver.entity.datamodify.YzTemperature;
import thyyxxk.webserver.service.datamodify.YzTemperatureService;

import java.util.List;

/**
 * <p>
 * 描述
 * </p>
 *
 * @author xc
 * @date 2021-04-12 17:42
 */
@RestController
@RequestMapping("/yzTemperature")
public class YzTemperatureController {

    private final YzTemperatureService service;

    @Autowired
    public YzTemperatureController(YzTemperatureService service) {
        this.service = service;
    }

    @GetMapping("/queryYzTemperature")
    public ResultVo<YzTemperature> queryYzTemperature(@RequestParam("date") String date,
                                                      @RequestParam("inpatientNo") String inpatientNo,
                                                      @RequestParam("admissTimes") Integer admissTimes) {
        return service.queryYzTemperature(date, inpatientNo, admissTimes);
    }

    @GetMapping("/getWard")
    public ResultVo<List<GetDropdownBox>> getWard() {
        return service.getWard();
    }

    @PostMapping("/modify")
    public ResultVo<Boolean> modify(@RequestBody YzTemperature param) {
        return service.modify(param);
    }
}
