|
@@ -189,7 +189,14 @@ public class TBCrmServiceImpl extends ServiceImpl<TBCrmMapper, TBCrm> implements
|
|
} else { // 修改
|
|
} else { // 修改
|
|
tBCrm.updateInfo(sysUser.getId());
|
|
tBCrm.updateInfo(sysUser.getId());
|
|
}
|
|
}
|
|
- return saveOrUpdate(tBCrm);
|
|
|
|
|
|
+ boolean result = saveOrUpdate(tBCrm);
|
|
|
|
+ Long serviceId = tBCrm.getServiceId();
|
|
|
|
+ if (result && serviceId != null && serviceId > 0) {
|
|
|
|
+ Long regionLeaderId = tbServiceRegionService.findRegionLeader(serviceId, tBCrm.getCrmNo());
|
|
|
|
+ tBCrm.setRegionCoordinatorId(regionLeaderId);
|
|
|
|
+ this.updateById(tBCrm);
|
|
|
|
+ }
|
|
|
|
+ return result;
|
|
} catch (Exception e) {
|
|
} catch (Exception e) {
|
|
if (e instanceof DuplicateKeyException) {
|
|
if (e instanceof DuplicateKeyException) {
|
|
String errorColumn = e.getCause().toString();
|
|
String errorColumn = e.getCause().toString();
|