| 
					
				 | 
			
			
				@ -258,6 +258,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //居民详情 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BasePatientDO basePatientDO = basePatientDao.findById(outpatientDO.getPatient()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        rs.put("patientName",basePatientDO.getName()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        rs.put("photo",basePatientDO.getPhoto()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        rs.put("patientId",basePatientDO.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        rs.put("idCard",basePatientDO.getIdcard()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        rs.put("sex", basePatientDO.getSex()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -310,6 +311,14 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            rs.put("expressageLogs",null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //预约记录 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPatientRegisterTimeDO> timeDOs = patientRegisterTimeDao.findByOutpatientId(outpatientId); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(timeDOs!=null&&timeDOs.size()>0){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            rs.put("register",timeDOs.get(0)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            rs.put("register",null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return rs; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -1420,4 +1429,96 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<WlyyHospitalSysDictDO> findCancelReasonList(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return sysDictDao.findByDictName("PatientCancel"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 獲取快速咨詢時間 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> findFastRegisterDate(){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int days = 7; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String AMStartTime ="8:00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String AMEndTime ="12:00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String PMStartTime ="14:00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String PMEndTime ="17:00"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //设置上午过号时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Calendar scTime = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        scTime.setTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Calendar ecTime = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ecTime.setTime(new Date()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> times = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        for(int i=0;i<days;i++){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //設置上午時段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> time = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time.put("timeType","1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time.put("date",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time.put("weekDay",scTime.get(Calendar.DAY_OF_WEEK)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String ts[] = AMStartTime.split(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            scTime.set(scTime.get(Calendar.YEAR),scTime.get(Calendar.MONTH),scTime.get(Calendar.DAY_OF_MONTH),Integer.parseInt(ts[0]),Integer.parseInt(ts[1]),00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time.put("startTime",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String ts2[] = AMEndTime.split(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            scTime.set(scTime.get(Calendar.YEAR),scTime.get(Calendar.MONTH),scTime.get(Calendar.DAY_OF_MONTH),Integer.parseInt(ts2[0]),Integer.parseInt(ts2[1]),00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time.put("endTime",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            times.add(time); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //設置下午時段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            Map<String,Object> time2 = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time2.put("timeType","2"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time2.put("date",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time2.put("weekDay",scTime.get(Calendar.DAY_OF_WEEK)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String pts[] = PMStartTime.split(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            scTime.set(scTime.get(Calendar.YEAR),scTime.get(Calendar.MONTH),scTime.get(Calendar.DAY_OF_MONTH),Integer.parseInt(pts[0]),Integer.parseInt(pts[1]),00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time2.put("startTime",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            String pts2[] = PMEndTime.split(":"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            scTime.set(scTime.get(Calendar.YEAR),scTime.get(Calendar.MONTH),scTime.get(Calendar.DAY_OF_MONTH),Integer.parseInt(pts2[0]),Integer.parseInt(pts2[1]),00); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            time2.put("endTime",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            times.add(time2); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            //生成下一天 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            scTime.add(Calendar.DAY_OF_MONTH,1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(DateUtil.strToDate(DateUtil.getTimeShort(),DateUtil.HH_MM).after(DateUtil.strToDate(AMEndTime,DateUtil.HH_MM))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            times.remove(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if(DateUtil.strToDate(DateUtil.getTimeShort(),DateUtil.HH_MM).after(DateUtil.strToDate(PMEndTime,DateUtil.HH_MM))) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            times.remove(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return times; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    /** 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * 获取快速咨询时间分段 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param startTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @param endTime 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public List<Map<String,Object>> findByTimeSlot(String startTime,String endTime){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        int interval = 30; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String,Object>> times = new ArrayList<>(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        //设置上午过号时间 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Calendar scTime = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        scTime.setTime(DateUtil.stringToDate(startTime,"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        Calendar ecTime = Calendar.getInstance(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        ecTime.setTime(DateUtil.stringToDate(endTime,"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        while (scTime.getTime().before(ecTime.getTime())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            if(new Date().before(scTime.getTime())){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                Map<String,Object> time = new HashedMap(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                time.put("startTime",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                scTime.add(Calendar.MINUTE,interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                time.put("endTime",DateUtil.dateToStr(scTime.getTime(),"yyyy-MM-dd HH:mm:ss")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                times.add(time); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            }else{ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                scTime.add(Calendar.MINUTE,interval); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        return times; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				} 
			 |