|
|
|
@ -168,27 +168,22 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
int waringDays = sysConfigManager.getSysConfig().getIntValue("rate_warning_days");
|
|
|
|
|
rateInfo.forEach((p) -> {
|
|
|
|
|
for (JSONObject p : rateInfo) {
|
|
|
|
|
if (now.compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) {
|
|
|
|
|
result.put("rate_expire", true);
|
|
|
|
|
}
|
|
|
|
|
if (DateUtils.addDays(now, waringDays).compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) {
|
|
|
|
|
int expireDay = 0;
|
|
|
|
|
long expireSS = (DateUtils.addDays(p.getDate("expiry_time"),1).getTime()-now.getTime());
|
|
|
|
|
expireDay = (int)expireSS/(1000*60*60*24);
|
|
|
|
|
if(expireSS%(1000*60*60*24)>1){
|
|
|
|
|
++expireDay;
|
|
|
|
|
}
|
|
|
|
|
result.put("expire_days",expireDay);
|
|
|
|
|
result.put("rate_waring", true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
int expireDay = 0;
|
|
|
|
|
long expireSS = (DateUtils.addDays(rateInfo.get(0).getDate("expiry_time"),1).getTime()-now.getTime());
|
|
|
|
|
expireDay = (int)expireSS/(1000*60*60*24);
|
|
|
|
|
logger.debug("kirawang__expiryTime+1:"+DateUtils.addDays(rateInfo.get(0).getDate("expiry_time"),1).getTime());
|
|
|
|
|
logger.debug("kirawang__当前时间:"+now.getTime());
|
|
|
|
|
logger.debug("kirawang__时间差:"+(DateUtils.addDays(rateInfo.get(0).getDate("expiry_time"),1).getTime()-now.getTime()));
|
|
|
|
|
logger.debug("kirawang__取整位:"+(int)expireSS/(1000*60*60*24));
|
|
|
|
|
logger.debug("kirawang__取整位:"+(int)expireSS/(1000*60*60*24));
|
|
|
|
|
|
|
|
|
|
if(expireSS%(1000*60*60*24)>1){
|
|
|
|
|
++expireDay;
|
|
|
|
|
}
|
|
|
|
|
result.put("expire_days",expireDay);
|
|
|
|
|
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|