<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Api id="__mxGweD5ItNUqXa6akjn">
  <name>等级证考生考试信息</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <status>published</status>
  <apiGroup></apiGroup>
  <encode>UTF-8</encode>
  <requestType>get</requestType>
  <requestUrl>/exam/classPersonInfo</requestUrl>
  <tags></tags>
  <responseType>json</responseType>
  <responseScript><![CDATA[(function(){

  var idCardNo = getParameter("idCardNo"); //鉴定考试结果
  var classId=getParameter("classId");  
  var whereStr = " where b.item_CLASSSTATUS='1' ";         
  if(isNotNull(classId)){            
    whereStr += "and a.ITEM_CLASSID = '"+classId+"' ";
  } 
  if(isNotNull(idCardNo)){            
    whereStr += 			" and a.ITEM_IDCARDNO='"+idCardNo+"' ";           
  }
  var sql = "select '"+getDomainid()+"' as domainid,"+
      "a.ITEM_signin,"+//考试签到
      "b.ITEM_CLASSNAME," + //班级名称
      "b.ITEM_CLASSSTATUS," + //班级状态
      "f.ITEM_TESTDURATION," + //考试时长
      "CONCAT(b.ITEM_GRADUATIONTHEORYTEXTSTARTTIME,'~',b.ITEM_GRADUATIONTHEORYTEXTENDTIME) as ITEM_GRADUATIONTHEORYTEXTTIME," +//结业-理论考试时间
      "b.ITEM_examPerson as item_person," + //监考老师
      "b.ITEM_precautions," + //注意事项
      "b.ITEM_graduationTheoryTextPlace," + //结业理论考试地点
      "b.ITEM_graduationTheoryTextPaperName," + //结业理论考试试卷的名称
      "b.ITEM_graduationTheoryTextPaperId," + //结业理论考试试卷的id
      "b.ITEM_qualifiedGTheoryResult," + //理论成绩合格分数  
      "a.ITEM_NAME," + //姓名
      "a.ITEM_COMPANY," + //所属公司
      "a.ITEM_PHONE," + //手机号
      "a.ITEM_IDCARDNO," + //身份证号码
      "a.ITEM_ISMAKEUP," + //是否补考
      "a.ITEM_GRADUATIONTESTRESULTS," + //结业考试结果
      "a.ITEM_GRADUATIONTHEORYSCORE," + //结业理论分数
      "a.ITEM_GRADUATIONOPERATIONSCORE," + //结业实操分数
      "a.ITEM_CLASSID as item_examid," + //班级id
      "a.ITEM_CLASSID,"+//班级id
      "a.ITEM_writtenRecordMore," + //做题记录
      "a.ID,"+ 
      "a.ID as ITEM_ID"+
      " from tlk_level_class_student a inner JOIN tlk_grade_card_class b on a.ITEM_CLASSID=b.id left join organizationauth.tlk_test_paper_base_info f on f.id=b.ITEM_graduationTheoryTextPaperId "+ whereStr+"";
  sql += " limit 1000"
  var datas = queryByDSName("tms",sql);
  return datas;
})()]]></responseScript>
</Api>