@yunzhanghu/sdk-nodejs 1.0.19 → 1.0.20
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/example/calculatelabor.js +70 -0
- package/example/payment.js +29 -0
- package/package.json +1 -1
- package/src/services/calculatelabor/index.ts +136 -0
- package/src/services/index.ts +1 -0
- package/src/services/payment/index.ts +117 -0
- package/yzh/services/calculatelabor/index.d.ts +123 -0
- package/yzh/services/calculatelabor/index.js +19 -0
- package/yzh/services/index.d.ts +1 -0
- package/yzh/services/index.js +3 -1
- package/yzh/services/payment/index.d.ts +108 -0
- package/yzh/services/payment/index.js +10 -0
|
@@ -0,0 +1,70 @@
|
|
|
1
|
+
const yzhAPI = require('../yzh/index.js')
|
|
2
|
+
const config = require('./conf/config.js')
|
|
3
|
+
|
|
4
|
+
// 连续劳务税费试算
|
|
5
|
+
const caculatorLabor = new yzhAPI.CalculateLaborServiceClient(config)
|
|
6
|
+
|
|
7
|
+
// LaborCaculator连续劳务税费试算(计算器)
|
|
8
|
+
caculatorLabor
|
|
9
|
+
.LaborCaculator({
|
|
10
|
+
|
|
11
|
+
/**
|
|
12
|
+
* @param {string} request-id:请求 ID,请求的唯一标识
|
|
13
|
+
* 建议平台企业自定义 request-id,并记录在日志中,便于问题发现及排查
|
|
14
|
+
* 如未自定义 request-id,将使用 SDK 中的 UUID 方法自动生成。注意:UUID 方法生成的 request-id 不能保证全局唯一,推荐自定义 request-id
|
|
15
|
+
*/
|
|
16
|
+
request_id: 'requestIdExample123456789',
|
|
17
|
+
dealer_id: config.dealer_id,
|
|
18
|
+
broker_id: config.broker_id,
|
|
19
|
+
month_settlement_list: [{
|
|
20
|
+
month: 1,
|
|
21
|
+
month_pre_tax_amount: "10.00",
|
|
22
|
+
},
|
|
23
|
+
{
|
|
24
|
+
month: 2,
|
|
25
|
+
month_pre_tax_amount: "10.00",
|
|
26
|
+
}],
|
|
27
|
+
})
|
|
28
|
+
.then((data) => {
|
|
29
|
+
if (data.code === '0000') {
|
|
30
|
+
// 操作成功
|
|
31
|
+
console.log('操作成功 ', data.data)
|
|
32
|
+
} else {
|
|
33
|
+
// 失败返回
|
|
34
|
+
console.log('失败返回 ', 'code:' + data.code + ' message:' + data.message + ' request_id:' + data.request_id)
|
|
35
|
+
}
|
|
36
|
+
})
|
|
37
|
+
.catch((err) => {
|
|
38
|
+
// 发生异常
|
|
39
|
+
console.log(err.toString())
|
|
40
|
+
})
|
|
41
|
+
|
|
42
|
+
// 订单税费试算
|
|
43
|
+
caculatorLabor
|
|
44
|
+
.CalcTax({
|
|
45
|
+
|
|
46
|
+
/**
|
|
47
|
+
* @param {string} request-id:请求 ID,请求的唯一标识
|
|
48
|
+
* 建议平台企业自定义 request-id,并记录在日志中,便于问题发现及排查
|
|
49
|
+
* 如未自定义 request-id,将使用 SDK 中的 UUID 方法自动生成。注意:UUID 方法生成的 request-id 不能保证全局唯一,推荐自定义 request-id
|
|
50
|
+
*/
|
|
51
|
+
request_id: 'requestIdExample123456789',
|
|
52
|
+
dealer_id: config.dealer_id,
|
|
53
|
+
broker_id: config.broker_id,
|
|
54
|
+
real_name: "张三",
|
|
55
|
+
id_card: "11010519491231002X",
|
|
56
|
+
pay: "99",
|
|
57
|
+
})
|
|
58
|
+
.then((data) => {
|
|
59
|
+
if (data.code === '0000') {
|
|
60
|
+
// 操作成功
|
|
61
|
+
console.log('操作成功 ', data.data)
|
|
62
|
+
} else {
|
|
63
|
+
// 失败返回
|
|
64
|
+
console.log('失败返回 ', 'code:' + data.code + ' message:' + data.message + ' request_id:' + data.request_id)
|
|
65
|
+
}
|
|
66
|
+
})
|
|
67
|
+
.catch((err) => {
|
|
68
|
+
// 发生异常
|
|
69
|
+
console.log(err.toString())
|
|
70
|
+
})
|
package/example/payment.js
CHANGED
|
@@ -422,3 +422,32 @@ payment
|
|
|
422
422
|
// 发生异常
|
|
423
423
|
console.log(err.toString())
|
|
424
424
|
})
|
|
425
|
+
|
|
426
|
+
|
|
427
|
+
// 查询劳务模式单笔订单信息
|
|
428
|
+
payment
|
|
429
|
+
.GetOrderLxlw({
|
|
430
|
+
|
|
431
|
+
/**
|
|
432
|
+
* @param {string} request-id:请求 ID,请求的唯一标识
|
|
433
|
+
* 建议平台企业自定义 request-id,并记录在日志中,便于问题发现及排查
|
|
434
|
+
* 如未自定义 request-id,将使用 SDK 中的 UUID 方法自动生成。注意:UUID 方法生成的 request-id 不能保证全局唯一,推荐自定义 request-id
|
|
435
|
+
*/
|
|
436
|
+
request_id: 'requestIdExample123456789',
|
|
437
|
+
order_id: '180490818101749',
|
|
438
|
+
channel: '银行卡',
|
|
439
|
+
data_type: '',
|
|
440
|
+
})
|
|
441
|
+
.then((data) => {
|
|
442
|
+
if (data.code === '0000') {
|
|
443
|
+
// 操作成功
|
|
444
|
+
console.log('操作成功 ', data.data)
|
|
445
|
+
} else {
|
|
446
|
+
// 失败返回
|
|
447
|
+
console.log('失败返回 ', 'code:' + data.code + ' message:' + data.message + ' request_id:' + data.request_id)
|
|
448
|
+
}
|
|
449
|
+
})
|
|
450
|
+
.catch((err) => {
|
|
451
|
+
// 发生异常
|
|
452
|
+
console.log(err.toString())
|
|
453
|
+
})
|
package/package.json
CHANGED
|
@@ -0,0 +1,136 @@
|
|
|
1
|
+
import YZHclient from '../../common/client';
|
|
2
|
+
|
|
3
|
+
/** LaborCaculatorRequest 连续劳务税费试算(计算器)请求 */
|
|
4
|
+
interface LaborCaculatorRequest {
|
|
5
|
+
/** 平台企业 ID */
|
|
6
|
+
dealer_id: string;
|
|
7
|
+
/** 综合服务主体 ID */
|
|
8
|
+
broker_id: string;
|
|
9
|
+
/** 月度收入列表 */
|
|
10
|
+
month_settlement_list: MonthSettlement[];
|
|
11
|
+
}
|
|
12
|
+
|
|
13
|
+
/** MonthSettlement 月度收入 */
|
|
14
|
+
interface MonthSettlement {
|
|
15
|
+
/** 月份 */
|
|
16
|
+
month: number;
|
|
17
|
+
/** 月度收入 */
|
|
18
|
+
month_pre_tax_amount: string;
|
|
19
|
+
}
|
|
20
|
+
|
|
21
|
+
/** LaborCaculatorResponse 连续劳务税费试算(计算器)返回 */
|
|
22
|
+
interface LaborCaculatorResponse {
|
|
23
|
+
/** 综合所得汇算清缴 */
|
|
24
|
+
year_tax_info: YearTaxInfo;
|
|
25
|
+
/** 月度税务信息列表 */
|
|
26
|
+
month_tax_list: MontTax[];
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
/** YearTaxInfo 综合所得汇算清缴信息 */
|
|
30
|
+
interface YearTaxInfo {
|
|
31
|
+
/** 连续劳务年度个税 */
|
|
32
|
+
continuous_month_personal_tax: string;
|
|
33
|
+
/** 综合所得汇算清缴年度个税 */
|
|
34
|
+
personal_tax: string;
|
|
35
|
+
/** 年度扣除费用 */
|
|
36
|
+
deduct_cost: string;
|
|
37
|
+
/** 个税税率 */
|
|
38
|
+
personal_tax_rate: string;
|
|
39
|
+
/** 速算扣除数 */
|
|
40
|
+
deduct_tax: string;
|
|
41
|
+
/** 税负率 */
|
|
42
|
+
total_tax_rate: string;
|
|
43
|
+
}
|
|
44
|
+
|
|
45
|
+
/** MontTax 月度税务信息 */
|
|
46
|
+
interface MontTax {
|
|
47
|
+
/** 月份 */
|
|
48
|
+
month: number;
|
|
49
|
+
/** 含增值税收入 */
|
|
50
|
+
pre_tax_amount: string;
|
|
51
|
+
/** 不含增值税收入 */
|
|
52
|
+
excluding_vat_amount: string;
|
|
53
|
+
/** 增值税 */
|
|
54
|
+
value_added_tax: string;
|
|
55
|
+
/** 附加税 */
|
|
56
|
+
additional_tax: string;
|
|
57
|
+
/** 个税 */
|
|
58
|
+
personal_tax: string;
|
|
59
|
+
/** 个税税率 */
|
|
60
|
+
personal_tax_rate: string;
|
|
61
|
+
/** 速算扣除数 */
|
|
62
|
+
deduct_tax: string;
|
|
63
|
+
/** 税后金额 */
|
|
64
|
+
post_tax_amount: string;
|
|
65
|
+
/** 税负率 */
|
|
66
|
+
total_tax_rate: string;
|
|
67
|
+
}
|
|
68
|
+
|
|
69
|
+
/** CalcTaxRequest 订单税费试算请求 */
|
|
70
|
+
interface CalcTaxRequest {
|
|
71
|
+
/** 平台企业 ID */
|
|
72
|
+
dealer_id: string;
|
|
73
|
+
/** 综合服务主体 ID */
|
|
74
|
+
broker_id: string;
|
|
75
|
+
/** 姓名 */
|
|
76
|
+
real_name: string;
|
|
77
|
+
/** 证件号 */
|
|
78
|
+
id_card: string;
|
|
79
|
+
/** 订单金额 */
|
|
80
|
+
pay: string;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
/** CalcTaxResponse 订单税费试算返回 */
|
|
84
|
+
interface CalcTaxResponse {
|
|
85
|
+
/** 订单金额 */
|
|
86
|
+
pay: string;
|
|
87
|
+
/** 税费总额 */
|
|
88
|
+
tax: string;
|
|
89
|
+
/** 税后金额 */
|
|
90
|
+
after_tax_amount: string;
|
|
91
|
+
/** 税费明细 */
|
|
92
|
+
tax_detail: CalcTaxDetail;
|
|
93
|
+
}
|
|
94
|
+
|
|
95
|
+
/** CalcTaxDetail 税费明细 */
|
|
96
|
+
interface CalcTaxDetail {
|
|
97
|
+
/** 应纳个税 */
|
|
98
|
+
personal_tax: string;
|
|
99
|
+
/** 应纳增值税 */
|
|
100
|
+
value_added_tax: string;
|
|
101
|
+
/** 应纳附加税费 */
|
|
102
|
+
additional_tax: string;
|
|
103
|
+
}
|
|
104
|
+
|
|
105
|
+
export class CalculateLaborServiceClient extends YZHclient {
|
|
106
|
+
// eslint-disable-next-line no-useless-constructor
|
|
107
|
+
constructor(conf: {
|
|
108
|
+
dealer_id: string;
|
|
109
|
+
broker_id: string;
|
|
110
|
+
app_key: string;
|
|
111
|
+
des3_key: string;
|
|
112
|
+
private_key: string;
|
|
113
|
+
yzh_public_key: string;
|
|
114
|
+
sign_type: 'rsa' | 'sha256';
|
|
115
|
+
base_url?: string;
|
|
116
|
+
timeout?: number;
|
|
117
|
+
}) {
|
|
118
|
+
super(conf);
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
// LaborCaculator 连续劳务税费试算(计算器)
|
|
122
|
+
async LaborCaculator(
|
|
123
|
+
req: LaborCaculatorRequest,
|
|
124
|
+
cb?: (error: null | string, rep: LaborCaculatorResponse) => void
|
|
125
|
+
): Promise<LaborCaculatorResponse> {
|
|
126
|
+
return this.request('post', '/api/tax/v1/labor-caculator', req, { encryption: false }, cb);
|
|
127
|
+
}
|
|
128
|
+
|
|
129
|
+
// CalcTax 订单税费试算
|
|
130
|
+
async CalcTax(
|
|
131
|
+
req: CalcTaxRequest,
|
|
132
|
+
cb?: (error: null | string, rep: CalcTaxResponse) => void
|
|
133
|
+
): Promise<CalcTaxResponse> {
|
|
134
|
+
return this.request('post', '/api/payment/v1/calc-tax', req, { encryption: false }, cb);
|
|
135
|
+
}
|
|
136
|
+
}
|
package/src/services/index.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { BizlicGxV2H5ServiceClient } from './bizlicgxv2h5';
|
|
|
5
5
|
export { BizlicGxV2H5APIServiceClient } from './bizlicgxv2h5api';
|
|
6
6
|
export { BizlicXjjH5ServiceClient } from './bizlicxjjh5';
|
|
7
7
|
export { BizlicXjjH5APIServiceClient } from './bizlicxjjh5api';
|
|
8
|
+
export { CalculateLaborServiceClient } from './calculatelabor';
|
|
8
9
|
export { CustomClient } from './custom';
|
|
9
10
|
export { DataServiceClient } from './dataservice';
|
|
10
11
|
export { H5UserSignServiceClient } from './h5usersign';
|
|
@@ -528,6 +528,109 @@ interface CheckUserAmountResponse {
|
|
|
528
528
|
is_over_whole_user_year_quota: boolean;
|
|
529
529
|
}
|
|
530
530
|
|
|
531
|
+
/** GetOrderLxlwRequest 查询劳务模式单笔订单信息请求 */
|
|
532
|
+
interface GetOrderLxlwRequest {
|
|
533
|
+
/** 平台企业订单号 */
|
|
534
|
+
order_id: string;
|
|
535
|
+
/** 支付路径 */
|
|
536
|
+
channel: string;
|
|
537
|
+
/** 数据类型 */
|
|
538
|
+
data_type: string;
|
|
539
|
+
}
|
|
540
|
+
|
|
541
|
+
/** GetOrderLxlwResponse 查询劳务模式单笔订单信息返回 */
|
|
542
|
+
interface GetOrderLxlwResponse {
|
|
543
|
+
/** 平台企业订单号 */
|
|
544
|
+
order_id: string;
|
|
545
|
+
/** 订单金额 */
|
|
546
|
+
pay: string;
|
|
547
|
+
/** 综合服务主体 ID */
|
|
548
|
+
broker_id: string;
|
|
549
|
+
/** 平台企业 ID */
|
|
550
|
+
dealer_id: string;
|
|
551
|
+
/** 姓名 */
|
|
552
|
+
real_name: string;
|
|
553
|
+
/** 收款人账号 */
|
|
554
|
+
card_no: string;
|
|
555
|
+
/** 身份证号码 */
|
|
556
|
+
id_card: string;
|
|
557
|
+
/** 手机号 */
|
|
558
|
+
phone_no: string;
|
|
559
|
+
/** 订单状态码 */
|
|
560
|
+
status: string;
|
|
561
|
+
/** 订单详细状态码 */
|
|
562
|
+
status_detail: string;
|
|
563
|
+
/** 订单状态码描述 */
|
|
564
|
+
status_message: string;
|
|
565
|
+
/** 订单详情状态码描述 */
|
|
566
|
+
status_detail_message: string;
|
|
567
|
+
/** 订单状态补充信息 */
|
|
568
|
+
supplemental_detail_message: string;
|
|
569
|
+
/** 综合服务主体支付金额 */
|
|
570
|
+
broker_amount: string;
|
|
571
|
+
/** 综合服务平台流水号 */
|
|
572
|
+
ref: string;
|
|
573
|
+
/** 支付交易流水号 */
|
|
574
|
+
broker_bank_bill: string;
|
|
575
|
+
/** 支付路径 */
|
|
576
|
+
withdraw_platform: string;
|
|
577
|
+
/** 订单接收时间,精确到秒 */
|
|
578
|
+
created_at: string;
|
|
579
|
+
/** 订单完成时间,精确到秒 */
|
|
580
|
+
finished_time: string;
|
|
581
|
+
/** 应收综合服务主体加成服务费金额 */
|
|
582
|
+
broker_fee: string;
|
|
583
|
+
/** 应收余额账户支出加成服务费金额 */
|
|
584
|
+
broker_real_fee: string;
|
|
585
|
+
/** 应收加成服务费抵扣金额 */
|
|
586
|
+
broker_deduct_fee: string;
|
|
587
|
+
/** 应收用户加成服务费金额 */
|
|
588
|
+
user_fee: string;
|
|
589
|
+
/** 实收综合服务主体加成服务费金额 */
|
|
590
|
+
received_broker_fee: string;
|
|
591
|
+
/** 实收余额账户支出加成服务费金额 */
|
|
592
|
+
received_broker_real_fee: string;
|
|
593
|
+
/** 实收加成服务费抵扣金额 */
|
|
594
|
+
received_broker_deduct_fee: string;
|
|
595
|
+
/** 实收用户加成服务费金额 */
|
|
596
|
+
received_user_fee: string;
|
|
597
|
+
/** 订单备注 */
|
|
598
|
+
pay_remark: string;
|
|
599
|
+
/** 银行名称 */
|
|
600
|
+
bank_name: string;
|
|
601
|
+
/** 业务线标识 */
|
|
602
|
+
project_id: string;
|
|
603
|
+
/** 新就业形态劳动者 ID,该字段已废弃 */
|
|
604
|
+
anchor_id: string;
|
|
605
|
+
/** 描述信息,该字段已废弃 */
|
|
606
|
+
notes: string;
|
|
607
|
+
/** 系统支付金额,该字段已废弃 */
|
|
608
|
+
sys_amount: string;
|
|
609
|
+
/** 税费,该字段已废弃 */
|
|
610
|
+
tax: string;
|
|
611
|
+
/** 系统支付费用,该字段已废弃 */
|
|
612
|
+
sys_fee: string;
|
|
613
|
+
/** 用户实收金额 */
|
|
614
|
+
user_real_amount: string;
|
|
615
|
+
/** 缴税明细 */
|
|
616
|
+
tax_detail: TaxDetail;
|
|
617
|
+
}
|
|
618
|
+
|
|
619
|
+
/** TaxDetail 缴税明细 */
|
|
620
|
+
interface TaxDetail {
|
|
621
|
+
/** 应纳个税 */
|
|
622
|
+
personal_tax: string;
|
|
623
|
+
/** 应纳增值税 */
|
|
624
|
+
value_added_tax: string;
|
|
625
|
+
/** 应纳附加税费 */
|
|
626
|
+
additional_tax: string;
|
|
627
|
+
/** 实纳个税 */
|
|
628
|
+
received_personal_tax: string;
|
|
629
|
+
/** 实纳增值税 */
|
|
630
|
+
received_value_added_tax: string;
|
|
631
|
+
/** 实纳附加税费 */
|
|
632
|
+
received_additional_tax: string;
|
|
633
|
+
}
|
|
531
634
|
export class PaymentClient extends YZHclient {
|
|
532
635
|
// eslint-disable-next-line no-useless-constructor
|
|
533
636
|
constructor(conf: {
|
|
@@ -661,4 +764,18 @@ export class PaymentClient extends YZHclient {
|
|
|
661
764
|
): Promise<CheckUserAmountResponse> {
|
|
662
765
|
return this.request('post', '/api/payment/v1/risk-check/amount', req, { encryption: false }, cb);
|
|
663
766
|
}
|
|
767
|
+
|
|
768
|
+
// GetOrderLxlw 查询劳务模式单笔订单信息
|
|
769
|
+
async GetOrderLxlw(
|
|
770
|
+
req: GetOrderLxlwRequest,
|
|
771
|
+
cb?: (error: null | string, rep: GetOrderLxlwResponse) => void
|
|
772
|
+
): Promise<GetOrderLxlwResponse> {
|
|
773
|
+
return this.request(
|
|
774
|
+
'get',
|
|
775
|
+
'/api/payment/v1/query-order',
|
|
776
|
+
req,
|
|
777
|
+
{ encryption: req?.data_type === 'encryption' },
|
|
778
|
+
cb
|
|
779
|
+
);
|
|
780
|
+
}
|
|
664
781
|
}
|
|
@@ -0,0 +1,123 @@
|
|
|
1
|
+
import YZHclient from '../../common/client';
|
|
2
|
+
/** LaborCaculatorRequest 连续劳务税费试算(计算器)请求 */
|
|
3
|
+
interface LaborCaculatorRequest {
|
|
4
|
+
/** 平台企业 ID */
|
|
5
|
+
dealer_id: string;
|
|
6
|
+
/** 综合服务主体 ID */
|
|
7
|
+
broker_id: string;
|
|
8
|
+
/** 月度收入列表 */
|
|
9
|
+
month_settlement_list: MonthSettlement[];
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
/** MonthSettlement 月度收入 */
|
|
13
|
+
interface MonthSettlement {
|
|
14
|
+
/** 月份 */
|
|
15
|
+
month: number;
|
|
16
|
+
/** 月度收入 */
|
|
17
|
+
month_pre_tax_amount: string;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
/** LaborCaculatorResponse 连续劳务税费试算(计算器)返回 */
|
|
21
|
+
interface LaborCaculatorResponse {
|
|
22
|
+
/** 综合所得汇算清缴 */
|
|
23
|
+
year_tax_info: YearTaxInfo;
|
|
24
|
+
/** 月度税务信息列表 */
|
|
25
|
+
month_tax_list: MontTax[];
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
/** YearTaxInfo 综合所得汇算清缴信息 */
|
|
29
|
+
interface YearTaxInfo {
|
|
30
|
+
/** 连续劳务年度个税 */
|
|
31
|
+
continuous_month_personal_tax: string;
|
|
32
|
+
/** 综合所得汇算清缴年度个税 */
|
|
33
|
+
personal_tax: string;
|
|
34
|
+
/** 年度扣除费用 */
|
|
35
|
+
deduct_cost: string;
|
|
36
|
+
/** 个税税率 */
|
|
37
|
+
personal_tax_rate: string;
|
|
38
|
+
/** 速算扣除数 */
|
|
39
|
+
deduct_tax: string;
|
|
40
|
+
/** 税负率 */
|
|
41
|
+
total_tax_rate: string;
|
|
42
|
+
}
|
|
43
|
+
|
|
44
|
+
/** MontTax 月度税务信息 */
|
|
45
|
+
interface MontTax {
|
|
46
|
+
/** 月份 */
|
|
47
|
+
month: number;
|
|
48
|
+
/** 含增值税收入 */
|
|
49
|
+
pre_tax_amount: string;
|
|
50
|
+
/** 不含增值税收入 */
|
|
51
|
+
excluding_vat_amount: string;
|
|
52
|
+
/** 增值税 */
|
|
53
|
+
value_added_tax: string;
|
|
54
|
+
/** 附加税 */
|
|
55
|
+
additional_tax: string;
|
|
56
|
+
/** 个税 */
|
|
57
|
+
personal_tax: string;
|
|
58
|
+
/** 个税税率 */
|
|
59
|
+
personal_tax_rate: string;
|
|
60
|
+
/** 速算扣除数 */
|
|
61
|
+
deduct_tax: string;
|
|
62
|
+
/** 税后金额 */
|
|
63
|
+
post_tax_amount: string;
|
|
64
|
+
/** 税负率 */
|
|
65
|
+
total_tax_rate: string;
|
|
66
|
+
}
|
|
67
|
+
|
|
68
|
+
/** CalcTaxRequest 订单税费试算请求 */
|
|
69
|
+
interface CalcTaxRequest {
|
|
70
|
+
/** 平台企业 ID */
|
|
71
|
+
dealer_id: string;
|
|
72
|
+
/** 综合服务主体 ID */
|
|
73
|
+
broker_id: string;
|
|
74
|
+
/** 姓名 */
|
|
75
|
+
real_name: string;
|
|
76
|
+
/** 证件号 */
|
|
77
|
+
id_card: string;
|
|
78
|
+
/** 订单金额 */
|
|
79
|
+
pay: string;
|
|
80
|
+
}
|
|
81
|
+
|
|
82
|
+
/** CalcTaxResponse 订单税费试算返回 */
|
|
83
|
+
interface CalcTaxResponse {
|
|
84
|
+
/** 订单金额 */
|
|
85
|
+
pay: string;
|
|
86
|
+
/** 税费总额 */
|
|
87
|
+
tax: string;
|
|
88
|
+
/** 税后金额 */
|
|
89
|
+
after_tax_amount: string;
|
|
90
|
+
/** 税费明细 */
|
|
91
|
+
tax_detail: CalcTaxDetail;
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** CalcTaxDetail 税费明细 */
|
|
95
|
+
interface CalcTaxDetail {
|
|
96
|
+
/** 应纳个税 */
|
|
97
|
+
personal_tax: string;
|
|
98
|
+
/** 应纳增值税 */
|
|
99
|
+
value_added_tax: string;
|
|
100
|
+
/** 应纳附加税费 */
|
|
101
|
+
additional_tax: string;
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
export declare class CalculateLaborServiceClient extends YZHclient {
|
|
105
|
+
constructor(conf: {
|
|
106
|
+
dealer_id: string;
|
|
107
|
+
broker_id: string;
|
|
108
|
+
app_key: string;
|
|
109
|
+
des3_key: string;
|
|
110
|
+
private_key: string;
|
|
111
|
+
yzh_public_key: string;
|
|
112
|
+
sign_type: 'rsa' | 'sha256';
|
|
113
|
+
base_url?: string;
|
|
114
|
+
timeout?: number;
|
|
115
|
+
});
|
|
116
|
+
LaborCaculator(
|
|
117
|
+
req: LaborCaculatorRequest,
|
|
118
|
+
cb?: (error: null | string, rep: LaborCaculatorResponse) => void
|
|
119
|
+
): Promise<LaborCaculatorResponse>;
|
|
120
|
+
CalcTax(req: CalcTaxRequest, cb?: (error: null | string, rep: CalcTaxResponse) => void): Promise<CalcTaxResponse>;
|
|
121
|
+
}
|
|
122
|
+
|
|
123
|
+
export {};
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
'use strict';
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true });
|
|
3
|
+
exports.CalculateLaborServiceClient = void 0;
|
|
4
|
+
const client_1 = require('../../common/client');
|
|
5
|
+
class CalculateLaborServiceClient extends client_1.default {
|
|
6
|
+
// eslint-disable-next-line no-useless-constructor
|
|
7
|
+
constructor(conf) {
|
|
8
|
+
super(conf);
|
|
9
|
+
}
|
|
10
|
+
// LaborCaculator 连续劳务税费试算(计算器)
|
|
11
|
+
async LaborCaculator(req, cb) {
|
|
12
|
+
return this.request('post', '/api/tax/v1/labor-caculator', req, { encryption: false }, cb);
|
|
13
|
+
}
|
|
14
|
+
// CalcTax 订单税费试算
|
|
15
|
+
async CalcTax(req, cb) {
|
|
16
|
+
return this.request('post', '/api/payment/v1/calc-tax', req, { encryption: false }, cb);
|
|
17
|
+
}
|
|
18
|
+
}
|
|
19
|
+
exports.CalculateLaborServiceClient = CalculateLaborServiceClient;
|
package/yzh/services/index.d.ts
CHANGED
|
@@ -5,6 +5,7 @@ export { BizlicGxV2H5ServiceClient } from './bizlicgxv2h5';
|
|
|
5
5
|
export { BizlicGxV2H5APIServiceClient } from './bizlicgxv2h5api';
|
|
6
6
|
export { BizlicXjjH5ServiceClient } from './bizlicxjjh5';
|
|
7
7
|
export { BizlicXjjH5APIServiceClient } from './bizlicxjjh5api';
|
|
8
|
+
export { CalculateLaborServiceClient } from './calculatelabor';
|
|
8
9
|
export { CustomClient } from './custom';
|
|
9
10
|
export { DataServiceClient } from './dataservice';
|
|
10
11
|
export { H5UserSignServiceClient } from './h5usersign';
|
package/yzh/services/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.UserCollectServiceClient = exports.UploadUserSignServiceClient = exports.TaxClient = exports.PaymentClient = exports.InvoiceClient = exports.H5UserSignServiceClient = exports.DataServiceClient = exports.CustomClient = exports.BizlicXjjH5APIServiceClient = exports.BizlicXjjH5ServiceClient = exports.BizlicGxV2H5APIServiceClient = exports.BizlicGxV2H5ServiceClient = exports.AuthenticationClient = exports.ApiUserSignServiceClient = exports.Util = void 0;
|
|
3
|
+
exports.UserCollectServiceClient = exports.UploadUserSignServiceClient = exports.TaxClient = exports.PaymentClient = exports.InvoiceClient = exports.H5UserSignServiceClient = exports.DataServiceClient = exports.CustomClient = exports.CalculateLaborServiceClient = exports.BizlicXjjH5APIServiceClient = exports.BizlicXjjH5ServiceClient = exports.BizlicGxV2H5APIServiceClient = exports.BizlicGxV2H5ServiceClient = exports.AuthenticationClient = exports.ApiUserSignServiceClient = exports.Util = void 0;
|
|
4
4
|
var utils_1 = require("../common/utils");
|
|
5
5
|
Object.defineProperty(exports, "Util", { enumerable: true, get: function () { return utils_1.Util; } });
|
|
6
6
|
var apiusersign_1 = require("./apiusersign");
|
|
@@ -15,6 +15,8 @@ var bizlicxjjh5_1 = require("./bizlicxjjh5");
|
|
|
15
15
|
Object.defineProperty(exports, "BizlicXjjH5ServiceClient", { enumerable: true, get: function () { return bizlicxjjh5_1.BizlicXjjH5ServiceClient; } });
|
|
16
16
|
var bizlicxjjh5api_1 = require("./bizlicxjjh5api");
|
|
17
17
|
Object.defineProperty(exports, "BizlicXjjH5APIServiceClient", { enumerable: true, get: function () { return bizlicxjjh5api_1.BizlicXjjH5APIServiceClient; } });
|
|
18
|
+
var calculatelabor_1 = require("./calculatelabor");
|
|
19
|
+
Object.defineProperty(exports, "CalculateLaborServiceClient", { enumerable: true, get: function () { return calculatelabor_1.CalculateLaborServiceClient; } });
|
|
18
20
|
var custom_1 = require("./custom");
|
|
19
21
|
Object.defineProperty(exports, "CustomClient", { enumerable: true, get: function () { return custom_1.CustomClient; } });
|
|
20
22
|
var dataservice_1 = require("./dataservice");
|
|
@@ -527,6 +527,110 @@ interface CheckUserAmountResponse {
|
|
|
527
527
|
is_over_whole_user_year_quota: boolean;
|
|
528
528
|
}
|
|
529
529
|
|
|
530
|
+
/** GetOrderLxlwRequest 查询劳务模式单笔订单信息请求 */
|
|
531
|
+
interface GetOrderLxlwRequest {
|
|
532
|
+
/** 平台企业订单号 */
|
|
533
|
+
order_id: string;
|
|
534
|
+
/** 支付路径 */
|
|
535
|
+
channel: string;
|
|
536
|
+
/** 数据类型 */
|
|
537
|
+
data_type: string;
|
|
538
|
+
}
|
|
539
|
+
|
|
540
|
+
/** GetOrderLxlwResponse 查询劳务模式单笔订单信息返回 */
|
|
541
|
+
interface GetOrderLxlwResponse {
|
|
542
|
+
/** 平台企业订单号 */
|
|
543
|
+
order_id: string;
|
|
544
|
+
/** 订单金额 */
|
|
545
|
+
pay: string;
|
|
546
|
+
/** 综合服务主体 ID */
|
|
547
|
+
broker_id: string;
|
|
548
|
+
/** 平台企业 ID */
|
|
549
|
+
dealer_id: string;
|
|
550
|
+
/** 姓名 */
|
|
551
|
+
real_name: string;
|
|
552
|
+
/** 收款人账号 */
|
|
553
|
+
card_no: string;
|
|
554
|
+
/** 身份证号码 */
|
|
555
|
+
id_card: string;
|
|
556
|
+
/** 手机号 */
|
|
557
|
+
phone_no: string;
|
|
558
|
+
/** 订单状态码 */
|
|
559
|
+
status: string;
|
|
560
|
+
/** 订单详细状态码 */
|
|
561
|
+
status_detail: string;
|
|
562
|
+
/** 订单状态码描述 */
|
|
563
|
+
status_message: string;
|
|
564
|
+
/** 订单详情状态码描述 */
|
|
565
|
+
status_detail_message: string;
|
|
566
|
+
/** 订单状态补充信息 */
|
|
567
|
+
supplemental_detail_message: string;
|
|
568
|
+
/** 综合服务主体支付金额 */
|
|
569
|
+
broker_amount: string;
|
|
570
|
+
/** 综合服务平台流水号 */
|
|
571
|
+
ref: string;
|
|
572
|
+
/** 支付交易流水号 */
|
|
573
|
+
broker_bank_bill: string;
|
|
574
|
+
/** 支付路径 */
|
|
575
|
+
withdraw_platform: string;
|
|
576
|
+
/** 订单接收时间,精确到秒 */
|
|
577
|
+
created_at: string;
|
|
578
|
+
/** 订单完成时间,精确到秒 */
|
|
579
|
+
finished_time: string;
|
|
580
|
+
/** 应收综合服务主体加成服务费金额 */
|
|
581
|
+
broker_fee: string;
|
|
582
|
+
/** 应收余额账户支出加成服务费金额 */
|
|
583
|
+
broker_real_fee: string;
|
|
584
|
+
/** 应收加成服务费抵扣金额 */
|
|
585
|
+
broker_deduct_fee: string;
|
|
586
|
+
/** 应收用户加成服务费金额 */
|
|
587
|
+
user_fee: string;
|
|
588
|
+
/** 实收综合服务主体加成服务费金额 */
|
|
589
|
+
received_broker_fee: string;
|
|
590
|
+
/** 实收余额账户支出加成服务费金额 */
|
|
591
|
+
received_broker_real_fee: string;
|
|
592
|
+
/** 实收加成服务费抵扣金额 */
|
|
593
|
+
received_broker_deduct_fee: string;
|
|
594
|
+
/** 实收用户加成服务费金额 */
|
|
595
|
+
received_user_fee: string;
|
|
596
|
+
/** 订单备注 */
|
|
597
|
+
pay_remark: string;
|
|
598
|
+
/** 银行名称 */
|
|
599
|
+
bank_name: string;
|
|
600
|
+
/** 业务线标识 */
|
|
601
|
+
project_id: string;
|
|
602
|
+
/** 新就业形态劳动者 ID,该字段已废弃 */
|
|
603
|
+
anchor_id: string;
|
|
604
|
+
/** 描述信息,该字段已废弃 */
|
|
605
|
+
notes: string;
|
|
606
|
+
/** 系统支付金额,该字段已废弃 */
|
|
607
|
+
sys_amount: string;
|
|
608
|
+
/** 税费,该字段已废弃 */
|
|
609
|
+
tax: string;
|
|
610
|
+
/** 系统支付费用,该字段已废弃 */
|
|
611
|
+
sys_fee: string;
|
|
612
|
+
/** 用户实收金额 */
|
|
613
|
+
user_real_amount: string;
|
|
614
|
+
/** 缴税明细 */
|
|
615
|
+
tax_detail: TaxDetail;
|
|
616
|
+
}
|
|
617
|
+
|
|
618
|
+
/** TaxDetail 缴税明细 */
|
|
619
|
+
interface TaxDetail {
|
|
620
|
+
/** 应纳个税 */
|
|
621
|
+
personal_tax: string;
|
|
622
|
+
/** 应纳增值税 */
|
|
623
|
+
value_added_tax: string;
|
|
624
|
+
/** 应纳附加税费 */
|
|
625
|
+
additional_tax: string;
|
|
626
|
+
/** 实纳个税 */
|
|
627
|
+
received_personal_tax: string;
|
|
628
|
+
/** 实纳增值税 */
|
|
629
|
+
received_value_added_tax: string;
|
|
630
|
+
/** 实纳附加税费 */
|
|
631
|
+
received_additional_tax: string;
|
|
632
|
+
}
|
|
633
|
+
|
|
530
634
|
export declare class PaymentClient extends YZHclient {
|
|
531
635
|
constructor(conf: {
|
|
532
636
|
dealer_id: string;
|
|
@@ -595,6 +699,10 @@ export declare class PaymentClient extends YZHclient {
|
|
|
595
699
|
req: CheckUserAmountRequest,
|
|
596
700
|
cb?: (error: null | string, rep: CheckUserAmountResponse) => void
|
|
597
701
|
): Promise<CheckUserAmountResponse>;
|
|
702
|
+
GetOrderLxlw(
|
|
703
|
+
req: GetOrderLxlwRequest,
|
|
704
|
+
cb?: (error: null | string, rep: GetOrderLxlwResponse) => void
|
|
705
|
+
): Promise<GetOrderLxlwResponse>;
|
|
598
706
|
}
|
|
599
707
|
|
|
600
708
|
export {};
|
|
@@ -69,5 +69,15 @@ class PaymentClient extends client_1.default {
|
|
|
69
69
|
async CheckUserAmount(req, cb) {
|
|
70
70
|
return this.request('post', '/api/payment/v1/risk-check/amount', req, { encryption: false }, cb);
|
|
71
71
|
}
|
|
72
|
+
// GetOrderLxlw 查询劳务模式单笔订单信息
|
|
73
|
+
async GetOrderLxlw(req, cb) {
|
|
74
|
+
return this.request(
|
|
75
|
+
'get',
|
|
76
|
+
'/api/payment/v1/query-order',
|
|
77
|
+
req,
|
|
78
|
+
{ encryption: (req === null || req === void 0 ? void 0 : req.data_type) === 'encryption' },
|
|
79
|
+
cb
|
|
80
|
+
);
|
|
81
|
+
}
|
|
72
82
|
}
|
|
73
83
|
exports.PaymentClient = PaymentClient;
|