|
|
@ -235,16 +235,25 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
if (StringUtils.isNotBlank(dto.getWeixin())) { |
|
|
|
map.put("weixin", dto.getWeixin()); |
|
|
|
CrmCustomerTempVo crmCustomerTempVo = baseMapper.selectByMobileOrWx(map); |
|
|
|
if (crmCustomerTempVo != null && crmCustomerTempVo.getStaffSid().equals(userOrgInfoVo.getStaffSid())) { |
|
|
|
if (crmCustomerTempVo.getWeixin().equals(dto.getWeixin())) { |
|
|
|
return new ResultBean().fail().setMsg("该微信号已绑定其它客户,请重新添加"); |
|
|
|
AppCrmCustomerTempInfoVo appCrmCustomerTempInfoVo = baseMapper.selectBySid(dto.getSid()); |
|
|
|
String weiXin = appCrmCustomerTempInfoVo.getWeiXin(); |
|
|
|
if (!weiXin.equals(dto.getWeixin())) { |
|
|
|
int count = baseMapper.selBySidAndWeixin(dto.getSid(), dto.getWeixin()); |
|
|
|
if (count > 0) { |
|
|
|
return new ResultBean().fail().setMsg("该微信已绑定其它客户,请重新添加"); |
|
|
|
} |
|
|
|
} |
|
|
|
} |
|
|
|
// if (StringUtils.isNotBlank(dto.getWeixin())) {
|
|
|
|
// map.put("weixin", dto.getWeixin());
|
|
|
|
// CrmCustomerTempVo crmCustomerTempVo = baseMapper.selectByMobileOrWx(map);
|
|
|
|
// if (crmCustomerTempVo != null && crmCustomerTempVo.getStaffSid().equals(userOrgInfoVo.getStaffSid())) {
|
|
|
|
// if (crmCustomerTempVo.getWeixin().equals(dto.getWeixin())) {
|
|
|
|
// return new ResultBean().fail().setMsg("该微信号已绑定其它客户,请重新添加");
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
// }
|
|
|
|
CrmCustomerTemp customerTemp = fetchBySid(dto.getSid()); |
|
|
|
BeanUtil.copyProperties(dto, customerTemp); |
|
|
|
String adCode = dto.getAdCode(); |
|
|
@ -326,9 +335,9 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
|
// 客户档案
|
|
|
|
List<CrmCustomerFileVo> crmCustomerFileVos = crmCustomerFileService.selectByCustomerSidState(sid); |
|
|
|
if (crmCustomerFileVos.size() <= 0) { |
|
|
|
vo.setOperationSituationState(0); |
|
|
|
vo.setCustomerArchivesState(0); |
|
|
|
} else { |
|
|
|
vo.setOperationSituationState(1); |
|
|
|
vo.setCustomerArchivesState(1); |
|
|
|
} |
|
|
|
//意向车型
|
|
|
|
List<AppCrmVehicledemandVo> appCrmVehicledemandVos = crmVehicledemandService.selectCustomerSid(sid); |
|
|
@ -544,7 +553,7 @@ public class CrmCustomerTempService extends MybatisBaseService<CrmCustomerTempMa |
|
|
|
customerTemp.setStaffSid(userOrgInfoVo.getStaffSid()); |
|
|
|
customerTemp.setCreateOrgSid(userOrgInfoVo.getOrgSid()); |
|
|
|
customerTemp.setCustomerNo(map.get("code")); |
|
|
|
customerTemp.setCertificateTypeKey(customerTemp.getCustomerTypeKey().equals("1") ? "01" : "02"); |
|
|
|
customerTemp.setCertificateTypeKey(customerTemp.getCustomerTypeKey().equals("1") ? "0003" : "02"); |
|
|
|
customerTemp.setCertificateType(customerTemp.getCustomerTypeKey().equals("1") ? "身份证" : "营业执照"); |
|
|
|
ResultBean resultBean = dictCommonFeign.getFirstDictKeyByType(DictCommonType.FOLLOW_STATE, "0"); |
|
|
|
if (resultBean.getSuccess() && resultBean.getData() != null) { |
|
|
|