|
|
@ -18,6 +18,7 @@ import com.ynxbd.common.result.ResultEnum; |
|
|
|
import com.ynxbd.common.result.ServiceException; |
|
|
|
import com.ynxbd.common.result.ServiceException; |
|
|
|
import com.ynxbd.common.service.MedicalService; |
|
|
|
import com.ynxbd.common.service.MedicalService; |
|
|
|
import com.ynxbd.common.service.params.RegParams; |
|
|
|
import com.ynxbd.common.service.params.RegParams; |
|
|
|
|
|
|
|
import com.ynxbd.wx.wxfactory.ReqParamHelper; |
|
|
|
import com.ynxbd.wx.wxfactory.WxCacheHelper; |
|
|
|
import com.ynxbd.wx.wxfactory.WxCacheHelper; |
|
|
|
import com.ynxbd.wx.wxfactory.WxMedicalHelper; |
|
|
|
import com.ynxbd.wx.wxfactory.WxMedicalHelper; |
|
|
|
import com.ynxbd.wx.wxfactory.WxPayHelper; |
|
|
|
import com.ynxbd.wx.wxfactory.WxPayHelper; |
|
|
@ -45,9 +46,9 @@ public class MedicalAction extends BaseAction { |
|
|
|
* 用户信息获取 | 医保上传 | 医保支付下单 |
|
|
|
* 用户信息获取 | 医保上传 | 医保支付下单 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Action("getFeeDetails") |
|
|
|
@Action("getFeeDetails") |
|
|
|
public Result getFeeDetails(String callNo, String payCode, String openid, String qrCode, String patientId, String cardNo, String realName, BigDecimal totalFee, Boolean isTime,String ybAttrib,String ybBZCode, String ybBZName) { |
|
|
|
public Result getFeeDetails(String callNo, String payCode, String openid, String qrCode, String patientId, String cardNo, String realName, BigDecimal totalFee, Boolean isTime, String ybAttrib, String ybBZCode, String ybBZName) { |
|
|
|
try { |
|
|
|
try { |
|
|
|
log.info("【医保】上传明细下单 callNo={}, payCode={}, openid={}, qrCode={}, patientId={}, totalFee={}, ybAttrib={}, ybBZCode={}, ybBZName={}", callNo, payCode, openid, qrCode, patientId, totalFee,ybAttrib,ybBZCode,ybBZName); |
|
|
|
log.info("【医保】上传明细下单 callNo={}, payCode={}, openid={}, qrCode={}, patientId={}, totalFee={}, ybAttrib={}, ybBZCode={}, ybBZName={}", callNo, payCode, openid, qrCode, patientId, totalFee, ybAttrib, ybBZCode, ybBZName); |
|
|
|
if (callNo == null || payCode == null || openid == null || qrCode == null || patientId == null || cardNo == null || totalFee == null) { |
|
|
|
if (callNo == null || payCode == null || openid == null || qrCode == null || patientId == null || cardNo == null || totalFee == null) { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
} |
|
|
|
} |
|
|
@ -72,7 +73,7 @@ public class MedicalAction extends BaseAction { |
|
|
|
if (treatNum == null || recipeJson == null) { |
|
|
|
if (treatNum == null || recipeJson == null) { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
} |
|
|
|
} |
|
|
|
medicalInfo = MedicalService.recipeMdUploadFeeDetails(qrCode, openid, patientId, cardNo, realName, treatNum, recipeJson, totalFee,ybAttrib,ybBZCode,ybBZName); |
|
|
|
medicalInfo = MedicalService.recipeMdUploadFeeDetails(qrCode, openid, patientId, cardNo, realName, treatNum, recipeJson, totalFee, ybAttrib, ybBZCode, ybBZName); |
|
|
|
break; |
|
|
|
break; |
|
|
|
|
|
|
|
|
|
|
|
default: |
|
|
|
default: |
|
|
@ -99,11 +100,15 @@ public class MedicalAction extends BaseAction { |
|
|
|
* [处方流转]获取授权链接 |
|
|
|
* [处方流转]获取授权链接 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Action("getAuthUrl") |
|
|
|
@Action("getAuthUrl") |
|
|
|
public Result getAuthUrl(String url, String callNo) { |
|
|
|
public Result getAuthUrl(String url) { |
|
|
|
if (ObjectUtils.isEmpty(url) || ObjectUtils.isEmpty(callNo)) { |
|
|
|
if (ObjectUtils.isEmpty(url)) { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_INVALID); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_INVALID); |
|
|
|
} |
|
|
|
} |
|
|
|
JSONObject respJson = WxMedicalHelper.getMdAuthUrl(url, callNo); |
|
|
|
url = ReqParamHelper.decode(url); |
|
|
|
|
|
|
|
if (ObjectUtils.isEmpty(url)) { |
|
|
|
|
|
|
|
return Result.error(ResultEnum.PARAM_IS_INVALID); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
JSONObject respJson = WxMedicalHelper.getMdAuthUrl(url); |
|
|
|
return Result.success(respJson); |
|
|
|
return Result.success(respJson); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
@ -115,21 +120,22 @@ public class MedicalAction extends BaseAction { |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 获取对账链接 |
|
|
|
* 获取对账链接 |
|
|
|
|
|
|
|
* |
|
|
|
* @param billDate 账单日期 |
|
|
|
* @param billDate 账单日期 |
|
|
|
* @param billType 账单类型 ALL,返回当日所有订单信息,默认 SUCCESS,返回当日成功支付的订单 REFUND,返回当日退款订单 |
|
|
|
* @param billType 账单类型 ALL,返回当日所有订单信息,默认 SUCCESS,返回当日成功支付的订单 REFUND,返回当日退款订单 |
|
|
|
* @param key 加密密钥 |
|
|
|
* @param key 加密密钥 |
|
|
|
* @return 下载链接 |
|
|
|
* @return 下载链接 |
|
|
|
*/ |
|
|
|
*/ |
|
|
|
@Action("downBill") |
|
|
|
@Action("downBill") |
|
|
|
public Result downBill(String billDate, String billType, String key) { |
|
|
|
public Result downBill(String billDate, String billType, String key) { |
|
|
|
log.info("[医保]下载对账订单,billDate-{}, billType-{}, key-{}",billDate,billType,key); |
|
|
|
log.info("[医保]下载对账订单,billDate-{}, billType-{}, key-{}", billDate, billType, key); |
|
|
|
if(billDate== null || billType == null){ |
|
|
|
if (billDate == null || billType == null) { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_DEFECT); |
|
|
|
} |
|
|
|
} |
|
|
|
if (!DateHelper.getCurDate().equals(AesHelper.deCode(key))) { |
|
|
|
if (!DateHelper.getCurDate().equals(AesHelper.deCode(key))) { |
|
|
|
return Result.error(ResultEnum.PARAM_IS_INVALID); |
|
|
|
return Result.error(ResultEnum.PARAM_IS_INVALID); |
|
|
|
} |
|
|
|
} |
|
|
|
return Result.success(WxMedicalHelper.downBill(billDate,billType)); |
|
|
|
return Result.success(WxMedicalHelper.downBill(billDate, billType)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|