master
wangning 7 years ago
parent 3f604e71ac
commit e7785b4699

@ -164,15 +164,15 @@ public class ClientContractServiceImpl implements ClientContractService {
}
int waringDays = sysConfigManager.getSysConfig().getIntValue("rate_warning_days");
rateInfo.forEach((p) -> {
if (now.compareTo(p.getDate("expiry_time")) > -1) {
if (now.compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) {
result.put("rate_expire", true);
}
if (DateUtils.addDays(now, waringDays).compareTo(p.getDate("expiry_time")) > -1) {
if (DateUtils.addDays(now, waringDays).compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) {
result.put("rate_waring", true);
}
});
int expireDay = 0;
long expireSS = (rateInfo.get(0).getDate("expiry_time").getTime()-now.getTime());
long expireSS = (DateUtils.addDays(rateInfo.get(0).getDate("expiry_time"),1).getTime()-now.getTime());
expireDay = (int)expireSS/(1000*60*60*24);
if(expireSS%(1000*60*60*24)>1){

Loading…
Cancel
Save