package com.ankaibei.workFlow.common.flow.model;

import com.ankaibei.workFlow.common.flow.model.FlowWorkOrder.FlowWorkOrderModelMapper;
import com.ankaibei.workFlow.common.flow.vo.FlowWorkOrderVo;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T14:15:52+0800",
    comments = "version: 1.4.2.Final, compiler: javac, environment: Java 1.8.0_144 (Oracle Corporation)"
)
public class FlowWorkOrder$FlowWorkOrderModelMapperImpl implements FlowWorkOrderModelMapper {

    @Override
    public FlowWorkOrderVo fromModel(FlowWorkOrder arg0) {
        if ( arg0 == null ) {
            return null;
        }

        FlowWorkOrderVo flowWorkOrderVo = new FlowWorkOrderVo();

        flowWorkOrderVo.setWorkOrderId( arg0.getWorkOrderId() );
        flowWorkOrderVo.setWorkOrderCode( arg0.getWorkOrderCode() );
        flowWorkOrderVo.setProcessDefinitionKey( arg0.getProcessDefinitionKey() );
        flowWorkOrderVo.setProcessDefinitionName( arg0.getProcessDefinitionName() );
        flowWorkOrderVo.setProcessDefinitionId( arg0.getProcessDefinitionId() );
        flowWorkOrderVo.setProcessInstanceId( arg0.getProcessInstanceId() );
        flowWorkOrderVo.setOnlineTableId( arg0.getOnlineTableId() );
        flowWorkOrderVo.setBusinessKey( arg0.getBusinessKey() );
        flowWorkOrderVo.setLatestApprovalStatus( arg0.getLatestApprovalStatus() );
        flowWorkOrderVo.setFlowStatus( arg0.getFlowStatus() );
        flowWorkOrderVo.setSubmitUsername( arg0.getSubmitUsername() );
        flowWorkOrderVo.setDeptId( arg0.getDeptId() );
        flowWorkOrderVo.setUpdateTime( arg0.getUpdateTime() );
        flowWorkOrderVo.setUpdateUserId( arg0.getUpdateUserId() );
        flowWorkOrderVo.setCreateTime( arg0.getCreateTime() );
        flowWorkOrderVo.setCreateUserId( arg0.getCreateUserId() );
        flowWorkOrderVo.setFlowStatusDictMap( mapToMap( arg0.getFlowStatusDictMap() ) );

        return flowWorkOrderVo;
    }

    @Override
    public List<FlowWorkOrderVo> fromModelList(List<FlowWorkOrder> arg0) {
        if ( arg0 == null ) {
            return null;
        }

        List<FlowWorkOrderVo> list = new ArrayList<FlowWorkOrderVo>( arg0.size() );
        for ( FlowWorkOrder flowWorkOrder : arg0 ) {
            list.add( fromModel( flowWorkOrder ) );
        }

        return list;
    }

    @Override
    public FlowWorkOrder toModel(FlowWorkOrderVo arg0) {
        if ( arg0 == null ) {
            return null;
        }

        FlowWorkOrder flowWorkOrder = new FlowWorkOrder();

        flowWorkOrder.setWorkOrderId( arg0.getWorkOrderId() );
        flowWorkOrder.setWorkOrderCode( arg0.getWorkOrderCode() );
        flowWorkOrder.setProcessDefinitionKey( arg0.getProcessDefinitionKey() );
        flowWorkOrder.setProcessDefinitionName( arg0.getProcessDefinitionName() );
        flowWorkOrder.setProcessDefinitionId( arg0.getProcessDefinitionId() );
        flowWorkOrder.setProcessInstanceId( arg0.getProcessInstanceId() );
        flowWorkOrder.setOnlineTableId( arg0.getOnlineTableId() );
        flowWorkOrder.setBusinessKey( arg0.getBusinessKey() );
        flowWorkOrder.setLatestApprovalStatus( arg0.getLatestApprovalStatus() );
        flowWorkOrder.setFlowStatus( arg0.getFlowStatus() );
        flowWorkOrder.setSubmitUsername( arg0.getSubmitUsername() );
        flowWorkOrder.setDeptId( arg0.getDeptId() );
        flowWorkOrder.setUpdateTime( arg0.getUpdateTime() );
        flowWorkOrder.setUpdateUserId( arg0.getUpdateUserId() );
        flowWorkOrder.setCreateTime( arg0.getCreateTime() );
        flowWorkOrder.setCreateUserId( arg0.getCreateUserId() );
        flowWorkOrder.setFlowStatusDictMap( mapToMap( arg0.getFlowStatusDictMap() ) );

        return flowWorkOrder;
    }

    @Override
    public List<FlowWorkOrder> toModelList(List<FlowWorkOrderVo> arg0) {
        if ( arg0 == null ) {
            return null;
        }

        List<FlowWorkOrder> list = new ArrayList<FlowWorkOrder>( arg0.size() );
        for ( FlowWorkOrderVo flowWorkOrderVo : arg0 ) {
            list.add( toModel( flowWorkOrderVo ) );
        }

        return list;
    }
}
