| 
					
				 | 
			
			
				@ -57,8 +57,8 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String DEFAULT_PATIENT_INSERT_STATEMENT = 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				            "INSERT into base_patient (id,photo,idcard,password,salt,name,birthday,sex,mobile," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "province_code,province_name,city_code,city_name,town_code,town_name,street_code,street_name,address," + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "del,locked,enabled,login_failure_count,login_date) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    "del,locked,enabled,login_failure_count,login_date,card_type) " + 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    " values(?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				    private static final String PATIENT_INSERT_WEHCAT = "insert into base_patient_wechat (id,wechat_id,patient_id,openid,create_time) values(?,?,?,?,?)"; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -298,10 +298,12 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    JSONObject object1 = JSONObject.parseObject(res); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    logger.info("object1"+object1.toJSONString()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    if (null != object1&&null!=object1.get("status") && "200".equals(object1.get("status").toString())) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        JSONObject patient = object1.getJSONObject("userinfo"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String salt = randomString(5); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        idcard = patient.getString("idcard"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String idtype = patient.getString("idtype"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String mobile = patient.getString("mobile"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        String pw = mobile.substring(mobile.length()-6); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        try { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -328,7 +330,8 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            1, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            0, 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            new Date() 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            new Date(), 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                            idtype 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                            ); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        }catch (Exception e){ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -350,6 +353,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        user.setEnabled(true); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        user.setLocked(false); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        user.setLockedDate(null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        user.setCardType(idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                        users.add(user); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    }else{ 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -672,6 +676,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                JSONObject patient = object1.getJSONObject("userinfo"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                logger.info("开始同步患者数据"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String idcard = patient.getString("idcard"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String idtype = patient.getString("idtype"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                BasePatientDO patientDO2 = patientDao.findByIdcardAndDel(idcard,"1"); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                BasePatientDO patient1 = new BasePatientDO(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                String salt = UUID.randomUUID().toString().substring(0,5); 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@ -689,6 +694,7 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                    patient1.setSalt(salt); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                patient1.setIdcard(idcard); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                patient1.setCardType(idtype); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                patient1.setName(patient.getString("name")); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                patient1.setSex(StringUtils.isNotBlank(idcard)?Integer.parseInt(IdCardUtil.getSexForIdcard_new(idcard)):null); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                patient1.setMobile(mobile); 
			 |