1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
<?xml version="1.0" encoding="UTF-8"?>
<!--
$Author: Calvin
$Date: 2018年03月15日15:45:17
$Revision: 1.0
$Purpose: 中诚信接口
-->
<a:service xmlns:s="leaf.plugin.script" xmlns:a="http://www.leaf-framework.org/application" xmlns:p="uncertain.proc" trace="true">
<a:init-procedure>
<s:server-script><![CDATA[
importPackage(Packages.deron_ccx_interface);
//接口类型对应关系
// 1、身份验证
// 2、二维核验
// 3、三维核验
// 4、四维核验
// 5、手机号状态--联通、电信
// 6、手机号状态--移动
// 7、个人交易报告
// 8、风险报告
// 9、四维核验简项
var interface_type = $ctx.parameter.interface_type;
var url, para;
var project_id = $ctx.parameter.project_id;
var bp_id = $ctx.parameter.bp_id;
var bp_info_bm = $bm('interface.CCX_INTERFACE.hls_ccx_interface');
if (bp_id) {
var bp_info_result = bp_info_bm.queryAsMap({
"bp_id": bp_id,
"project_id": project_id,
"interface_type": interface_type
});
var bp_info_record = bp_info_result.getChildren();
} else {
raise_app_error('接口调用参数出错,请联系系统管理员!');
}
para = bp_info_record[0]["PARA"];
//1、身份验证
if (interface_type == '1') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/ProvateCerCHK.do";
//2、二维核验
} else if (interface_type == '2') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/CarNameCerPhoneCHK.do";
//3、三维核验
} else if (interface_type == '3') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/CarNameCerPhoneCHK.do";
//4、四维核验
} else if (interface_type == '4') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/CarNameCerPhoneCHK.do";
//5、手机号状态--电信、联通
} else if (interface_type == '5') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/PhoneNoStatueCHK.do";
//6、手机号状态--移动
} else if (interface_type == '6') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/PhoneNoStatueCHK_mobile.do";
//7、个人交易报告
} else if (interface_type == '7') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/personalTransactionReport.do";
// 8、风险报告
} else if (interface_type == '8') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/RiskInformationCHK.do";
// 9、四维核验简项
} else if (interface_type == '9') {
url = "http://127.0.0.1:8081/FHADMINM/ccx/CarNameCerPhoneCHKSimple.do";
}
try {
var result = HlsCcxInterface.executeSend(url, para);
// println(result);
} catch (e) {
println("抛出异常:" + e);
raise_app_error('接口调用出错,请联系系统管理员!');
}
$bm('interface.CCX_INTERFACE.hls_ccx_interface').update({
project_id: project_id,
bp_id: bp_id,
interface_type: interface_type,
result: result
});
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter"/>
</a:service>