|
@ -25,6 +25,7 @@ import com.yxt.anrui.portal.api.dictcommon.DictCommonFeign; |
|
|
import com.yxt.anrui.portal.api.dictcommon.DictCommonVo; |
|
|
import com.yxt.anrui.portal.api.dictcommon.DictCommonVo; |
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationFeign; |
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
import com.yxt.anrui.portal.api.sysorganization.SysOrganizationVo; |
|
|
|
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrg; |
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
import com.yxt.anrui.portal.api.sysstafforg.SysStaffOrgFeign; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserFeign; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserInfoVo; |
|
|
import com.yxt.anrui.portal.api.sysuser.SysUserInfoVo; |
|
@ -307,7 +308,32 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
} |
|
|
} |
|
|
customerTemp.setUpdateBySid(dto.getUserSid()); |
|
|
customerTemp.setUpdateBySid(dto.getUserSid()); |
|
|
//客户编码
|
|
|
//客户编码
|
|
|
String customerNo = HanZiConverterPinYin.getPinYinFirst(customerTemp.getName()) + customerTemp.getMobile(); |
|
|
String customerNoPrefix = ""; |
|
|
|
|
|
//查询业务员的分公司简称和部门简称
|
|
|
|
|
|
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(customerTemp.getStaffSid()); |
|
|
|
|
|
if (staffOrgResultBean.getSuccess()) { |
|
|
|
|
|
SysStaffOrg sysStaffOrg = staffOrgResultBean.getData(); |
|
|
|
|
|
if (sysStaffOrg != null) { |
|
|
|
|
|
ResultBean<String> resultBean1 = sysStaffOrgFeign.getOrgSidByPath(sysStaffOrg.getOrgSidPath()); |
|
|
|
|
|
if (resultBean1.getSuccess()) { |
|
|
|
|
|
String osid = resultBean1.getData(); |
|
|
|
|
|
if (StringUtils.isNotBlank(osid)) { |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(osid); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgAbbre(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String orgSid1 = sysStaffOrg.getOrgSid(); |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(orgSid1); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgCode(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String customerNo = customerNoPrefix + HanZiConverterPinYin.getPinYinFirst(customerTemp.getName()) + customerTemp.getMobile(); |
|
|
customerTemp.setCustomerNo(customerNo); |
|
|
customerTemp.setCustomerNo(customerNo); |
|
|
boolean updateBoolean = updateById(customerTemp); |
|
|
boolean updateBoolean = updateById(customerTemp); |
|
|
if (updateBoolean) { |
|
|
if (updateBoolean) { |
|
@ -662,7 +688,33 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
customerTemp.setRemind_day(dto.getRemind_day()); |
|
|
customerTemp.setRemind_day(dto.getRemind_day()); |
|
|
} |
|
|
} |
|
|
//客户编码
|
|
|
//客户编码
|
|
|
String customerNo = HanZiConverterPinYin.getPinYinFirst(customerTemp.getName()) + customerTemp.getMobile(); |
|
|
String customerNoPrefix = ""; |
|
|
|
|
|
//查询业务员的分公司简称和部门简称
|
|
|
|
|
|
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(customerTemp.getStaffSid()); |
|
|
|
|
|
if (staffOrgResultBean.getSuccess()) { |
|
|
|
|
|
SysStaffOrg sysStaffOrg = staffOrgResultBean.getData(); |
|
|
|
|
|
if (sysStaffOrg != null) { |
|
|
|
|
|
ResultBean<String> resultBean1 = sysStaffOrgFeign.getOrgSidByPath(sysStaffOrg.getOrgSidPath()); |
|
|
|
|
|
if (resultBean1.getSuccess()) { |
|
|
|
|
|
String osid = resultBean1.getData(); |
|
|
|
|
|
if (StringUtils.isNotBlank(osid)) { |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(osid); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgAbbre(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String orgSid1 = sysStaffOrg.getOrgSid(); |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(orgSid1); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgCode(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
//客户编码
|
|
|
|
|
|
String customerNo = customerNoPrefix + HanZiConverterPinYin.getPinYinFirst(customerTemp.getName()) + customerTemp.getMobile(); |
|
|
customerTemp.setCustomerNo(customerNo); |
|
|
customerTemp.setCustomerNo(customerNo); |
|
|
save(customerTemp); |
|
|
save(customerTemp); |
|
|
// 增加跟进记录
|
|
|
// 增加跟进记录
|
|
@ -838,8 +890,33 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
crmCustomerTemp.setFollow_state_key(key); |
|
|
crmCustomerTemp.setFollow_state_key(key); |
|
|
crmCustomerTemp.setFollow_state(dictCommonFeign.selectBykey(key, DictCommonType.FOLLOW_STATE).getData().getDictValue()); |
|
|
crmCustomerTemp.setFollow_state(dictCommonFeign.selectBykey(key, DictCommonType.FOLLOW_STATE).getData().getDictValue()); |
|
|
} |
|
|
} |
|
|
|
|
|
String customerNoPrefix = ""; |
|
|
|
|
|
//查询业务员的分公司简称和部门简称
|
|
|
|
|
|
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(sysUserInfoVo.getStaffSid()); |
|
|
|
|
|
if (staffOrgResultBean.getSuccess()) { |
|
|
|
|
|
SysStaffOrg sysStaffOrg = staffOrgResultBean.getData(); |
|
|
|
|
|
if (sysStaffOrg != null) { |
|
|
|
|
|
ResultBean<String> resultBean1 = sysStaffOrgFeign.getOrgSidByPath(sysStaffOrg.getOrgSidPath()); |
|
|
|
|
|
if (resultBean1.getSuccess()) { |
|
|
|
|
|
String osid = resultBean1.getData(); |
|
|
|
|
|
if (StringUtils.isNotBlank(osid)) { |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(osid); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgAbbre(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String orgSid1 = sysStaffOrg.getOrgSid(); |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(orgSid1); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgCode(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
//客户编码
|
|
|
//客户编码
|
|
|
String customerNo = HanZiConverterPinYin.getPinYinFirst(crmCustomerTemp.getName()) + crmCustomerTemp.getMobile(); |
|
|
String customerNo = customerNoPrefix + HanZiConverterPinYin.getPinYinFirst(crmCustomerTemp.getName()) + crmCustomerTemp.getMobile(); |
|
|
crmCustomerTemp.setCustomerNo(customerNo); |
|
|
crmCustomerTemp.setCustomerNo(customerNo); |
|
|
save(crmCustomerTemp); |
|
|
save(crmCustomerTemp); |
|
|
// 增加跟进记录
|
|
|
// 增加跟进记录
|
|
@ -917,7 +994,32 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
} |
|
|
} |
|
|
BeanUtil.copyProperties(dto, customerTemp); |
|
|
BeanUtil.copyProperties(dto, customerTemp); |
|
|
//客户编码
|
|
|
//客户编码
|
|
|
String customerNo = HanZiConverterPinYin.getPinYinFirst(customerTemp.getName()) + customerTemp.getMobile(); |
|
|
String customerNoPrefix = ""; |
|
|
|
|
|
//查询业务员的分公司简称和部门简称
|
|
|
|
|
|
ResultBean<SysStaffOrg> staffOrgResultBean = sysStaffOrgFeign.getOrgByStaffSid(customerTemp.getStaffSid()); |
|
|
|
|
|
if (staffOrgResultBean.getSuccess()) { |
|
|
|
|
|
SysStaffOrg sysStaffOrg = staffOrgResultBean.getData(); |
|
|
|
|
|
if (sysStaffOrg != null) { |
|
|
|
|
|
ResultBean<String> resultBean1 = sysStaffOrgFeign.getOrgSidByPath(sysStaffOrg.getOrgSidPath()); |
|
|
|
|
|
if (resultBean1.getSuccess()) { |
|
|
|
|
|
String osid = resultBean1.getData(); |
|
|
|
|
|
if (StringUtils.isNotBlank(osid)) { |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(osid); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgAbbre(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String orgSid1 = sysStaffOrg.getOrgSid(); |
|
|
|
|
|
ResultBean<SysOrganizationVo> sysOrganizationVoResultBean = sysOrganizationFeign.fetchBySid(orgSid1); |
|
|
|
|
|
if (sysOrganizationVoResultBean.getSuccess()) { |
|
|
|
|
|
SysOrganizationVo sysOrganizationVo = sysOrganizationVoResultBean.getData(); |
|
|
|
|
|
customerNoPrefix = customerNoPrefix + sysOrganizationVo.getOrgCode(); |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
} |
|
|
|
|
|
String customerNo = customerNoPrefix + HanZiConverterPinYin.getPinYinFirst(customerTemp.getName()) + customerTemp.getMobile(); |
|
|
customerTemp.setCustomerNo(customerNo); |
|
|
customerTemp.setCustomerNo(customerNo); |
|
|
baseMapper.updateById(customerTemp); |
|
|
baseMapper.updateById(customerTemp); |
|
|
//更新运营信息
|
|
|
//更新运营信息
|
|
|