|
@@ -85,6 +85,17 @@ public class SavePayResultService {
|
|
|
dao.updateSuccessHisStatus(order.getTradeNo());
|
|
|
return ResultVoUtil.success("保存挂号信息成功。");
|
|
|
}
|
|
|
+
|
|
|
+ template = new RestTemplate();
|
|
|
+ response = template.postForObject(hrgApiUrl + "/getPayStatusForRegistration",
|
|
|
+ obj, QueryMzPayStatusResponse.class);
|
|
|
+ hasSaved = 0;
|
|
|
+ if (null != response && response.getResultCode() == 0) {
|
|
|
+ hasSaved = response.getPayStatus();
|
|
|
+ }
|
|
|
+ if (hasSaved == 1) {
|
|
|
+ return ResultVoUtil.success("保存挂号信息成功。");
|
|
|
+ }
|
|
|
ResultVo<String> refund = refundService.autoRefund(order.getTradeNo(), "保存挂号信息失败,自动退款。");
|
|
|
log.info("【订单号:{}】保存挂号信息失败,自动退款结果:{}", order.getTradeNo(), refund);
|
|
|
if (null != refund && refund.getCode() == ExceptionEnum.SUCCESS.getCode()) {
|
|
@@ -132,6 +143,17 @@ public class SavePayResultService {
|
|
|
dao.updateSuccessHisStatus(order.getTradeNo());
|
|
|
return ResultVoUtil.success("保存门诊缴费信息成功。");
|
|
|
}
|
|
|
+
|
|
|
+ template = new RestTemplate();
|
|
|
+ response = template.postForObject(hrgApiUrl + "/getPayStatus",
|
|
|
+ obj, QueryMzPayStatusResponse.class);
|
|
|
+ hasSaved = 0;
|
|
|
+ if (null != response && response.getResultCode() != -1) {
|
|
|
+ hasSaved = response.getPayStatus();
|
|
|
+ }
|
|
|
+ if (hasSaved == 1) {
|
|
|
+ return ResultVoUtil.success("保存门诊缴费信息成功。");
|
|
|
+ }
|
|
|
ResultVo<String> refund = refundService.autoRefund(order.getTradeNo(), "保存门诊缴费信息失败,自动退款。");
|
|
|
log.info("【订单号:{}】保存门诊缴费信息失败,自动退款结果:{}", order.getTradeNo(), refund);
|
|
|
if (refund.getCode() == ExceptionEnum.SUCCESS.getCode()) {
|