package thyyxxk.webserver.controller.surgicalmanagement;

import org.springframework.web.bind.annotation.*;
import thyyxxk.webserver.entity.ResultVo;
import thyyxxk.webserver.entity.datamodify.GetDropdownBox;
import thyyxxk.webserver.entity.surgeryarrangement.ShouShuChaXun;
import thyyxxk.webserver.entity.zhuyuanyisheng.shoushu.OpRecord;
import thyyxxk.webserver.service.surgicalmanagement.SurgeryArrangementServer;

import java.util.List;

@RestController
@RequestMapping("/surgeryArrangement")
public class SurgeryArrangementController {
    private final SurgeryArrangementServer server;

    public SurgeryArrangementController(SurgeryArrangementServer server) {
        this.server = server;
    }

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

    @PostMapping("/huoQuShouShuAnPaiXinXi")
    public ResultVo<List<OpRecord>> huoQuShouShuAnPaiXinXi(@RequestBody ShouShuChaXun param) {
        return server.huoQuShouShuAnPaiXinXi(param);
    }

    @PostMapping("/modifySurgeryTime")
    public ResultVo<String> modifySurgeryTime(@RequestBody OpRecord param) {
        return server.modifySurgeryTime(param);
    }
}
