|
@ -82,33 +82,33 @@ public class OnePayService {
|
|
|
/**
|
|
|
* 查询绑卡信息(本人)
|
|
|
*/
|
|
|
public BindCard bindCard(String patient, String openid) throws Exception {
|
|
|
BindCard card = ownerCard(openid);
|
|
|
|
|
|
//更新患者信息
|
|
|
if (card != null) {
|
|
|
Patient p = patientDao.findByCode(patient);
|
|
|
p.setOpenid(openid);
|
|
|
p.setSsc(card.getAttachCardNo());
|
|
|
// 增加绑定电子社保卡信息
|
|
|
p.setSicardStatus(1);
|
|
|
if (p.getSicardTime() == null) {
|
|
|
p.setSicardTime(new Date());
|
|
|
}
|
|
|
;
|
|
|
if (card.getAttachIdType() == "01") //身份证
|
|
|
{
|
|
|
p.setIdcard(card.getAttachIdNo());
|
|
|
}
|
|
|
if (!card.getAttachName().equals(p.getName())) {
|
|
|
System.out.print("姓名不一致,姓名:" + p.getName() + " 社保姓名:" + card.getAttachName());
|
|
|
}
|
|
|
|
|
|
patientDao.save(p);
|
|
|
}
|
|
|
|
|
|
return card;
|
|
|
}
|
|
|
// public BindCard bindCard(String patient, String openid) throws Exception {
|
|
|
// BindCard card = ownerCard(openid);
|
|
|
//
|
|
|
// //更新患者信息
|
|
|
// if (card != null) {
|
|
|
// Patient p = patientDao.findByCode(patient);
|
|
|
// p.setOpenid(openid);
|
|
|
// p.setSsc(card.getAttachCardNo());
|
|
|
//// 增加绑定电子社保卡信息
|
|
|
// p.setSicardStatus(1);
|
|
|
// if (p.getSicardTime() == null) {
|
|
|
// p.setSicardTime(new Date());
|
|
|
// }
|
|
|
// ;
|
|
|
// if (card.getAttachIdType() == "01") //身份证
|
|
|
// {
|
|
|
// p.setIdcard(card.getAttachIdNo());
|
|
|
// }
|
|
|
// if (!card.getAttachName().equals(p.getName())) {
|
|
|
// System.out.print("姓名不一致,姓名:" + p.getName() + " 社保姓名:" + card.getAttachName());
|
|
|
// }
|
|
|
//
|
|
|
// patientDao.save(p);
|
|
|
// }
|
|
|
//
|
|
|
// return card;
|
|
|
// }
|
|
|
|
|
|
/**
|
|
|
* 查询绑卡信息(本人)
|
|
@ -694,7 +694,9 @@ public class OnePayService {
|
|
|
|
|
|
//保存到患者表
|
|
|
Patient p = patientDao.findByCode(patient);
|
|
|
p.setOpenid(openid);
|
|
|
if(!"undefined".equals(openid)&&StringUtils.isNotBlank(openid)){
|
|
|
p.setOpenid(openid);
|
|
|
}
|
|
|
// 增加绑定电子社保卡信息
|
|
|
if (!"1".equals(p.getSicardStatus())){
|
|
|
p.setSicardTime(new Date());
|