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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.dzquestion.vo.DzQuestionCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.dzquestion.vo.DzQuestionExcelVO;
import com.jojubanking.boot.module.system.controller.admin.dzquestion.vo.DzQuestionRespVO;
import com.jojubanking.boot.module.system.controller.admin.dzquestion.vo.DzQuestionUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.dzquestion.DzQuestionDO;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

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

    @Override
    public DzQuestionDO convert(DzQuestionCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DzQuestionDO dzQuestionDO = new DzQuestionDO();

        dzQuestionDO.setQuestion( bean.getQuestion() );
        dzQuestionDO.setDepartmentName( bean.getDepartmentName() );
        dzQuestionDO.setDepartmentNo( bean.getDepartmentNo() );
        dzQuestionDO.setBodyAreaType( bean.getBodyAreaType() );
        dzQuestionDO.setBodyArerName( bean.getBodyArerName() );
        dzQuestionDO.setQuestionType( bean.getQuestionType() );
        dzQuestionDO.setQuestionTypeName( bean.getQuestionTypeName() );

        return dzQuestionDO;
    }

    @Override
    public DzQuestionDO convert(DzQuestionUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        DzQuestionDO dzQuestionDO = new DzQuestionDO();

        dzQuestionDO.setId( bean.getId() );
        dzQuestionDO.setQuestion( bean.getQuestion() );
        dzQuestionDO.setDepartmentName( bean.getDepartmentName() );
        dzQuestionDO.setDepartmentNo( bean.getDepartmentNo() );
        dzQuestionDO.setBodyAreaType( bean.getBodyAreaType() );
        dzQuestionDO.setBodyArerName( bean.getBodyArerName() );
        dzQuestionDO.setQuestionType( bean.getQuestionType() );
        dzQuestionDO.setQuestionTypeName( bean.getQuestionTypeName() );

        return dzQuestionDO;
    }

    @Override
    public DzQuestionRespVO convert(DzQuestionDO bean) {
        if ( bean == null ) {
            return null;
        }

        DzQuestionRespVO dzQuestionRespVO = new DzQuestionRespVO();

        dzQuestionRespVO.setQuestion( bean.getQuestion() );
        dzQuestionRespVO.setDepartmentName( bean.getDepartmentName() );
        dzQuestionRespVO.setDepartmentNo( bean.getDepartmentNo() );
        dzQuestionRespVO.setBodyAreaType( bean.getBodyAreaType() );
        dzQuestionRespVO.setBodyArerName( bean.getBodyArerName() );
        dzQuestionRespVO.setQuestionType( bean.getQuestionType() );
        dzQuestionRespVO.setQuestionTypeName( bean.getQuestionTypeName() );
        dzQuestionRespVO.setId( bean.getId() );
        dzQuestionRespVO.setCreateTime( bean.getCreateTime() );

        return dzQuestionRespVO;
    }

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

        List<DzQuestionRespVO> list1 = new ArrayList<DzQuestionRespVO>( list.size() );
        for ( DzQuestionDO dzQuestionDO : list ) {
            list1.add( convert( dzQuestionDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<DzQuestionExcelVO> list1 = new ArrayList<DzQuestionExcelVO>( list.size() );
        for ( DzQuestionDO dzQuestionDO : list ) {
            list1.add( dzQuestionDOToDzQuestionExcelVO( dzQuestionDO ) );
        }

        return list1;
    }

    protected DzQuestionExcelVO dzQuestionDOToDzQuestionExcelVO(DzQuestionDO dzQuestionDO) {
        if ( dzQuestionDO == null ) {
            return null;
        }

        DzQuestionExcelVO dzQuestionExcelVO = new DzQuestionExcelVO();

        dzQuestionExcelVO.setId( dzQuestionDO.getId() );
        dzQuestionExcelVO.setQuestion( dzQuestionDO.getQuestion() );
        dzQuestionExcelVO.setDepartmentName( dzQuestionDO.getDepartmentName() );
        dzQuestionExcelVO.setDepartmentNo( dzQuestionDO.getDepartmentNo() );
        dzQuestionExcelVO.setBodyAreaType( dzQuestionDO.getBodyAreaType() );
        dzQuestionExcelVO.setBodyArerName( dzQuestionDO.getBodyArerName() );
        dzQuestionExcelVO.setQuestionType( dzQuestionDO.getQuestionType() );
        dzQuestionExcelVO.setQuestionTypeName( dzQuestionDO.getQuestionTypeName() );
        dzQuestionExcelVO.setCreateTime( dzQuestionDO.getCreateTime() );

        return dzQuestionExcelVO;
    }
}
