|  | @ -139,6 +139,8 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |     private WlyyDoctorOnlineTimeDao wlyyDoctorOnlineTimeDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private OauthYlzConfigDao oauthYlzConfigDao;
 | 
	
		
			
				|  |  |     @Autowired
 | 
	
		
			
				|  |  |     private PatientRegisterDao patientRegisterDao;
 | 
	
		
			
				|  |  |     
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |     @Value("${demo.flag}")
 | 
	
	
		
			
				|  | @ -1027,16 +1029,28 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |             throw new RuntimeException("未找到医生映射信息");
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         //判断是否已经挂号,如果已经挂号
 | 
	
		
			
				|  |  |         if(StringUtils.isNotBlank(outpatientDO.getConNo())&&StringUtils.isNotBlank(outpatientDO.getRegisterNo())){
 | 
	
		
			
				|  |  |         //查找居民当天挂号记录
 | 
	
		
			
				|  |  |         String date = DateUtil.dateToStr(new Date(),"yyyy-MM-dd");
 | 
	
		
			
				|  |  |         List<WlyyPatientRegisterDO>  patientRegisterDOs = patientRegisterDao.findByPatientAndDate(outpatientDO.getPatient(),date);
 | 
	
		
			
				|  |  |         if(patientRegisterDOs!=null&&patientRegisterDOs.size()>0){
 | 
	
		
			
				|  |  |             WlyyPatientRegisterDO registerDO = patientRegisterDOs.get(0);
 | 
	
		
			
				|  |  |             //判断是否已经挂号,如果已经挂号
 | 
	
		
			
				|  |  |             if(StringUtils.isNotBlank(registerDO.getConNo())&&StringUtils.isNotBlank(registerDO.getRegisterNo())){
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |                 net.sf.json.JSONObject res = new JSONObject();
 | 
	
		
			
				|  |  |                 res.put("@RESULT","0");
 | 
	
		
			
				|  |  |                 logger.info("已经挂号 res: " +res.toString());
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             net.sf.json.JSONObject res = new JSONObject();
 | 
	
		
			
				|  |  |             res.put("@RESULT","0");
 | 
	
		
			
				|  |  |             logger.info("已经挂号 res: " +res.toString());
 | 
	
		
			
				|  |  |                 //更新挂号流水号
 | 
	
		
			
				|  |  |                 outpatientDO.setConNo(registerDO.getConNo());
 | 
	
		
			
				|  |  |                 outpatientDO.setRegisterNo(registerDO.getRegisterNo());
 | 
	
		
			
				|  |  |                 outpatientDao.save(outpatientDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             return res;
 | 
	
		
			
				|  |  |                 return res;
 | 
	
		
			
				|  |  |             }
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |         net.sf.json.JSONObject rs = entranceService.BS10111(outpatientDO.getCardNo(),doctorMappingDO.getMappingCode(),outpatientDO.getDept(),null,outpatientDO.getWinNo(),demoFlag);
 | 
	
		
			
				|  |  |         net.sf.json.JSONObject res = rs.getJSONObject("resquest");
 | 
	
		
			
				|  |  |         logger.info("挂号结果 res: " +res.toString());
 | 
	
	
		
			
				|  | @ -1050,6 +1064,16 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres
 | 
	
		
			
				|  |  |             outpatientDO.setConNo(conNo);
 | 
	
		
			
				|  |  |             logger.info("挂号流水 @serial_no: " +serialNo+" @times: "+conNo);
 | 
	
		
			
				|  |  |             outpatientDao.save(outpatientDO);
 | 
	
		
			
				|  |  | 
 | 
	
		
			
				|  |  |             //存储就诊记录
 | 
	
		
			
				|  |  |             WlyyPatientRegisterDO registerDO = new WlyyPatientRegisterDO();
 | 
	
		
			
				|  |  |             registerDO.setPatient(outpatientDO.getPatient());
 | 
	
		
			
				|  |  |             registerDO.setPatientName(outpatientDO.getPatientName());
 | 
	
		
			
				|  |  |             registerDO.setRegisterNo(serialNo);
 | 
	
		
			
				|  |  |             registerDO.setConNo(conNo);
 | 
	
		
			
				|  |  |             registerDO.setCreateTime(new Date());
 | 
	
		
			
				|  |  |             registerDO.setDate(DateUtil.dateToStr(new Date(),"yyyy-MM-dd"));
 | 
	
		
			
				|  |  |             patientRegisterDao.save(registerDO);
 | 
	
		
			
				|  |  |         }
 | 
	
		
			
				|  |  |             //保存日志
 | 
	
		
			
				|  |  |         WlyyHttpLogDO log = new WlyyHttpLogDO();
 |