吉安感知网项目-后端
linwei
yesterday 89fd0b6ff97e90220376cec824eaf8eabb9d0a3e
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditServiceImpl.java
@@ -25,12 +25,10 @@
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;
/**
 * 供需需求审核记录表 服务实现类
@@ -39,20 +37,22 @@
 * @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;
   }
@@ -66,14 +66,11 @@
      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;
   }
}