|
@ -83,20 +83,19 @@ public class YkyyService {
|
|
|
return response;
|
|
|
}
|
|
|
|
|
|
/*
|
|
|
*//**
|
|
|
/**
|
|
|
* 眼科通验证码
|
|
|
* @param type
|
|
|
* @param phone
|
|
|
* @return
|
|
|
*//*
|
|
|
*/
|
|
|
public String getShortMessage(String type,String phone){
|
|
|
String response="";
|
|
|
String url = yktUrl+"verification_code/short_message?type="+type+"&telephone="+phone;
|
|
|
response = httpClientUtil.get(url,"GBK");
|
|
|
logger.info("眼科通验证码:"+response);
|
|
|
return response;
|
|
|
}*/
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
* 增加家庭成员
|
|
@ -131,8 +130,7 @@ public class YkyyService {
|
|
|
JSONObject jsonObject = new JSONObject();
|
|
|
jsonObject.put("loginid",tel);
|
|
|
jsonObject.put("password",password);
|
|
|
jsonObject.put("VerCode",vercode);
|
|
|
String url = "http://www.yanketong.com:90/api/Patient/ForgotPassword";
|
|
|
String url = "http://www.yanketong.com:90/api/Patient/ForgotPassword4Jkzl";
|
|
|
response = httpClientUtil.sendPost(url,jsonObject.toJSONString());
|
|
|
logger.info("获取眼科通忘记密码信息:"+response);
|
|
|
return response;
|
|
@ -149,7 +147,7 @@ public class YkyyService {
|
|
|
*/
|
|
|
public String getRegisterUser(String telephone,String patientPwd,String code,String inviteCode,String equipmentType,String equipmentGuid){
|
|
|
String response="";
|
|
|
String url = yktUrl+"user_center/patient_register01?telephone="+telephone+"&patient_pwd="+patientPwd+"&code="+code+"&invite_code="+inviteCode+"&equipment_type="+equipmentType+
|
|
|
String url = yktUrl+"user_center/patient_register01?telephone="+telephone+"&patient_pwd="+patientPwd+"&invite_code="+inviteCode+"&equipment_type="+equipmentType+
|
|
|
"&equipment_guid="+equipmentGuid;
|
|
|
response = httpClientUtil.get(url,"GBK");
|
|
|
logger.info("眼科通用户注册:"+response);
|
|
@ -242,7 +240,39 @@ public class YkyyService {
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
throw new Exception("用户注册失败");
|
|
|
String familyList =getFamilyList(basePatientDO.getMobile(),null);
|
|
|
JSONObject object = JSONObject.parseObject(familyList);
|
|
|
if (object.getString("code").equalsIgnoreCase("200")){
|
|
|
JSONObject object1 = object.getJSONObject("data");
|
|
|
JSONArray array = object1.getJSONArray("list");
|
|
|
if (array!=null&&array.size()!=0){
|
|
|
JSONObject jsonObject1 = array.getJSONObject(0);
|
|
|
if (jsonObject1!=null){
|
|
|
String yktId = jsonObject1.getString("ID");
|
|
|
userId = jsonObject1.getString("ASSUSERID");
|
|
|
basePatientDO.setYktId(yktId);
|
|
|
basePatientDO.setUserId(userId);
|
|
|
patientDao.save(basePatientDO);
|
|
|
}
|
|
|
}else {
|
|
|
userId=object1.getString("user_id");
|
|
|
String birdth = DateUtil.dateToStrShort(IdCardUtil.getBirthdayForIdcard(basePatientDO.getIdcard()));
|
|
|
Integer age = IdCardUtil.getAgeForIdcard(basePatientDO.getIdcard());
|
|
|
Integer sex = basePatientDO.getSex();
|
|
|
String family = addFamily(userId,basePatientDO.getIdcard(),basePatientDO.getName(),sex.toString(),birdth,age.toString(),basePatientDO.getMobile());
|
|
|
JSONObject object2 = JSONObject.parseObject(family);
|
|
|
if (object2.getString("code").equalsIgnoreCase("200")){
|
|
|
JSONObject object3 = object2.getJSONObject("data");
|
|
|
String yktId = object3.getString("ID");
|
|
|
basePatientDO.setYktId(yktId);
|
|
|
userId = object3.getString("ASSUSERID");
|
|
|
basePatientDO.setUserId(userId);
|
|
|
patientDao.save(basePatientDO);
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
throw new Exception("查询家庭成员失败!");
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|