From 3ae5f86787af4dca085e3013802c29b20a2a9d20 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 15 九月 2025 09:30:43 +0800
Subject: [PATCH] 供应商erp

---
 ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java |   10 +++++++---
 1 files changed, 7 insertions(+), 3 deletions(-)

diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java
index 646aef0..8a4daf9 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java
@@ -21,7 +21,9 @@
 
 import javax.annotation.Resource;
 import java.math.BigDecimal;
+import java.time.LocalDateTime;
 import java.util.Collections;
+import java.util.Date;
 import java.util.List;
 import java.util.stream.Collectors;
 
@@ -145,8 +147,12 @@
                     .last("LIMIT 1"));
             supplierClinicId =crmClinic.getId();
         }
+
+        // 当前时间一个月后
+        Date endDate = DateUtils.addMonths(DateUtils.getNowDate(), 1);
+
         PageInfo<TErpGoodsInventoryVO> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
-        List<TErpGoodsInventoryVO> list = this.baseMapper.pageInventoryGoodsPageList(query, pageInfo, user,supplierClinicId);
+        List<TErpGoodsInventoryVO> list = this.baseMapper.pageInventoryGoodsPageList(query, pageInfo, user,supplierClinicId,endDate);
         if (list.isEmpty()) {
             return pageInfo;
         }
@@ -246,12 +252,10 @@
                 TErpSupplierOutbound tErpSupplierOutbound = new TErpSupplierOutbound();
                 tErpSupplierOutbound.setWarehouseId(dto.getWarehouseId());
                 tErpSupplierOutbound.setSupplierId(supplierClinicId);
-                tErpSupplierOutbound.setGoodsId(tErpSupplierWarehousing1.getGoodsId());
                 tErpSupplierOutbound.setOutboundType(6);
                 tErpSupplierOutbound.setOutboundNumber("G" + s);
                 int count = inventoryGoodsDto.getNum() - inventoryGoodsDto.getInventoryCount();
                 tErpSupplierOutbound.setTotalMoney(erpGoods.getSalesAmount().multiply(new BigDecimal(count)));
-                tErpSupplierOutbound.setGoodsId(erpGoods.getId());
                 erpSupplierOutboundMapper.insert(tErpSupplierOutbound);
 
 

--
Gitblit v1.7.1