|
|
@@ -35,6 +35,9 @@ import javax.annotation.Resource;
|
|
|
import java.lang.reflect.InvocationTargetException;
|
|
|
import java.text.ParseException;
|
|
|
import java.text.SimpleDateFormat;
|
|
|
+import java.time.LocalDate;
|
|
|
+import java.time.ZoneId;
|
|
|
+import java.time.temporal.ChronoUnit;
|
|
|
import java.util.*;
|
|
|
|
|
|
@Service
|
|
|
@@ -2142,9 +2145,7 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
* @param power
|
|
|
*/
|
|
|
private void setCustomerList(List<CustomerListOut> tmpList, int i, Integer power) {
|
|
|
- Date now = new Date();
|
|
|
Date s1, s2;
|
|
|
- long l1, l2;
|
|
|
int diff1 = 0, diff2 = 0;
|
|
|
for (CustomerListOut clo : tmpList) {
|
|
|
// 如果最近跟进为空直接取转换时间
|
|
|
@@ -2161,19 +2162,20 @@ public class CustomerServiceImpl extends BaseMybatisDao<UserMapper> implements C
|
|
|
}
|
|
|
// 另外一个时间取转换时间
|
|
|
s2 = clo.getTransferTime();
|
|
|
- l1 = s1.getTime();
|
|
|
- l2 = s2.getTime();
|
|
|
- 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));
|
|
|
+ LocalDate localDate = LocalDate.now();
|
|
|
+ LocalDate localDate1 = s1.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(AFTConstants.USER_FOLLOW_DAYS);
|
|
|
+ LocalDate localDate2 = s2.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(AFTConstants.USER_SIGN_DAYS);
|
|
|
+ if (i == 0) {
|
|
|
+ diff1 = (int)ChronoUnit.DAYS.between(localDate,localDate1);
|
|
|
+ diff2 = (int)ChronoUnit.DAYS.between(localDate,localDate2);
|
|
|
if (diff1 < 0)diff1 = 0;
|
|
|
if (diff2 < 0)diff2 = 0;
|
|
|
} else if (i == 1) {
|
|
|
- diff1 = (int) ((l1 + AFTConstants.PROJECT_FOLLOW_LIMIT_MS - now.getTime()) / (24 * 3600 * 1000));
|
|
|
+ localDate1 = s1.toInstant().atZone(ZoneId.systemDefault()).toLocalDate().plusDays(AFTConstants.PROJECT_FOLLOW_DAYS);
|
|
|
+ diff1 = (int)ChronoUnit.DAYS.between(localDate,localDate1);
|
|
|
// diff2 = (int) ((l2 + AFTConstants.PROJECT_SIGN_LIMIT_MS - now.getTime()) / (24 * 3600 * 1000));
|
|
|
if (diff1 < 0)diff1 = 0;
|
|
|
}
|
|
|
- if(diff1 ==30)diff1 = 29;
|
|
|
clo.setSurplusFollowTime(diff1 + "");
|
|
|
clo.setSurplusSignTime(diff2 + "");
|
|
|
if (power!=null&&power == 1) {
|