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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.student.vo.StudentCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.student.vo.StudentExcelVO;
import com.jojubanking.boot.module.system.controller.admin.student.vo.StudentImportExcelVO;
import com.jojubanking.boot.module.system.controller.admin.student.vo.StudentRespVO;
import com.jojubanking.boot.module.system.controller.admin.student.vo.StudentUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.student.StudentDO;
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 StudentConvertImpl implements StudentConvert {

    @Override
    public StudentDO convert(StudentCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        StudentDO studentDO = new StudentDO();

        studentDO.setOpenid( bean.getOpenid() );
        studentDO.setBatchno( bean.getBatchno() );
        studentDO.setBatchname( bean.getBatchname() );
        studentDO.setPatid( bean.getPatid() );
        studentDO.setName( bean.getName() );
        studentDO.setSex( bean.getSex() );
        studentDO.setAge( bean.getAge() );
        studentDO.setNationId( bean.getNationId() );
        studentDO.setDeptId( bean.getDeptId() );
        studentDO.setClassName( bean.getClassName() );
        studentDO.setSchoolName( bean.getSchoolName() );
        studentDO.setSqName( bean.getSqName() );
        studentDO.setJdName( bean.getJdName() );
        studentDO.setEmail( bean.getEmail() );
        studentDO.setMobile( bean.getMobile() );
        studentDO.setRemark( bean.getRemark() );
        studentDO.setStatus( bean.getStatus() );
        studentDO.setFeeflag( bean.getFeeflag() );

        return studentDO;
    }

    @Override
    public StudentDO convert(StudentUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        StudentDO studentDO = new StudentDO();

        studentDO.setId( bean.getId() );
        studentDO.setOpenid( bean.getOpenid() );
        studentDO.setBatchno( bean.getBatchno() );
        studentDO.setBatchname( bean.getBatchname() );
        studentDO.setPatid( bean.getPatid() );
        studentDO.setName( bean.getName() );
        studentDO.setSex( bean.getSex() );
        studentDO.setAge( bean.getAge() );
        studentDO.setNationId( bean.getNationId() );
        studentDO.setDeptId( bean.getDeptId() );
        studentDO.setClassName( bean.getClassName() );
        studentDO.setSchoolName( bean.getSchoolName() );
        studentDO.setSqName( bean.getSqName() );
        studentDO.setJdName( bean.getJdName() );
        studentDO.setEmail( bean.getEmail() );
        studentDO.setMobile( bean.getMobile() );
        studentDO.setRemark( bean.getRemark() );
        studentDO.setStatus( bean.getStatus() );
        studentDO.setFeeflag( bean.getFeeflag() );

        return studentDO;
    }

    @Override
    public StudentDO convert(StudentImportExcelVO bean) {
        if ( bean == null ) {
            return null;
        }

        StudentDO studentDO = new StudentDO();

        studentDO.setName( bean.getName() );
        studentDO.setNationId( bean.getNationId() );
        studentDO.setClassName( bean.getClassName() );
        studentDO.setSchoolName( bean.getSchoolName() );
        studentDO.setSqName( bean.getSqName() );
        studentDO.setMobile( bean.getMobile() );

        return studentDO;
    }

    @Override
    public StudentRespVO convert(StudentDO bean) {
        if ( bean == null ) {
            return null;
        }

        StudentRespVO studentRespVO = new StudentRespVO();

        studentRespVO.setOpenid( bean.getOpenid() );
        studentRespVO.setBatchno( bean.getBatchno() );
        studentRespVO.setBatchname( bean.getBatchname() );
        studentRespVO.setPatid( bean.getPatid() );
        studentRespVO.setName( bean.getName() );
        studentRespVO.setSex( bean.getSex() );
        studentRespVO.setAge( bean.getAge() );
        studentRespVO.setNationId( bean.getNationId() );
        studentRespVO.setFeeflag( bean.getFeeflag() );
        studentRespVO.setDeptId( bean.getDeptId() );
        studentRespVO.setClassName( bean.getClassName() );
        studentRespVO.setSchoolName( bean.getSchoolName() );
        studentRespVO.setSqName( bean.getSqName() );
        studentRespVO.setJdName( bean.getJdName() );
        studentRespVO.setEmail( bean.getEmail() );
        studentRespVO.setMobile( bean.getMobile() );
        studentRespVO.setRemark( bean.getRemark() );
        studentRespVO.setStatus( bean.getStatus() );
        studentRespVO.setId( bean.getId() );
        studentRespVO.setCreateTime( bean.getCreateTime() );

        return studentRespVO;
    }

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

        List<StudentRespVO> list1 = new ArrayList<StudentRespVO>( list.size() );
        for ( StudentDO studentDO : list ) {
            list1.add( convert( studentDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<StudentExcelVO> list1 = new ArrayList<StudentExcelVO>( list.size() );
        for ( StudentDO studentDO : list ) {
            list1.add( studentDOToStudentExcelVO( studentDO ) );
        }

        return list1;
    }

    protected StudentExcelVO studentDOToStudentExcelVO(StudentDO studentDO) {
        if ( studentDO == null ) {
            return null;
        }

        StudentExcelVO studentExcelVO = new StudentExcelVO();

        studentExcelVO.setId( studentDO.getId() );
        studentExcelVO.setOpenid( studentDO.getOpenid() );
        studentExcelVO.setPatid( studentDO.getPatid() );
        studentExcelVO.setName( studentDO.getName() );
        studentExcelVO.setSex( studentDO.getSex() );
        studentExcelVO.setAge( studentDO.getAge() );
        studentExcelVO.setNationId( studentDO.getNationId() );
        studentExcelVO.setDeptId( studentDO.getDeptId() );
        studentExcelVO.setClassName( studentDO.getClassName() );
        studentExcelVO.setSchoolName( studentDO.getSchoolName() );
        studentExcelVO.setSqName( studentDO.getSqName() );
        studentExcelVO.setJdName( studentDO.getJdName() );
        studentExcelVO.setEmail( studentDO.getEmail() );
        studentExcelVO.setMobile( studentDO.getMobile() );
        studentExcelVO.setRemark( studentDO.getRemark() );
        studentExcelVO.setStatus( studentDO.getStatus() );
        studentExcelVO.setCreateTime( studentDO.getCreateTime() );
        studentExcelVO.setTjpkgmx( studentDO.getTjpkgmx() );
        studentExcelVO.setTjpkgfee( studentDO.getTjpkgfee() );
        studentExcelVO.setTjkxmx( studentDO.getTjkxmx() );
        studentExcelVO.setTjkxfee( studentDO.getTjkxfee() );
        studentExcelVO.setOrderno( studentDO.getOrderno() );
        studentExcelVO.setFeeflag( studentDO.getFeeflag() );

        return studentExcelVO;
    }
}
