|
|
|
|
@ -99,18 +99,18 @@ public class PayAction extends BaseAction { |
|
|
|
|
if (merchantEnum == null) { // 支付方式异常
|
|
|
|
|
return Result.error(ResultEnum.PAY_TYPE_ERROR); |
|
|
|
|
} |
|
|
|
|
RecipeService recipeService = new RecipeService(); |
|
|
|
|
RxService rxService = new RxService(); |
|
|
|
|
|
|
|
|
|
SelfHelp selfHelp = new SelfHelpDao().selectByTreatNum(treatNum); |
|
|
|
|
if (selfHelp != null) { // 是核酸
|
|
|
|
|
try { |
|
|
|
|
recipeService.selfHelpPrepay(selfHelp.getCode(), treatNum); |
|
|
|
|
rxService.selfHelpPrepay(selfHelp.getCode(), treatNum); |
|
|
|
|
} catch (ServiceException e) { |
|
|
|
|
return Result.error(e); |
|
|
|
|
} |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
Result result = recipeService.recipeHand(merchantEnum, payOpenId, openid, patientId, treatNum, totalFee, recipeJson, payWay, awaitSecond, isHttpsWithProxy()); |
|
|
|
|
Result result = rxService.rxHand(merchantEnum, payOpenId, openid, patientId, treatNum, totalFee, recipeJson, payWay, awaitSecond, isHttpsWithProxy()); |
|
|
|
|
if (!result.isOK() || result.getData() != null) { // 业务错误 || 存在返回数据-需提前返回
|
|
|
|
|
return result; |
|
|
|
|
} |
|
|
|
|
@ -122,14 +122,14 @@ public class PayAction extends BaseAction { |
|
|
|
|
|
|
|
|
|
log.info("{} [处方]预结算开始... patientId={}", merchantEnum.NAME, patientId); |
|
|
|
|
// 调用预结算!!!!注意如果HIS不支持开启改功能后,会存在直接入库的风险
|
|
|
|
|
List<Recipe> respList = recipeService.hisRxPrepay(recipeJson, patientId, treatNum); |
|
|
|
|
List<Recipe> respList = rxService.hisRxPrepay(recipeJson, patientId, treatNum); |
|
|
|
|
return Result.success(respList); |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
String outTradeNo = merchantEnum.createOutTradeNo(); |
|
|
|
|
// 订单信息预存
|
|
|
|
|
if (!recipeService.saveRecipeInfo(merchantEnum, payOpenId, openid, recipeJson, payWay, patientId, treatNum, outTradeNo, totalFee)) { |
|
|
|
|
if (!rxService.saveRxData(merchantEnum, payOpenId, openid, recipeJson, payWay, patientId, treatNum, outTradeNo, totalFee)) { |
|
|
|
|
log.info("{} [处方支付]预存支付信息失败 patientId={}", merchantEnum.NAME, patientId); |
|
|
|
|
return Result.error(ResultEnum.SPECIFIED_QUESTIONED_USER_NOT_EXIST); |
|
|
|
|
} |
|
|
|
|
@ -298,7 +298,7 @@ public class PayAction extends BaseAction { |
|
|
|
|
|
|
|
|
|
switch (PEnum.toEnum(callNo)) { |
|
|
|
|
case RECIPE: |
|
|
|
|
return new RecipeService().mdCashRefund(payOrdId, refundDesc); |
|
|
|
|
return new RxService().mdCashRefund(payOrdId, refundDesc); |
|
|
|
|
|
|
|
|
|
case REG: // 挂号
|
|
|
|
|
return new RegService().mdCashRefund(payOrdId, refundDesc); |
|
|
|
|
@ -349,7 +349,7 @@ public class PayAction extends BaseAction { |
|
|
|
|
try { |
|
|
|
|
switch (pEnum) { |
|
|
|
|
case RECIPE: // 处方
|
|
|
|
|
new RecipeService().hisRefund(invoiceTransNo, patientId, refundUser, refundDesc, refundMoney, pEnum); |
|
|
|
|
new RxService().hisRefund(invoiceTransNo, patientId, refundUser, refundDesc, refundMoney, pEnum); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case REG: // 挂号
|
|
|
|
|
@ -519,7 +519,7 @@ public class PayAction extends BaseAction { |
|
|
|
|
} |
|
|
|
|
switch (orderType) { |
|
|
|
|
case RECIPE: // 处方
|
|
|
|
|
isResult = new RecipeService().isHandRefund(tradeNo, refundUser, refundDesc, orderType, callNo); |
|
|
|
|
isResult = new RxService().isHandRefund(tradeNo, refundUser, refundDesc, orderType, callNo); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case REG: // 挂号
|
|
|
|
|
@ -589,7 +589,7 @@ public class PayAction extends BaseAction { |
|
|
|
|
} |
|
|
|
|
switch (orderType) { |
|
|
|
|
case RECIPE: // 处方
|
|
|
|
|
isResult = new RecipeService().isHandRefund(tradeNo, username, refundDesc, orderType, "MICRO"); |
|
|
|
|
isResult = new RxService().isHandRefund(tradeNo, username, refundDesc, orderType, "MICRO"); |
|
|
|
|
break; |
|
|
|
|
|
|
|
|
|
case REG: // 挂号
|
|
|
|
|
@ -709,7 +709,7 @@ public class PayAction extends BaseAction { |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
try { |
|
|
|
|
new RecipeService().selfHelpMaxNum(code); |
|
|
|
|
new RxService().selfHelpMaxNum(code); |
|
|
|
|
} catch (ServiceException e) { |
|
|
|
|
return Result.error(e); |
|
|
|
|
} |
|
|
|
|
|