|
@@ -1526,7 +1526,8 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
1526
|
1526
|
// 4.校验公客是否已经是分配项目下的私客
|
1527
|
1527
|
QueryWrapper<TaRecommendCustomer> customerQueryWrapper2 = new QueryWrapper<>();
|
1528
|
1528
|
customerQueryWrapper2.eq("org_id", orgId);
|
1529
|
|
- customerQueryWrapper2.eq("person_id", customerInfo.getPersonId());
|
|
1529
|
+// customerQueryWrapper2.eq("person_id", customerInfo.getPersonId());
|
|
1530
|
+ customerQueryWrapper2.eq("phone", customerInfo.getPhone());
|
1530
|
1531
|
customerQueryWrapper2.eq("building_id", taPersonBuilding.getBuildingId());
|
1531
|
1532
|
customerQueryWrapper2.eq("status", CommConstant.CUSTOMER_REPORT);
|
1532
|
1533
|
customerQueryWrapper2.eq("verify_status", CommConstant.VERIFY_AGREE);
|
|
@@ -1539,19 +1540,19 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
1539
|
1540
|
}
|
1540
|
1541
|
|
1541
|
1542
|
// 5.无buildingId,新增一条私客数据
|
1542
|
|
- TaPerson taPerson = taPersonMapper.getById(customerInfo.getPersonId());
|
1543
|
|
- if (taPerson == null) {
|
1544
|
|
- logger.info("公客分配置业顾问 taPerson为空");
|
1545
|
|
- responseBean.addError("分配客户失败");
|
1546
|
|
- return responseBean;
|
1547
|
|
- }
|
|
1543
|
+// TaPerson taPerson = taPersonMapper.getById(customerInfo.getPersonId());
|
|
1544
|
+// if (taPerson == null) {
|
|
1545
|
+// logger.info("公客分配置业顾问 taPerson为空");
|
|
1546
|
+// responseBean.addError("分配客户失败");
|
|
1547
|
+// return responseBean;
|
|
1548
|
+// }
|
1548
|
1549
|
|
1549
|
1550
|
TaRecommendCustomer taRecommendCustomer = new TaRecommendCustomer();
|
1550
|
1551
|
taRecommendCustomer.setOrgId(orgId);
|
1551
|
|
- taRecommendCustomer.setName(taPerson.getNickname());
|
1552
|
|
- taRecommendCustomer.setPicture(taPerson.getAvatarurl());
|
1553
|
|
- taRecommendCustomer.setPhone(taPerson.getPhone());
|
1554
|
|
- taRecommendCustomer.setSex(null == taPerson.getGender() ? null : ("1".equals(taPerson.getGender()) ? 1 : 2));
|
|
1552
|
+ taRecommendCustomer.setName(customerInfo.getName());
|
|
1553
|
+ taRecommendCustomer.setPicture(customerInfo.getAvatarurl());
|
|
1554
|
+ taRecommendCustomer.setPhone(customerInfo.getPhone());
|
|
1555
|
+ taRecommendCustomer.setSex(null == customerInfo.getSex() ? null : ("1".equals(customerInfo.getSex()) ? 1 : 2));
|
1555
|
1556
|
taRecommendCustomer.setRealtyConsultant(taUser.getUserId());
|
1556
|
1557
|
taRecommendCustomer.setBuildingId(taPersonBuilding.getBuildingId());
|
1557
|
1558
|
TaBuilding building = taBuildingMapper.selectById(taPersonBuilding.getBuildingId());
|
|
@@ -1559,13 +1560,13 @@ public class TaRecommendCustomerServiceImpl extends ServiceImpl<TaRecommendCusto
|
1559
|
1560
|
taRecommendCustomer.setReportRecommendStatus(CommConstant.VERIFY_AGREE);
|
1560
|
1561
|
taRecommendCustomer.setCreateDate(LocalDateTime.now());
|
1561
|
1562
|
taRecommendCustomer.setReportDate(LocalDateTime.now());
|
1562
|
|
- taRecommendCustomer.setPersonId(taPerson.getPersonId());
|
|
1563
|
+ taRecommendCustomer.setPersonId(customerInfo.getPersonId());
|
1563
|
1564
|
taRecommendCustomer.setEntryType(CommConstant.ENTRY_VERIFY);
|
1564
|
1565
|
taRecommendCustomer.setVerifyStatus(CommConstant.VERIFY_AGREE);
|
1565
|
1566
|
taRecommendCustomer.setStatus(CommConstant.CUSTOMER_REPORT);
|
1566
|
|
- taRecommendCustomer.setPersonId(taPerson.getPersonId());
|
1567
|
|
- taRecommendCustomer.setRecommendPerson(taPerson.getRecommendPerson());
|
1568
|
|
-
|
|
1567
|
+ taRecommendCustomer.setPersonId(customerInfo.getPersonId());
|
|
1568
|
+ taRecommendCustomer.setRecommendPerson(customerInfo.getRecommendPerson());
|
|
1569
|
+ taRecommendCustomer.setInstitutionId(customerInfo.getInstitutionId());
|
1569
|
1570
|
int row = taRecommendCustomerMapper.insert(taRecommendCustomer);
|
1570
|
1571
|
if (row < 1) {
|
1571
|
1572
|
responseBean.addError("分配客户失败");
|