|  | @ -7,6 +7,7 @@ import com.yihu.jw.doctor.dao.BaseDoctorHospitalDao;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
 |  | import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 |  | import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 |  | import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
 | 
												
													
														
															|  | 
 |  | import com.yihu.jw.entity.base.im.ConsultTeamDo;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 |  | import com.yihu.jw.entity.base.org.BaseOrgDO;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.patient.BasePatientDO;
 |  | import com.yihu.jw.entity.base.patient.BasePatientDO;
 | 
												
													
														
															|  | import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
 |  | import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
 | 
												
											
												
													
														
															|  | @ -117,6 +118,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |     private WlyyDoctorClinicRoomDao wlyyDoctorClinicRoomDao;
 |  |     private WlyyDoctorClinicRoomDao wlyyDoctorClinicRoomDao;
 | 
												
													
														
															|  |     @Autowired
 |  |     @Autowired
 | 
												
													
														
															|  |     private BaseDoctorHospitalDao baseDoctorHospitalDao;
 |  |     private BaseDoctorHospitalDao baseDoctorHospitalDao;
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     
 |  |     
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  |     @Value("${demo.flag}")
 |  |     @Value("${demo.flag}")
 | 
												
											
												
													
														
															|  | @ -1607,9 +1609,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |                rs.put("hospital",hospitalDOs.get(0));
 |  |                rs.put("hospital",hospitalDOs.get(0));
 | 
												
													
														
															|  |                BaseOrgDO org = baseOrgDao.findByCode(hospitalDOs.get(0).getOrgCode());
 |  |                BaseOrgDO org = baseOrgDao.findByCode(hospitalDOs.get(0).getOrgCode());
 | 
												
													
														
															|  |                rs.put("winNo",org.getWinNo());
 |  |                rs.put("winNo",org.getWinNo());
 | 
												
													
														
															|  | 
 |  |                rs.put("deptName",hospitalDOs.get(0).getDeptName());
 | 
												
													
														
															|  |             }else{
 |  |             }else{
 | 
												
													
														
															|  |                rs.put("hospital",null);
 |  |                rs.put("hospital",null);
 | 
												
													
														
															|  |                rs.put("winNo",null);
 |  |                rs.put("winNo",null);
 | 
												
													
														
															|  | 
 |  |                rs.put("deptName",null);
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  | 
 | 
												
											
												
													
														
															|  | @ -2375,4 +2379,49 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
												
													
														
															|  |             }
 |  |             }
 | 
												
													
														
															|  |         }
 |  |         }
 | 
												
													
														
															|  |     }
 |  |     }
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |     /**
 | 
												
													
														
															|  | 
 |  |      * 复诊图文咨询人数,视频咨询人数, 专家咨询未完成
 | 
												
													
														
															|  | 
 |  |      * @param doctor
 | 
												
													
														
															|  | 
 |  |      * @return
 | 
												
													
														
															|  | 
 |  |      */
 | 
												
													
														
															|  | 
 |  |     public JSONObject doctorIndexConsultCount(String doctor) {
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |         //医生问诊量
 | 
												
													
														
															|  | 
 |  |         List<WlyyOutpatientDO> wlyyOutpatientDOs = outpatientDao.findByDoctor(doctor);
 | 
												
													
														
															|  | 
 |  |         
 | 
												
													
														
															|  | 
 |  |         Integer imgCount = 0;
 | 
												
													
														
															|  | 
 |  |         
 | 
												
													
														
															|  | 
 |  |         Integer videoCount = 0;
 | 
												
													
														
															|  | 
 |  |         
 | 
												
													
														
															|  | 
 |  |         for(WlyyOutpatientDO wlyyOutpatientDO:wlyyOutpatientDOs){
 | 
												
													
														
															|  | 
 |  |             //1.图文 2.视频
 | 
												
													
														
															|  | 
 |  |             if("1".equals(wlyyOutpatientDO.getType())){
 | 
												
													
														
															|  | 
 |  |                 imgCount ++;
 | 
												
													
														
															|  | 
 |  |             }else if("2".equals(wlyyOutpatientDO.getType())){
 | 
												
													
														
															|  | 
 |  |                 videoCount ++;
 | 
												
													
														
															|  | 
 |  |             }else{
 | 
												
													
														
															|  | 
 |  |                 continue;
 | 
												
													
														
															|  | 
 |  |             }
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |         String totalSql = "SELECT count(a.id) AS total " +
 | 
												
													
														
															|  | 
 |  |                 "FROM wlyy_consult a,wlyy_consult_team b " +
 | 
												
													
														
															|  | 
 |  |                 "WHERE a.id=b.consult AND b.doctor='"+doctor+"' AND a.type=1 AND b.`status`=0";
 | 
												
													
														
															|  | 
 |  | 
 | 
												
													
														
															|  | 
 |  |         List<Map<String, Object>> rstotal = jdbcTemplate.queryForList(totalSql);
 | 
												
													
														
															|  | 
 |  |     
 | 
												
													
														
															|  | 
 |  |         Long zjCount = 0L;
 | 
												
													
														
															|  | 
 |  |         if (rstotal != null && rstotal.size() > 0) {
 | 
												
													
														
															|  | 
 |  |             zjCount = (Long) rstotal.get(0).get("total");
 | 
												
													
														
															|  | 
 |  |         }
 | 
												
													
														
															|  | 
 |  |         
 | 
												
													
														
															|  | 
 |  |         JSONObject result = new JSONObject();
 | 
												
													
														
															|  | 
 |  |         result.put("imgCount",imgCount);
 | 
												
													
														
															|  | 
 |  |         result.put("videoCount",videoCount);
 | 
												
													
														
															|  | 
 |  |         result.put("zjCount",zjCount);
 | 
												
													
														
															|  | 
 |  |         
 | 
												
													
														
															|  | 
 |  |         return result;
 | 
												
													
														
															|  | 
 |  |         
 | 
												
													
														
															|  | 
 |  |     }
 | 
												
													
														
															|  | }
 |  | }
 |