<?xml version="1.0" encoding="UTF-8"?> <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[ var json_msg = [{ "name": "xxxx", "cid": "xxxx", "type": 100, "subtype": 103, "entity": { "name": "xxxx", "cid": "xxxx", "cidtype": 1, "datetime": "2012-06-11", "datatype": "最高法执行", "datatypeid": 103, "court": "呈贡县人民法院", "time": "2012-06-11 00:00:00.0", "casenum": "(2012)呈执字第 00217 号", "money": "60487.81", "statute": "已结案", "basic": "", "basiccourt": "", "objection": "", "objectiontime": "2015-01-01" } }, { "name": "xxxx", "cid": "xxxx", "type": 100, "subtype": 101, "entity": { "name": "xxxx", "cid": "xxxx", "cidtype": 1, "datetime": "2012-04-05", "datatype": "判决文书", "datatypeid": 101, "title": "原告 xxxx 诉被告 xxxx、昆明中北公交有限责任公司、中国太平洋财产保险股份有限公司云南分公司机动车交通事故责任纠纷一案 ", "anyou ": "机动车交通事故责任纠纷 ", "address": "云南省大理白族自治州巍山彝族回族自治县大仓镇上厂街 3 号", "type": "被告", "leader": "", "trialprocedure": "一审", "court": "昆明市呈贡区人民法院", "casenum": "(2012)呈民初字第 175 号", "casetype": "民事判决书", "time": "2012-04-05", "ownfile": "", "objection": "", "objectiontime": null, "pdfhref": " xxxx", "contenthref": "xxxx" } }, { "name": "xxxx", "cid": "xxxx", "type": 100, "subtype": 101, "entity": { "name": "xxxx", "cid": "xxxx", "cidtype": 1, "datetime": "2012-04-05", "datatype": "判决文书", "datatypeid": 101, "title": "原告 xxxx 诉被告 xxxx、昆明中北公交有限责任公司、中国太平洋财产保险 股份有限公司云南分公司机动车交通事故责任纠纷一案", "anyou": "机动车交通事故责任纠纷", "address": "云南省大理白族自治州巍山彝族回族自治县大仓镇上厂街 3 号", "type": "被告", "leader": "", "trialprocedure": "一审", "court": "昆明市呈贡区人民法院", "casenum": "(2012)呈民初字第 175 号", "casetype": "民事判决书", "time": "2012-04-05", "ownfile": "", "objection": "", "objectiontime": null, "pdfhref": " xxxx", "contenthref": " xxxx " } }, { "name": "xxxx", "cid": "xxxx", "type": 100, "subtype": 101, "entity": { "name": "xxxx", "cid": "xxxx", "cidtype": 1, "datetime": "2012-04-05", "datatype": "判决文书", "datatypeid": 101, "title": "原告 xxxx 诉被告 xxxx、昆明中北公交有限责任公司、中国太平洋财产保险 股份有限公司云南分公司机动车交通事故责任纠纷一案", "anyou": "机动车交通事故责任纠纷", "address": "云南省大理白族自治州巍山彝族回族自治县大仓镇上厂街 3 号", "type": "被告", "leader": "", "trialprocedure": "一审", "court": "昆明市呈贡区人民法院", "casenum": "(2012)呈民初字第 175 号", "casetype": "民事判决书", "time": "2012-04-05 00:00:00", "ownfile": "", "objection": "", "objectiontime": null, "pdfhref": null, "contenthref": null } }, { "name": "xxxx", "cid": " xxxx ", "type": 200, "subtype": 201, "entity": { "name": "xxxx", "cid": " xxxx ", "cidtype": 1, "datetime": "2011-06-22", "datatype": "欠税公告", "datatypeid": 201, "taxnum": " xxxx ", "address": "深泽县东关", "leader": "xxxx", "type": null, "taxtype": "", "money": "", "money2": "", "money3": "0.05", "time": "", "time2": "2011-06-22", "unit": null, "leadership": "xxxx", "taxpeople": "", "region": null, "casenum": "", "period": null, "objection": "", "objectiontime": "0001-01-01" } }, { "name": "xxxx", "cid": " xxxx ", "type": 200, "subtype": 202, "entity": { "name": "xxxx", "cid": " xxxx ", "cidtype": 1, "datetime": "2011-07-08", "datatype": "税务信息-税务监管-失踪纳税人", "datatypeid": 202, "taxnum": null, "address": null, "leader": null, "type": null, "unit": "", "misstime": "", "num": "", "money": "", "time": "2011-07-08", "objection": "", "objectiontime": null } }, { "name": "xxxx", "cid": " xxxx ", "type": 100, "subtype": 106, "entity": { "name": "周鸿祎", "cid": " 110322197309111832 ", "cidtype": 1, "datetime": "2011-07-08", "datatype": "老赖信息", "datatypeid": 106, "leader": "周鸿祎", "imgurl": "/images/touch/user.png", "address": "北京市朝阳区", "money": "3000000", "court": "北京市朝阳区中级人民法院", "casenum": "BJCY-2011-09221", "time": "2010-3-12", "posttime": "2013-3-12", "basic": "中华人民共和国版权保护法第103条", "situation": "不履行法院判决的经济赔偿", "obligation": "赔偿侵权所产生的经济损失", "objection": "连续不执行", "objectiontime": null } }]; // var json_str = JSON.stringify(json_msg); // var json_obj = JSON.parse(json_str); // println(json_str); // println(json_obj[0]); for (var i = 0;i < json_msg.length;i++) { var chk_list_id = 2; var interface_type = json_msg[i].subtype; var json_str = JSON.stringify(json_msg[i].entity); println(chk_list_id + ',' + interface_type + ',' + json_str); // 插入接口表 $bm('interface.CCX_INTERFACE.hls_ccx_interface').update({ chk_list_id: chk_list_id, interface_type: interface_type, json_str: json_str }); // for (var key in json_msg[i]) { // if (key != "entity") { // println(key + ':' + json_msg[i][key]); // } else { // var cloumn_name = ''; // var cloumn_value = ''; // var json_str = ''; // for (var key in json_msg[i].entity) { // cloumn_name = key + ',' + cloumn_name; // cloumn_value = json_msg[i].entity[key] + ',' + cloumn_value; // json_str = key + ':' + json_msg[i].entity[key]; // // println(json_str); // } // var keys = cloumn_name; // var values = cloumn_value; // println(cloumn_name); // println(cloumn_value); // println('insert into' + 'table_name ' + '(' + cloumn_name + ')' + 'values'); // } // } } ]]></s:server-script> </a:init-procedure> <a:service-output output="/parameter"/> </a:service>