吉安感知网项目-后端
linwei
2026-02-05 08d4bb2bf4bfadc9ab5fcf6b0a2bfb543d22b2a0
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditAttachmentServiceImpl.java
@@ -16,15 +16,18 @@
 */
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;
/**
@@ -51,4 +54,24 @@
      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;
   }
}