|
|
|
|
@ -167,7 +167,7 @@ public class MedicalService { |
|
|
|
|
String ordStas = result.getDataMapString("OrdStas"); //
|
|
|
|
|
BigDecimal deposit = result.getDataMapBigDecimal("Deposit"); // 住院押金(医保6202返回)
|
|
|
|
|
|
|
|
|
|
log.info("[医保-住院结算]HIS费用上传明细接口返回 payAuthNo={}, payOrdId={}, payToken={}, mdtrtId={}, chrgBchno={}, userIdYBZF={}", payAuthNo, payOrdId, payToken, mdTrtId, chrgBchno, mdUserId); |
|
|
|
|
log.info("[医保-住院结算]HIS费用上传明细接口返回-授权信息 payAuthNo={}, payOrdId={}, payToken={}, mdtrtId={}, chrgBchno={}, userIdYBZF={}", payAuthNo, payOrdId, payToken, mdTrtId, chrgBchno, mdUserId); |
|
|
|
|
if (payOrdId == null || payToken == null || mdTrtId == null || chrgBchno == null) { |
|
|
|
|
throw new ServiceException("[医保]费用明细上传参数缺失"); |
|
|
|
|
} |
|
|
|
|
@ -181,32 +181,33 @@ public class MedicalService { |
|
|
|
|
medicalInfo.setMdUserId(mdUserId); |
|
|
|
|
|
|
|
|
|
BigDecimal totalFee = result.getDataMapBigDecimal("FeeSumamt"); // 订单总金额医保返回
|
|
|
|
|
BigDecimal cashFee = result.getDataMapBigDecimal("OwnPayAmt"); // 现金支付(医保6202返回)
|
|
|
|
|
BigDecimal hifpFee = result.getDataMapBigDecimal("FundPay"); // 统筹金额[基金金额]
|
|
|
|
|
BigDecimal hisOwnPayAmt = result.getDataMapBigDecimal("OwnPayAmt"); // 现金支付(医保6202返回)
|
|
|
|
|
BigDecimal hisPsnAcctPay = result.getDataMapBigDecimal("PsnAcctPay"); // 个人账户支出(医保6202返回)
|
|
|
|
|
log.info("[医保-住院结算]HIS费用上传明细接口返回2 payOrdId={}, hifpFee={}, hisOwnPayAmt={}, hisPsnAcctPay={}", |
|
|
|
|
payOrdId, hifpFee, hisOwnPayAmt, hisPsnAcctPay); |
|
|
|
|
BigDecimal acctPay = result.getDataMapBigDecimal("PsnAcctPay"); // 个人账户支出(医保6202返回)
|
|
|
|
|
log.info("[医保-住院结算]HIS费用上传明细接口返回-费用明细 payOrdId={}, totalFee={}, cashFee={}, hifpFee={}, acctPay={}", |
|
|
|
|
payOrdId, totalFee, cashFee, hifpFee, acctPay); |
|
|
|
|
|
|
|
|
|
String extData = result.getDataMapString("ExtData"); |
|
|
|
|
log.info("[医保-住院结算]扩展数据 extData={}", extData); |
|
|
|
|
if (extData == null || totalFee == null) { |
|
|
|
|
throw new ServiceException("[上传明细失败]响应参数缺失 extData is null"); |
|
|
|
|
|
|
|
|
|
if (totalFee == null) { |
|
|
|
|
throw new ServiceException("[上传明细失败]订单总金额为空"); |
|
|
|
|
} |
|
|
|
|
if (ObjectUtils.isEmpty(extData)) { |
|
|
|
|
throw new ServiceException("[上传明细失败]响应参数ExtData缺失"); |
|
|
|
|
} |
|
|
|
|
JSONObject extDataJson = JsonHelper.parseObject(extData); |
|
|
|
|
JSONObject preSetl = extDataJson.getJSONObject("preSetl"); |
|
|
|
|
|
|
|
|
|
medicalInfo.setMedFeeSumAmt(new BigDecimal(preSetl.getString("medfee_sumamt"))); // 医保金额
|
|
|
|
|
|
|
|
|
|
medicalInfo.setCashFee(new BigDecimal(preSetl.getString("psn_cash_pay"))); // 现金支付
|
|
|
|
|
BigDecimal acctPay = new BigDecimal(preSetl.getString("acct_pay")); // 个人账户支付
|
|
|
|
|
// BigDecimal hifpPay = new BigDecimal(preSetl.getString("hifp_pay"));
|
|
|
|
|
medicalInfo.setAcctFee(acctPay); // 个人账户支付
|
|
|
|
|
medicalInfo.setHifpFee(hifpFee); // 统筹支付金额
|
|
|
|
|
medicalInfo.setTotalFee(totalFee); // 医保订单总金额
|
|
|
|
|
medicalInfo.setCashFee(cashFee); // 现金部分
|
|
|
|
|
medicalInfo.setHifpFee(hifpFee); // 统筹支付金额
|
|
|
|
|
medicalInfo.setAcctFee(acctPay); // 个人账户支付
|
|
|
|
|
|
|
|
|
|
medicalInfo.setInsuranceFee(acctPay.add(hifpFee)); // (个账 + 统筹)
|
|
|
|
|
medicalInfo.setInsuranceFee(acctPay.add(hifpFee)); // 医保支付(个账 + 统筹)
|
|
|
|
|
|
|
|
|
|
log.info("[医保-住院结算]结算完成返回数据 medicalFee={}", medicalInfo); |
|
|
|
|
log.info("[医保-住院结算]结算完成返回数据 medicalFee={}", JsonHelper.toJsonString(medicalInfo)); |
|
|
|
|
return medicalInfo; |
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|