From 49dd9ee3dea22203cd1a0cc53745cffb6607122c Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 15 十月 2025 18:28:51 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java | 18 ++++++++++++------
1 files changed, 12 insertions(+), 6 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 0e261e4..4da89fe 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
@@ -13,10 +13,7 @@
import com.ruoyi.system.dto.InventoryGoodsDto;
import com.ruoyi.system.mapper.*;
import com.ruoyi.system.model.*;
-import com.ruoyi.system.query.TClinicGoodsWarehouseQuery;
-import com.ruoyi.system.query.TErpGoodsAdminQuery;
-import com.ruoyi.system.query.TErpGoodsInventoryQuery;
-import com.ruoyi.system.query.TErpGoodsQuery;
+import com.ruoyi.system.query.*;
import com.ruoyi.system.service.TErpGoodsService;
import com.ruoyi.system.service.TErpSupplierInventoryGoodsService;
import com.ruoyi.system.vo.*;
@@ -153,6 +150,11 @@
}
@Override
+ public List<TErpGoods> pageAddList(Page<TErpGoods> tErpGoodsPage, String clinicSupplierId, PageAddListQuery query) {
+ return this.baseMapper.pageAddList(tErpGoodsPage, clinicSupplierId, query);
+ }
+
+ @Override
public List<TErpGoodsVO> listExport(TErpGoodsQuery query, SysUser user) {
List<TErpGoodsVO> list = this.baseMapper.listExport(query, user);
if (list.isEmpty()) {
@@ -185,7 +187,7 @@
@Override
public boolean isExit(String goodsIdCode, String quasiNumber,String id) {
- Long size = this.baseMapper.selectCount(new LambdaQueryWrapper<>(TErpGoods.class).ne(id!=null,TErpGoods::getId, id).and(q -> q.eq(TErpGoods::getGoodsIdCode, goodsIdCode).or().eq(TErpGoods::getQuasiNumber, quasiNumber)));
+ Long size = this.baseMapper.selectCount(new LambdaQueryWrapper<>(TErpGoods.class).eq(TErpGoods::getGoodsSource,1).ne(id!=null,TErpGoods::getId, id).and(q -> q.eq(TErpGoods::getGoodsIdCode, goodsIdCode).or().eq(TErpGoods::getQuasiNumber, quasiNumber)));
if (size > 0) {
return true;
}
@@ -554,6 +556,9 @@
} else {
+ TErpSupplierWarehousingBatch tErpSupplierWarehousingBatch1 = erpSupplierWarehousingBatchMapper.selectById(inventoryGoodsDto.getId());
+ String warehousingId1 = tErpSupplierWarehousingBatch1.getWarehousingId();
+ TErpSupplierWarehousing tErpSupplierWarehousing2 = erpSupplierWarehousingMapper.selectById(warehousingId1);
TErpSupplierOutbound tErpSupplierOutbound = new TErpSupplierOutbound();
tErpSupplierOutbound.setWarehouseId(dto.getWarehouseId());
@@ -561,7 +566,8 @@
tErpSupplierOutbound.setOutboundType(6);
tErpSupplierOutbound.setOutboundNumber("G" + s);
int count = inventoryGoodsDto.getNum() - inventoryGoodsDto.getInventoryCount();
- tErpSupplierOutbound.setTotalMoney(erpGoods.getSalesAmount().multiply(new BigDecimal(count)));
+ tErpSupplierOutbound.setTotalMoney(tErpSupplierWarehousing1.getUnitAmount().multiply(new BigDecimal(count)));
+ tErpSupplierOutbound.setGoodsId(tErpSupplierWarehousing2.getGoodsId());
erpSupplierOutboundMapper.insert(tErpSupplierOutbound);
--
Gitblit v1.7.1