✨ 新增未关联业务员客户列表

This commit is contained in:
caojia
2026-10-29 10:35:24 +08:00
parent d02d3dd881
commit eafc8af89a
9 changed files with 172 additions and 1 deletions
@@ -2,7 +2,6 @@ package com.bms.customer.customerinfo.mapper;
import java.util.List;
import com.bms.customer.customerinfo.domain.BmsCustomer;
import com.bms.customer.customerinfo.domain.BmsCustomerOption;
import com.bms.customer.customerinfo.domain.BmsCustomerAttachment;
import com.bms.customer.customerinfo.domain.BmsCustomerCompany;
import com.bms.customer.customerinfo.domain.BmsCustomerContact;
@@ -44,6 +43,9 @@ public interface BmsCustomerMapper
*/
public List<BmsCustomerOption> selectCustomerOptions(BmsCustomer query);
/** 独立分页查询未关联业务员的客户,仅按 sales_user_id 为空筛选。 */
public List<UnlinkedSalesCustomerVO> selectUnlinkedSalesUserCustomerList(BmsCustomer query);
/** 校验业务员用户ID仍对应未删除的系统用户。 */
public int countValidSalesUserId(@org.apache.ibatis.annotations.Param("salesUserId") String salesUserId);
@@ -7,6 +7,7 @@ import com.bms.customer.customerinfo.domain.BmsCustomerAttachment;
import com.bms.customer.customerinfo.domain.BmsCustomerCompany;
import com.bms.customer.customerinfo.domain.BmsCustomerContact;
import com.bms.customer.customerinfo.domain.BmsCustomerLog;
import com.bms.customer.customerinfo.vo.UnlinkedSalesCustomerVO;
/**
* 客户主Service接口
@@ -40,6 +41,9 @@ public interface IBmsCustomerService
*/
public List<BmsCustomer> selectBmsCustomerList(BmsCustomer bmsCustomer);
/** 独立查询未关联业务员的客户。 */
public List<UnlinkedSalesCustomerVO> selectUnlinkedSalesUserCustomerList(BmsCustomer query);
/**
* 查询客户下拉选项。
* 只返回客户ID、客户编码、客户名称;keywords 按客户名称、客户编码、对外代码模糊查询。
@@ -19,6 +19,7 @@ import com.bms.customer.customerinfo.mapper.BmsCustomerMapper;
import com.bms.customer.customerinfo.domain.BmsCustomer;
import com.bms.customer.customerinfo.domain.BmsCustomerOption;
import com.bms.customer.customerinfo.domain.BmsCustomerLog;
import com.bms.customer.customerinfo.vo.UnlinkedSalesCustomerVO;
import com.bms.customer.customerinfo.service.IBmsCustomerLogService;
import com.bms.customer.customerinfo.service.IBmsCustomerService;
import com.bms.customer.customermoney.service.ICustomerMoneyService;
@@ -90,6 +91,14 @@ public class BmsCustomerServiceImpl implements IBmsCustomerService
return bmsCustomerMapper.selectBmsCustomerList(bmsCustomer);
}
/** 查询未关联业务员客户,保留客户业务员维度的数据范围。 */
@Override
@DataScope(deptAlias = "su", deptField = "dept_id", userAlias = "su", userField = "user_id")
public List<UnlinkedSalesCustomerVO> selectUnlinkedSalesUserCustomerList(BmsCustomer query)
{
return bmsCustomerMapper.selectUnlinkedSalesUserCustomerList(query);
}
/**
* 客户下拉选项。数据权限与客户列表一致,只查下拉需要的字段。
*/
@@ -0,0 +1,16 @@
package com.bms.customer.customerinfo.vo;
import lombok.Data;
/** 未关联业务员客户弹窗专用列表响应。 */
@Data
public class UnlinkedSalesCustomerVO
{
private Long customerId;
private String customerCode;
private String customerName;
private String customerCodeDw;
private String customerType;
private String isEnable;
private String sourceSalesCode;
}