Skip to content

Commit 8e2ff73

Browse files
committed
feat(微信支付): 医保自费混合收款下单
1 parent b56eddd commit 8e2ff73

15 files changed

Lines changed: 1702 additions & 18 deletions

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/MedInsOrdersRequest.java

Lines changed: 568 additions & 0 deletions
Large diffs are not rendered by default.

weixin-java-pay/src/main/java/com/github/binarywang/wxpay/bean/mipay/MedInsOrdersResult.java

Lines changed: 503 additions & 0 deletions
Large diffs are not rendered by default.
Lines changed: 28 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,28 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 现金增加类型枚举
7+
* <p>
8+
* 描述医保自费混合支付中现金增加的类型
9+
* @author xgl
10+
* @date 2025/12/20
11+
*/
12+
public enum CashAddTypeEnum {
13+
/**
14+
* 默认增加类型
15+
*/
16+
@SerializedName("DEFAULT_ADD_TYPE")
17+
DEFAULT_ADD_TYPE,
18+
/**
19+
* 运费
20+
*/
21+
@SerializedName("FREIGHT")
22+
FREIGHT,
23+
/**
24+
* 其他医疗费用
25+
*/
26+
@SerializedName("OTHER_MEDICAL_EXPENSES")
27+
OTHER_MEDICAL_EXPENSES
28+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 现金减少类型枚举
7+
* <p>
8+
* 描述医保自费混合支付中现金减少的类型
9+
* @author xgl
10+
* @date 2025/12/20
11+
*/
12+
public enum CashReduceTypeEnum {
13+
/**
14+
* 默认减少类型
15+
*/
16+
@SerializedName("DEFAULT_REDUCE_TYPE")
17+
DEFAULT_REDUCE_TYPE,
18+
/**
19+
* 医院减免
20+
*/
21+
@SerializedName("HOSPITAL_REDUCE")
22+
HOSPITAL_REDUCE,
23+
/**
24+
* 药店折扣
25+
*/
26+
@SerializedName("PHARMACY_DISCOUNT")
27+
PHARMACY_DISCOUNT,
28+
/**
29+
* 折扣优惠
30+
*/
31+
@SerializedName("DISCOUNT")
32+
DISCOUNT,
33+
/**
34+
* 预付费抵扣
35+
*/
36+
@SerializedName("PRE_PAYMENT")
37+
PRE_PAYMENT,
38+
/**
39+
* 押金扣除
40+
*/
41+
@SerializedName("DEPOSIT_DEDUCTION")
42+
DEPOSIT_DEDUCTION
43+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 医保支付状态枚举
7+
* <p>
8+
* 描述医保自费混合支付中医保部分的支付状态
9+
* @author xgl
10+
* @date 2025/12/20
11+
*/
12+
public enum MedInsPayStatusEnum {
13+
/**
14+
* 未知的医保支付状态
15+
*/
16+
@SerializedName("UNKNOWN_MED_INS_PAY_STATUS")
17+
UNKNOWN_MED_INS_PAY_STATUS,
18+
/**
19+
* 医保支付已创建
20+
*/
21+
@SerializedName("MED_INS_PAY_CREATED")
22+
MED_INS_PAY_CREATED,
23+
/**
24+
* 医保支付成功
25+
*/
26+
@SerializedName("MED_INS_PAY_SUCCESS")
27+
MED_INS_PAY_SUCCESS,
28+
/**
29+
* 医保支付已退款
30+
*/
31+
@SerializedName("MED_INS_PAY_REFUND")
32+
MED_INS_PAY_REFUND,
33+
/**
34+
* 医保支付失败
35+
*/
36+
@SerializedName("MED_INS_PAY_FAIL")
37+
MED_INS_PAY_FAIL,
38+
/**
39+
* 无需医保支付
40+
*/
41+
@SerializedName("NO_MED_INS_PAY")
42+
NO_MED_INS_PAY
43+
}
Lines changed: 38 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 混合支付状态枚举
7+
* <p>
8+
* 描述医保自费混合支付的整体状态
9+
* @author xgl
10+
* @date 2025/12/20
11+
*/
12+
public enum MixPayStatusEnum {
13+
/**
14+
* 未知的混合支付状态
15+
*/
16+
@SerializedName("UNKNOWN_MIX_PAY_STATUS")
17+
UNKNOWN_MIX_PAY_STATUS,
18+
/**
19+
* 混合支付已创建
20+
*/
21+
@SerializedName("MIX_PAY_CREATED")
22+
MIX_PAY_CREATED,
23+
/**
24+
* 混合支付成功
25+
*/
26+
@SerializedName("MIX_PAY_SUCCESS")
27+
MIX_PAY_SUCCESS,
28+
/**
29+
* 混合支付已退款
30+
*/
31+
@SerializedName("MIX_PAY_REFUND")
32+
MIX_PAY_REFUND,
33+
/**
34+
* 混合支付失败
35+
*/
36+
@SerializedName("MIX_PAY_FAIL")
37+
MIX_PAY_FAIL
38+
}
Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 混合支付类型枚举
7+
* <p>
8+
* 描述医保自费混合支付的类型
9+
* 文档地址:https://pay.weixin.qq.com/doc/v3/partner/4012503131
10+
* @author xgl
11+
* @date 2025/12/20 09:21
12+
*/
13+
public enum MixPayTypeEnum {
14+
15+
/**
16+
* 未知的混合支付类型,会被拦截。
17+
*/
18+
@SerializedName("UNKNOWN_MIX_PAY_TYPE")
19+
UNKNOWN_MIX_PAY_TYPE,
20+
21+
/**
22+
* 只向微信支付下单,没有向医保局下单。包括没有向医保局上传费用明细、预结算。
23+
*/
24+
@SerializedName("CASH_ONLY")
25+
CASH_ONLY,
26+
27+
/**
28+
* 只向医保局下单,没有向微信支付下单。如果医保局分账结果中有自费部份,但由于有减免抵扣,没有向微信支付下单,也是纯医保。
29+
*/
30+
@SerializedName("INSURANCE_ONLY")
31+
INSURANCE_ONLY,
32+
33+
/**
34+
* 向医保局下单,也向微信支付下单。如果医保预结算全部需自费,也属于混合类型。
35+
*/
36+
@SerializedName("CASH_AND_INSURANCE")
37+
CASH_AND_INSURANCE
38+
39+
40+
}
Lines changed: 86 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,86 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 订单类型枚举
7+
* <p>
8+
* 描述医保自费混合支付的订单类型
9+
* 文档地址:https://pay.weixin.qq.com/doc/v3/partner/4012503131
10+
* @author xgl
11+
* @date 2025/12/20
12+
*/
13+
public enum OrderTypeEnum {
14+
15+
/**
16+
* 未知类型,会被拦截
17+
*/
18+
@SerializedName("UNKNOWN_ORDER_TYPE")
19+
UNKNOWN_ORDER_TYPE,
20+
21+
/**
22+
* 挂号支付
23+
*/
24+
@SerializedName("REG_PAY")
25+
REG_PAY,
26+
27+
/**
28+
* 诊间支付
29+
*/
30+
@SerializedName("DIAG_PAY")
31+
DIAG_PAY,
32+
33+
/**
34+
* 新冠检测费用(核酸)
35+
*/
36+
@SerializedName("COVID_EXAM_PAY")
37+
COVID_EXAM_PAY,
38+
39+
/**
40+
* 住院费支付
41+
*/
42+
@SerializedName("IN_HOSP_PAY")
43+
IN_HOSP_PAY,
44+
45+
/**
46+
* 药店支付
47+
*/
48+
@SerializedName("PHARMACY_PAY")
49+
PHARMACY_PAY,
50+
51+
/**
52+
* 保险费支付
53+
*/
54+
@SerializedName("INSURANCE_PAY")
55+
INSURANCE_PAY,
56+
57+
/**
58+
* 互联网医院挂号支付
59+
*/
60+
@SerializedName("INT_REG_PAY")
61+
INT_REG_PAY,
62+
63+
/**
64+
* 互联网医院复诊支付
65+
*/
66+
@SerializedName("INT_RE_DIAG_PAY")
67+
INT_RE_DIAG_PAY,
68+
69+
/**
70+
* 互联网医院处方支付
71+
*/
72+
@SerializedName("INT_RX_PAY")
73+
INT_RX_PAY,
74+
75+
/**
76+
* 新冠抗原检测
77+
*/
78+
@SerializedName("COVID_ANTIGEN_PAY")
79+
COVID_ANTIGEN_PAY,
80+
81+
/**
82+
* 药费支付
83+
*/
84+
@SerializedName("MED_PAY")
85+
MED_PAY
86+
}
Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 自费支付状态枚举
7+
* <p>
8+
* 描述医保自费混合支付中自费部分的支付状态
9+
* @author xgl
10+
* @date 2025/12/20
11+
*/
12+
public enum SelfPayStatusEnum {
13+
/**
14+
* 未知的自费支付状态
15+
*/
16+
@SerializedName("UNKNOWN_SELF_PAY_STATUS")
17+
UNKNOWN_SELF_PAY_STATUS,
18+
/**
19+
* 自费支付已创建
20+
*/
21+
@SerializedName("SELF_PAY_CREATED")
22+
SELF_PAY_CREATED,
23+
/**
24+
* 自费支付成功
25+
*/
26+
@SerializedName("SELF_PAY_SUCCESS")
27+
SELF_PAY_SUCCESS,
28+
/**
29+
* 自费支付已退款
30+
*/
31+
@SerializedName("SELF_PAY_REFUND")
32+
SELF_PAY_REFUND,
33+
/**
34+
* 自费支付失败
35+
*/
36+
@SerializedName("SELF_PAY_FAIL")
37+
SELF_PAY_FAIL,
38+
/**
39+
* 无需自费支付
40+
*/
41+
@SerializedName("NO_SELF_PAY")
42+
NO_SELF_PAY
43+
}
Lines changed: 53 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,53 @@
1+
package com.github.binarywang.wxpay.bean.mipay.enums;
2+
3+
import com.google.gson.annotations.SerializedName;
4+
5+
/**
6+
* 用户证件类型枚举
7+
* <p>
8+
* 描述医保自费混合支付中用户的证件类型
9+
* @author xgl
10+
* @date 2025/12/20
11+
*/
12+
public enum UserCardTypeEnum {
13+
/**
14+
* 未知的用户证件类型
15+
*/
16+
@SerializedName("UNKNOWN_USER_CARD_TYPE")
17+
UNKNOWN_USER_CARD_TYPE,
18+
/**
19+
* 居民身份证
20+
*/
21+
@SerializedName("ID_CARD")
22+
ID_CARD,
23+
/**
24+
* 户口本
25+
*/
26+
@SerializedName("HOUSEHOLD_REGISTRATION")
27+
HOUSEHOLD_REGISTRATION,
28+
/**
29+
* 外国护照
30+
*/
31+
@SerializedName("FOREIGNER_PASSPORT")
32+
FOREIGNER_PASSPORT,
33+
/**
34+
* 台湾居民来往大陆通行证
35+
*/
36+
@SerializedName("MAINLAND_TRAVEL_PERMIT_FOR_TW")
37+
MAINLAND_TRAVEL_PERMIT_FOR_TW,
38+
/**
39+
* 澳门居民来往大陆通行证
40+
*/
41+
@SerializedName("MAINLAND_TRAVEL_PERMIT_FOR_MO")
42+
MAINLAND_TRAVEL_PERMIT_FOR_MO,
43+
/**
44+
* 香港居民来往大陆通行证
45+
*/
46+
@SerializedName("MAINLAND_TRAVEL_PERMIT_FOR_HK")
47+
MAINLAND_TRAVEL_PERMIT_FOR_HK,
48+
/**
49+
* 外国人永久居留身份证
50+
*/
51+
@SerializedName("FOREIGN_PERMANENT_RESIDENT")
52+
FOREIGN_PERMANENT_RESIDENT
53+
}

0 commit comments

Comments
 (0)