package cn.iocoder.yudao.module.bpm.controller.admin.business;

import cn.iocoder.yudao.framework.common.pojo.CommonResult;
import cn.iocoder.yudao.framework.tenant.core.aop.TenantIgnore;
import cn.iocoder.yudao.module.system.api.bpm.BpmCheckInWaitApi;
import com.alibaba.fastjson.JSONObject;
import io.swagger.v3.oas.annotations.Operation;
import io.swagger.v3.oas.annotations.tags.Tag;
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 javax.annotation.Resource;

import static cn.iocoder.yudao.framework.common.pojo.CommonResult.success;

@Tag(name = "管理后台 - 长者轮候入住流程")
@RestController
@RequestMapping("/bpm/check-in-wait")
@Validated
public class BpmCheckInWaitQueryController {

    @Resource
    private BpmCheckInWaitApi checkInWaitApi;

    @GetMapping("/detail")
    @Operation(summary = "获取轮候入住详情")
    @TenantIgnore
    public CommonResult<JSONObject> getCheckInWaitDetail(@RequestParam("id") Long id) {
        return success(checkInWaitApi.selectById(id));
    }
}
