| | |
| | | import org.sxkj.gd.orderdata.mapper.GdSupplyDemandAuditMapper; |
| | | import org.sxkj.gd.orderdata.service.IGdSupplyDemandAuditService; |
| | | import org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditVO; |
| | | import org.sxkj.gd.orderdata.wrapper.GdSupplyDemandAuditWrapper; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | |
| | | import java.util.List; |
| | | import java.util.stream.Collectors; |
| | | |
| | | /** |
| | | * 供需需求审核记录表 服务实现类 |
| | |
| | | * @since 2026-01-16 |
| | | */ |
| | | @Service |
| | | public class GdSupplyDemandAuditServiceImpl extends BaseServiceImpl<GdSupplyDemandAuditMapper, GdSupplyDemandAuditEntity> implements IGdSupplyDemandAuditService { |
| | | public class GdSupplyDemandAuditServiceImpl extends |
| | | BaseServiceImpl<GdSupplyDemandAuditMapper, GdSupplyDemandAuditEntity> implements IGdSupplyDemandAuditService { |
| | | |
| | | @Override |
| | | public IPage<GdSupplyDemandAuditVO> selectGdSupplyDemandAuditPage(IPage<GdSupplyDemandAuditVO> page, GdSupplyDemandAuditVO gdSupplyDemandAudit) { |
| | | public IPage<GdSupplyDemandAuditVO> selectGdSupplyDemandAuditPage(IPage<GdSupplyDemandAuditVO> page, |
| | | GdSupplyDemandAuditVO gdSupplyDemandAudit) { |
| | | return page.setRecords(baseMapper.selectGdSupplyDemandAuditPage(page, gdSupplyDemandAudit)); |
| | | } |
| | | |
| | | |
| | | @Override |
| | | public List<GdSupplyDemandAuditExcel> exportGdSupplyDemandAudit(Wrapper<GdSupplyDemandAuditEntity> queryWrapper) { |
| | | List<GdSupplyDemandAuditExcel> gdSupplyDemandAuditList = baseMapper.exportGdSupplyDemandAudit(queryWrapper); |
| | | //gdSupplyDemandAuditList.forEach(gdSupplyDemandAudit -> { |
| | | // gdSupplyDemandAudit.setTypeName(DictCache.getValue(DictEnum.YES_NO, GdSupplyDemandAudit.getType())); |
| | | //}); |
| | | // gdSupplyDemandAuditList.forEach(gdSupplyDemandAudit -> { |
| | | // gdSupplyDemandAudit.setTypeName(DictCache.getValue(DictEnum.YES_NO, |
| | | // GdSupplyDemandAudit.getType())); |
| | | // }); |
| | | return gdSupplyDemandAuditList; |
| | | } |
| | | |
| | |
| | | if (demandId == null) { |
| | | throw new ServiceException("需求编号不能为空"); |
| | | } |
| | | List<GdSupplyDemandAuditEntity> entities = baseMapper.selectSupplyDemandAuditList(demandId); |
| | | if (Func.isEmpty(entities)) { |
| | | List<GdSupplyDemandAuditVO> voList = baseMapper.selectSupplyDemandAuditList(demandId); |
| | | if (Func.isEmpty(voList)) { |
| | | return java.util.Collections.emptyList(); |
| | | } |
| | | GdSupplyDemandAuditWrapper wrapper = GdSupplyDemandAuditWrapper.build(); |
| | | return entities.stream() |
| | | .map(wrapper::entityVO) |
| | | .collect(Collectors.toList()); |
| | | return voList; |
| | | } |
| | | |
| | | } |