<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<activity id="__ZMozTduE5DZCKY3WEqC">
  <name>录入成绩</name>
  <parentId>__DSHi9Cu2eM5sr11kp7g</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <type>11</type>
  <onActionFlow></onActionFlow>
  <onActionPrint></onActionPrint>
  <colorType>default</colorType>
  <beforeActionScript><![CDATA[]]></beforeActionScript>
  <afterActionScript><![CDATA[//修改表单数据
(function(){   
  var classId = getItemValueAsString("classId");
  println("结果的classId"+classId);
  var personId = getItemValueAsString("personId");
  var classInfoDoc=findDocument(classId);
  println("结果的classInfoDoc"+classInfoDoc);
  var qualifiedGTheoryResult=classInfoDoc.findItem("qualifiedGTheoryResult").getValue();//合格理论成绩
  var qualifiedGOperationResult=classInfoDoc.findItem("qualifiedGOperationResult").getValue();//合格实操成绩
  var graduationTestResults='0';
  var graduationTheoryScore = getItemValueAsDouble("graduationTheoryScore");   //获取理论成绩
  var graduationOperationScore = getItemValueAsDouble("graduationOperationScore"); //获取操作成绩
  var process = getDocumentProcess();            
  if((graduationTheoryScore>=qualifiedGTheoryResult)&&(graduationOperationScore>=qualifiedGOperationResult)){//判断是否合格
    var graduationTestResults = '1';
  }else{
    var graduationTestResults = '2';
  }
  //var graduationTheoryScore = getItemValueAsString("graduationTheoryScore");   //获取理论成绩
  //var graduationOperationScore = getItemValueAsString("graduationOperationScore"); //获取操作成绩
  //var graduationTestResults = getItemValueAsString("graduationTestResults");   //获取考试结果
  //var sumScore = getItemValueAsString("sumScore"); //获取总成绩
  var sumScore = graduationTheoryScore+graduationOperationScore //获取总成绩
  println("sumScore====================================="+sumScore);
  var personId = getItemValueAsString("personId");
  var process = getDocumentProcess();  
  var examInfoDoc=findDocument(personId); 

  examInfoDoc.findItem("graduationTestResults").setValue(graduationTestResults);
  var graduationTheoryScore2 = examInfoDoc.findItem("graduationTheoryScore").getValue();
  examInfoDoc.findItem("graduationTheoryScore").setValue(graduationTheoryScore);
  examInfoDoc.findItem("graduationOperationScore").setValue(graduationOperationScore);
  examInfoDoc.findItem("sumScore").setValue(sumScore);
  println("graduationTheoryScore2-----------------"+graduationTheoryScore2);
  println("graduationTheoryScore-----------------"+graduationTheoryScore);
  if(graduationTheoryScore!=graduationTheoryScore2){
    examInfoDoc.findItem("apptype").setValue(1);
  }
  println("examInfoDoc====================================="+examInfoDoc);
  process.doUpdate(examInfoDoc);
})()]]></afterActionScript>
  <retractBeforeActionScript><![CDATA[]]></retractBeforeActionScript>
  <retractAfterActionScript><![CDATA[]]></retractAfterActionScript>
  <hiddenScript><![CDATA[]]></hiddenScript>
  <readonlyScript><![CDATA[]]></readonlyScript>
  <startFlowScript><![CDATA[]]></startFlowScript>
  <editMode>0</editMode>
  <fileNameScript><![CDATA[]]></fileNameScript>
  <iconurl></iconurl>
  <orderno>0</orderno>
  <stateToShow></stateToShow>
  <parentForm>__DSHi9Cu2eM5sr11kp7g</parentForm>
  <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>
  <actionDispatcherUrlScript><![CDATA[]]></actionDispatcherUrlScript>
  <actionSelection>0</actionSelection>
  <relatedFormId></relatedFormId>
  <actionScript><![CDATA[]]></actionScript>
  <workFlowType>0</workFlowType>
  <contextMenu>false</contextMenu>
  <showInToolbar>true</showInToolbar>
  <transpond></transpond>
  <targetList>|</targetList>
  <label><![CDATA[]]></label>
</activity>