|
@ -54,8 +54,8 @@ public class OnePayController extends WeixinBaseController {
|
|
|
public String expensesStatus() throws Exception {
|
|
|
try {
|
|
|
// 获取居民个人信息 要根据签约code去查找签约扣费状态
|
|
|
String userCode = getUID();
|
|
|
// String userCode = "915cc456-5b1d-11e6-8344-fa163e8aee56";
|
|
|
// String userCode = getUID();
|
|
|
String userCode = "915cc456-5b1d-11e6-8344-fa163e8aee56";
|
|
|
SignFamily signFamily = signFamilyDao.findPatientExpensesStatus(userCode);
|
|
|
String expensesStatus = signFamily.getExpensesStatus();
|
|
|
if ("0".equals(expensesStatus)){
|
|
@ -72,23 +72,25 @@ public class OnePayController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "createSicard", method = RequestMethod.POST)
|
|
|
@ApiOperation("生成电子社保卡")
|
|
|
@ResponseBody
|
|
|
public String createSicard() throws Exception {
|
|
|
try {
|
|
|
String sicardUrl = pay.createSicard("0cc6e4562de2437ab2dbbf51a9fc3b49","oULM4xAj9sOsHJ95ttKYd_Fjh6Hc");//getUID(), getOpenid());
|
|
|
return write(200, "生成电子社保卡成功!", "data", sicardUrl);
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "bindCard", method = RequestMethod.POST)
|
|
|
@ApiOperation("查询绑卡信息")
|
|
|
@ResponseBody
|
|
|
public String bindCard() throws Exception {
|
|
|
try {
|
|
|
// 获取居民个人信息
|
|
|
String userCode = getUID();
|
|
|
String openId = getOpenid();
|
|
|
if (StringUtils.isNotEmpty(openId)) {
|
|
|
BindCard bindCard = pay.bindCard(userCode, openId);
|
|
|
return write(200, "查询绑卡信息成功!", "data", bindCard);
|
|
|
} else {
|
|
|
return write(-1, "openId为空!");
|
|
|
}
|
|
|
// BindCard bindCard = pay.bindCard("915cc456-5b1d-11e6-8344-fa163e8aee56","o4Ma2t5665rS7uNfA9EF-VnOJx30"); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk //o4Ma2t5665rS7uNfA9EF-VnOJx30 getUID()getOpenid()
|
|
|
// BindCard bindCard = pay.bindCard("915cc456-5b1d-11e6-8344-fa163e8aee56","ohNH9sh4uwuJCxIwcLJtGTX-BaSk"); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk //o4Ma2t5665rS7uNfA9EF-VnOJx30 getUID()getOpenid()
|
|
|
// return write(200, "查询绑卡信息成功!","data",bindCard);
|
|
|
BindCard bindCard = pay.bindCard("0cc6e4562de2437ab2dbbf51a9fc3b49","oULM4xAj9sOsHJ95ttKYd_Fjh6Hc");//getUID(), getOpenid()); oULM4xAj9sOsHJ95ttKYd_Fjh6Hc
|
|
|
return write(200, "查询绑卡信息成功!","data",bindCard);
|
|
|
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, e.getMessage());
|
|
@ -115,8 +117,9 @@ public class OnePayController extends WeixinBaseController {
|
|
|
@RequestParam String feeDetail) throws Exception {
|
|
|
try {
|
|
|
// 获取居民个人信息
|
|
|
String userCode = getUID();
|
|
|
String openId = getOpenid();
|
|
|
/*String userCode = getUID();
|
|
|
Patient patient = patientDao.findByCode(userCode);
|
|
|
String openId = patient.getOpenid();
|
|
|
if (StringUtils.isNotEmpty(openId)) {
|
|
|
String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, selfpayAmount, insuranceAmount, feeDetail, userCode, openId); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk getUID(),getOpenid()
|
|
|
// 更新签约表的缴费状态(begin字段),表示签约正式开始
|
|
@ -124,10 +127,9 @@ public class OnePayController extends WeixinBaseController {
|
|
|
return write(200, "家庭医生签约支付成功!", "data", settleNo);
|
|
|
} else {
|
|
|
return write(-1, "openId为空!");
|
|
|
}
|
|
|
// String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, selfpayAmount, insuranceAmount, feeDetail, "915cc456-5b1d-11e6-8344-fa163e8aee56", "o4Ma2t5665rS7uNfA9EF-VnOJx30"); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk getUID(),getOpenid()
|
|
|
// String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, selfpayAmount, insuranceAmount, feeDetail, "915cc456-5b1d-11e6-8344-fa163e8aee56", "ohNH9sh4uwuJCxIwcLJtGTX-BaSk"); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk getUID(),getOpenid()
|
|
|
// return write(200, "家庭医生签约支付成功!", "data", settleNo);
|
|
|
}*/
|
|
|
String settleNo = pay.charge(orgCode, chargeType, chargeRelation, totalAmount, selfpayAmount, insuranceAmount, feeDetail,"0cc6e4562de2437ab2dbbf51a9fc3b49", "oULM4xAj9sOsHJ95ttKYd_Fjh6Hc"); //getUID(),getOpenid()
|
|
|
return write(200, "家庭医生签约支付成功!", "data", settleNo);
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, e.getMessage());
|
|
|
}
|
|
@ -147,26 +149,7 @@ public class OnePayController extends WeixinBaseController {
|
|
|
}
|
|
|
}
|
|
|
|
|
|
@RequestMapping(value = "createSicard", method = RequestMethod.POST)
|
|
|
@ApiOperation("生成电子社保卡")
|
|
|
@ResponseBody
|
|
|
public String createSicard() throws Exception {
|
|
|
try {
|
|
|
// 获取居民个人信息
|
|
|
String userCode = getUID();
|
|
|
String openId = getOpenid();
|
|
|
if (StringUtils.isNotEmpty(openId)) {
|
|
|
String sicardUrl = pay.createSicard(userCode, openId); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk //o4Ma2t5665rS7uNfA9EF-VnOJx30 getUID(),getOpenid()
|
|
|
return write(200, "生成电子社保卡成功!", "data", sicardUrl);
|
|
|
}else {
|
|
|
return write(-1, "openId为空!");
|
|
|
}
|
|
|
// String sicardUrl = pay.createSicard("915cc456-5b1d-11e6-8344-fa163e8aee56", "o4Ma2t5665rS7uNfA9EF-VnOJx30"); //ohNH9sh4uwuJCxIwcLJtGTX-BaSk //o4Ma2t5665rS7uNfA9EF-VnOJx30 getUID(),getOpenid()
|
|
|
// return write(200, "生成电子社保卡成功!", "data", sicardUrl);
|
|
|
} catch (Exception e) {
|
|
|
return error(-1, e.getMessage());
|
|
|
}
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@RequestMapping(value = "chargeList", method = RequestMethod.POST)
|
|
@ -239,6 +222,7 @@ public class OnePayController extends WeixinBaseController {
|
|
|
if (StringUtil.isEmpty(reqQueryString)) {
|
|
|
throw new PayException("跳转参数为空");
|
|
|
}
|
|
|
|
|
|
Map<String, String> targetMap = null;
|
|
|
|
|
|
try {
|