|
@ -185,13 +185,18 @@ public class BirthdayWishesService {
|
|
|
"AND CASE LENGTH(p.idcard) WHEN 18 then SUBSTR(p.idcard,11,4) when 15 then SUBSTR(p.idcard, 9,4) END = '" + dateString + "' " ;
|
|
|
List<Map<String, Object>> patientInfos = jdbcTemplate.queryForList(sql);
|
|
|
//整理未发送居民信息
|
|
|
for(Map<String, Object> map : patientInfos){
|
|
|
if (sendPatients == null || !sendPatients.contains(map.get("patient"))) {
|
|
|
Iterator<Map<String, Object>> iterator = patientInfos.iterator();
|
|
|
while (iterator.hasNext()){
|
|
|
Map<String, Object> map = iterator.next();
|
|
|
if (sendPatients == null || !sendPatients.contains(map.get("patient").toString())) {
|
|
|
int age = IdCardUtil.getAgeForIdcard(map.get("idcard") + "");
|
|
|
Date birthday = IdCardUtil.getBirthdayForIdcard(map.get("idcard") + "");
|
|
|
map.put("age", age);
|
|
|
map.put("birthday", DateUtil.dateToStr(birthday, "yyyy-MM-dd"));
|
|
|
}
|
|
|
else {
|
|
|
iterator.remove();
|
|
|
}
|
|
|
}
|
|
|
return patientInfos;
|
|
|
}
|