|
@ -370,8 +370,7 @@ public class JMJkEduArticleService extends BaseService {
|
|
String currentUserRoleCode,
|
|
String currentUserRoleCode,
|
|
String currentUserRoleLevel) throws Exception {
|
|
String currentUserRoleLevel) throws Exception {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
Set<String> openidSet = getOpenid(patientSet);
|
|
List<HealthEduArticleES> healthEduArticleESList = new ArrayList<>();
|
|
List<HealthEduArticleES> healthEduArticleESList = new ArrayList<>();
|
|
Doctor doctor = doctorDao.findByCode(sendCode);
|
|
Doctor doctor = doctorDao.findByCode(sendCode);
|
|
AdminTeam adminTeam =null;
|
|
AdminTeam adminTeam =null;
|
|
@ -473,6 +472,7 @@ public class JMJkEduArticleService extends BaseService {
|
|
// healthEduArticleES.setSendSource();
|
|
// healthEduArticleES.setSendSource();
|
|
healthEduArticleES.setAllCount(patientSet.size());
|
|
healthEduArticleES.setAllCount(patientSet.size());
|
|
healthEduArticleES.setUserType(1);
|
|
healthEduArticleES.setUserType(1);
|
|
|
|
healthEduArticleES.setOpenidSet(openidSet);
|
|
healthEduArticleESList.add(healthEduArticleES);
|
|
healthEduArticleESList.add(healthEduArticleES);
|
|
|
|
|
|
}
|
|
}
|
|
@ -1490,4 +1490,17 @@ public class JMJkEduArticleService extends BaseService {
|
|
// List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql.toString(),HealthEduArticleES.class, esIndex, esType);
|
|
// List<HealthEduArticleES> esList = elasticsearchUtil.excute(sql.toString(),HealthEduArticleES.class, esIndex, esType);
|
|
// return esList;
|
|
// return esList;
|
|
// }
|
|
// }
|
|
|
|
|
|
|
|
public Set<String> getOpenid(Set<String> patientSet){
|
|
|
|
Set<String> openidSet = new HashSet<>(patientSet);
|
|
|
|
Patient one = null;
|
|
|
|
for (String patient : patientSet) {
|
|
|
|
one = patientDao.findByCode(patient);
|
|
|
|
if(one==null){
|
|
|
|
continue;
|
|
|
|
}
|
|
|
|
openidSet.add(one.getOpenid());
|
|
|
|
}
|
|
|
|
return openidSet;
|
|
|
|
}
|
|
}
|
|
}
|