-
-
Notifications
You must be signed in to change notification settings - Fork 9.1k
微信医保相关接口 #3816
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Merged
微信医保相关接口 #3816
Changes from 4 commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
8e2ff73
feat(微信支付): 医保自费混合收款下单
xgl6 e63ff35
feat(微信支付): 医保自费混合收款下单
xgl6 cb6cb57
feat(微信支付): 使用医保自费混合订单号查看下单结果
xgl6 3e60f60
feat(微信支付): 医保退款通知,医保混合收款成功通知
xgl6 9de4e1d
feat(微信医保支付): 修改规范性问题
xgl6 91a47ad
feat(微信医保支付): 修改规范性问题
xgl6 4c8efe0
feat(微信医保支付): 修改规范性问题
xgl6 File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
568 changes: 568 additions & 0 deletions
568
...in-java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/MedInsOrdersRequest.java
Large diffs are not rendered by default.
Oops, something went wrong.
503 changes: 503 additions & 0 deletions
503
weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/MedInsOrdersResult.java
Large diffs are not rendered by default.
Oops, something went wrong.
116 changes: 116 additions & 0 deletions
116
...a-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/MedInsRefundNotifyRequest.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,116 @@ | ||
| package com.github.binarywang.wxpay.bean.mipay; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
| import lombok.AllArgsConstructor; | ||
| import lombok.Builder; | ||
| import lombok.Data; | ||
| import lombok.NoArgsConstructor; | ||
|
|
||
| /** | ||
| * 医保退款通知请求 | ||
| * <p> | ||
| * 从业机构调用该接口向微信医保后台通知医保订单的退款成功结果 | ||
| * 文档地址:https://pay.weixin.qq.com/doc/v3/partner/4012166534 | ||
| * @author xgl | ||
| * @date 2025/12/20 | ||
| */ | ||
| @Data | ||
| @Builder(builderMethodName = "newBuilder") | ||
| @NoArgsConstructor | ||
| @AllArgsConstructor | ||
| public class MedInsRefundNotifyRequest { | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医保自费混合订单号 | ||
| * 必填:是 | ||
| * 类型:string(32) | ||
| * 描述:医保自费混合订单号 | ||
| * </pre> | ||
| */ | ||
| private String mixTradeNo; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医疗机构的商户号 | ||
| * 变量名:sub_mchid | ||
| * 必填:是 | ||
| * 类型:string(32) | ||
| * 描述:医疗机构的商户号 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("sub_mchid") | ||
| private String subMchid; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医保退款的总金额 | ||
| * 变量名:med_refund_total_fee | ||
| * 必填:是 | ||
| * 类型:integer | ||
| * 描述:单位分,医保退款的总金额。 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("med_refund_total_fee") | ||
| private Integer medRefundTotalFee; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医保统筹退款金额 | ||
| * 变量名:med_refund_gov_fee | ||
| * 必填:是 | ||
| * 类型:integer | ||
| * 描述:单位分,医保统筹退款金额。 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("med_refund_gov_fee") | ||
| private Integer medRefundGovFee; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医保个账退款金额 | ||
| * 变量名:med_refund_self_fee | ||
| * 必填:是 | ||
| * 类型:integer | ||
| * 描述:单位分,医保个账退款金额。 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("med_refund_self_fee") | ||
| private Integer medRefundSelfFee; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医保其他退款金额 | ||
| * 变量名:med_refund_other_fee | ||
| * 必填:是 | ||
| * 类型:integer | ||
| * 描述:单位分,医保其他退款金额。 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("med_refund_other_fee") | ||
| private Integer medRefundOtherFee; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:医保退款成功时间 | ||
| * 变量名:refund_time | ||
| * 必填:是 | ||
| * 类型:string(64) | ||
| * 描述:遵循rfc3339标准格式,格式为yyyy-MM-DDTHH:mm:ss+TIMEZONE。 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("refund_time") | ||
| private String refundTime; | ||
|
|
||
| /** | ||
| * <pre> | ||
| * 字段名:从业机构\服务商退款单号 | ||
| * 变量名:out_refund_no | ||
| * 必填:是 | ||
| * 类型:string(64) | ||
| * 描述:有自费单时,从业机构\服务商应填与自费退款申请处一致的out_refund_no。否则从业机构透传医疗机构退款单号即可。 | ||
| * </pre> | ||
| */ | ||
| @SerializedName("out_refund_no") | ||
| private String outRefundNo; | ||
| } |
28 changes: 28 additions & 0 deletions
28
...-java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/enums/CashAddTypeEnum.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,28 @@ | ||
| package com.github.binarywang.wxpay.bean.mipay.enums; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * 现金增加类型枚举 | ||
| * <p> | ||
| * 描述医保自费混合支付中现金增加的类型 | ||
| * @author xgl | ||
| * @date 2025/12/20 | ||
| */ | ||
| public enum CashAddTypeEnum { | ||
| /** | ||
| * 默认增加类型 | ||
| */ | ||
| @SerializedName("DEFAULT_ADD_TYPE") | ||
| DEFAULT_ADD_TYPE, | ||
| /** | ||
| * 运费 | ||
| */ | ||
| @SerializedName("FREIGHT") | ||
| FREIGHT, | ||
| /** | ||
| * 其他医疗费用 | ||
| */ | ||
| @SerializedName("OTHER_MEDICAL_EXPENSES") | ||
| OTHER_MEDICAL_EXPENSES | ||
| } | ||
43 changes: 43 additions & 0 deletions
43
...va-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/enums/CashReduceTypeEnum.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| package com.github.binarywang.wxpay.bean.mipay.enums; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * 现金减少类型枚举 | ||
| * <p> | ||
| * 描述医保自费混合支付中现金减少的类型 | ||
| * @author xgl | ||
| * @date 2025/12/20 | ||
| */ | ||
| public enum CashReduceTypeEnum { | ||
| /** | ||
| * 默认减少类型 | ||
| */ | ||
| @SerializedName("DEFAULT_REDUCE_TYPE") | ||
| DEFAULT_REDUCE_TYPE, | ||
| /** | ||
| * 医院减免 | ||
| */ | ||
| @SerializedName("HOSPITAL_REDUCE") | ||
| HOSPITAL_REDUCE, | ||
| /** | ||
| * 药店折扣 | ||
| */ | ||
| @SerializedName("PHARMACY_DISCOUNT") | ||
| PHARMACY_DISCOUNT, | ||
| /** | ||
| * 折扣优惠 | ||
| */ | ||
| @SerializedName("DISCOUNT") | ||
| DISCOUNT, | ||
| /** | ||
| * 预付费抵扣 | ||
| */ | ||
| @SerializedName("PRE_PAYMENT") | ||
| PRE_PAYMENT, | ||
| /** | ||
| * 押金扣除 | ||
| */ | ||
| @SerializedName("DEPOSIT_DEDUCTION") | ||
| DEPOSIT_DEDUCTION | ||
| } |
43 changes: 43 additions & 0 deletions
43
...a-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/enums/MedInsPayStatusEnum.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| package com.github.binarywang.wxpay.bean.mipay.enums; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * 医保支付状态枚举 | ||
| * <p> | ||
| * 描述医保自费混合支付中医保部分的支付状态 | ||
| * @author xgl | ||
| * @date 2025/12/20 | ||
| */ | ||
| public enum MedInsPayStatusEnum { | ||
| /** | ||
| * 未知的医保支付状态 | ||
| */ | ||
| @SerializedName("UNKNOWN_MED_INS_PAY_STATUS") | ||
| UNKNOWN_MED_INS_PAY_STATUS, | ||
| /** | ||
| * 医保支付已创建 | ||
| */ | ||
| @SerializedName("MED_INS_PAY_CREATED") | ||
| MED_INS_PAY_CREATED, | ||
| /** | ||
| * 医保支付成功 | ||
| */ | ||
| @SerializedName("MED_INS_PAY_SUCCESS") | ||
| MED_INS_PAY_SUCCESS, | ||
| /** | ||
| * 医保支付已退款 | ||
| */ | ||
| @SerializedName("MED_INS_PAY_REFUND") | ||
| MED_INS_PAY_REFUND, | ||
| /** | ||
| * 医保支付失败 | ||
| */ | ||
| @SerializedName("MED_INS_PAY_FAIL") | ||
| MED_INS_PAY_FAIL, | ||
| /** | ||
| * 无需医保支付 | ||
| */ | ||
| @SerializedName("NO_MED_INS_PAY") | ||
| NO_MED_INS_PAY | ||
| } |
38 changes: 38 additions & 0 deletions
38
...java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/enums/MixPayStatusEnum.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,38 @@ | ||
| package com.github.binarywang.wxpay.bean.mipay.enums; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * 混合支付状态枚举 | ||
| * <p> | ||
| * 描述医保自费混合支付的整体状态 | ||
| * @author xgl | ||
| * @date 2025/12/20 | ||
| */ | ||
| public enum MixPayStatusEnum { | ||
| /** | ||
| * 未知的混合支付状态 | ||
| */ | ||
| @SerializedName("UNKNOWN_MIX_PAY_STATUS") | ||
| UNKNOWN_MIX_PAY_STATUS, | ||
| /** | ||
| * 混合支付已创建 | ||
| */ | ||
| @SerializedName("MIX_PAY_CREATED") | ||
| MIX_PAY_CREATED, | ||
| /** | ||
| * 混合支付成功 | ||
| */ | ||
| @SerializedName("MIX_PAY_SUCCESS") | ||
| MIX_PAY_SUCCESS, | ||
| /** | ||
| * 混合支付已退款 | ||
| */ | ||
| @SerializedName("MIX_PAY_REFUND") | ||
| MIX_PAY_REFUND, | ||
| /** | ||
| * 混合支付失败 | ||
| */ | ||
| @SerializedName("MIX_PAY_FAIL") | ||
| MIX_PAY_FAIL | ||
| } |
40 changes: 40 additions & 0 deletions
40
...n-java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/enums/MixPayTypeEnum.java
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,40 @@ | ||
| package com.github.binarywang.wxpay.bean.mipay.enums; | ||
|
|
||
| import com.google.gson.annotations.SerializedName; | ||
|
|
||
| /** | ||
| * 混合支付类型枚举 | ||
| * <p> | ||
| * 描述医保自费混合支付的类型 | ||
| * 文档地址:https://pay.weixin.qq.com/doc/v3/partner/4012503131 | ||
| * @author xgl | ||
| * @date 2025/12/20 09:21 | ||
| */ | ||
| public enum MixPayTypeEnum { | ||
|
|
||
| /** | ||
| * 未知的混合支付类型,会被拦截。 | ||
| */ | ||
| @SerializedName("UNKNOWN_MIX_PAY_TYPE") | ||
| UNKNOWN_MIX_PAY_TYPE, | ||
|
|
||
| /** | ||
| * 只向微信支付下单,没有向医保局下单。包括没有向医保局上传费用明细、预结算。 | ||
| */ | ||
| @SerializedName("CASH_ONLY") | ||
| CASH_ONLY, | ||
|
|
||
| /** | ||
| * 只向医保局下单,没有向微信支付下单。如果医保局分账结果中有自费部份,但由于有减免抵扣,没有向微信支付下单,也是纯医保。 | ||
| */ | ||
| @SerializedName("INSURANCE_ONLY") | ||
| INSURANCE_ONLY, | ||
|
|
||
| /** | ||
| * 向医保局下单,也向微信支付下单。如果医保预结算全部需自费,也属于混合类型。 | ||
| */ | ||
| @SerializedName("CASH_AND_INSURANCE") | ||
| CASH_AND_INSURANCE | ||
|
|
||
|
|
||
| } |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
CashAddTypeEnum.java 第13-27行的缩进不一致。枚举值的缩进使用了4个空格,而项目规范要求使用2个空格。这会导致 checkstyle 校验失败。