|
@@ -110,6 +110,7 @@ public class CustomerContactServiceImpl extends ServiceImpl<CustomerContactMappe
|
|
|
LambdaQueryWrapper<CustomerContact> lqw = Wrappers.lambdaQuery();
|
|
LambdaQueryWrapper<CustomerContact> lqw = Wrappers.lambdaQuery();
|
|
|
lqw.orderByDesc(CustomerContact::getId);
|
|
lqw.orderByDesc(CustomerContact::getId);
|
|
|
lqw.eq(bo.getCustomerId() != null, CustomerContact::getCustomerId, bo.getCustomerId());
|
|
lqw.eq(bo.getCustomerId() != null, CustomerContact::getCustomerId, bo.getCustomerId());
|
|
|
|
|
+ lqw.like(StringUtils.isNotBlank(bo.getContactNo()), CustomerContact::getContactNo, bo.getContactNo());
|
|
|
lqw.like(StringUtils.isNotBlank(bo.getContactName()), CustomerContact::getContactName, bo.getContactName());
|
|
lqw.like(StringUtils.isNotBlank(bo.getContactName()), CustomerContact::getContactName, bo.getContactName());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), CustomerContact::getPhone, bo.getPhone());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getPhone()), CustomerContact::getPhone, bo.getPhone());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getOfficePhone()), CustomerContact::getOfficePhone, bo.getOfficePhone());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getOfficePhone()), CustomerContact::getOfficePhone, bo.getOfficePhone());
|
|
@@ -124,6 +125,14 @@ public class CustomerContactServiceImpl extends ServiceImpl<CustomerContactMappe
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getProvincialCityCounty()), CustomerContact::getProvincialCityCounty, bo.getProvincialCityCounty());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getProvincialCityCounty()), CustomerContact::getProvincialCityCounty, bo.getProvincialCityCounty());
|
|
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CustomerContact::getStatus, bo.getStatus());
|
|
lqw.eq(StringUtils.isNotBlank(bo.getStatus()), CustomerContact::getStatus, bo.getStatus());
|
|
|
|
|
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(bo.getCustomerName())) {
|
|
|
|
|
+ CustomerInfoVo customerInfoVo = customerInfoMapper.selectVoOne(new LambdaQueryWrapper<CustomerInfo>().eq(CustomerInfo::getCustomerName, bo.getCustomerName()));
|
|
|
|
|
+ if (ObjectUtil.isNotEmpty(customerInfoVo)) {
|
|
|
|
|
+ lqw.eq(CustomerContact::getCustomerId, customerInfoVo.getId());
|
|
|
|
|
+ } else {
|
|
|
|
|
+ lqw.eq(CustomerContact::getCustomerId, 0);
|
|
|
|
|
+ }
|
|
|
|
|
+ }
|
|
|
if (bo.getDeptId() != null) {
|
|
if (bo.getDeptId() != null) {
|
|
|
// 1. 获取当前部门及所有子部门的 ID 列表
|
|
// 1. 获取当前部门及所有子部门的 ID 列表
|
|
|
List<Long> deptIds = remoteDeptService.selectDeptChildrenIds(bo.getDeptId());
|
|
List<Long> deptIds = remoteDeptService.selectDeptChildrenIds(bo.getDeptId());
|