From 3ca1cefd9bed863131ee3f684ff127bd7ac877aa Mon Sep 17 00:00:00 2001
From: 云 <2163098428@qq.com>
Date: 星期三, 05 八月 2026 11:35:16 +0800
Subject: [PATCH] feat(ai): 优化AI知识文档处理功能
---
yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/quotation/CrmSaleQuotationController.java | 15 +++++++++++++++
1 files changed, 15 insertions(+), 0 deletions(-)
diff --git a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/quotation/CrmSaleQuotationController.java b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/quotation/CrmSaleQuotationController.java
index 542f3e0..58b5dba 100644
--- a/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/quotation/CrmSaleQuotationController.java
+++ b/yudao-module-crm/src/main/java/cn/iocoder/yudao/module/crm/controller/admin/quotation/CrmSaleQuotationController.java
@@ -13,7 +13,9 @@
import cn.iocoder.yudao.module.crm.controller.admin.quotation.vo.CrmSaleQuotationSaveReqVO;
import cn.iocoder.yudao.module.crm.dal.dataobject.quotation.CrmSaleQuotationDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.quotation.CrmSaleQuotationProductDO;
+import cn.iocoder.yudao.module.crm.dal.dataobject.business.CrmBusinessDO;
import cn.iocoder.yudao.module.crm.dal.dataobject.customer.CrmCustomerDO;
+import cn.iocoder.yudao.module.crm.service.business.CrmBusinessService;
import cn.iocoder.yudao.module.crm.service.customer.CrmCustomerService;
import cn.iocoder.yudao.module.crm.service.quotation.CrmSaleQuotationService;
import cn.iocoder.yudao.module.mdm.api.item.MdmItemApi;
@@ -66,6 +68,8 @@
private MdmUnitMeasureApi mdmUnitMeasureApi;
@Resource
private CrmCustomerService customerService;
+ @Resource
+ private CrmBusinessService businessService;
@Resource
private StorageAttachmentApi storageAttachmentApi;
@@ -178,6 +182,13 @@
respVO.setCustomerName(customer.getName());
}
}
+ // 2.1 濉厖鍟嗘満鍚嶇О
+ if (saleQuotation.getBusinessId() != null) {
+ CrmBusinessDO business = businessService.getBusiness(saleQuotation.getBusinessId());
+ if (business != null) {
+ respVO.setBusinessName(business.getName());
+ }
+ }
// 3. 濉厖鍏宠仈淇℃伅
fillSaleQuotationRelatedFields(respVO);
// 4. 濉厖闄勪欢鍒楄〃
@@ -204,6 +215,9 @@
// 1.5 閮ㄩ棬淇℃伅
Map<Long, DeptRespDTO> deptMap = deptApi.getDeptMap(
convertSet(pageResult.getList(), CrmSaleQuotationDO::getOwnerUserId));
+ // 1.6 鍟嗘満淇℃伅锛堣繃婊� null锛宐usinessId 涓哄彲閫夊瓧娈碉級
+ Map<Long, CrmBusinessDO> businessMap = businessService.getBusinessMap(
+ convertSet(pageResult.getList(), CrmSaleQuotationDO::getBusinessId, vo -> vo.getBusinessId() != null));
// 2. 寮�濮嬫嫾鎺�
return BeanUtils.toBean(pageResult, CrmSaleQuotationRespVO.class, vo -> {
@@ -213,6 +227,7 @@
MapUtils.findAndThen(customerMap, vo.getCustomerId(), customer -> vo.setCustomerName(customer.getName()));
MapUtils.findAndThen(userMap, vo.getOwnerUserId(), user -> vo.setOwnerUserName(user.getNickname()));
MapUtils.findAndThen(deptMap, vo.getOwnerUserId(), dept -> vo.setOwnerUserDeptName(dept.getName()));
+ MapUtils.findAndThen(businessMap, vo.getBusinessId(), business -> vo.setBusinessName(business.getName()));
});
}
--
Gitblit v1.9.3