吉安感知网项目-后端
linwei
2026-02-05 08d4bb2bf4bfadc9ab5fcf6b0a2bfb543d22b2a0
drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditServiceImpl.java
@@ -16,15 +16,18 @@
 */
package org.sxkj.gd.orderdata.service.impl;
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.GdSupplyDemandAuditEntity;
import org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditVO;
import org.sxkj.gd.orderdata.excel.GdSupplyDemandAuditExcel;
import org.sxkj.gd.orderdata.mapper.GdSupplyDemandAuditMapper;
import org.sxkj.gd.orderdata.service.IGdSupplyDemandAuditService;
import org.springframework.stereotype.Service;
import org.sxkj.gd.orderdata.vo.GdSupplyDemandAuditVO;
import com.baomidou.mybatisplus.core.conditions.Wrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import org.springblade.core.mp.base.BaseServiceImpl;
import java.util.List;
/**
@@ -34,21 +37,40 @@
 * @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;
   }
   @Override
   public boolean saveSupplyDemandAudit(GdSupplyDemandAuditEntity gdSupplyDemandAudit) {
      return baseMapper.insertSupplyDemandAudit(gdSupplyDemandAudit) > 0;
   }
   @Override
   public List<GdSupplyDemandAuditVO> listSupplyDemandAudit(Long demandId) {
      if (demandId == null) {
         throw new ServiceException("需求编号不能为空");
      }
      List<GdSupplyDemandAuditVO> voList = baseMapper.selectSupplyDemandAuditList(demandId);
      if (Func.isEmpty(voList)) {
         return java.util.Collections.emptyList();
      }
      return voList;
   }
}