From 08d4bb2bf4bfadc9ab5fcf6b0a2bfb543d22b2a0 Mon Sep 17 00:00:00 2001
From: linwei <872216696@qq.com>
Date: Thu, 05 Feb 2026 10:13:10 +0800
Subject: [PATCH] 工单优化

---
 drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditServiceImpl.java |   40 +++++++++++++++++++++++++++++++---------
 1 files changed, 31 insertions(+), 9 deletions(-)

diff --git a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditServiceImpl.java b/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditServiceImpl.java
index c282d6f..04ab9d1 100644
--- a/drone-service/drone-gd/src/main/java/org/sxkj/gd/orderdata/service/impl/GdSupplyDemandAuditServiceImpl.java
+++ b/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;
+	}
+
 }

--
Gitblit v1.9.3