|
|
@@ -127,7 +127,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPrivatePersonalCustomerList","selectPrivatePersonalCustomerCount",params,pageNo,pageSize);
|
|
|
List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
|
|
|
- setCustomerList(tmpList);
|
|
|
+ setCustomerList(tmpList,0);
|
|
|
list.setList(tmpList);
|
|
|
return list;
|
|
|
}
|
|
|
@@ -172,7 +172,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
params.put("sortType",sortType);
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectPrivateOrganizationCustomerList","selectPrivateOrganizationCustomerCount",params,pageNo,pageSize);
|
|
|
List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
|
|
|
- setCustomerList(tmpList);
|
|
|
+ setCustomerList(tmpList,0);
|
|
|
list.setList(tmpList);
|
|
|
return list;
|
|
|
}
|
|
|
@@ -1277,15 +1277,16 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
return userMapper.updateRefusedCustomer(id, nickname, mobile, societyTag);
|
|
|
}
|
|
|
|
|
|
- private void setCustomerList(List<CustomerListOut> tmpList){
|
|
|
+ private void setCustomerList(List<CustomerListOut> tmpList,int i){
|
|
|
Date now = new Date();
|
|
|
String s1,s2;
|
|
|
Long l1,l2;
|
|
|
- int diff1,diff2;
|
|
|
+ int diff1=0,diff2=0;
|
|
|
for(CustomerListOut clo: tmpList){
|
|
|
- //s1 = StringUtils.isBlank(clo.getLastFollowTime()) ? clo.getTransferTime() : clo.getLastFollowTime();
|
|
|
try {
|
|
|
+ //如果最近跟进为空直接取转换时间
|
|
|
if (StringUtils.isNotBlank(clo.getLastFollowTime())){
|
|
|
+ //如果最近跟进小于转换取转换时间
|
|
|
if(DateUtils.parseDate(clo.getLastFollowTime(), AFTConstants.YYYYMMDDHHMMSS).getTime()>DateUtils.parseDate(clo.getTransferTime(), AFTConstants.YYYYMMDDHHMMSS).getTime()) {
|
|
|
s1=clo.getLastFollowTime();
|
|
|
}else {
|
|
|
@@ -1294,11 +1295,17 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
}else {
|
|
|
s1=clo.getTransferTime();
|
|
|
}
|
|
|
- s2 = StringUtils.isBlank(clo.getLastSignTime()) ? clo.getTransferTime() : clo.getLastSignTime();
|
|
|
+ //另外一个时间取转换时间
|
|
|
+ s2 = clo.getTransferTime();
|
|
|
l1 = DateUtils.parseDate(s1, AFTConstants.YYYYMMDDHHMMSS).getTime();
|
|
|
l2 = DateUtils.parseDate(s2, AFTConstants.YYYYMMDDHHMMSS).getTime();
|
|
|
- diff1 = (int)((l1 + AFTConstants.USER_FOLLOW_LIMIT_MS - now.getTime())/(24*3600*1000));
|
|
|
- diff2 = (int)((l2 + AFTConstants.USER_SIGN_LIMIT_MS - now.getTime())/(24*3600*1000));
|
|
|
+ if(i==0) {
|
|
|
+ diff1 = (int)((l1 + AFTConstants.USER_FOLLOW_LIMIT_MS - now.getTime())/(24*3600*1000));
|
|
|
+ diff2 = (int)((l2 + AFTConstants.USER_SIGN_LIMIT_MS - now.getTime())/(24*3600*1000));
|
|
|
+ }else if (i==1) {
|
|
|
+ diff1 = (int)((l1 + AFTConstants.PROJECT_FOLLOW_LIMIT_MS - now.getTime())/(24*3600*1000));
|
|
|
+ diff2 = (int)((l2 + AFTConstants.PROJECT_SIGN_LIMIT_MS - now.getTime())/(24*3600*1000));
|
|
|
+ }
|
|
|
clo.setSurplusFollowTime(diff1 + "");
|
|
|
clo.setSurplusSignTime(diff2 + "");
|
|
|
} catch (ParseException e) {
|
|
|
@@ -1316,7 +1323,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectSignOrganizationCustomerList","selectSignOrganizationCustomerCount",params,pageNo,pageSize);
|
|
|
List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
|
|
|
- setCustomerList(tmpList);
|
|
|
+ setCustomerList(tmpList,1);
|
|
|
list.setList(tmpList);
|
|
|
return list;
|
|
|
}
|
|
|
@@ -1329,7 +1336,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
Map<String,Object> params = disposeParams(cli);
|
|
|
Pagination<CustomerListOut> list = (Pagination<CustomerListOut>) findPage("selectSignPersonalCustomerList","selectSignPersonalCustomerCount",params,pageNo,pageSize);
|
|
|
List<CustomerListOut> tmpList = (List<CustomerListOut>)list.getList();
|
|
|
- setCustomerList(tmpList);
|
|
|
+ setCustomerList(tmpList,0);
|
|
|
list.setList(tmpList);
|
|
|
return list;
|
|
|
}
|
|
|
@@ -1492,7 +1499,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
params.put("sort", sort);
|
|
|
params.put("sortType",sortType);
|
|
|
List<CustomerListOut> list= userMapper.privateUnitCustomerList(params);
|
|
|
- setCustomerList(list);
|
|
|
+ setCustomerList(list,0);
|
|
|
if (list==null || list.size()==0) return null;
|
|
|
String[] comment = {"客户名称","地区","联系人","联系电话","社会性质","客户初始时间","剩余私有天数","最新跟进时间","客户等级"};
|
|
|
String filePath = uploadPath + "/privateUnitCustomer";
|