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

import com.jojubanking.boot.framework.common.pojo.PageResult;
import com.jojubanking.boot.module.system.controller.admin.order.vo.OrderCreateReqVO;
import com.jojubanking.boot.module.system.controller.admin.order.vo.OrderExcelVO;
import com.jojubanking.boot.module.system.controller.admin.order.vo.OrderRespVO;
import com.jojubanking.boot.module.system.controller.admin.order.vo.OrderSumExcelVO;
import com.jojubanking.boot.module.system.controller.admin.order.vo.OrderSumRespVO;
import com.jojubanking.boot.module.system.controller.admin.order.vo.OrderUpdateReqVO;
import com.jojubanking.boot.module.system.dal.dataobject.order.OrderDO;
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 OrderConvertImpl implements OrderConvert {

    @Override
    public OrderDO convert(OrderCreateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        OrderDO orderDO = new OrderDO();

        orderDO.setBatchno( bean.getBatchno() );
        orderDO.setPatid( bean.getPatid() );
        orderDO.setName( bean.getName() );
        if ( bean.getSex() != null ) {
            orderDO.setSex( String.valueOf( bean.getSex() ) );
        }
        orderDO.setNationid( bean.getNationid() );
        orderDO.setClassName( bean.getClassName() );
        orderDO.setSchoolName( bean.getSchoolName() );
        orderDO.setOrderno( bean.getOrderno() );
        orderDO.setPackageflag( bean.getPackageflag() );
        orderDO.setPackageno( bean.getPackageno() );
        orderDO.setItemflag( bean.getItemflag() );
        orderDO.setItemno( bean.getItemno() );
        orderDO.setItemname( bean.getItemname() );
        orderDO.setItemprice( bean.getItemprice() );
        orderDO.setPaystatus( bean.getPaystatus() );
        orderDO.setZxks( bean.getZxks() );
        orderDO.setZxksname( bean.getZxksname() );
        orderDO.setKdks( bean.getKdks() );
        orderDO.setKdksname( bean.getKdksname() );

        return orderDO;
    }

    @Override
    public OrderDO convert(OrderUpdateReqVO bean) {
        if ( bean == null ) {
            return null;
        }

        OrderDO orderDO = new OrderDO();

        orderDO.setId( bean.getId() );
        orderDO.setBatchno( bean.getBatchno() );
        orderDO.setPatid( bean.getPatid() );
        orderDO.setName( bean.getName() );
        orderDO.setNationid( bean.getNationid() );
        orderDO.setOrderno( bean.getOrderno() );
        orderDO.setPackageflag( bean.getPackageflag() );
        orderDO.setPackageno( bean.getPackageno() );
        orderDO.setItemflag( bean.getItemflag() );
        orderDO.setItemno( bean.getItemno() );
        orderDO.setItemname( bean.getItemname() );
        orderDO.setItemprice( bean.getItemprice() );
        orderDO.setPaystatus( bean.getPaystatus() );

        return orderDO;
    }

    @Override
    public OrderRespVO convert(OrderDO bean) {
        if ( bean == null ) {
            return null;
        }

        OrderRespVO orderRespVO = new OrderRespVO();

        orderRespVO.setBatchno( bean.getBatchno() );
        orderRespVO.setPatid( bean.getPatid() );
        orderRespVO.setName( bean.getName() );
        orderRespVO.setNationid( bean.getNationid() );
        orderRespVO.setOrderno( bean.getOrderno() );
        orderRespVO.setPackageflag( bean.getPackageflag() );
        orderRespVO.setPackageno( bean.getPackageno() );
        orderRespVO.setItemflag( bean.getItemflag() );
        orderRespVO.setItemno( bean.getItemno() );
        orderRespVO.setItemname( bean.getItemname() );
        orderRespVO.setItemprice( bean.getItemprice() );
        orderRespVO.setPaystatus( bean.getPaystatus() );
        orderRespVO.setId( bean.getId() );
        orderRespVO.setClassName( bean.getClassName() );
        orderRespVO.setSchoolName( bean.getSchoolName() );
        orderRespVO.setCreateTime( bean.getCreateTime() );
        orderRespVO.setZxks( bean.getZxks() );
        orderRespVO.setZxksname( bean.getZxksname() );
        orderRespVO.setKdks( bean.getKdks() );
        orderRespVO.setKdksname( bean.getKdksname() );

        return orderRespVO;
    }

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

        List<OrderRespVO> list1 = new ArrayList<OrderRespVO>( list.size() );
        for ( OrderDO orderDO : list ) {
            list1.add( convert( orderDO ) );
        }

        return list1;
    }

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

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

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

        return pageResult;
    }

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

        List<OrderExcelVO> list1 = new ArrayList<OrderExcelVO>( list.size() );
        for ( OrderDO orderDO : list ) {
            list1.add( orderDOToOrderExcelVO( orderDO ) );
        }

        return list1;
    }

    @Override
    public List<OrderSumExcelVO> convertList03(List<OrderSumRespVO> list) {
        if ( list == null ) {
            return null;
        }

        List<OrderSumExcelVO> list1 = new ArrayList<OrderSumExcelVO>( list.size() );
        for ( OrderSumRespVO orderSumRespVO : list ) {
            list1.add( orderSumRespVOToOrderSumExcelVO( orderSumRespVO ) );
        }

        return list1;
    }

    protected OrderExcelVO orderDOToOrderExcelVO(OrderDO orderDO) {
        if ( orderDO == null ) {
            return null;
        }

        OrderExcelVO orderExcelVO = new OrderExcelVO();

        orderExcelVO.setId( orderDO.getId() );
        orderExcelVO.setBatchno( orderDO.getBatchno() );
        orderExcelVO.setPatid( orderDO.getPatid() );
        orderExcelVO.setOrderno( orderDO.getOrderno() );
        orderExcelVO.setName( orderDO.getName() );
        orderExcelVO.setNationid( orderDO.getNationid() );
        orderExcelVO.setSchoolName( orderDO.getSchoolName() );
        orderExcelVO.setClassName( orderDO.getClassName() );
        orderExcelVO.setPaystatus( orderDO.getPaystatus() );
        orderExcelVO.setPackageflag( orderDO.getPackageflag() );
        orderExcelVO.setPackageno( orderDO.getPackageno() );
        orderExcelVO.setItemflag( orderDO.getItemflag() );
        orderExcelVO.setItemno( orderDO.getItemno() );
        orderExcelVO.setItemname( orderDO.getItemname() );
        orderExcelVO.setItemprice( orderDO.getItemprice() );
        orderExcelVO.setKdksname( orderDO.getKdksname() );
        orderExcelVO.setZxksname( orderDO.getZxksname() );
        orderExcelVO.setCreateTime( orderDO.getCreateTime() );

        return orderExcelVO;
    }

    protected OrderSumExcelVO orderSumRespVOToOrderSumExcelVO(OrderSumRespVO orderSumRespVO) {
        if ( orderSumRespVO == null ) {
            return null;
        }

        OrderSumExcelVO orderSumExcelVO = new OrderSumExcelVO();

        orderSumExcelVO.setBatchno( orderSumRespVO.getBatchno() );
        orderSumExcelVO.setClassName( orderSumRespVO.getClassName() );
        orderSumExcelVO.setSchoolName( orderSumRespVO.getSchoolName() );
        orderSumExcelVO.setSex( orderSumRespVO.getSex() );
        orderSumExcelVO.setItemname( orderSumRespVO.getItemname() );
        orderSumExcelVO.setPatCount( orderSumRespVO.getPatCount() );
        orderSumExcelVO.setPriceSum( orderSumRespVO.getPriceSum() );

        return orderSumExcelVO;
    }
}
