Browse Source

[fix] 销售管理

修复原客户资料按照业务搜索没有效果的问题:
修改 查询客户资料信息列表后端接口,新增在分页查询之前从前端传入的业务员名字进行名字转换操作
新增 客户资料通过用户名找到业务登录名,重新给业务员赋值后端方法
dev
liuxiaoxu 3 months ago
parent
commit
2510bb242f
  1. 3
      ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java
  2. 8
      ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java
  3. 13
      ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java
  4. 2
      ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

3
ruoyi-admin/src/main/java/com/ruoyi/system/controller/SysCustomerController.java

@ -112,6 +112,9 @@ public class SysCustomerController extends BaseController
sysCustomerVo.setApplyUser(curUser.getLoginName());
}
String tempLoginName = sysCustomerService.convertName(sysCustomerVo);
sysCustomerVo.setBusinessMembers(tempLoginName);
startPage();
List<SysCustomerVo> list = sysCustomerService.selectSysCustomerList(sysCustomerVo);
return getDataTable(list);

8
ruoyi-admin/src/main/java/com/ruoyi/system/service/ISysCustomerService.java

@ -2,6 +2,7 @@ package com.ruoyi.system.service;
import com.ruoyi.aftersales.domain.dto.CustomerDto;
import com.ruoyi.system.domain.SysCustomer;
import com.ruoyi.system.domain.SysCustomerQuoteVo;
import com.ruoyi.system.domain.SysCustomerVo;
import com.ruoyi.system.domain.SysInvoice;
import org.activiti.engine.runtime.ProcessInstance;
@ -115,4 +116,11 @@ public interface ISysCustomerService
* 根据客户资料对象作废客户资料
* */
int cancelSysCustomerByObject(SysCustomer sysCustomer);
/**
* 通过用户名找到业务登录名重新给业务员赋值
* */
String convertName(SysCustomerVo sysCustomerVo);
}

13
ruoyi-admin/src/main/java/com/ruoyi/system/service/impl/SysCustomerServiceImpl.java

@ -549,4 +549,17 @@ public class SysCustomerServiceImpl implements ISysCustomerService
return sysCustomerMapper.updateSysCustomer(tempSysCustomer);
}
/**
* 通过用户名找到业务登录名重新给业务员赋值
* */
@Override
public String convertName(SysCustomerVo sysCustomerVo) {
String businessMembers = sysCustomerVo.getBusinessMembers();
if (StringUtils.isNotEmpty(businessMembers)){
String loginName = userMapper.selectLoginNameByUserName(businessMembers);
return loginName;
}
return businessMembers;
}
}

2
ruoyi-admin/src/main/resources/mapper/system/SysCustomerMapper.xml

@ -113,7 +113,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="exportSales != null and exportSales != ''"> and s.export_sales = #{exportSales}</if>
<if test="auditStatus!=null and auditStatus != ''"> and s.audit_status = #{auditStatus}</if>
<if test="useStatus!=null and useStatus != ''"> and s.use_status = #{useStatus}</if>
<if test="businessMembers !=null and businessMembers !=''"> and s.business_members like concat('%',#{businessMembers}, '%')</if>
<if test="businessMembers !=null and businessMembers !=''"> and s.business_members = #{businessMembers}</if>
<if test="enterpriseCode != null and enterpriseCode != ''"> and s.enterprise_code like concat('%', #{enterpriseCode}, '%')</if>
<if test="enterpriseName != null and enterpriseName != ''"> and s.enterprise_name like concat('%', #{enterpriseName}, '%')</if>
<if test="customerPurser != null and customerPurser != ''"> and s.customer_purser like concat('%', #{customerPurser}, '%')</if>

Loading…
Cancel
Save