package com.ruoyi.info.nursing.api.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.ruoyi.common.utils.BeanCopyUtils;
import com.ruoyi.info.nursing.api.NursingWorkerApi;
import com.ruoyi.info.nursing.domain.vo.NursingWorkerVo;
import com.ruoyi.info.nursing.dto.NursingWorkerDto;
import com.ruoyi.info.nursing.service.INursingWorkerService;

import lombok.RequiredArgsConstructor;

/**
 * @author fucheng.bai
 * @date 2025/10/9
 */
@RequiredArgsConstructor
@Service
public class NursingWorkerApiImpl implements NursingWorkerApi {


    private final INursingWorkerService nursingWorkerService;

    @Override
    public NursingWorkerDto getByPhoneNumber(String mobile, boolean isEnable) {
        NursingWorkerVo nursingWorkerVo = nursingWorkerService.getByPhoneNumber(mobile, isEnable);

        return BeanCopyUtils.copy(nursingWorkerVo, NursingWorkerDto.class);
    }
}
