| | |
| | | package com.vci.ubcs.code.wrapper; |
| | | |
| | | import com.baomidou.mybatisplus.core.toolkit.CollectionUtils; |
| | | import com.vci.ubcs.code.entity.DockingPreApplyForm; |
| | | import com.vci.ubcs.code.vo.pagemodel.DockingPreApplyFormVO; |
| | | 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; |
| | | |
| | | /*** |
| | |
| | | * @date 2023-05-23 |
| | | */ |
| | | public class DockingPreApplyFormWrapper extends BaseEntityWrapper<DockingPreApplyForm, DockingPreApplyFormVO> { |
| | | |
| | | public static DockingPreApplyFormWrapper build() { |
| | | return new DockingPreApplyFormWrapper(); |
| | | } |
| | | @Override |
| | | public DockingPreApplyFormVO entityVO(DockingPreApplyForm entity) { |
| | | DockingPreApplyFormVO dockingPreApplyFormVO = Objects.requireNonNull(BeanUtil.copy(entity, DockingPreApplyFormVO.class)); |
| | | return dockingPreApplyFormVO; |
| | | } |
| | | |
| | | /*** |
| | | * 数组对象转换 |
| | | * @param entitys |
| | | * @return |
| | | */ |
| | | public List<DockingPreApplyFormVO> entityVOs(Collection<DockingPreApplyForm> entitys) { |
| | | if(CollectionUtils.isEmpty(entitys)) {return new ArrayList<>();} |
| | | List<DockingPreApplyFormVO> vos=new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(entitys)) { |
| | | entitys.stream().forEach(vo -> { |
| | | vos.add(entityVO(vo)); |
| | | }); |
| | | } |
| | | return vos; |
| | | } |
| | | |
| | | /*** |
| | | * 数组对象转换 |
| | | * @param vos |
| | | * @return |
| | | */ |
| | | public List<DockingPreApplyForm> voentitys(Collection<DockingPreApplyFormVO> vos) { |
| | | if(CollectionUtils.isEmpty(vos)) {return new ArrayList<>();} |
| | | List<DockingPreApplyForm>entitys =new ArrayList<>(); |
| | | if(!CollectionUtils.isEmpty(vos)) { |
| | | vos.stream().forEach(entity -> { |
| | | entitys.add(voentity(entity)); |
| | | }); |
| | | } |
| | | return entitys; |
| | | } |
| | | |
| | | /*** |
| | | * 数组对象转换 |
| | | * @param vo |
| | | * @return |
| | | */ |
| | | public DockingPreApplyForm voentity( DockingPreApplyFormVO vo) { |
| | | DockingPreApplyForm entity = Objects.requireNonNull(BeanUtil.copy(vo, DockingPreApplyForm.class)); |
| | | return entity; |
| | | } |
| | | } |