From 18039c6046648d129a33059f72c9dbcbe7c71998 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期一, 13 十月 2025 15:56:09 +0800
Subject: [PATCH] 盘点问题修改
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpClinicWarehousingServiceImpl.java | 16 ++++++++--------
1 files changed, 8 insertions(+), 8 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpClinicWarehousingServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpClinicWarehousingServiceImpl.java
index badeda8..2f8390a 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpClinicWarehousingServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpClinicWarehousingServiceImpl.java
@@ -117,13 +117,13 @@
if(tErpSupplierInventoryGoods1!=null){
// 盘盈 查入库
if(tErpSupplierInventoryGoods1.getInventoryType()==1){
- TErpClinicWarehousing tErpSupplierWarehousing = erpClinicWarehousingMapper.selectById(tErpSupplierInventoryGoods1.getWarehousingId());
+ TErpClinicWarehousingBatch tErpSupplierWarehousing = erpClinicWarehousingBatchMapper.selectById(tErpSupplierInventoryGoods1.getWarehousingBatchId());
// List<TErpSupplierWarehousingBatch> tErpSupplierWarehousingBatches = erpSupplierWarehousingBatchMapper.selectList(new LambdaQueryWrapper<TErpSupplierWarehousingBatch>().eq(TErpSupplierWarehousingBatch::getWarehousingId, tErpSupplierWarehousing.getId()));
// int sum = tErpSupplierWarehousingBatches.stream().mapToInt(TErpSupplierWarehousingBatch::getWarehousingNumber).sum();
String goodsId = tErpSupplierInventoryGoods1.getGoodsId();
- TErpGoods goods = erpGoodsMapper.selectById(goodsId);
+// TErpGoods goods = erpGoodsMapper.selectById(goodsId);
int count = tErpSupplierInventoryGoods1.getInventoryCount() - tErpSupplierInventoryGoods1.getDamagedCount();
- BigDecimal multiply = goods.getSalesAmount().multiply(new BigDecimal(count));
+ BigDecimal multiply = tErpSupplierWarehousing.getSalesAmount().multiply(new BigDecimal(count));
add = add.add(multiply);
}else {
// 盘亏 查出库
@@ -131,11 +131,11 @@
List<TErpClinicOutboundGoods> tErpSupplierOutboundGoods = erpClinicOutboundGoodsMapper.selectList(new LambdaQueryWrapper<TErpClinicOutboundGoods>().eq(TErpClinicOutboundGoods::getOutboundId, tErpSupplierOutbound.getId()));
for (TErpClinicOutboundGoods tErpSupplierOutboundGood : tErpSupplierOutboundGoods) {
- TErpClinicWarehousing tErpSupplierWarehousing = erpClinicWarehousingMapper.selectById(tErpSupplierOutboundGood.getWarehousingId());
- String goodsId = tErpSupplierInventoryGoods1.getGoodsId();
- TErpGoods goods = erpGoodsMapper.selectById(goodsId);
+ TErpClinicWarehousingBatch tErpSupplierWarehousing = erpClinicWarehousingBatchMapper.selectById(tErpSupplierOutboundGood.getWarehousingBatchId());
+// String goodsId = tErpSupplierInventoryGoods1.getGoodsId();
+// TErpGoods goods = erpGoodsMapper.selectById(goodsId);
int count = tErpSupplierInventoryGoods1.getInventoryCount() - tErpSupplierInventoryGoods1.getDamagedCount();
- BigDecimal multiply = goods.getSalesAmount().multiply(new BigDecimal(count));
+ BigDecimal multiply = tErpSupplierWarehousing.getSalesAmount().multiply(new BigDecimal(count));
add = add.add(multiply);
}
// int sum = tErpSupplierOutboundGoods.stream().mapToInt(TErpSupplierOutboundGoods::getOutboundCount).sum();
@@ -396,7 +396,7 @@
erpClinicWarehousingBatchMapper.insert(tErpClinicWarehousingBatch);
- if(goods.getMaintenanceInterval()!=null){
+ if(goods.getMaintenanceInterval()!=null && !goods.getMaintenanceInterval().isEmpty()){
TErpMaintenanceReminder tErpMaintenanceReminder = new TErpMaintenanceReminder();
tErpMaintenanceReminder.setClinicSupplierId(supplierClinicId);
tErpMaintenanceReminder.setMaintenanceType(2);
--
Gitblit v1.7.1