| | |
| | | import org.sxkj.gd.orderdata.mapper.GdSupplyDemandAuditAttachmentMapper; |
| | | import org.sxkj.gd.orderdata.service.IGdSupplyDemandAuditAttachmentService; |
| | | import org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditAttachmentVO; |
| | | import org.sxkj.gd.orderdata.wrapper.GdSupplyDemandAuditAttachmentWrapper; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 供需需求审核附件表 服务实现类 |
| | |
| | | if (demandId == null) { |
| | | throw new ServiceException("需求编号不能为空"); |
| | | } |
| | | List<GdSupplyDemandAuditAttachmentEntity> entities = baseMapper.selectSupplyDemandAuditAttachmentList(demandId); |
| | | if (Func.isEmpty(entities)) { |
| | | List<GdSupplyDemandAuditAttachmentVO> attachments = baseMapper.selectSupplyDemandAuditAttachmentList(demandId); |
| | | if (Func.isEmpty(attachments)) { |
| | | return java.util.Collections.emptyList(); |
| | | } |
| | | GdSupplyDemandAuditAttachmentWrapper wrapper = GdSupplyDemandAuditAttachmentWrapper.build(); |
| | | return entities.stream() |
| | | .map(wrapper::entityVO) |
| | | .collect(Collectors.toList()); |
| | | return attachments; |
| | | } |
| | | |
| | | } |