| 
					
				 | 
			
			
				@ -6633,7 +6633,7 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            sql.append("  and b.status IN(20,21,30,31,32,100,101)"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            countSql.append(" and b.status IN(20,21,30,31,32,100,101) "); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql.append(" order by b.prescribe_time limit ").append((page-1)*size).append(",").append(size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        sql.append(" order by b.prescribe_time DESC limit ").append((page-1)*size).append(",").append(size); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<WlyyPrescriptionVO> list = jdbcTemplate.query(sql.toString(), new BeanPropertyRowMapper<>(WlyyPrescriptionVO.class)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<Map<String, Object>> mapList = jdbcTemplate.queryForList(countSql.toString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        long count = Long.parseLong(mapList.get(0).get("count").toString()); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -6709,11 +6709,11 @@ public class PrescriptionService extends BaseJpaService<WlyyPrescriptionDO, Pres 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     * @return 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     */ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    public MixEnvelop findPatientOpenId(String patientCode) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        BasePatientWechatDo basePatientWechatDo = patientWechatDao.findByWechatIdAndPatientId(wechatId, patientCode).get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (basePatientWechatDo==null){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        List<BasePatientWechatDo> basePatientWechatDo = patientWechatDao.findByWechatIdAndPatientId(wechatId, patientCode); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (basePatientWechatDo.isEmpty()){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return MixEnvelop.getError("居民不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String openid = basePatientWechatDo.getOpenid(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        String openid = basePatientWechatDo.get(0).getOpenid(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        if (StringUtils.isEmpty(openid)){ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            return MixEnvelop.getError("居民openID不存在"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				        } 
			 |