|
@ -3,6 +3,7 @@ package com.yihu.wlyy.service.app.sign;
|
|
|
import java.util.*;
|
|
|
|
|
|
import com.yihu.wlyy.entity.doctor.team.admin.AdminTeam;
|
|
|
import com.yihu.wlyy.entity.doctor.team.sign.SignPatientLabelInfo;
|
|
|
import com.yihu.wlyy.entity.organization.Hospital;
|
|
|
import com.yihu.wlyy.entity.dict.SystemDict;
|
|
|
import com.yihu.wlyy.entity.doctor.profile.Doctor;
|
|
@ -1696,6 +1697,32 @@ public class FamilyContractService extends BaseService {
|
|
|
}
|
|
|
sql.append(" limit "+start+","+pagesize+"");
|
|
|
List<Patient> returnList= jdbcTemplate.query(sql.toString(),new BeanPropertyRowMapper(Patient.class));
|
|
|
//得到疾病标签
|
|
|
StringBuffer dieaseSql=new StringBuffer("" +
|
|
|
" select p.* from wlyy_sign_patient_label_info p where p.label_type='2' and p.status=1 and p.patient in " +
|
|
|
" (select a.patient code from wlyy_sign_family a where a.type = 2 and a.status >= 1 and a.doctor_health is null and a.doctor='"+doctor+"' order by a.czrq desc ) ");
|
|
|
|
|
|
|
|
|
List<SignPatientLabelInfo> dieaseList= jdbcTemplate.query(dieaseSql.toString(),new BeanPropertyRowMapper(SignPatientLabelInfo.class));
|
|
|
Map<String,List<SignPatientLabelInfo>> diseaseMap=new HashMap<>();
|
|
|
if(dieaseList!=null&&dieaseList.size()>0){
|
|
|
for(SignPatientLabelInfo signPatientLabelInfo:dieaseList){
|
|
|
List<SignPatientLabelInfo> signPatientLabelInfoTemp= diseaseMap.get(signPatientLabelInfo.getPatient());
|
|
|
if(signPatientLabelInfoTemp!=null){
|
|
|
signPatientLabelInfoTemp.add(signPatientLabelInfo);
|
|
|
}else{
|
|
|
signPatientLabelInfoTemp=new ArrayList<>();
|
|
|
signPatientLabelInfoTemp.add(signPatientLabelInfo);
|
|
|
}
|
|
|
diseaseMap.put(signPatientLabelInfo.getPatient(),signPatientLabelInfoTemp);
|
|
|
}
|
|
|
}
|
|
|
if(returnList!=null&&returnList.size()>0){
|
|
|
for(Patient patient:returnList){
|
|
|
List<SignPatientLabelInfo> signPatientLabelInfoTemp=diseaseMap.get(patient.getCode());
|
|
|
patient.setLabelInfos(signPatientLabelInfoTemp);
|
|
|
}
|
|
|
}
|
|
|
Integer allCount= jdbcTemplate.queryForObject(countSql.toString(),Integer.class);
|
|
|
if(allCount%pagesize==0){
|
|
|
returnMap.put("count",allCount/pagesize);
|