package com.jojubanking.boot.module.system.convert.doctor;

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.doctor.vo.DoctorCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.doctor.vo.DoctorExcelVO;
import com.jojubanking.boot.module.system.controller.admin.doctor.vo.DoctorRespVO;
import com.jojubanking.boot.module.system.controller.admin.doctor.vo.DoctorUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.doctor.DoctorDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2025-12-05T11:32:08+0800",
    comments = "version: 1.4.1.Final, compiler: javac, environment: Java 1.8.0_201 (Oracle Corporation)"
)
public class DoctorConvertImpl implements DoctorConvert {

    @Override
    public DoctorDO convert(DoctorCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DoctorDO doctorDO = new DoctorDO();

        doctorDO.setSort( bean.getSort() );
        doctorDO.setName( bean.getName() );
        doctorDO.setImg( bean.getImg() );
        doctorDO.setMid( bean.getMid() );
        doctorDO.setInfo( bean.getInfo() );
        doctorDO.setGrsc( bean.getGrsc() );
        doctorDO.setZztime( bean.getZztime() );
        doctorDO.setLabel( bean.getLabel() );

        return doctorDO;
    }

    @Override
    public DoctorDO convert(DoctorUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DoctorDO doctorDO = new DoctorDO();

        doctorDO.setId( bean.getId() );
        doctorDO.setSort( bean.getSort() );
        doctorDO.setName( bean.getName() );
        doctorDO.setImg( bean.getImg() );
        doctorDO.setMid( bean.getMid() );
        doctorDO.setInfo( bean.getInfo() );
        doctorDO.setGrsc( bean.getGrsc() );
        doctorDO.setZztime( bean.getZztime() );
        doctorDO.setLabel( bean.getLabel() );

        return doctorDO;
    }

    @Override
    public DoctorRespVO convert(DoctorDO bean) {
        if ( bean == null ) {
            return null;
        }

        DoctorRespVO doctorRespVO = new DoctorRespVO();

        doctorRespVO.setSort( bean.getSort() );
        doctorRespVO.setName( bean.getName() );
        doctorRespVO.setImg( bean.getImg() );
        doctorRespVO.setMid( bean.getMid() );
        doctorRespVO.setInfo( bean.getInfo() );
        doctorRespVO.setGrsc( bean.getGrsc() );
        doctorRespVO.setZztime( bean.getZztime() );
        doctorRespVO.setLabel( bean.getLabel() );
        doctorRespVO.setId( bean.getId() );
        doctorRespVO.setCreateTime( bean.getCreateTime() );

        return doctorRespVO;
    }

    @Override
    public List<DoctorRespVO> convertList(List<DoctorDO> list) {
        if ( list == null ) {
            return null;
        }

        List<DoctorRespVO> list1 = new ArrayList<DoctorRespVO>( list.size() );
        for ( DoctorDO doctorDO : list ) {
            list1.add( convert( doctorDO ) );
        }

        return list1;
    }

    @Override
    public PageResult<DoctorRespVO> convertPage(PageResult<DoctorDO> page) {
        if ( page == null ) {
            return null;
        }

        PageResult<DoctorRespVO> pageResult = new PageResult<DoctorRespVO>();

        pageResult.setList( convertList( page.getList() ) );
        pageResult.setTotal( page.getTotal() );

        return pageResult;
    }

    @Override
    public List<DoctorExcelVO> convertList02(List<DoctorDO> list) {
        if ( list == null ) {
            return null;
        }

        List<DoctorExcelVO> list1 = new ArrayList<DoctorExcelVO>( list.size() );
        for ( DoctorDO doctorDO : list ) {
            list1.add( doctorDOToDoctorExcelVO( doctorDO ) );
        }

        return list1;
    }

    protected DoctorExcelVO doctorDOToDoctorExcelVO(DoctorDO doctorDO) {
        if ( doctorDO == null ) {
            return null;
        }

        DoctorExcelVO doctorExcelVO = new DoctorExcelVO();

        doctorExcelVO.setId( doctorDO.getId() );
        doctorExcelVO.setName( doctorDO.getName() );
        doctorExcelVO.setImg( doctorDO.getImg() );
        doctorExcelVO.setMid( doctorDO.getMid() );
        doctorExcelVO.setInfo( doctorDO.getInfo() );
        doctorExcelVO.setGrsc( doctorDO.getGrsc() );
        doctorExcelVO.setZztime( doctorDO.getZztime() );
        doctorExcelVO.setLabel( doctorDO.getLabel() );
        doctorExcelVO.setCreateTime( doctorDO.getCreateTime() );

        return doctorExcelVO;
    }
}
