|
@ -218,6 +218,14 @@ public class WlyyBusinessService {
|
|
|
patient.setBirthday(DateUtil.strToDate(data.getString("birthday"),"yyyyMMdd"));
|
|
|
patient = basePatientDao.save(patient);
|
|
|
result = patient.getId();
|
|
|
if(data.get("ssc")!=null){
|
|
|
PatientMedicareCardDO patientMedicareCardDO = new PatientMedicareCardDO();
|
|
|
patientMedicareCardDO.setDel("1");
|
|
|
patientMedicareCardDO.setPatientCode(patient.getId());
|
|
|
patientMedicareCardDO.setCode(data.getString("ssc"));
|
|
|
patientMedicareCardDO.setType("A_01");
|
|
|
patientMedicareCardDao.save(patientMedicareCardDO);
|
|
|
}
|
|
|
}else{
|
|
|
throw new Exception("请求i健康接口,获取居民信息失败");
|
|
|
}
|
|
@ -340,7 +348,29 @@ public class WlyyBusinessService {
|
|
|
}
|
|
|
}
|
|
|
}else {
|
|
|
//TODO
|
|
|
PatientMedicareCardDO patientMedicareCardDO = patientMedicareCardDao.findByTypeAndPatientCodeAndDel("A_01",patientId,"1");
|
|
|
if (patientMedicareCardDO!=null){
|
|
|
patientCardNo = patientMedicareCardDO.getCode();
|
|
|
}else {
|
|
|
Map<String,String> params2 = new HashMap<>();
|
|
|
params2.put("idcard",idcard);
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatient",null,params2);
|
|
|
if(rs!=null) {
|
|
|
Integer status = rs.getInteger("status");
|
|
|
if (200 == status) {
|
|
|
JSONObject data = rs.getJSONObject("data");
|
|
|
if (data.get("ssc")!=null){
|
|
|
patientCardNo = data.getString("ssc");
|
|
|
patientMedicareCardDO = new PatientMedicareCardDO();
|
|
|
patientMedicareCardDO.setPatientCode(patientId);
|
|
|
patientMedicareCardDO.setCode(patientCardNo);
|
|
|
patientMedicareCardDO.setType("A_01");
|
|
|
patientMedicareCardDO.setDel("1");
|
|
|
patientMedicareCardDao.save(patientMedicareCardDO);
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
}
|
|
|
if (!StringUtils.isNoneBlank(patientCardNo)){
|
|
|
return "社保卡不能为空!";
|
|
@ -353,9 +383,7 @@ public class WlyyBusinessService {
|
|
|
patientSccParams.put("sex",basePatientDO.getSex().toString());
|
|
|
patientSccParams.put("phone",basePatientDO.getMobile());
|
|
|
patientSccParams.put("birthday",DateUtil.dateToStrShort(basePatientDO.getBirthday()));
|
|
|
JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
|
|
|
|
|
|
|
|
|
//JSONObject object = wlyyHttpService.sendWlyyMes("wlyyFindAccountBySsc", null, patientSccParams);
|
|
|
|
|
|
JSONObject rs = wlyyHttpService.sendWlyyMes("wlyyGetPatientAccetokenByIdcard",null,params);
|
|
|
if(rs!=null){
|