<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activity id="__5UusrMJqUC9kXrERQwA">
  <name>提交审核</name>
  <parentId>__Xq3r3eKoddb3a49Mrrg</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <type>1</type>
  <onActionForm></onActionForm>
  <onActionView>__Xq3r3eKoddb3a49Mrrg</onActionView>
  <colorType>warning</colorType>
  <beforeActionScript><![CDATA[#include "sysfunction";
#include "saasSendMessage";
(function(){
  var selectId = getParameterAsText("_selects");//获取所选中数据的id结果集
  var rtn = "";
  var arrto = splitText(selectId, ";"); //对这个结果集进行处理，以;进行切割，放到数组arrto
  var classStatus = ""; //成绩确认状态
  var classname = ""; //班级名称
  if(isNotNull(selectId)){
    for (var i = 0; i < arrto.length; i++) { 
      var sql1 = "select ITEM_CLASSNAME,ITEM_CLASSSTATUS,ID from tlk_grade_card_class where ID ='" + arrto[i] + "'";
      println("sql--------------------------"+sql1);
      var datas = queryByDSName("tms", sql1)
      if (datas != null) {
        for (var iterator = datas.iterator(); iterator.hasNext();){
          var map1 = iterator.next();//取值
          classStatus = map1.get("ITEM_CLASSSTATUS");
          println("classStatus-----------------------"+classStatus)
          classname = map1.get("ITEM_CLASSNAME");
          var examId=map1.get("ID");
          println("成绩确认状态："+classStatus);
          if(!"0".equals(classStatus)){  
            rtn = rtn + classname+"已经提交申请了！";
          } else{
            println("1：");


            //var examId = getId();       
            println("+++examId++："+examId);
            var process = getDocumentProcess();            
            var examInfoDoc=findDocument(examId); 
            println("++++++++："+examInfoDoc);
            println("2：");
            examInfoDoc.findItem("classStatus").setValue("3");
            println("3：");
            examInfoDoc.findItem("applyTime").setValue(format(getToday(),"yyyy-MM-dd HH:mm:ss"));//申请时间
            println("4：");
            process.doUpdate(examInfoDoc);
            println("5："); 
          }
        }

      }
    }
  }



  //println("考试==>" + computerStartDate.getTime());
  //println("现在==>" + getToday().getTime());

  return createAlert(rtn);
  //return new JsMessage(JsMessage.TYPE_ALERT, "已经提交了申请！");

})()]]></beforeActionScript>
  <afterActionScript><![CDATA[]]></afterActionScript>
  <hiddenScript><![CDATA[]]></hiddenScript>
  <readonlyScript><![CDATA[]]></readonlyScript>
  <editMode>0</editMode>
  <fileNameScript><![CDATA[]]></fileNameScript>
  <orderno>2</orderno>
  <parentView>__Xq3r3eKoddb3a49Mrrg</parentView>
  <impmappingconfigid></impmappingconfigid>
  <jumpType>0</jumpType>
  <expSub>false</expSub>
  <icon></icon>
  <disableFlowNode>false</disableFlowNode>
  <changeFlowOperator>false</changeFlowOperator>
  <changeFlowCc>false</changeFlowCc>
  <multiLanguageLabel></multiLanguageLabel>
  <dispatcherMode>0</dispatcherMode>
  <dispatcherUrl><![CDATA[]]></dispatcherUrl>
  <dispatcherParams><![CDATA[[{"paramKey":"","paramValue":""}]]]></dispatcherParams>
  <jumpMode>0</jumpMode>
  <jumpActOpenType>0</jumpActOpenType>
  <withOld>false</withOld>
  <actionType>0</actionType>
  <actionSelection>0</actionSelection>
  <workFlowType>0</workFlowType>
  <contextMenu>true</contextMenu>
  <showInToolbar>true</showInToolbar>
  <label><![CDATA[]]></label>
</activity>