|
|
|
@ -6,27 +6,21 @@ import com.ynxbd.ali.helper.AliHelper; |
|
|
|
|
import com.ynxbd.ali.helper.AliMessageHelper; |
|
|
|
|
import com.ynxbd.common.action.pay.PEnum; |
|
|
|
|
import com.ynxbd.common.bean.RegSign; |
|
|
|
|
import com.ynxbd.common.bean.enums.HospEnum; |
|
|
|
|
import com.ynxbd.common.bean.enums.MerchantEnum; |
|
|
|
|
import com.ynxbd.common.bean.pay.Order; |
|
|
|
|
import com.ynxbd.common.bean.pay.Register; |
|
|
|
|
import com.ynxbd.common.bean.sms.SmsRegTem; |
|
|
|
|
import com.ynxbd.common.dao.RefundDao; |
|
|
|
|
import com.ynxbd.common.dao.RegisterDao; |
|
|
|
|
import com.ynxbd.common.dao.his.HisAccountDao; |
|
|
|
|
import com.ynxbd.common.dao.his.HisRegisterDao; |
|
|
|
|
import com.ynxbd.common.helper.common.CodeHelper; |
|
|
|
|
import com.ynxbd.common.helper.common.DateHelper; |
|
|
|
|
import com.ynxbd.common.helper.common.JsonHelper; |
|
|
|
|
import com.ynxbd.common.helper.common.SmsHelper; |
|
|
|
|
import com.ynxbd.common.helper.his.HisHelper; |
|
|
|
|
import com.ynxbd.common.result.JsonResult; |
|
|
|
|
import com.ynxbd.common.result.Result; |
|
|
|
|
import com.ynxbd.common.result.ResultEnum; |
|
|
|
|
import com.ynxbd.common.result.ServiceException; |
|
|
|
|
import com.ynxbd.wx.config.MessagePushConfig; |
|
|
|
|
import com.ynxbd.wx.config.MiddleOfficeConfig; |
|
|
|
|
import com.ynxbd.wx.config.WeChatConfig; |
|
|
|
|
import com.ynxbd.wx.utils.DateGenerate; |
|
|
|
|
import com.ynxbd.wx.wxfactory.WxMedicalHelper; |
|
|
|
|
import com.ynxbd.wx.wxfactory.WxPayHelper; |
|
|
|
@ -274,9 +268,12 @@ public class RegService { |
|
|
|
|
|
|
|
|
|
MedicalOrder order = WxMedicalHelper.refund(outTradeNo, ("R" + payOrdId), payOrdId, cashFee, reason); |
|
|
|
|
log.info("[医保]挂号现金退费order={}", order); |
|
|
|
|
|
|
|
|
|
String refundReason = "线下现金退费"; |
|
|
|
|
if (!ObjectUtils.isEmpty(reason)) { |
|
|
|
|
refundReason = ":" + reason; |
|
|
|
|
} |
|
|
|
|
refundResult = order.isOk() ? WxPayHelper.OK : order.getMessage(); |
|
|
|
|
if (!regDao.updateRefundByTradeNo(payOrdId, refundResult)) { |
|
|
|
|
if (!regDao.updateRefundByTradeNo(payOrdId, refundResult, refundReason)) { |
|
|
|
|
log.error("[医保]挂号现金退费修改数据库状态失败 payOrderId={}, refundResult={}", payOrdId, refundResult); |
|
|
|
|
} |
|
|
|
|
if (order.isOk()) { |
|
|
|
|