package com.ruoyi.api.controller.info;

import java.util.List;

import org.springframework.validation.annotation.Validated;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;

import com.ruoyi.common.core.domain.R;
import com.ruoyi.common.core.validate.QueryGroup;
import com.ruoyi.info.hospital.domain.bo.HospitalDepartmentBo;
import com.ruoyi.info.hospital.domain.vo.HospitalDepartmentVo;
import com.ruoyi.info.hospital.service.IHospitalDepartmentService;

import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.RequiredArgsConstructor;

/**
 * @author fucheng.bai
 * @date 2025/9/22
 */
@Validated
@Api(value = "API 科室管理控制器", tags = {"科室管理"})
@RequiredArgsConstructor
@RestController
@RequestMapping("/api/info/hospitalDepartment")
public class ApiHospitalDepartmentController {

    private final IHospitalDepartmentService iHospitalDepartmentService;

    /**
     * 获取科室列表
     */
    @ApiOperation("获取科室列表")
    @GetMapping("/list")
    public R<List<HospitalDepartmentVo>> list(@Validated(QueryGroup.class) HospitalDepartmentBo bo) {
        bo.setRackStatus("0");
        return R.ok(iHospitalDepartmentService.queryByHospitalId(bo));
    }


}
