<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Api id="__n2EQP7iPx8v7qxH7xf1">
  <name>二维码优化</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <status>published</status>
  <apiGroup></apiGroup>
  <encode>UTF-8</encode>
  <requestType>get</requestType>
  <requestUrl>/person/personinfo</requestUrl>
  <tags></tags>
  <responseType>json</responseType>
  <responseScript><![CDATA[(function(){    
  var id = getParameter("applyid");   
  if(isNotNull(id)){
    var sql=" select item_securityid,item_name,item_idcardno,item_truepiture"+   
        " from "+
        " tlk_qualify_person_apply where id = '"+id+"' union all select a.item_securityid,a.item_name,a.item_idcardno,a.item_truepiture"+   
        " from "+
        " tlk_grade_registration a  where a.id = '"+id+"'";
    var datas = queryByDSName("tms",sql);
    if(datas!=null){
      for(var iterator = datas.iterator();iterator.hasNext();){
        var map1 = iterator.next();//取值
        var securityid = map1.get("item_securityid")
        var name= map1.get("item_name");
        var idcarno= map1.get("item_idcardno");
        var picture = map1.get("item_truepiture")
        }
    }
    if(!isNotNull(picture)){
      var sqls = "select a.one_inch_color_white_photo from obpm2.tenant_users a left join baibaodunflow.vw_employee b on b.id = a.id where b.ITEM_USERID = '"+securityid+"' "
      var datass = queryByDSName("tms",sqls);
      if(datass!=null){
        for(var iterator = datass.iterator();iterator.hasNext();){
          var map1 = iterator.next();//取值
          picture = map1.get("one_inch_color_white_photo");
          picture = '[{"name":"身份证头像","path":"'+picture+'","url":"'+picture+'"}]'
        }
      }
    }
    var result = new Packages.java.util.HashMap(); //创建指定类对象
    if(isNotNull(name)&&isNotNull(idcarno)&&isNotNull(picture)){
      result.put("name",name)
      result.put("idcarno",idcarno)
      result.put("picture",picture)
    }else{
      result.put("msg","姓名或身份证或照片或考试id为空")
      result.put("error",-1);
    }
    return result;     
  }else{
    var result = new Packages.java.util.HashMap(); //创建指定类对象
    result.put("code", "-1");
    result.put("msg", "报名id不能为空");
    return result;
  }

})()]]></responseScript>
</Api>