|
@ -123,7 +123,7 @@ public class RegisterService {
|
|
|
rs.put("mes","保存用户信息失败");
|
|
|
return rs;
|
|
|
}
|
|
|
public Map<String,Object> registerPatient(String mobile,String pw,String name,String idcard,String ssc,String openid)throws Exception{
|
|
|
public Map<String,Object> registerPatient(String mobile,String pw,String name,String idcard, String cardType,String ssc,String openid)throws Exception{
|
|
|
|
|
|
Map<String,Object> rs = new HashedMap();
|
|
|
try{
|
|
@ -133,10 +133,22 @@ public class RegisterService {
|
|
|
rs.put("mes","手机号已经存在");
|
|
|
return rs;
|
|
|
}
|
|
|
List<BasePatientDO> p3 = basePatientDao.findListByIdcardAndDel(idcard, "1");
|
|
|
if (p3 != null && p3.size() > 0) {
|
|
|
BasePatientDO tmp = p3.get(0);
|
|
|
rs.put("code", "-3");
|
|
|
rs.put("mobile", StringUtils.isNotBlank(tmp.getMobile()) ? tmp.getMobile() : tmp.getMobileRemarks());
|
|
|
rs.put("mes", "当前身份证已有注册信息,请填写正确的手机号登录");
|
|
|
return rs;
|
|
|
}
|
|
|
if (StringUtils.isNotBlank(idcard)) {
|
|
|
idcard = idcard.toUpperCase();
|
|
|
}
|
|
|
BasePatientDO patient = new BasePatientDO();
|
|
|
String salt = UUID.randomUUID().toString().substring(0,5);
|
|
|
patient.setPassword(MD5.md5Hex(pw + "{" + salt + "}"));
|
|
|
patient.setSalt(salt);
|
|
|
patient.setCardType(cardType);
|
|
|
patient.setMobile(mobile);
|
|
|
patient.setDel("1");
|
|
|
patient.setEnabled(1);
|
|
@ -153,13 +165,6 @@ public class RegisterService {
|
|
|
if(StringUtils.isNoneBlank(openid)){
|
|
|
patient.setOpenid(openid);
|
|
|
}
|
|
|
if("hz_yyyzh_wx".equalsIgnoreCase(wechatId)){//杭州医养头像初始化
|
|
|
if(StringUtils.isBlank(patient.getPhoto())){
|
|
|
String sql = " select dict_value from wlyy_hospital_sys_dict where dict_name='hz_default_avatar' and dict_code='jiashunan' ";
|
|
|
String hzPhoto = jdbcTemplate.queryForObject(sql,String.class);
|
|
|
patient.setPhoto(hzPhoto);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
BasePatientDO temp = basePatientDao.save(patient);
|
|
|
|