From ae2892132b50a1796941fb8d8aa82927d8ae1fcf Mon Sep 17 00:00:00 2001
From: gaoluyang <2820782392@qq.com>
Date: 星期一, 02 十一月 2026 11:10:23 +0800
Subject: [PATCH] SRM 供应商精简列表改为返回启用状态的供应商档案
---
yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/service/supplier/SrmSupplierServiceImpl.java | 16 +++++++++++++++-
1 files changed, 15 insertions(+), 1 deletions(-)
diff --git a/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/service/supplier/SrmSupplierServiceImpl.java b/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/service/supplier/SrmSupplierServiceImpl.java
index 129d4fa..d892d5c 100644
--- a/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/service/supplier/SrmSupplierServiceImpl.java
+++ b/yudao-module-srm/src/main/java/cn/iocoder/yudao/module/srm/service/supplier/SrmSupplierServiceImpl.java
@@ -8,6 +8,7 @@
import cn.iocoder.yudao.framework.common.pojo.PageResult;
import cn.iocoder.yudao.framework.common.util.object.BeanUtils;
import cn.iocoder.yudao.framework.mybatis.core.query.LambdaQueryWrapperX;
+import cn.iocoder.yudao.framework.operatelog.core.util.OperateLogUtils;
import cn.iocoder.yudao.module.srm.controller.admin.supplier.vo.SrmSupplierImportExcelVO;
import cn.iocoder.yudao.module.srm.controller.admin.supplier.vo.SrmSupplierImportRespVO;
import cn.iocoder.yudao.module.srm.controller.admin.supplier.vo.SrmSupplierPageReqVO;
@@ -23,6 +24,7 @@
import cn.iocoder.yudao.module.srm.dal.mysql.SrmTenderBidMapper;
import cn.iocoder.yudao.module.srm.enums.ErrorCodeConstants;
import cn.iocoder.yudao.module.srm.enums.SupplierTypeEnum;
+import com.mzt.logapi.starter.annotation.LogRecord;
import jakarta.annotation.Resource;
import org.springframework.stereotype.Service;
import org.springframework.validation.annotation.Validated;
@@ -35,6 +37,8 @@
import java.util.LinkedHashMap;
import java.util.List;
import java.util.Map;
+
+import static cn.iocoder.yudao.module.srm.enums.LogRecordConstants.*;
@Service
@Validated
@@ -111,6 +115,8 @@
@Override
@Transactional(rollbackFor = Exception.class)
+ @LogRecord(type = LOG_SUPPLIER_TYPE, subType = LOG_SUPPLIER_IMPORT_SUB_TYPE, bizNo = "0",
+ success = LOG_SUPPLIER_IMPORT_SUCCESS)
public SrmSupplierImportRespVO importSupplierList(List<SrmSupplierImportExcelVO> importList, Boolean updateSupport) {
if (CollUtil.isEmpty(importList)) {
throw ServiceExceptionUtil.exception(ErrorCodeConstants.SUPPLIER_IMPORT_LIST_IS_EMPTY);
@@ -149,12 +155,20 @@
respVO.getFailureList().put(name, reason == null ? "瀵煎叆澶辫触" : reason);
}
}
+ // 璁板綍瀵煎叆缁撴灉姹囨�伙紝渚� @LogRecord 鐨� success 鏂囨寮曠敤
+ OperateLogUtils.putImportSummary(respVO.getCreateList(), respVO.getUpdateList(), respVO.getFailureList());
return respVO;
}
@Override
public List<SrmSupplierDO> getSupplierSimpleList() {
- return supplierMapper.selectApprovedList();
+ // 渚涘簲鍟嗘。妗堢洿鎺ョ淮鎶わ紙鏈鎴锋湭鍚敤鍑嗗叆瀹℃壒娴佺▼锛夛紝绮剧畝鍒楄〃杩斿洖鍏ㄩ儴鍚敤鐘舵�佺殑渚涘簲鍟嗭紝
+ // 渚涢噰璐敵璇枫�侀噰璐鍗曘�佸叆搴撱�侀��璐х瓑鍗曟嵁鐨勪緵搴斿晢涓嬫媺浣跨敤銆�
+ return supplierMapper.selectList(new LambdaQueryWrapperX<SrmSupplierDO>()
+ .and(w -> w.isNull(SrmSupplierDO::getStatus)
+ .or()
+ .eq(SrmSupplierDO::getStatus, CommonStatusEnum.ENABLE.getStatus()))
+ .orderByAsc(SrmSupplierDO::getId));
}
@Override
--
Gitblit v1.9.3