From b7ba43ae6ef3205be7a0697044f1a38ff3c9b952 Mon Sep 17 00:00:00 2001
From: liujie <1793218484@qq.com>
Date: 星期二, 14 十月 2025 18:31:57 +0800
Subject: [PATCH] bug修改
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java | 18 +++++++-----------
1 files changed, 7 insertions(+), 11 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java
index 56ef58c..6ab1680 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpProcurementServiceImpl.java
@@ -171,19 +171,15 @@
Integer roleType = user.getRoleType();
- String supplierClinicId = null;
+ List<String> supplierClinicId = null;
if (roleType == 6) {
TCrmWarehouse warehouse = crmWarehouseMapper.selectOne(Wrappers.lambdaQuery(TCrmWarehouse.class)
.eq(TCrmWarehouse::getUserId, user.getUserId())
.last("LIMIT 1"));
// 供应商
- TCrmSupplier crmSupplier = crmSupplierMapper.selectOne(Wrappers.lambdaQuery(TCrmSupplier.class)
- .eq(TCrmSupplier::getWarehouseId, warehouse.getId())
- .last("LIMIT 1"));
- supplierClinicId = crmSupplier.getId();
-
-
+ supplierClinicId = crmSupplierMapper.selectList(Wrappers.lambdaQuery(TCrmSupplier.class)
+ .eq(TCrmSupplier::getWarehouseId, warehouse.getId())).stream().map(TCrmSupplier::getId).collect(Collectors.toList());
String sTime = null;
String eTime = null;
if (query.getTime() != null && !query.getTime().isEmpty()) {
@@ -496,11 +492,11 @@
@Override
@Transactional(rollbackFor = Exception.class, propagation = Propagation.REQUIRED)
- public void detailProcurementSend(String clinicSupplierId, SysUser user, String id,String logisticsNumber) {
+ public void detailProcurementSend(List<String> clinicSupplierId, SysUser user, String id,String logisticsNumber) {
// 查出这个采购的下级商品
List<TErpProcurementGoods> list = erpProcurementGoodsService.list(new QueryWrapper<TErpProcurementGoods>().eq("procurement_id", id));
List<TErpSupplierWarehousing> tErpSupplierWarehousings = erpSupplierWarehousingMapper.selectList(new LambdaQueryWrapper<TErpSupplierWarehousing>()
- .eq(TErpSupplierWarehousing::getSupplierId, clinicSupplierId).in(TErpSupplierWarehousing::getGoodsId, list.stream().map(TErpProcurementGoods::getGoodsId).collect(Collectors.toList()))
+ .in(TErpSupplierWarehousing::getSupplierId, clinicSupplierId).in(TErpSupplierWarehousing::getGoodsId, list.stream().map(TErpProcurementGoods::getGoodsId).collect(Collectors.toList()))
.orderByAsc(BaseModel::getCreateTime));
if(tErpSupplierWarehousings.isEmpty()){
@@ -544,7 +540,7 @@
if(count>=purchaseCount){
// 添加出库记录
TErpSupplierOutbound tErpSupplierOutbound= new TErpSupplierOutbound();
- tErpSupplierOutbound.setSupplierId(clinicSupplierId);
+ tErpSupplierOutbound.setSupplierId(tErpSupplierWarehousing.getSupplierId());
tErpSupplierOutbound.setWarehouseId(tErpSupplierWarehousing.getWarehouseId());
tErpSupplierOutbound.setOutboundType(7);
//TODO 确定这个是采购价还是销售价格
@@ -567,7 +563,7 @@
purchaseCount = purchaseCount - count;
// 添加出库记录
TErpSupplierOutbound tErpSupplierOutbound= new TErpSupplierOutbound();
- tErpSupplierOutbound.setSupplierId(clinicSupplierId);
+ tErpSupplierOutbound.setSupplierId(tErpSupplierWarehousing.getSupplierId());
tErpSupplierOutbound.setWarehouseId(tErpSupplierWarehousing.getWarehouseId());
tErpSupplierOutbound.setOutboundType(7);
//TODO 确定这个是采购价还是销售价格
--
Gitblit v1.7.1