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
<?xml version="1.0" encoding="UTF-8"?>
<a:service xmlns:ns1="leaf.application.action" xmlns:p="uncertain.proc" xmlns:a="http://www.leaf-framework.org/application" xmlns:s="leaf.plugin.script" trace="true">
<a:init-procedure>
<s:server-script import="app/app_login_check.js"><![CDATA[
function bp_master_query() {
var bpMaster_list_details;
var bp_account_list_details;
try {
var bpMaster_list_bm = $bm('app.financing_due.financing_query');
var bpMaster_list_map = bpMaster_list_bm.queryAsMap();
bpMaster_list_details = bpMaster_list_map.getChildren();
$ctx.parameter.return_status = 'S';
$ctx.parameter.return_message = '执行成功';
} catch (e) {
$ctx.success = "true";
$ctx.parameter.return_status = 'E';
$ctx.parameter.return_message = String(e);
}
//返回结果
var result = {
result: $ctx.parameter.return_status,
message: $ctx.parameter.return_message,
product_main: []
};
var product_main = result.product_main;
if (bpMaster_list_details) {
for (var i = 0;i < bpMaster_list_details.length;i++) {
var bp_class_list_detail2 = bpMaster_list_details[i];
product_main.push({
"product_id": bp_class_list_detail2.product_plan_id,
"special_note": bp_class_list_detail2.special_note,
"if_self_definition":bp_class_list_detail2.if_self_definition,
"product_name_write": bp_class_list_detail2.PRODUCT_NAME_WRITE,
"down_payment_ratio": Number(bp_class_list_detail2.DOWN_PAYMENT_RATIO),
"margin_ratio": Number(bp_class_list_detail2.MARGIN_RATIO),
"lease_charge_ratio": Number(bp_class_list_detail2.lease_charge_ratio),
"btb_int_rate_implicit": Number(bp_class_list_detail2.btb_int_rate_implicit),
"lease_times": Number(bp_class_list_detail2.lease_times),
"lease_times_n": bp_class_list_detail2.lease_times_n,
"annual_pay_times": bp_class_list_detail2.ANNUAL_PAY_TIMES,
"annual_pay_times_n": bp_class_list_detail2.ANNUAL_PAY_TIMES_n,
"price_list": bp_class_list_detail2.PRICE_LIST,
"price_list_n": bp_class_list_detail2.price_list_n,
"int_rate_display":bp_class_list_detail2.int_rate_display,
"product_number": bp_class_list_detail2.product_number,
"product_type":bp_class_list_detail2.product_type
});
}
}
$ctx.parameter.json = JSON.stringify(result);
}
if ($ctx.parameter.return_status != 'E' && $ctx.parameter.return_status != 'TIMEOUT') {
bp_master_query();
}
]]></s:server-script>
</a:init-procedure>
<a:service-output output="/parameter/@json"/>
</a:service>