|  | @ -94,8 +94,8 @@ public class JMJkEduArticleService extends BaseService {
 | 
	
		
			
				|  |  |      */
 | 
	
		
			
				|  |  |     public List<HealthEduArticlePatientModel> pushArticleList(int page, int pagesize, String sendCode,  String firstLevelCategoryId,String secondLevelCategoryId,Integer myArticle,Integer sendType,String currentUserRole,
 | 
	
		
			
				|  |  |                                                               String currentUserRoleLevel,String articleTitle,String sendTimeStart,String sendTimeEnd) throws Exception {
 | 
	
		
			
				|  |  |         pagesize = page * pagesize;
 | 
	
		
			
				|  |  |         page = (page - 1) * pagesize;
 | 
	
		
			
				|  |  | //        pagesize = page * pagesize;
 | 
	
		
			
				|  |  | //        page = (page - 1) ;
 | 
	
		
			
				|  |  | //        if(loginType==2){
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //            String sql = "select r.code as roleCode from wlyy_user_role u " +
 | 
	
	
		
			
				|  | @ -167,7 +167,7 @@ public class JMJkEduArticleService extends BaseService {
 | 
	
		
			
				|  |  |             heapm.setLevel(article.getString("articlelevel"));
 | 
	
		
			
				|  |  | //            heapm.setAllCount(heapm.getAllCount() + one.getPatients().size());
 | 
	
		
			
				|  |  |             sql3 = new StringBuffer();
 | 
	
		
			
				|  |  |             sql3.append("SELECT COUNT(*) as num FROM health_edu_article_patient_test3 WHERE isRead='1' AND patientCode is not null AND articleId='"+article.getString("articleId")+"'");
 | 
	
		
			
				|  |  |             sql3.append("SELECT COUNT(*) as num FROM health_edu_article_patient_test3 WHERE isRead='1' AND batchNo = '"+one.getBatchNo()+"' AND patientCode is not null AND articleId='"+article.getString("articleId")+"'");
 | 
	
		
			
				|  |  |             Long num = elasticsearchUtil.excuteForLong(sql3.toString(), esType, esIndex);
 | 
	
		
			
				|  |  |             if(num!=null){
 | 
	
		
			
				|  |  |                 heapm.setReadNumber(num.longValue());
 | 
	
	
		
			
				|  | @ -455,84 +455,6 @@ public class JMJkEduArticleService extends BaseService {
 | 
	
		
			
				|  |  |                                                      String currentUserRoleLevel) throws Exception {
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | //        String batchNo = UUID.randomUUID().toString();
 | 
	
		
			
				|  |  | //        List<Patient> patientList = new ArrayList<>();
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //        for (String patient : patientSet) {
 | 
	
		
			
				|  |  | //            patientList.add(new Patient(patient));
 | 
	
		
			
				|  |  | //        }
 | 
	
		
			
				|  |  | //        HealthEduArticlePatient healthEduArticlePatient = new HealthEduArticlePatient();
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //        Doctor doctor = doctorDao.findByCode(sendCode);
 | 
	
		
			
				|  |  | //        String sendName = doctor.getName();
 | 
	
		
			
				|  |  | //        //1、普通医生,2、管理员
 | 
	
		
			
				|  |  | //        if(sendType==2){
 | 
	
		
			
				|  |  | //            String resultSql ="";
 | 
	
		
			
				|  |  | //            String whereSql ="";
 | 
	
		
			
				|  |  | //            switch (currentUserRoleLevel){
 | 
	
		
			
				|  |  | //                case "1":{resultSql +=" DISTINCT (province_name) as name";
 | 
	
		
			
				|  |  | //                    whereSql+=" and province ='"+currentUserRoleCode+"'";break;}
 | 
	
		
			
				|  |  | //                case "2":{resultSql +=" DISTINCT (city_name) as name";
 | 
	
		
			
				|  |  | //                    whereSql+=" and city ='"+currentUserRoleCode+"'";break;}
 | 
	
		
			
				|  |  | //                case "3":{resultSql +=" DISTINCT (town_name) as name";
 | 
	
		
			
				|  |  | //                    whereSql+=" and town ='"+currentUserRoleCode+"'";break;}
 | 
	
		
			
				|  |  | //                case "4":{resultSql +=" DISTINCT (name) as name";
 | 
	
		
			
				|  |  | //                    whereSql+=" and code ='"+currentUserRoleCode+"'";break;}
 | 
	
		
			
				|  |  | //            }
 | 
	
		
			
				|  |  | //            String sql = "select "+resultSql+" from dm_hospital  where level=2 "+whereSql ;
 | 
	
		
			
				|  |  | //            List<Map<String, Object>> returnList = jdbcTemplate.queryForList(sql);
 | 
	
		
			
				|  |  | //            sendName = returnList.get(0).get("name")+"";
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //            Map<String,Object> resultMap = labelService.fetchUserHighestAuthority(sendCode);
 | 
	
		
			
				|  |  | //            List<String> roleList = (List<String>)resultMap.get("roleList");
 | 
	
		
			
				|  |  | //            List<RoleVo> roleVoLists= new ArrayList<>();
 | 
	
		
			
				|  |  | //            for(String one:roleList){
 | 
	
		
			
				|  |  | //                RoleVo roleVo = new RoleVo();
 | 
	
		
			
				|  |  | //                roleVo.setCode(one);
 | 
	
		
			
				|  |  | //                roleVoLists.add(roleVo);
 | 
	
		
			
				|  |  | //            }
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setRoleList(roleVoLists);
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setCurrentUserRoleCode(currentUserRoleCode);
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setCurrentUserRoleLevel(currentUserRoleLevel);
 | 
	
		
			
				|  |  | //        }else{
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setCurrentUserRoleCode(doctor.getHospital());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setCurrentUserRoleLevel("4");
 | 
	
		
			
				|  |  | //        }
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setSendType(sendType);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setDoctorCode(sendCode);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setSendName(sendName);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setAdminTeamCode(teamId);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setLeaveWords(leaveWords);
 | 
	
		
			
				|  |  | //        if (doctor != null) {
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setDoctorName(doctor.getName());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setHospital(doctor.getHospital());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setHospitalName(doctor.getHospitalName());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setTown(doctor.getTown());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setTownName(doctor.getTownName());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setSendLevel(doctor.getLevel() != null ? String.valueOf(doctor.getLevel()) : "");
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setSendPic(doctor.getPhoto());
 | 
	
		
			
				|  |  | //            healthEduArticlePatient.setSendSex(doctor.getSex() != null ? String.valueOf(doctor.getSex()) : "");
 | 
	
		
			
				|  |  | //        }
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setBatchNo(batchNo);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setCreateTime(new Date());
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //        //通过文章id 获取文章详情
 | 
	
		
			
				|  |  | //        JSONObject article = thirdJkEduArticleService.getArticalById(articleId,"");
 | 
	
		
			
				|  |  | //
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setArticleId(article.get("articleId") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setAttachedTitle(article.get("articleTitle") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setAttachedPic(article.get("articleCover") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setAttachedContent(article.get("articleContent") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setAttachedMessage(sendMessage);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setArticleType(article.get("articleType") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setLevel(article.get("articlelevel") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setLevel1Type(article.get("firstLevelCategoryId") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setLevel2Type(article.get("secondLevelCategoryId") + "");
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setType("1");//文章
 | 
	
		
			
				|  |  | ////        healthEduArticlePatient.setArticleUrl(articleBaseUrl+"JkEduWeb/web/jkEdu/articleDetail.html?behavior=4&articleId="+articleId+"&userId="+);
 | 
	
		
			
				|  |  | //        healthEduArticlePatient.setPatients(patientList);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         List<HealthEduArticleES> healthEduArticleESList = new ArrayList<>();
 | 
	
		
			
				|  |  |         Doctor doctor = doctorDao.findByCode(sendCode);
 |