<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Api id="__HvRA5KNveYbmJLby0zM">
  <name>作弊人员信息新增</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <status>published</status>
  <apiGroup></apiGroup>
  <encode>UTF-8</encode>
  <requestType>post</requestType>
  <requestUrl>/exam/cheatman</requestUrl>
  <tags></tags>
  <responseType>json</responseType>
  <responseScript><![CDATA[(function () {
  var result = new Packages.java.util.HashMap(); //创建指定类对象
  var jsonStr = getParameter("_content");
  if(isNotNull(jsonStr)){
    var json = JSON.parse(jsonStr);
    var name = json["name"];
    var phone = json["phone"];
    var idcardno = json["idcardno"];
    var date = format(getToday(),"yyyy-MM-dd HH:mm:ss");
    var examname = json["examname"];//节ID
    var phonetype = json["phonetype"];//节ID
    var fromid="__zYbMz6iDSUbKJaqCGuV";
    var process = getDocumentProcess();
    var formProcess = getFormProcess();
    var subform = formProcess.doView(fromid);
    var Info = process.doNew(subform, getWebUser(), createParamsTable());

    Info.findItem("name").setValue(name);


    Info.findItem("idcardno").setValue(idcardno);


    Info.findItem("mobile").setValue(phone);


    Info.findItem("phonetype").setValue(phonetype);


    Info.findItem("cheatdate").setValue(date);


    Info.findItem("examname").setValue(examname);

  }
  process.doCreate(Info);
  result.put("msg", "success");
  result.put("code", "0");
  return result;
})()]]></responseScript>
</Api>