| | |
| | | */ |
| | | package org.sxkj.gd.orderdata.service.impl; |
| | | |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.log.exception.ServiceException; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.springblade.core.tool.utils.Func; |
| | | import org.springframework.stereotype.Service; |
| | | import org.sxkj.gd.orderdata.entity.GdSupplyDemandAuditAttachmentEntity; |
| | | import org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditAttachmentVO; |
| | | import org.sxkj.gd.orderdata.excel.GdSupplyDemandAuditAttachmentExcel; |
| | | import org.sxkj.gd.orderdata.mapper.GdSupplyDemandAuditAttachmentMapper; |
| | | import org.sxkj.gd.orderdata.service.IGdSupplyDemandAuditAttachmentService; |
| | | import org.springframework.stereotype.Service; |
| | | import com.baomidou.mybatisplus.core.conditions.Wrapper; |
| | | import com.baomidou.mybatisplus.core.metadata.IPage; |
| | | import org.springblade.core.mp.base.BaseServiceImpl; |
| | | import org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditAttachmentVO; |
| | | |
| | | import java.util.List; |
| | | |
| | | /** |
| | |
| | | return gdSupplyDemandAuditAttachmentList; |
| | | } |
| | | |
| | | @Override |
| | | public boolean saveSupplyDemandAuditAttachments(List<GdSupplyDemandAuditAttachmentEntity> attachments) { |
| | | if (attachments == null || attachments.isEmpty()) { |
| | | return true; |
| | | } |
| | | return baseMapper.insertSupplyDemandAuditAttachments(attachments) > 0; |
| | | } |
| | | |
| | | @Override |
| | | public List<GdSupplyDemandAuditAttachmentVO> listSupplyDemandAuditAttachments(Long demandId) { |
| | | if (demandId == null) { |
| | | throw new ServiceException("需求编号不能为空"); |
| | | } |
| | | List<GdSupplyDemandAuditAttachmentVO> attachments = baseMapper.selectSupplyDemandAuditAttachmentList(demandId); |
| | | if (Func.isEmpty(attachments)) { |
| | | return java.util.Collections.emptyList(); |
| | | } |
| | | return attachments; |
| | | } |
| | | |
| | | } |