|
@ -1048,11 +1048,32 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
String ssc = card.getAttachCardNo();
|
|
|
String idType = card.getAttachIdType();
|
|
|
String idNo = card.getAttachIdNo();
|
|
|
logger.info("================================>" + "after get BindCard");
|
|
|
// 验证续方人与绑卡人是否一致
|
|
|
if (!(payName.equals(name) && paySsc.equals(ssc) && payIdcard.equals(idNo))) {
|
|
|
resultMap.put("status", "-1");
|
|
|
return resultMap;
|
|
|
|
|
|
String resName = "";
|
|
|
String resSsc = "";
|
|
|
String resIdNo = "";
|
|
|
if (!patient.equals(repUid)){
|
|
|
List<BindCard> bindCard = onePayService.bindCardList(openid);
|
|
|
for (BindCard cards : bindCard) {
|
|
|
String attachCardNo = cards.getAttachCardNo();
|
|
|
if (StringUtil.isNotEmpty(attachCardNo) && StringUtil.isNotEmpty(paySsc) && paySsc.equals(attachCardNo)) {
|
|
|
resIdNo = cards.getAttachIdNo();
|
|
|
resName = cards.getAttachName();
|
|
|
resSsc = cards.getAttachCardNo();
|
|
|
}
|
|
|
}
|
|
|
// 验证续方人与绑卡人(或代理人)是否一致
|
|
|
if (!(payName.equals(resName) && paySsc.equals(resSsc) && payIdcard.equals(resIdNo))) {
|
|
|
resultMap.put("status", "-1");
|
|
|
return resultMap;
|
|
|
}
|
|
|
}else {
|
|
|
logger.info("================================>" + "after get BindCard");
|
|
|
// 验证续方人与绑卡人(或代理人)是否一致
|
|
|
if (!(payName.equals(name) && paySsc.equals(ssc) && payIdcard.equals(idNo))) {
|
|
|
resultMap.put("status", "-1");
|
|
|
return resultMap;
|
|
|
}
|
|
|
}
|
|
|
|
|
|
prescriptionPay.setCardNo(ssc);//医保卡号
|
|
@ -1099,12 +1120,22 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
|
|
|
String visitNo = prescription.getVisitNo();//续方挂号号
|
|
|
String recipeNo = prescription.getRecipeNo();//基位处方code(开方成功后返回)
|
|
|
logger.debug("======================> getPayInfo " + ssc + visitNo);
|
|
|
if (visitNo == null || ssc == null || recipeNo == null) {
|
|
|
resultMap.put("status", "-2");
|
|
|
return resultMap;
|
|
|
JSONObject jsonParams = null;
|
|
|
if (!patient.equals(repUid)){
|
|
|
logger.debug("======================> getPayInfo " + resSsc + visitNo);
|
|
|
if (visitNo == null || resSsc == null || recipeNo == null) {
|
|
|
resultMap.put("status", "-2");
|
|
|
return resultMap;
|
|
|
}
|
|
|
jsonParams = prescriptionService.getPayInfo(resSsc, visitNo, recipeNo);
|
|
|
}else{
|
|
|
logger.debug("======================> getPayInfo " + ssc + visitNo);
|
|
|
if (visitNo == null || ssc == null || recipeNo == null) {
|
|
|
resultMap.put("status", "-2");
|
|
|
return resultMap;
|
|
|
}
|
|
|
jsonParams = prescriptionService.getPayInfo(ssc, visitNo, recipeNo);
|
|
|
}
|
|
|
JSONObject jsonParams = prescriptionService.getPayInfo(ssc, visitNo, recipeNo);
|
|
|
|
|
|
if (!jsonParams.containsKey("recipeContent") || !jsonParams.containsKey("zdlist") || !jsonParams.containsKey("mxlist")) {
|
|
|
resultMap.put("status", "-3");
|
|
@ -1132,6 +1163,7 @@ public class PatientPrescriptionPayService extends BaseService {
|
|
|
map.put("settleType", "01"); //诊间医保结算
|
|
|
// 易联众新增字段代支付v1.3.7
|
|
|
map.put("principalCardNo", ssc); //实际结算卡号( 默认为绑卡主体卡号)
|
|
|
prescriptionPay.setPrincipalCardNo(ssc);
|
|
|
if (!patient.equals(repUid)) {
|
|
|
String principalCardNo = null;
|
|
|
Patient person = patientDao.findByCode(repUid);
|