From 441eb455e1e8a9283cd569c132b14ba8da4c54a6 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期六, 11 十月 2025 17:49:47 +0800
Subject: [PATCH] 导出,短信,模板消息
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsServiceImpl.java | 9 ++++++---
1 files changed, 6 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 27daf7c..0e261e4 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,6 +21,8 @@
import com.ruoyi.system.service.TErpSupplierInventoryGoodsService;
import com.ruoyi.system.vo.*;
import org.springframework.stereotype.Service;
+import org.springframework.transaction.annotation.Propagation;
+import org.springframework.transaction.annotation.Transactional;
import javax.annotation.Resource;
import java.math.BigDecimal;
@@ -479,6 +481,7 @@
}
@Override
+ @Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
public void inventoryGoods(InventoryDto dto, SysUser user) {
Integer roleType = user.getRoleType();
String supplierClinicId = null;
@@ -520,8 +523,8 @@
tErpSupplierWarehousing.setGoodsId(tErpSupplierWarehousing1.getGoodsId());
tErpSupplierWarehousing.setGoodsName(erpGoods.getGoodsName());
tErpSupplierWarehousing.setGoodsCount(inventoryGoodsDto.getInventoryCount() - inventoryGoodsDto.getNum());
- tErpSupplierWarehousing.setUnitAmount(erpGoods.getSalesAmount());
- tErpSupplierWarehousing.setTotalPrice(erpGoods.getSalesAmount().multiply(new BigDecimal(tErpSupplierWarehousing.getGoodsCount())));
+ tErpSupplierWarehousing.setUnitAmount(tErpSupplierWarehousing1.getUnitAmount());
+ tErpSupplierWarehousing.setTotalPrice(tErpSupplierWarehousing1.getUnitAmount().multiply(new BigDecimal(tErpSupplierWarehousing.getGoodsCount())));
// 当前年月日时分秒
String time = DateUtils.dateTimeNow();
tErpSupplierWarehousing.setWarehouseNo("G" + time);
@@ -567,7 +570,7 @@
tErpSupplierOutboundGoods.setWarehousingId(tErpSupplierWarehousing1.getId());
tErpSupplierOutboundGoods.setWarehousingBatchId(tErpSupplierWarehousingBatch.getId());
tErpSupplierOutboundGoods.setOutboundCount(count);
- tErpSupplierOutboundGoods.setTotalPrice(erpGoods.getSalesAmount().multiply(new BigDecimal(count)));
+ tErpSupplierOutboundGoods.setTotalPrice(tErpSupplierWarehousing1.getUnitAmount().multiply(new BigDecimal(count)));
erpSupplierOutboundGoodsMapper.insert(tErpSupplierOutboundGoods);
--
Gitblit v1.7.1