|
|
|
@ -117,8 +117,8 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
rateInfo.forEach((p)->{
|
|
|
|
|
p.remove("client_rate_id");
|
|
|
|
|
p.put("create_time",now);
|
|
|
|
|
p.put("active_time",DateUtils.addYears(p.getDate("active_time"),1));
|
|
|
|
|
p.put("expiry_time",DateUtils.addYears(p.getDate("expiry_time"),1));
|
|
|
|
|
p.put("active_time",DateUtils.addDays(p.getDate("active_time"),1));
|
|
|
|
|
p.put("expiry_time",DateUtils.addYears(p.getDate("active_time"),1));
|
|
|
|
|
clientRateMapper.saveRate(p);
|
|
|
|
|
});
|
|
|
|
|
}
|
|
|
|
@ -163,7 +163,14 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
result.put("rate_waring", true);
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
result.put("expire_days",(int)(rateInfo.get(0).getDate("expiry_time").getTime()-now.getTime())/(1000*60*60*24));
|
|
|
|
|
int expireDay = 0;
|
|
|
|
|
long expireSS = (rateInfo.get(0).getDate("expiry_time").getTime()-now.getTime());
|
|
|
|
|
expireDay = (int)expireSS/(1000*60*60*24);
|
|
|
|
|
|
|
|
|
|
if(expireSS%(1000*60*60*24)>1){
|
|
|
|
|
++expireDay;
|
|
|
|
|
}
|
|
|
|
|
result.put("expire_days",expireDay);
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|