|
|
@@ -366,12 +366,14 @@ public class ScheduleTask9 {
|
|
|
}else{
|
|
|
privateNewCustomerNumMap.put(businessUserId, 1);
|
|
|
}
|
|
|
- }else{
|
|
|
+ }else if("老".equals(newOrOldFlag)){
|
|
|
if(privateOldCustomerNumMap.containsKey(businessUserId)){
|
|
|
privateOldCustomerNumMap.put(businessUserId, privateOldCustomerNumMap.get(businessUserId) + 1);
|
|
|
}else{
|
|
|
privateOldCustomerNumMap.put(businessUserId, 1);
|
|
|
}
|
|
|
+ }else{
|
|
|
+ //忽略非新老客户
|
|
|
}
|
|
|
}else{
|
|
|
log.info("未匹配到在职业务员:" + businessUserId + " " + ddCoreClient.getNameByUserId(businessUserId));
|
|
|
@@ -384,55 +386,55 @@ public class ScheduleTask9 {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
-// if(privateCustomerNumMap.isEmpty()){
|
|
|
-// log.info("业务员私海客户数量获取不正确");
|
|
|
-// return;
|
|
|
-// }
|
|
|
+ if(privateCustomerNumMap.isEmpty()){
|
|
|
+ log.info("业务员私海客户数量获取不正确");
|
|
|
+ return;
|
|
|
+ }
|
|
|
|
|
|
/*
|
|
|
更新各业务员私海客户数量
|
|
|
*/
|
|
|
-// for (String userIdKey : userIdList){
|
|
|
-// if(privateCustomerNumMap.containsKey(userIdKey)){
|
|
|
-// numOfPrivateCustomer = privateCustomerNumMap.get(userIdKey);
|
|
|
-// }else{
|
|
|
-// //私海客户归0
|
|
|
-// numOfPrivateCustomer = 0;
|
|
|
-// }
|
|
|
-// try {
|
|
|
-// formInstId = userIdFormInstIdMap.get(userIdKey);
|
|
|
-// log.info("更新各业务员私海客户数量:" + formInstId + " " + numOfPrivateCustomer);
|
|
|
-// yidaService.updateLtcBusinessUserPrivateCustomerNum(formInstId, numOfPrivateCustomer);
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("更新各业务员私海客户数量异常",e);
|
|
|
-// }
|
|
|
-// if(privateNewCustomerNumMap.containsKey(userIdKey)){
|
|
|
-// numOfPrivateNewCustomer = privateNewCustomerNumMap.get(userIdKey);
|
|
|
-// }else{
|
|
|
-// //新客户归0
|
|
|
-// numOfPrivateNewCustomer = 0;
|
|
|
-// }
|
|
|
-// try {
|
|
|
-// formInstId = userIdFormInstIdMap.get(userIdKey);
|
|
|
-// log.info("更新各业务员新客户数量:" + formInstId + " " + numOfPrivateNewCustomer);
|
|
|
-// yidaService.updateLtcBusinessUserPrivateNewCustomerNum(formInstId, numOfPrivateNewCustomer);
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("更新各业务员新客户数量异常",e);
|
|
|
-// }
|
|
|
-// if(privateOldCustomerNumMap.containsKey(userIdKey)){
|
|
|
-// numOfPrivateOldCustomer = privateOldCustomerNumMap.get(userIdKey);
|
|
|
-// }else{
|
|
|
-// //老客户归0
|
|
|
-// numOfPrivateOldCustomer = 0;
|
|
|
-// }
|
|
|
-// try {
|
|
|
-// formInstId = userIdFormInstIdMap.get(userIdKey);
|
|
|
-// log.info("更新各业务员老客户数量:" + formInstId + " " + numOfPrivateOldCustomer);
|
|
|
-// yidaService.updateLtcBusinessUserPrivateOldCustomerNum(formInstId, numOfPrivateOldCustomer);
|
|
|
-// } catch (Exception e) {
|
|
|
-// log.error("更新各业务员老客户数量异常",e);
|
|
|
-// }
|
|
|
-// }
|
|
|
+ for (String userIdKey : userIdList){
|
|
|
+ if(privateCustomerNumMap.containsKey(userIdKey)){
|
|
|
+ numOfPrivateCustomer = privateCustomerNumMap.get(userIdKey);
|
|
|
+ }else{
|
|
|
+ //私海客户归0
|
|
|
+ numOfPrivateCustomer = 0;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ formInstId = userIdFormInstIdMap.get(userIdKey);
|
|
|
+ log.info("更新各业务员私海客户数量:" + formInstId + " " + numOfPrivateCustomer);
|
|
|
+ yidaService.updateLtcBusinessUserPrivateCustomerNum(formInstId, numOfPrivateCustomer);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("更新各业务员私海客户数量异常",e);
|
|
|
+ }
|
|
|
+ if(privateNewCustomerNumMap.containsKey(userIdKey)){
|
|
|
+ numOfPrivateNewCustomer = privateNewCustomerNumMap.get(userIdKey);
|
|
|
+ }else{
|
|
|
+ //新客户归0
|
|
|
+ numOfPrivateNewCustomer = 0;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ formInstId = userIdFormInstIdMap.get(userIdKey);
|
|
|
+ log.info("更新各业务员新客户数量:" + formInstId + " " + numOfPrivateNewCustomer);
|
|
|
+ yidaService.updateLtcBusinessUserPrivateNewCustomerNum(formInstId, numOfPrivateNewCustomer);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("更新各业务员新客户数量异常",e);
|
|
|
+ }
|
|
|
+ if(privateOldCustomerNumMap.containsKey(userIdKey)){
|
|
|
+ numOfPrivateOldCustomer = privateOldCustomerNumMap.get(userIdKey);
|
|
|
+ }else{
|
|
|
+ //老客户归0
|
|
|
+ numOfPrivateOldCustomer = 0;
|
|
|
+ }
|
|
|
+ try {
|
|
|
+ formInstId = userIdFormInstIdMap.get(userIdKey);
|
|
|
+ log.info("更新各业务员老客户数量:" + formInstId + " " + numOfPrivateOldCustomer);
|
|
|
+ yidaService.updateLtcBusinessUserPrivateOldCustomerNum(formInstId, numOfPrivateOldCustomer);
|
|
|
+ } catch (Exception e) {
|
|
|
+ log.error("更新各业务员老客户数量异常",e);
|
|
|
+ }
|
|
|
+ }
|
|
|
|
|
|
|
|
|
|
|
|
@@ -469,12 +471,14 @@ public class ScheduleTask9 {
|
|
|
}else{
|
|
|
privateNewCustomerNumMap.put(businessUnionId, 1);
|
|
|
}
|
|
|
- }else{
|
|
|
+ }else if("老".equals(newOrOldFlag)){
|
|
|
if(privateOldCustomerNumMap.containsKey(businessUnionId)){
|
|
|
privateOldCustomerNumMap.put(businessUnionId, privateOldCustomerNumMap.get(businessUnionId) + 1);
|
|
|
}else{
|
|
|
privateOldCustomerNumMap.put(businessUnionId, 1);
|
|
|
}
|
|
|
+ }else{
|
|
|
+ //忽略非新老客户
|
|
|
}
|
|
|
}
|
|
|
}
|