|
|
|
@ -21,7 +21,9 @@ import org.springframework.transaction.annotation.Transactional;
|
|
|
|
|
import org.springframework.util.CollectionUtils;
|
|
|
|
|
|
|
|
|
|
import java.util.Date;
|
|
|
|
|
import java.util.HashMap;
|
|
|
|
|
import java.util.List;
|
|
|
|
|
import java.util.Map;
|
|
|
|
|
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
@ -171,7 +173,22 @@ public class ClientContractServiceImpl implements ClientContractService {
|
|
|
|
|
return result;
|
|
|
|
|
}
|
|
|
|
|
int waringDays = sysConfigManager.getSysConfig().getIntValue("rate_warning_days");
|
|
|
|
|
for (JSONObject p : rateInfo) {
|
|
|
|
|
Map<String,JSONObject> filterMap = new HashMap<>();
|
|
|
|
|
rateInfo.forEach((p)->{
|
|
|
|
|
String key = p.getString("rate_name");
|
|
|
|
|
JSONObject tmp = filterMap.get(key);
|
|
|
|
|
if(tmp==null){
|
|
|
|
|
filterMap.put(key,p);
|
|
|
|
|
}else {
|
|
|
|
|
if(tmp.getDate("expiry_time").compareTo(p.getDate("expiry_time"))<0){
|
|
|
|
|
filterMap.put(key,p);
|
|
|
|
|
}
|
|
|
|
|
}
|
|
|
|
|
});
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
for (JSONObject p : filterMap.values()) {
|
|
|
|
|
if (now.compareTo(DateUtils.addDays(p.getDate("expiry_time"),1)) > -1) {
|
|
|
|
|
result.put("rate_expire", true);
|
|
|
|
|
}
|
|
|
|
|