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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.orderview.vo.OrderViewCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.orderview.vo.OrderViewExcelVO;
import com.jojubanking.boot.module.system.controller.admin.orderview.vo.OrderViewRespVO;
import com.jojubanking.boot.module.system.controller.admin.orderview.vo.OrderViewUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.orderview.OrderViewDO;
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 OrderViewConvertImpl implements OrderViewConvert {

    @Override
    public OrderViewDO convert(OrderViewCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        OrderViewDO orderViewDO = new OrderViewDO();

        orderViewDO.setBatchno( bean.getBatchno() );
        orderViewDO.setPatid( bean.getPatid() );
        orderViewDO.setName( bean.getName() );
        orderViewDO.setNationid( bean.getNationid() );
        orderViewDO.setOrderno( bean.getOrderno() );
        orderViewDO.setSjh( bean.getSjh() );
        orderViewDO.setPackageflag( bean.getPackageflag() );
        orderViewDO.setPackageno( bean.getPackageno() );
        orderViewDO.setItemflag( bean.getItemflag() );
        orderViewDO.setItemno( bean.getItemno() );
        orderViewDO.setItemname( bean.getItemname() );
        orderViewDO.setItemprice( bean.getItemprice() );
        orderViewDO.setPaystatus( bean.getPaystatus() );
        orderViewDO.setSchoolName( bean.getSchoolName() );
        orderViewDO.setClassName( bean.getClassName() );

        return orderViewDO;
    }

    @Override
    public OrderViewDO convert(OrderViewUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        OrderViewDO orderViewDO = new OrderViewDO();

        orderViewDO.setId( bean.getId() );
        orderViewDO.setBatchno( bean.getBatchno() );
        orderViewDO.setPatid( bean.getPatid() );
        orderViewDO.setName( bean.getName() );
        orderViewDO.setNationid( bean.getNationid() );
        orderViewDO.setOrderno( bean.getOrderno() );
        orderViewDO.setSjh( bean.getSjh() );
        orderViewDO.setPackageflag( bean.getPackageflag() );
        orderViewDO.setPackageno( bean.getPackageno() );
        orderViewDO.setItemflag( bean.getItemflag() );
        orderViewDO.setItemno( bean.getItemno() );
        orderViewDO.setItemname( bean.getItemname() );
        orderViewDO.setItemprice( bean.getItemprice() );
        orderViewDO.setPaystatus( bean.getPaystatus() );
        orderViewDO.setSchoolName( bean.getSchoolName() );
        orderViewDO.setClassName( bean.getClassName() );

        return orderViewDO;
    }

    @Override
    public OrderViewRespVO convert(OrderViewDO bean) {
        if ( bean == null ) {
            return null;
        }

        OrderViewRespVO orderViewRespVO = new OrderViewRespVO();

        orderViewRespVO.setBatchno( bean.getBatchno() );
        orderViewRespVO.setPatid( bean.getPatid() );
        orderViewRespVO.setName( bean.getName() );
        orderViewRespVO.setNationid( bean.getNationid() );
        orderViewRespVO.setOrderno( bean.getOrderno() );
        orderViewRespVO.setSjh( bean.getSjh() );
        orderViewRespVO.setPackageflag( bean.getPackageflag() );
        orderViewRespVO.setPackageno( bean.getPackageno() );
        orderViewRespVO.setItemflag( bean.getItemflag() );
        orderViewRespVO.setItemno( bean.getItemno() );
        orderViewRespVO.setItemname( bean.getItemname() );
        orderViewRespVO.setItemprice( bean.getItemprice() );
        orderViewRespVO.setPaystatus( bean.getPaystatus() );
        orderViewRespVO.setSchoolName( bean.getSchoolName() );
        orderViewRespVO.setClassName( bean.getClassName() );
        orderViewRespVO.setId( bean.getId() );
        orderViewRespVO.setCreateTime( bean.getCreateTime() );

        return orderViewRespVO;
    }

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

        List<OrderViewRespVO> list1 = new ArrayList<OrderViewRespVO>( list.size() );
        for ( OrderViewDO orderViewDO : list ) {
            list1.add( convert( orderViewDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<OrderViewExcelVO> list1 = new ArrayList<OrderViewExcelVO>( list.size() );
        for ( OrderViewDO orderViewDO : list ) {
            list1.add( orderViewDOToOrderViewExcelVO( orderViewDO ) );
        }

        return list1;
    }

    protected OrderViewExcelVO orderViewDOToOrderViewExcelVO(OrderViewDO orderViewDO) {
        if ( orderViewDO == null ) {
            return null;
        }

        OrderViewExcelVO orderViewExcelVO = new OrderViewExcelVO();

        orderViewExcelVO.setId( orderViewDO.getId() );
        orderViewExcelVO.setBatchno( orderViewDO.getBatchno() );
        orderViewExcelVO.setPatid( orderViewDO.getPatid() );
        orderViewExcelVO.setName( orderViewDO.getName() );
        orderViewExcelVO.setNationid( orderViewDO.getNationid() );
        orderViewExcelVO.setOrderno( orderViewDO.getOrderno() );
        orderViewExcelVO.setSjh( orderViewDO.getSjh() );
        orderViewExcelVO.setPackageflag( orderViewDO.getPackageflag() );
        orderViewExcelVO.setPackageno( orderViewDO.getPackageno() );
        orderViewExcelVO.setItemflag( orderViewDO.getItemflag() );
        orderViewExcelVO.setItemno( orderViewDO.getItemno() );
        orderViewExcelVO.setItemname( orderViewDO.getItemname() );
        orderViewExcelVO.setItemprice( orderViewDO.getItemprice() );
        orderViewExcelVO.setPaystatus( orderViewDO.getPaystatus() );
        orderViewExcelVO.setCreateTime( orderViewDO.getCreateTime() );
        orderViewExcelVO.setSchoolName( orderViewDO.getSchoolName() );
        orderViewExcelVO.setClassName( orderViewDO.getClassName() );

        return orderViewExcelVO;
    }
}
