<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<Api id="__SoLtnxAc5ctkiPotcUd">
  <name>添加模拟考试记录</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <status>published</status>
  <apiGroup></apiGroup>
  <encode>UTF-8</encode>
  <requestType>post</requestType>
  <requestUrl>/mock/add</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 time = json["time"];
    var true_count = json["true_count"];
    var false_count = json["false_count"];
    var null_count = json["null_count"];
    var score = json["score"];
    var record = json["record"];
    var formProcess = getFormProcess();    
    var process = getDocumentProcess();
    var signInfo = formProcess.doView("__PaHRhALTcfJzmSN8Nux");
    var signInfoDoc = process.doNew(signInfo,getWebUser(),createParamsTable()); 
    signInfoDoc.addStringItem("time",time);
    signInfoDoc.addStringItem("true_count",true_count);
    signInfoDoc.addStringItem("false_count",false_count);
    signInfoDoc.addStringItem("null_count",null_count);
    signInfoDoc.addStringItem("score",score);
    signInfoDoc.addStringItem("record",record);
    signInfoDoc.addStringItem("person_name",getWebUser().getName());
    signInfoDoc.addStringItem("person_id",getWebUser().getId());
    process.doCreate(signInfoDoc); 

    result.put("msg", "success");
    result.put("code", "0");
    result.put("type", "update");
    return result;

  }
  result.put("msg", "参数不能是空");
  result.put("code", "-1");
  result.put("type", "update");
  return result;

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