package com.joju.datamanager.controller;

import cn.hutool.core.collection.CollUtil;
import com.joju.datamanager.common.annotation.EleganceLog;
import com.joju.datamanager.common.result.Result;
import com.joju.datamanager.common.result.ResultUtil;
import com.joju.datamanager.service.TriageCallingService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

/**
 * @description: 分诊叫号接口
 * @author: Mr.zs
 * @create: 2024-03-29 16:15
 **/

@RestController
@RequestMapping("/triageCalling")
public class TriageCallingController {

    @Autowired
    TriageCallingService triageCallingService;


    @GetMapping("/getTriageCallingByDate")
    @EleganceLog(description = "分诊叫号获取患者叫号记录")
    public Result getTriageCallingByDate() {
        List<String> triageCallings = triageCallingService.getTriageCallingByDate();

        if (!CollUtil.isEmpty(triageCallings)) {
            return ResultUtil.successData(triageCallings);
        }
        return ResultUtil.failureMsg("获取失败");
    }

}
