| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreClassify; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreAttrMappingVO; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreClassifyVO; |
| | | import org.springblade.core.mp.support.BaseEntityWrapper; |
| | | import org.springblade.core.tool.utils.BeanUtil; |
| | | |
| | | import java.util.ArrayList; |
| | | import java.util.Collection; |
| | | import java.util.List; |
| | | import java.util.Objects; |
| | | /** |
| | | *集团编码分类包装类 |
| | |
| | | * @since 2023-05-23 |
| | | */ |
| | | public class DockingPreClassifyWrapper extends BaseEntityWrapper<DockingPreClassify, DockingPreClassifyVO> { |
| | | public static DockingPreClassifyWrapper build() { |
| | | return new DockingPreClassifyWrapper(); |
| | | } |
| | | @Override |
| | | public DockingPreClassifyVO entityVO(DockingPreClassify entity) { |
| | | DockingPreClassifyVO dockingPreClassifyVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingPreClassifyVO.class)); |
| | | return dockingPreClassifyVO; |
| | | } |
| | | |
| | | /*** |
| | | * 数组对象转换 |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreClassifyVO> entityVOs(Collection<DockingPreClassify> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreClassifyVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(vo -> { |
| | | vos.add(entityVO(vo)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * 数组对象转换 |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreClassify> voentitys(Collection<DockingPreClassifyVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreClassify>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * 数组对象转换 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingPreClassify voentity( DockingPreClassifyVO vo) { |
| | | DockingPreClassify entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreClassify.class)); |
| | | return entity; |
| | | } |
| | | } |