package com.artfess.manage.duty.manager.mapper;

import com.artfess.manage.duty.manager.dto.CmgtDutyTeamDto;
import com.artfess.manage.duty.model.CmgtDutyTeam;
import java.util.ArrayList;
import java.util.List;
import javax.annotation.Generated;
import org.springframework.stereotype.Component;

@Generated(
    value = "org.mapstruct.ap.MappingProcessor",
    date = "2023-05-08T09:35:56+0800",
    comments = "version: 1.2.0.Final, compiler: javac, environment: Java 1.8.0_71 (Oracle Corporation)"
)
@Component
public class CmgtDutyTeamDtoMapperImpl implements CmgtDutyTeamDtoMapper {

    @Override
    public CmgtDutyTeam toEntity(CmgtDutyTeamDto dto) {
        if ( dto == null ) {
            return null;
        }

        CmgtDutyTeam cmgtDutyTeam = new CmgtDutyTeam();

        cmgtDutyTeam.setCreateBy( dto.getCreateBy() );
        cmgtDutyTeam.setCreateOrgId( dto.getCreateOrgId() );
        cmgtDutyTeam.setCreateTime( dto.getCreateTime() );
        cmgtDutyTeam.setUpdateBy( dto.getUpdateBy() );
        cmgtDutyTeam.setUpdateTime( dto.getUpdateTime() );
        cmgtDutyTeam.setId( dto.getId() );
        cmgtDutyTeam.setCode( dto.getCode() );
        cmgtDutyTeam.setName( dto.getName() );
        cmgtDutyTeam.setAlias( dto.getAlias() );
        cmgtDutyTeam.setHeadman( dto.getHeadman() );
        cmgtDutyTeam.setArea( dto.getArea() );
        cmgtDutyTeam.setSn( dto.getSn() );
        cmgtDutyTeam.setMemo( dto.getMemo() );
        cmgtDutyTeam.setOrgId( dto.getOrgId() );
        cmgtDutyTeam.setOrgName( dto.getOrgName() );
        cmgtDutyTeam.setIsDele( dto.getIsDele() );
        cmgtDutyTeam.setVersion( dto.getVersion() );
        cmgtDutyTeam.setLastTime( dto.getLastTime() );

        return cmgtDutyTeam;
    }

    @Override
    public CmgtDutyTeamDto toDto(CmgtDutyTeam entity) {
        if ( entity == null ) {
            return null;
        }

        CmgtDutyTeamDto cmgtDutyTeamDto = new CmgtDutyTeamDto();

        cmgtDutyTeamDto.setCreateBy( entity.getCreateBy() );
        cmgtDutyTeamDto.setCreateOrgId( entity.getCreateOrgId() );
        cmgtDutyTeamDto.setCreateTime( entity.getCreateTime() );
        cmgtDutyTeamDto.setUpdateBy( entity.getUpdateBy() );
        cmgtDutyTeamDto.setUpdateTime( entity.getUpdateTime() );
        cmgtDutyTeamDto.setId( entity.getId() );
        cmgtDutyTeamDto.setCode( entity.getCode() );
        cmgtDutyTeamDto.setName( entity.getName() );
        cmgtDutyTeamDto.setAlias( entity.getAlias() );
        cmgtDutyTeamDto.setHeadman( entity.getHeadman() );
        cmgtDutyTeamDto.setArea( entity.getArea() );
        cmgtDutyTeamDto.setSn( entity.getSn() );
        cmgtDutyTeamDto.setMemo( entity.getMemo() );
        cmgtDutyTeamDto.setIsDele( entity.getIsDele() );
        cmgtDutyTeamDto.setVersion( entity.getVersion() );
        cmgtDutyTeamDto.setLastTime( entity.getLastTime() );
        cmgtDutyTeamDto.setOrgId( entity.getOrgId() );
        cmgtDutyTeamDto.setOrgName( entity.getOrgName() );

        return cmgtDutyTeamDto;
    }

    @Override
    public List<CmgtDutyTeam> toEntity(List<CmgtDutyTeamDto> dtoList) {
        if ( dtoList == null ) {
            return null;
        }

        List<CmgtDutyTeam> list = new ArrayList<CmgtDutyTeam>( dtoList.size() );
        for ( CmgtDutyTeamDto cmgtDutyTeamDto : dtoList ) {
            list.add( toEntity( cmgtDutyTeamDto ) );
        }

        return list;
    }

    @Override
    public List<CmgtDutyTeamDto> toDto(List<CmgtDutyTeam> entityList) {
        if ( entityList == null ) {
            return null;
        }

        List<CmgtDutyTeamDto> list = new ArrayList<CmgtDutyTeamDto>( entityList.size() );
        for ( CmgtDutyTeam cmgtDutyTeam : entityList ) {
            list.add( toDto( cmgtDutyTeam ) );
        }

        return list;
    }
}
