Commit 38ef5764 by jianan

客户告知书9

parent 0af20ab0
...@@ -3615,16 +3615,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3615,16 +3615,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
AclCustomer oldCustomer = aclCustomerDALService.findById(requestVO.getCustomerId()); AclCustomer oldCustomer = aclCustomerDALService.findById(requestVO.getCustomerId());
String newName = requestVO.getCustomerName(); String newName = requestVO.getCustomerName();
String newMobile = requestVO.getCustomerMobile(); String newMobile = requestVO.getCustomerMobile();
if (!newMobile.equals(oldCustomer.getMobileNo())) {// 如果电话不一样,就更新商机的电话
MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
mktLeadsAssigneds.setCustomerMobile(newMobile);
mktLeadsAssignedsMapper.updateByPrimaryKeySelective(mktLeadsAssigneds);
}
if (!newName.equals(oldCustomer.getName())) {// 如果名字不一样,就更新商机的名字
MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
mktLeadsAssigneds.setCustomerName(newName);
mktLeadsAssignedsMapper.updateByPrimaryKeySelective(mktLeadsAssigneds);
}
// 数据库实体 // 数据库实体
AclCustomer newerCustomer = aclCustomerDALService.findByMobileNo(newMobile); AclCustomer newerCustomer = aclCustomerDALService.findByMobileNo(newMobile);
if (newerCustomer == null) { if (newerCustomer == null) {
...@@ -3637,6 +3627,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3637,6 +3627,15 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
newerCustomer = new AclCustomer(); newerCustomer = new AclCustomer();
newerCustomer.setId(registerResp.getCustomerId()); newerCustomer.setId(registerResp.getCustomerId());
} }
if (!newMobile.equals(oldCustomer.getMobileNo()) || !newName.equals(oldCustomer.getName())) {// 如果电话不一样,就更新商机的电话
MktLeadsAssigneds mktLeadsAssigneds = new MktLeadsAssigneds();
mktLeadsAssigneds.setId(requestVO.getLeadsAssignedId());
mktLeadsAssigneds.setCustomerMobile(newMobile);
mktLeadsAssigneds.setCustomerName(newName);
mktLeadsAssigneds.setCustomerId(newerCustomer.getId());
mktLeadsAssignedsMapper.updateByPrimaryKeySelective(mktLeadsAssigneds);
}
AgPoInformed informed = new AgPoInformed(); AgPoInformed informed = new AgPoInformed();
BeanUtils.copyProperties(requestVO, informed); BeanUtils.copyProperties(requestVO, informed);
informed.setCustomerId(newerCustomer.getId()); informed.setCustomerId(newerCustomer.getId());
...@@ -3655,7 +3654,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -3655,7 +3654,8 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
// 商机更新一条告知书待签署的记录 // 商机更新一条告知书待签署的记录
MktLeadsAssignedTrack track = new MktLeadsAssignedTrack(); MktLeadsAssignedTrack track = new MktLeadsAssignedTrack();
track.setCustomerId(requestVO.getLeadsAssignedId());// 商机的id还是得用旧的customerId track.setCustomerId(newerCustomer.getId());// 商机的id还是得用旧的customerId
track.setLeadsAssignedId(requestVO.getLeadsAssignedId());
track.setTrackTime(curDate); track.setTrackTime(curDate);
track.setCreatedBy(loginId); track.setCreatedBy(loginId);
track.setCreatedAt(new Date()); track.setCreatedAt(new Date());
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment