瀏覽代碼

Merge branch 'dev' of http://192.168.1.220:10080/Amoy/patient-co-management into dev

8 年之前
父節點
當前提交
fab9de2371

+ 18 - 15
patient-co-statistics/src/main/java/com/yihu/wlyy/statistics/job/message/HealthMessageJob.java

@ -64,31 +64,34 @@ public class HealthMessageJob implements Job {
            String deleteSql="delete from wlyy_message where type=3 and czrq >= '"+yesterday+" 00:00:00'and czrq <= '"+now+" 00:00:00'";
            jdbcTemplate.execute(deleteSql);
            //生成新的数据
            String sql="select doctor,doctor_name from wlyy_sign_family " +
                    " where  status >0 and type='2' and expenses_status='1'  " +
                    " and expenses_time >='"+yesterday+" 00:00:00' and expenses_time<'"+now+" 00:00:00' and  (doctor_health is null or doctor_health = '')" ;
            String sql="select admin_team_code  from wlyy_sign_family " +
                    " where  status >0 and type='2' " +
                    " and apply_date >='"+yesterday+" 00:00:00' and apply_date<'"+now+" 00:00:00' and  (doctor_health is null or doctor_health = '')" ;
            String countSql="select count(id) from wlyy_sign_family " +
                    " where  status >0 and type='2' and expenses_status='1'  " +
                    " and expenses_time >='"+yesterday+" 00:00:00' and expenses_time<'"+now+" 00:00:00' and  (doctor_health is null or doctor_health = '')" ;
                    " where  status >0 and type='2'  " +
                    " and apply_date >='"+yesterday+" 00:00:00' and apply_date<'"+now+" 00:00:00' and  (doctor_health is null or doctor_health = '')" ;
            List<SignFamily> signFamilyList=dbExtract.extractByPage(SignFamily.class,sql,countSql,true);
            Map<String,List<SignFamily>> signFamilyMap=new HashMap<String,List<SignFamily>>();
            Map<Long,List<SignFamily>> signFamilyMap=new HashMap<Long,List<SignFamily>>();
            for(int i=0;i<signFamilyList.size();i++){
                SignFamily signFamilyTemp=signFamilyList.get(i);
                if (signFamilyMap.containsKey(signFamilyTemp.getDoctor())){
                    signFamilyMap.get(signFamilyTemp.getDoctor()).add(signFamilyTemp);
                if (signFamilyMap.containsKey(signFamilyTemp.getAdminTeamCode())){
                    signFamilyMap.get(signFamilyTemp.getAdminTeamCode()).add(signFamilyTemp);
                }else{
                    List<SignFamily> signFamilies=new ArrayList<>();
                    signFamilies.add(signFamilyTemp);
                    signFamilyMap.put(signFamilyTemp.getDoctor(),signFamilies);
                    signFamilyMap.put(signFamilyTemp.getAdminTeamCode(),signFamilies);
                }
            }
            JSONArray jsonArray=new JSONArray();
            for(Map.Entry<String,List<SignFamily>> entry:signFamilyMap.entrySet()){
            for(Map.Entry<Long,List<SignFamily>> entry:signFamilyMap.entrySet()){
                //得到未分配的所有数目
                 countSql="select count(id) from wlyy_sign_family " +
                        " where  status >0 and type='2' and expenses_status='1'  " +
                        "  and expenses_time<'"+now+" 00:00:00' and  (doctor_health is null or doctor_health = '') and doctor='"+entry.getKey()+"'" ;
                        " where  status >0 and type='2'  " +
                        "  and apply_date<'"+now+" 00:00:00' and  (doctor_health is null or doctor_health = '') and admin_team_code="+entry.getKey()+"" ;
                Integer allCount=jdbcTemplate.queryForObject(countSql,Integer.class);
                //得到团队的leader
               sql="select leader_code from wlyy_admin_team m where m.id= ?";
                String teamLeader=jdbcTemplate.queryForObject(sql,String.class,entry.getKey());
                Message message=new Message();
                message.setType(3);
                message.setRead(0);
@ -104,13 +107,13 @@ public class HealthMessageJob implements Job {
                String content=dateFormat2.format(dateFormat1.parse(yesterday))+"新增"+entry.getValue().size()+"个签约居民待分配健管师,目前共"+allCount+"人待处理";
                message.setContent(content);
                message.setCode(UUID.randomUUID().toString());
                message.setReceiver(entry.getKey());
                message.setReceiver(teamLeader);
                messageDao.save(message);
                // 异常通知
                JSONObject json = new JSONObject();
                json.put("receiver", entry.getKey());
                json.put("receiver", teamLeader);
                json.put("type", "D_NH_01");
                json.put("title", title);
                json.put("msg", content);

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultDao.java

@ -28,6 +28,6 @@ public interface ConsultDao extends PagingAndSortingRepository<Consult, Long>, J
	@Query("select a.id,a.type,a.code,a.title,a.symptoms,a.czrq,b.status from Consult a,ConsultTeam b where a.code = b.consult and a.patient = ?1 and a.id < ?2 and a.del = '1'order by a.czrq desc")
	Page<Object> findByPatient(String patient, long id, Pageable pageRequest);
	@Query("select count(a) from Consult a,ConsultTeamDoctor b  where a.code = b.consult and a.patient=?1 and b.to=?2 ")
	@Query("select count(a) from Consult a,ConsultTeamDoctor b  where a.code = b.consult and a.patient=?1 and b.to=?2 and b.from is null")
	Integer findByPatient(String patientCode,String doctorCode);
}

+ 34 - 34
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/consult/ConsultTeamDao.java

@ -33,27 +33,27 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	int countByPatient(String patient,String doctor);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and b.from is null")
	Page<ConsultTeam> findDoctorList(String doctor, Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and b.from is null")
	Page<ConsultTeam> findDoctorList(String doctor, long id, Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.patient = ?2 and b.to = ?1 ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.patient = ?2 and b.to = ?1 and b.from is null")
	Page<ConsultTeam> findDoctorPatientList(String doctor,String patient,  Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.patient = ?2 and b.to = ?1 and a.id < ?3  ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.patient = ?2 and b.to = ?1 and a.id < ?3  and b.from is null")
	Page<ConsultTeam> findDoctorPatientList(String doctor,String patient, long id, Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 0 and a.del = '1' and b.del = '1' and a.type<3 ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 0 and a.del = '1' and b.del = '1' and a.type<3 and b.from is null")
	Page<ConsultTeam> findDoctorPointList(String doctor, Pageable pageRequest);
	// 被指定且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1' and a.type<3 ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1' and a.type<3 and b.from is null")
	Page<ConsultTeam> findDoctorPointList(String doctor, long id, Pageable pageRequest);
	// 被指定且未结束列表
@ -65,17 +65,17 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	Page<ConsultTeam> findDoctorAllList(String doctor, Pageable pageRequest);
	// 医生参与且未结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 0 and b.reply = 1 and a.del = '1' and b.del = '1' and a.type<3")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 0 and b.reply = 1 and a.del = '1' and b.del = '1' and a.type<3 and b.from is null")
	Page<ConsultTeam> findDoctorJoinList(String doctor, Pageable pageRequest);
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 0 and b.reply = 1 and a.del = '1' and b.del = '1' and a.type<3 ")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 0 and b.reply = 1 and a.del = '1' and b.del = '1' and a.type<3 and b.from is null")
	Page<ConsultTeam> findDoctorJoinList(String doctor, long id, Pageable pageRequest);
	// 医生参与并已结束列表
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 1 and a.del = '1' and b.del = '1' and a.type<3")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.status = 1 and a.del = '1' and b.del = '1' and a.type<3 and b.from is null")
	Page<ConsultTeam> findDoctorFinishList(String doctor, Pageable pageRequest);
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 1 and a.del = '1' and b.del = '1' and a.type<3")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and b.to = ?1 and a.id < ?2 and a.status = 1 and a.del = '1' and b.del = '1' and a.type<3  and b.from is null")
	Page<ConsultTeam> findDoctorFinishList(String doctor, long id, Pageable pageRequest);
	// 医生关闭三师咨询
@ -175,51 +175,51 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	@Query("SELECT a FROM ConsultTeam a WHERE a.patient=?1 and a.doctor = ?2 and a.status=0 and a.del=1 and a.type=6")
	ConsultTeam findFamousConsultByPatient(String uid,String doctor);
	//名医咨询 -全部
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorAllList(String uid, long id, Pageable pageRequest);
	//名医咨询 -全部
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1  and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1  and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorAllList(String uid, Pageable pageRequest);
	//名医咨询 -全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorAllList(String uid, long id,String title, Pageable pageRequest);
	//名医咨询 -全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.symptoms like ?2  and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.symptoms like ?2  and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorAllList(String uid,String title, Pageable pageRequest);
	//名医咨询 -根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.status = ?3 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.status = ?3 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorDoingList(String uid, long id,Integer type, Pageable pageRequest);
	//名医咨询 -根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 )and b.to = ?1 and a.status = ?2  and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 )and b.to = ?1 and a.status = ?2  and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorDoingList(String uid,Integer type, Pageable pageRequest);
	//名医咨询 -根据status 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = ?4 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = ?4 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorDoingList(String uid, long id,String title,Integer type, Pageable pageRequest);
	//名医咨询 -根据status 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 )and b.to = ?1 and a.symptoms like ?2 and a.status = ?3 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 )and b.to = ?1 and a.symptoms like ?2 and a.status = ?3 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorDoingList(String uid,String title,Integer type, Pageable pageRequest);
	@Query("select a from ConsultTeam a where  a.type=?3  and a.del = '1' and a.patient=?1 and a.doctor=?2 and  a.status=0 ")
	ConsultTeam findByParientCodeAndSignTypeAndDoctor(String patientCode, String doctor, int s);
	//名医咨询 -全部 带symptoms 未处理、未回复
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.symptoms like ?3 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid, long id,String title, Pageable pageRequest);
	//名医咨询 -全部 带symptoms 处理、未回复
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.symptoms like ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.symptoms like ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorUnReplyReadList(String uid,String title, Pageable pageRequest);
	//名医咨询 -全部 处理、未回复
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.id < ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorUnReplyReadNoTitleList(String uid, long id, Pageable pageRequest);
	//三师家庭咨询 -全部
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findDoctorUnReplyReadNoTitleList(String uid, Pageable pageRequest);
	//三师家庭咨询 -全部 处理、未回复
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.id < ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.id < ?2 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findDoctorUnReplyReadNoTitleList(String uid, long id, Pageable pageRequest);
	//名医咨询 -全部
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and a.type=6 and b.to = ?1 and a.status = 0 and (a.doctorRead > 0 or b.reply <> 1) and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findFamousDoctorUnReplyReadNoTitleList(String uid, Pageable pageRequest);
	//名医咨询 -全部 带symptoms 进行中
@ -239,11 +239,11 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	Page<ConsultTeam> findFamousDoctorIngNoTitleList(String uid, Pageable pageRequest);
	//三师家庭咨询 -全部 进行中
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.id < ?2 and a.status = 0 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findDoctorIngNoTitleList(String uid, long id, Pageable pageRequest);
	//三师家庭咨询 -全部 进行中
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.status = 0 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type= 1 or a.type = 2) and b.to = ?1 and a.status = 0 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findDoctorIngNoTitleList(String uid, Pageable pageRequest);
    // 更新超过24小时未回复的项目,多加一分钟,防止过于频繁更新
@ -258,34 +258,34 @@ public interface ConsultTeamDao extends PagingAndSortingRepository<ConsultTeam,
	@Query("FROM ConsultTeam a where a.type=?1 and a.adminTeamId is null")
	List<ConsultTeam> findByTypeAndAdminTeamIdIsNull(Integer s);
	//名医咨询 -我咨询的全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.id < ?2 and a.symptoms like ?3 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.id < ?2 and a.symptoms like ?3 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorAllList(String uid, long id, String title, Pageable pageRequest);
	//名医咨询 -我咨询的全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.symptoms like ?2 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.symptoms like ?2 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorAllList(String uid, String title, Pageable pageRequest);
	//名医咨询 -我咨询的全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.id < ?2 and  a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.id < ?2 and  a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorAllList(String uid, Long id, Pageable pageRequest);
	//名医咨询 -我咨询的全部 带symptoms
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1  and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1  and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorAllList(String uid, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms 根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2 and a.id < ?3 and a.symptoms like ?4 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2 and a.id < ?3 and a.symptoms like ?4 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, long id, String title, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms 根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.symptoms like ?3 and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.symptoms like ?3 and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, String title, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.id < ?3 and  a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.id < ?3 and  a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, long id, Pageable pageRequest);
	//名医咨询 -我咨询的 带symptoms根据status
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.del = '1' and b.del = '1'")
	@Query("select a from ConsultTeam a, ConsultTeamDoctor b where a.consult = b.consult and (a.type=6 or a.type=7 ) and a.patient = ?1 and a.status=?2  and a.del = '1' and b.del = '1' and b.from is null")
	Page<ConsultTeam> findMyFamousDoctorListByStatus(String uid, int status, Pageable pageRequest);
}

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/repository/patient/SignFamilyDao.java

@ -304,8 +304,8 @@ public interface SignFamilyDao extends PagingAndSortingRepository<SignFamily, Lo
	List<SignFamily> findBySignTypeAndTeamCode();
	//找出没有健康管理师的签约数据
	@Query("select a from SignFamily a where a.type = 2 and a.status >= 1 and a.doctorHealth is null and a.doctor=?1 order by a.czrq desc")
	List<SignFamily> findNoHealthSignFamilyNum(String doctor);
	@Query("select a from SignFamily a where a.type = 2 and a.status >= 1 and a.doctorHealth is null and a.adminTeamId = ?1 order by a.czrq desc")
	List<SignFamily> findNoHealthSignFamilyNum(Long teamCode);
	//找出没有健康管理师的签约数据
	@Query("select a from SignFamily a where a.type = 2 and a.status >= 1 and a.doctorHealth is null and a.doctor=?1 order by a.czrq desc")

+ 13 - 8
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/account/DoctorInfoService.java

@ -34,6 +34,7 @@ import com.yihu.wlyy.service.app.scheduling.DoctorWorkTimeService;
import com.yihu.wlyy.service.app.talk.TalkGroupService;
import com.yihu.wlyy.service.common.SMSService;
import com.yihu.wlyy.task.PushMsgTask;
import com.yihu.wlyy.util.DateUtil;
import com.yihu.wlyy.util.MD5;
import com.yihu.wlyy.wechat.util.WeiXinAccessTokenUtils;
import org.apache.commons.lang3.StringUtils;
@ -845,8 +846,9 @@ public class DoctorInfoService extends BaseService {
            data.put("doctorName", newD.getName());
            data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorHealthName +
                    "医生无法继续为您服务,具体变动如下:");
            data.put("keyword1", "家庭医生");
            data.put("keyword2", newD.getName());
            data.put("keyword3", "家庭医生");
            data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
            data.put("keyword1", newD.getName());
            if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                data.put("remark", newD.getName() + "医生将专门为您提供优质健康服务");
            } else {
@ -857,8 +859,9 @@ public class DoctorInfoService extends BaseService {
            data.put("doctor", newD.getCode());
            data.put("doctorName", newD.getName());
            data.put("first", p.getName() + ",您好!您的签约团队已为您新增一位责任医生,医生信息如下:");
            data.put("keyword1", "家庭医生");
            data.put("keyword2", newD.getName());
            data.put("keyword3", "家庭医生");
            data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
            data.put("keyword1", newD.getName());
            if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                data.put("remark", newD.getName() + "医生将专门为您提供优质的健康服务");
            } else {
@ -937,8 +940,9 @@ public class DoctorInfoService extends BaseService {
        data.put("doctor", newD.getCode());
        data.put("doctorName", newD.getName());
        data.put("first", p.getName() + ",您好!您的签约团队已为您新增一位责任医生,医生信息如下:");
        data.put("keyword1", "家庭医生");
        data.put("keyword2", newD.getName());
        data.put("keyword3", "家庭医生");
        data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
        data.put("keyword1", newD.getName());
        if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
            data.put("remark", newD.getName() + "医生将专门为您提供优质的健康服务");
        } else {
@ -1112,8 +1116,9 @@ public class DoctorInfoService extends BaseService {
        data.put("doctorName", newD.getName());
        data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorName +
                "医生无法继续为您服务,具体变动如下:");
        data.put("keyword1", "家庭医生");
        data.put("keyword2", newD.getName());
        data.put("keyword3", "家庭医生");
        data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
        data.put("keyword1", newD.getName());
        if (StringUtils.isEmpty(signFamily.getDoctorHealth()) || signFamily.getDoctor().equals(signFamily.getDoctorHealth())) {
            data.put("remark", newD.getName() + "医生将专门为您提供优质健康服务");
        } else {

+ 73 - 43
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/archives/PatientRecordService.java

@ -59,7 +59,7 @@ public class PatientRecordService {
    /**
     * 获取门/急诊记录 + 住院记录
     */
    public List<Map<String,String>> getAllEvent(String patientCode, String type, String page, String pageSize) throws Exception
    public List<Map<String,String>> getAllEvent(String patientCode, String type, String page, String pageSize,String lastTime) throws Exception
    {
        List<Map<String,String>> re = new ArrayList<>();
@ -76,60 +76,90 @@ public class PatientRecordService {
            JSONArray array = new JSONArray(response);
            String max = "";
            String min = "";
            for (int i=0;i<array.length();i++) {
                JSONObject item = array.getJSONObject(i);
                if(i==0) //最大值
            if(!"[{}]".equals(response)) {
                for (int i = 0; i < array.length(); i++) {
                    JSONObject item = array.getJSONObject(i);
                    if (i == 0) //最大值
                    {
                        max = item.optString("END_TIME");
                    } else if (i == array.length() - 1) //最小值
                    {
                        min = item.optString("END_TIME");
                    }
                    Map<String, String> map = new HashMap<>();
                    map.put("id", item.optString("EVENT"));
                    map.put("patient", patientCode);
                    map.put("eventDate", item.optString("END_TIME"));
                    map.put("eventType", item.optString("TYPE"));
                    map.put("orgName", item.optString("ORG_NAME"));
                    map.put("dianosis", item.optString("DIAGNOSIS"));
                    map.put("createTime", item.optString("END_TIME"));
                    map.put("dataFrom", "1");//基卫数据
                    re.add(map);
                }
            }
            //过滤
            for(PatientEvent item:eventList)
            {
                String  eventDate = DateUtil.dateToStrLong(item.getEventDate());
                int maxCompare = eventDate.compareTo(max);
                int minCompare = eventDate.compareTo(min);
                Boolean contain = false;
                if(maxCompare<0 && minCompare>=0)       //时间范围内
                {
                    max = item.optString("END_TIME");
                    contain = true;
                }
                else if(i==array.length()-1) //最小值
                //第一页特殊处理
                if("1".equals(page) && maxCompare>=0)
                {
                    min = item.optString("END_TIME");
                    contain = true;
                }
                Map<String,String> map = new HashMap<>();
                map.put("id",item.optString("EVENT"));
                map.put("patient",patientCode);
                map.put("eventDate",item.optString("END_TIME"));
                map.put("eventType",item.optString("TYPE"));
                map.put("orgName",item.optString("ORG_NAME"));
                map.put("dianosis",item.optString("DIAGNOSIS"));
                map.put("createTime",item.optString("END_TIME"));
                map.put("dataFrom","1");//基卫数据
                re.add(map);
            }
                //最后一页特殊处理
                if(!"1".equals(page) && (array.length()==0||"[{}]".equals(response)) && !StringUtils.isEmpty(lastTime))
                {
                    int lastTimeCompare = eventDate.compareTo(lastTime);
                    if(lastTimeCompare<0)
                    {
                        contain = true;
                    }
                }
            //过滤***********
            for(PatientEvent item:eventList)
            {
                Map<String,String> map = new HashMap<>();
                map.put("id",item.getId().toString());
                map.put("patient",item.getPatient());
                map.put("eventDate",DateUtil.dateToStrLong(item.getEventDate()));
                map.put("eventType",item.getEventType());
                map.put("orgName",item.getOrgName());
                map.put("dianosis",item.getDianosis());
                map.put("createTime",DateUtil.dateToStrLong(item.getCreateTime()));
                map.put("dataFrom","2");   //APP数据
                re.add(map);
                if(contain) {
                    Map<String, String> map = new HashMap<>();
                    map.put("id", item.getId().toString());
                    map.put("patient", item.getPatient());
                    map.put("eventDate", DateUtil.dateToStrLong(item.getEventDate()));
                    map.put("eventType", item.getEventType());
                    map.put("orgName", item.getOrgName());
                    map.put("dianosis", item.getDianosis());
                    map.put("createTime", DateUtil.dateToStrLong(item.getCreateTime()));
                    map.put("dataFrom", "2");   //APP数据
                    re.add(map);
                }
            }
            //排序
            re = sortMapList(re,"eventDate","DESC");
        }
        else{
            for(PatientEvent item:eventList)
            {
                Map<String,String> map = new HashMap<>();
                map.put("id",item.getId().toString());
                map.put("patient",item.getPatient());
                map.put("eventDate",DateUtil.dateToStrLong(item.getEventDate()));
                map.put("eventType",item.getEventType());
                map.put("orgName",item.getOrgName());
                map.put("dianosis",item.getDianosis());
                map.put("createTime",DateUtil.dateToStrLong(item.getCreateTime()));
                map.put("dataFrom","2");   //APP数据
                re.add(map);
            if("1".equals(page)) {
                for (PatientEvent item : eventList) {
                    Map<String, String> map = new HashMap<>();
                    map.put("id", item.getId().toString());
                    map.put("patient", item.getPatient());
                    map.put("eventDate", DateUtil.dateToStrLong(item.getEventDate()));
                    map.put("eventType", item.getEventType());
                    map.put("orgName", item.getOrgName());
                    map.put("dianosis", item.getDianosis());
                    map.put("createTime", DateUtil.dateToStrLong(item.getCreateTime()));
                    map.put("dataFrom", "2");   //APP数据
                    re.add(map);
                }
            }
        }

+ 22 - 12
patient-co-wlyy/src/main/java/com/yihu/wlyy/service/app/sign/FamilyContractService.java

@ -1680,9 +1680,10 @@ public class FamilyContractService extends BaseService {
                data.put("doctorName", docHealth.getName());
                data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorHealthName +
                        "医生无法继续为您服务,具体变动如下:");
                data.put("keyword1", "家庭医生");
                data.put("keyword2", docHealth.getName());
                if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                data.put("keyword3", "家庭医生");
                data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
                data.put("keyword1", docHealth.getName());
                if (StringUtils.isEmpty(signFamily.getDoctor()) || docHealth.getCode().equals(signFamily.getDoctor())) {
                    data.put("remark", docHealth.getName() + "医生将专门为您提供优质健康服务");
                } else {
                    data.put("remark", docHealth.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
@ -1694,9 +1695,10 @@ public class FamilyContractService extends BaseService {
                data.put("doctor", docHealth.getCode());
                data.put("doctorName", docHealth.getName());
                data.put("first", p.getName() + ",您好!您的签约团队已为您新增一位责任医生,医生信息如下:");
                data.put("keyword1", "家庭医生");
                data.put("keyword2", docHealth.getName());
                if (StringUtils.isEmpty(signFamily.getDoctor()) || signFamily.getDoctorHealth().equals(signFamily.getDoctor())) {
                data.put("keyword3", "家庭医生");
                data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
                data.put("keyword1", docHealth.getName());
                if (StringUtils.isEmpty(signFamily.getDoctor()) || docHealth.getCode().equals(signFamily.getDoctor())) {
                    data.put("remark", docHealth.getName() + "医生将专门为您提供优质的健康服务");
                } else {
                    data.put("remark", docHealth.getName() + "医生与" + signFamily.getDoctorName() + "医生一道,为您提供优质健康服务");
@ -1731,6 +1733,13 @@ public class FamilyContractService extends BaseService {
                result.put("msg", "医生不存在");
                return result;
            }
            //判断患者对旧的健管师是否存在健康咨询
            ConsultTeam consultTeam = consultTeamDao.findByParientCodeAndSignTypeAndDoctor(patient, signFamily.getDoctor(), 2);
            if (consultTeam != null) {
                result.put("status", -1);
                result.put("msg", "与当前健管师有未结束的咨询");
                return result;
            }
            String oldDoctorName = signFamily.getDoctorName();
            if (StringUtils.isNotEmpty(signFamily.getDoctor())) {
                DoctorTeamMember teamMember = doctorTeamDoctor.findMemberByTeamAndQkCode(signFamily.getTeamCode(), signFamily.getDoctor());
@ -1767,8 +1776,9 @@ public class FamilyContractService extends BaseService {
            data.put("doctorName", docQk.getName());
            data.put("first", p.getName() + ",您好!因签约团队内分工调整,您的责任医生有变动," + oldDoctorName +
                    "医生无法继续为您服务,具体变动如下:");
            data.put("keyword1", "家庭医生");
            data.put("keyword2", docQk.getName());
            data.put("keyword3", "家庭医生");
            data.put("keyword2", DateUtil.dateToStrNoSecond(new Date()));
            data.put("keyword1", docQk.getName());
            if (StringUtils.isEmpty(signFamily.getDoctorHealth()) || signFamily.getDoctor().equals(signFamily.getDoctorHealth())) {
                data.put("remark", docQk.getName() + "医生将专门为您提供优质健康服务");
            } else {
@ -1907,12 +1917,12 @@ public class FamilyContractService extends BaseService {
                " WHERE " +
                " sf.type = 2 " +
                " AND sf. STATUS >= 0 " +
                " and sf.doctor = ? " +
               // " and sf.doctor = ? " +
                " and sf.admin_team_code = ? " +
                " AND ( sf.doctor_health is null or sf.doctor_health ='' ) ";
        List<Map<String, Object>> datas = null;
        //查找居民
        datas = jdbcTemplate.queryForList(sql, labelType, doctorCode, teamCode);
        datas = jdbcTemplate.queryForList(sql, labelType, teamCode);
        //根据类别查找标签
        List<SignPatientLabel> s =  labelDao.findByLabelTypeAndStatusAndTeamCode(labelType, 1,teamCode);
@ -1952,8 +1962,8 @@ public class FamilyContractService extends BaseService {
        return signFamilyDao.findAllSignByPatient(patient);
    }
    public List<SignFamily> findNoHealthSignFamilyNum(String doctor) {
        return signFamilyDao.findNoHealthSignFamilyNum(doctor);
    public List<SignFamily> findNoHealthSignFamilyNum(long teamCode) {
        return signFamilyDao.findNoHealthSignFamilyNum(teamCode);
    }
    /**

+ 11 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/task/PushMsgTask.java

@ -413,11 +413,21 @@ public class PushMsgTask {
            } else if (type == 10){
                temp.setUrl(url + "qygl/html/signing-doctors.html?openid=" + openid + "&state=" + openid + "&toUser=" + json.getString("toUser"));
                temp.setTemplate_id(SystemConf.getInstance().getSystemProperties()
                        .getProperty("template_healthy_article"));
                        .getProperty("template_doctor_change"));
                WechatTemplateData keyword1 = new WechatTemplateData();
                keyword1.setColor("#000000");
                keyword1.setValue(json.getString("keyword1"));
                m.put("keyword1", keyword1);
                WechatTemplateData keyword2 = new WechatTemplateData();
                keyword2.setColor("#000000");
                keyword2.setValue(json.getString("keyword2"));
                m.put("keyword2", keyword2);
                WechatTemplateData keyword3 = new WechatTemplateData();
                keyword3.setColor("#000000");
                keyword3.setValue(json.getString("keyword3"));
                m.put("keyword3", keyword3);
            }
            temp.setData(m);
            ObjectMapper mapper = new ObjectMapper();

+ 48 - 37
patient-co-wlyy/src/main/java/com/yihu/wlyy/util/IdCardUtil.java

@ -17,7 +17,6 @@ import java.util.concurrent.ExecutionException;
public class IdCardUtil {
//    /**
//     * 根据身份证的号码算出当前身份证持有者的年龄
//     *
@ -65,31 +64,36 @@ public class IdCardUtil {
     * @throws Exception
     */
    public static int getAgeForIdcard(String idcard) {
        int age = 0;
        try {
            int age = 0;
        if (StringUtils.isEmpty(idcard)) {
            return age;
        }
            if (StringUtils.isEmpty(idcard)) {
                return age;
            }
        String birth = "";
            String birth = "";
        if (idcard.length() == 18) {
            birth = idcard.substring(6, 14);
        } else if (idcard.length() == 15) {
            birth = "19" + idcard.substring(6, 12);
        }
            if (idcard.length() == 18) {
                birth = idcard.substring(6, 14);
            } else if (idcard.length() == 15) {
                birth = "19" + idcard.substring(6, 12);
            }
        int year = Integer.valueOf(birth.substring(0, 4));
        int month = Integer.valueOf(birth.substring(4, 6));
        int day = Integer.valueOf(birth.substring(6));
        Calendar cal = Calendar.getInstance();
        age = cal.get(Calendar.YEAR) - year;
        //周岁计算
        if (cal.get(Calendar.MONTH) < (month - 1) || (cal.get(Calendar.MONTH) == (month - 1) && cal.get(Calendar.DATE) < day)) {
            age--;
        }
            int year = Integer.valueOf(birth.substring(0, 4));
            int month = Integer.valueOf(birth.substring(4, 6));
            int day = Integer.valueOf(birth.substring(6));
            Calendar cal = Calendar.getInstance();
            age = cal.get(Calendar.YEAR) - year;
            //周岁计算
            if (cal.get(Calendar.MONTH) < (month - 1) || (cal.get(Calendar.MONTH) == (month - 1) && cal.get(Calendar.DATE) < day)) {
                age--;
            }
            return age;
        } catch (Exception e) {
        return age;
        }
        return -1;
    }
    /**
@ -118,6 +122,7 @@ public class IdCardUtil {
        }
        return b;
    }
    /**
     * 根据身份证的号码算出当前身份证持有者的性别
     * 1 女 2 男 3未知
@ -152,6 +157,7 @@ public class IdCardUtil {
        }
        return sex;
    }
    /**
     * 根据身份证的号码算出当前身份证持有者的性别
     * 1 男 2 女 3未知
@ -162,23 +168,28 @@ public class IdCardUtil {
    public static String getSexForIdcard_new(String CardCode)
            throws Exception {
        String sex = Constant.level_sex_3;
        if (CardCode.length() == 18) {
            if (Integer.parseInt(CardCode.substring(16).substring(0, 1)) % 2 == 0) {// 判断性别
                // modifid by lyr 2016-09-29
                 sex =  Constant.level_sex_2;
                // modifid by lyr 2016-09-29
            } else {
                // modifid by lyr 2016-09-29
                 sex =  Constant.level_sex_1;
                // modifid by lyr 2016-09-29
            }
        } else if (CardCode.length() == 15) {
            String usex = CardCode.substring(14, 15);// 用户的性别
            if (Integer.parseInt(usex) % 2 == 0) {
                 sex =  Constant.level_sex_2;
            } else {
                sex =  Constant.level_sex_1;
        try {
            if (CardCode.length() == 18) {
                if (Integer.parseInt(CardCode.substring(16).substring(0, 1)) % 2 == 0) {// 判断性别
                    // modifid by lyr 2016-09-29
                    sex = Constant.level_sex_2;
                    // modifid by lyr 2016-09-29
                } else {
                    // modifid by lyr 2016-09-29
                    sex = Constant.level_sex_1;
                    // modifid by lyr 2016-09-29
                }
            } else if (CardCode.length() == 15) {
                String usex = CardCode.substring(14, 15);// 用户的性别
                if (Integer.parseInt(usex) % 2 == 0) {
                    sex = Constant.level_sex_2;
                } else {
                    sex = Constant.level_sex_1;
                }
            }
            return sex;
        } catch (Exception e) {
            e.printStackTrace();
        }
        return sex;
    }

+ 2 - 0
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/consult/DoctorConsultController.java

@ -205,6 +205,8 @@ public class DoctorConsultController extends WeixinBaseController {
                json.put("time", DateUtil.dateToStr(consult.getCzrq(), DateUtil.YYYY_MM_DD_HH_MM_SS));
                // 咨询状态
                json.put("status", consult.getStatus());
                json.put("doctor", consult.getDoctor());
                json.put("doctorName", consult.getDoctorName());
                // 设置性别
                json.put("sex", p.getSex());
                // 未读消息

+ 2 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/doctor/sign/DoctorFamilyContractController.java

@ -875,9 +875,9 @@ public class DoctorFamilyContractController extends WeixinBaseController {
     */
    @RequestMapping(value = "/findNoHealthSignFamilyNum")
    @ResponseBody
    public String findNoHealthSignFamilyNum(String doctor) {
    public String findNoHealthSignFamilyNum(long teamCode) {
        try {
            List<SignFamily> signFamily = familyContractService.findNoHealthSignFamilyNum(doctor);
            List<SignFamily> signFamily = familyContractService.findNoHealthSignFamilyNum(teamCode);
            JSONObject jo = new JSONObject();
            if (signFamily != null && signFamily.size() > 0) {
                jo.put("date", DateUtil.dateToStr(signFamily.get(0).getCzrq(), "yyyy-MM-dd"));

+ 4 - 2
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/archives/PatientArchivesController.java

@ -41,9 +41,11 @@ public class PatientArchivesController extends BaseController {
                              @ApiParam(name="page",value="第几页",defaultValue = "1")
                              @RequestParam(value="page",required = true) String page,
                              @ApiParam(name="pageSize",value="每页几行",defaultValue = "10")
                              @RequestParam(value="pageSize",required = true) String pageSize) {
                              @RequestParam(value="pageSize",required = true) String pageSize,
                              @ApiParam(name="lastTime",value="最后一条时间",defaultValue = "2010-10-10 00:00:00")
                              @RequestParam(value="lastTime",required = false) String lastTime) {
        try {
            List<Map<String,String>> result = patientRecordService.getAllEvent(getUID(),type,page,pageSize);
            List<Map<String,String>> result = patientRecordService.getAllEvent(getUID(),type,page,pageSize,lastTime);
            return write(200, "获取就诊记录成功!", "data", result);
        } catch (Exception e) {

+ 1 - 1
patient-co-wlyy/src/main/java/com/yihu/wlyy/web/patient/consult/ConsultController.java

@ -327,7 +327,7 @@ public class ConsultController extends WeixinBaseController {
            // 推送消息给医生
            PushMsgTask.getInstance().put(consult.getDoctor(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.D_CT_01.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.指定咨询.name(), MessageType.MESSAGE_TYPE_DOCTOR_NEW_CONSULT_TEAM.您有新的指定咨询.name(), consult.getConsult());
            return write(200, "提交成功");
            return write(200, "提交成功","data",consult);
        } catch (Exception ex) {
            error(ex);
            return invalidUserException(ex, -1, "提交失败!");

+ 7 - 3
patient-co-wlyy/src/main/resources/system.properties

@ -138,9 +138,8 @@ template_appoint_failed=pErTBTdweIdrNRf_1Oo62YtQC0aHwPvtLaCzw44JzCQ
template_expenses_remind=BkTGJ8S18qZ3DfaptAXnZznAk8RJjx9v93og5vyO0bs
#健康教育
template_healthy_article=LA7erINJ0CSsG2G_ZCrgsDaX3krhsI4qg_NSHEyL_l4
#医生变更
template_doctor_change=TNIDMjduVKgVL4-k71umYLpHROvFB8K6mmm8aZC_EH8
#----------------正式环境-----------------#
##签约邀请
@ -163,6 +162,9 @@ template_healthy_article=LA7erINJ0CSsG2G_ZCrgsDaX3krhsI4qg_NSHEyL_l4
#template_expenses_remind=tldWEb9AN7p_RoHoD8ml0GxWW3V1V_mpEEhp2v6p56s
##健康教育
#template_healthy_article=a5-ZGf-IUUULsuRNoHWQiBMU6pSYhLgPPqV67SjdLRo
##医生变更
#template_doctor_change=TNIDMjduVKgVL4-k71umYLpHROvFB8K6mmm8aZC_EH8
#----------------测试环境(健康之路i厦门)----------------#
##签约邀请
@ -185,6 +187,8 @@ template_healthy_article=LA7erINJ0CSsG2G_ZCrgsDaX3krhsI4qg_NSHEyL_l4
#template_expenses_remind=r-bVEKgXVyl8O96saoJXlLd7DX1zW7fXA4a0PZHxiQM
##健康教育
#template_healthy_article=aO_qqk5nAXaGXhsikPVLNelqzwlrp1LTPfIQ1qRMpxo
##医生变更
#template_doctor_change=V5h0F84t972kUzQvWy8qYrgdaYGJVj10pFeFVl19Nb8
#----------------演示环境(健康之路i健康)-----------------#
##签约邀请