Ver Fonte

fix(customer): 修复客户信息中销售和服务人员ID映射问题

- 修正了销售负责人ID从customerSalesInfo改为从vo对象获取
- 修正了客服人员ID从customerSalesInfo改为从vo对象获取
- 修正了归属部门ID从customerSalesInfo改为从vo对象获取
- 修正了员工ID集合从staffIds改为comStaffIds变量
- 修正了部门ID集合从deptIds改为comDeptIds变量
- 修正了订单服务中部门服务调用从remoteComDeptService改为remoteDeptService
hurx há 1 mês atrás
pai
commit
d0214e143b

+ 7 - 7
ruoyi-modules/ruoyi-customer/src/main/java/org/dromara/customer/service/impl/CustomerInfoServiceImpl.java

@@ -176,22 +176,22 @@ public class CustomerInfoServiceImpl extends ServiceImpl<CustomerInfoMapper, Cus
         Set<Long> comDeptIds = new HashSet<>(); //系统的部门
 
         if (vo.getSalesPersonId() != null) {
-            comStaffIds.add(customerSalesInfo.getSalesPersonId());
+            comStaffIds.add(vo.getSalesPersonId());
         }
         if (vo.getServiceStaffId() != null) {
-            comStaffIds.add(customerSalesInfo.getServiceStaffId());
+            comStaffIds.add(vo.getServiceStaffId());
         }
         if (vo.getBelongingDepartmentId() != null) {
-            comDeptIds.add(customerSalesInfo.getBelongingDepartmentId());
+            comDeptIds.add(vo.getBelongingDepartmentId());
         }
 
-        Map<Long, String> comStaffMap = staffIds.isEmpty()
+        Map<Long, String> comStaffMap = comStaffIds.isEmpty()
             ? Collections.emptyMap()
-            : remoteComStaffService.selectStaffNameByIds(staffIds);
+            : remoteComStaffService.selectStaffNameByIds(comStaffIds);
 
-        Map<Long, String> comDeptMap = deptIds.isEmpty()//系统的部门
+        Map<Long, String> comDeptMap = comDeptIds.isEmpty()//系统的部门
             ? Collections.emptyMap()
-            : remoteDeptService.selectDeptNameByIds(deptIds);
+            : remoteDeptService.selectDeptNameByIds(comDeptIds);
 
         /*回填系统的人员与部门*/
         vo.setSalesPersonName(comStaffMap.get(vo.getSalesPersonId()));

+ 1 - 1
ruoyi-modules/ruoyi-order/src/main/java/org/dromara/order/service/impl/OrderMainServiceImpl.java

@@ -602,7 +602,7 @@ public class OrderMainServiceImpl extends ServiceImpl<OrderMainMapper, OrderMain
 
             Map<Long, String> deptMap = deptIds.isEmpty()
                 ? Collections.emptyMap()
-                : remoteComDeptService.selectDeptNameByIds(deptIds);
+                : remoteDeptService.selectDeptNameByIds(deptIds);
 
             mainBo.setBusinessStaff(staffMap.get(salesPersonId));
             mainBo.setCustomerService(staffMap.get(serviceStaffId));