<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<impMappingConfigVO id="__CCg5Cf1mMOtqNBmSDgi">
  <name>结业成绩录入表单</name>
  <parentId>__LgZds5MVHW3o08T7UcX</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <xml><![CDATA[<cn.myapps.runtime.dynaform.dts.excelimport.ExcelMappingDiagram>
<flowstatus>16</flowstatus>
<flowpath></flowpath>
<deleteMSG></deleteMSG>
<width>2048</width>
<height>1536</height>
<needRollback>rollback</needRollback>
<cn.myapps.runtime.dynaform.dts.excelimport.MasterSheet>
<id>1638001360007</id>
<name>结业成绩表</name>
<scale>0</scale>
<x>498</x>
<y>88</y>
<width>142</width>
<height>34</height>
<formName>level_class_student</formName>
</cn.myapps.runtime.dynaform.dts.excelimport.MasterSheet>
<cn.myapps.runtime.dynaform.dts.excelimport.Column>
<id>1638001391039</id>
<name>结业理论成绩</name>
<scale>0</scale>
<x>497</x>
<y>234</y>
<width>142</width>
<height>34</height>
<formName></formName>
<fieldName>graduationTheoryScore</fieldName>
<primaryKey>false</primaryKey>
<valueScript>(function(){  
  var graduationTheoryScore = getItemValue(@quot;graduationTheoryScore@quot;);  
  println(@quot;graduationTheoryScore----------------------------@gt;@quot;+graduationTheoryScore)  
  })()</valueScript>
<validateRule></validateRule>
</cn.myapps.runtime.dynaform.dts.excelimport.Column>
<cn.myapps.runtime.dynaform.dts.excelimport.Column>
<id>1638001391534</id>
<name>身份证</name>
<scale>0</scale>
<x>367</x>
<y>193</y>
<width>142</width>
<height>34</height>
<formName></formName>
<fieldName>idCardNo</fieldName>
<primaryKey>true</primaryKey>
<valueScript>(function(){        
        var idCardNo = getItemValue(@quot;idCardNo@quot;);  
        var testState=@quot;@quot; 
        var writtenScore1=getItemValueAsInt(@quot;graduationTheoryScore@quot;);   //数字类型                                          
        var writtenScore2=getItemValueAsInt(@quot;graduationOperationScore@quot;);//数字类型     
        var sumScore=writtenScore1+writtenScore2      
        var testState=@quot;@quot;   
        var hclassid = new Packages.cn.myapps.common.util.cache.MemoryCacheUtil.getFromPrivateSpace(@quot;classId@quot;, getWebUser());    
        println(@quot;sumScore----@gt;@quot;+sumScore)         
        println(@quot;idCardNo----------------------------@gt;@quot;+idCardNo)        
        println(@quot;更新开始@quot;)   
       var examInfoDoc = findDocument(hclassid); //班级id                               
       var qualifiedGTheoryResult = examInfoDoc.findItem(@quot;qualifiedGTheoryResult@quot;).getValue(); //合格结业理论考试成绩                            
       var qualifiedGOperationResult= examInfoDoc.findItem(@quot;qualifiedGOperationResult@quot;).getValue();//合格结业实操考试成绩                             
       var sumScorequal=parseDouble(qualifiedGTheoryResult)+parseDouble(qualifiedGOperationResult)   
       println(@quot;sumScorequal----@gt;@quot;+sumScorequal) 
           if(sumScore@gt;=sumScorequal){//都有，按照总分计算                             
                   testState=1   //及格                          
           }else if(0@lt;sumScore@amp;@amp;sumScore@lt;sumScorequal){                          
                   testState=2  //不及格                          
           }else{                             
                   testState=0  //未考试                           
           }   
        println(@quot;testState----@gt;@quot;+testState)   
        var updatesql=@quot;update tlk_level_class_student set item_graduationTestResults='@quot;+testState+@quot;',item_graduationTheoryScore='@quot;+writtenScore1+@quot;',item_graduationOperationScore='@quot;+writtenScore2+@quot;',ITEM_SUMSCORE = '@quot;+sumScore+@quot;' where ITEM_IDCARDNO = '@quot;+idCardNo+@quot;'@quot;;                     
                      updateByDSName(@quot;tms@quot;,updatesql);                
        println(@quot;更新结束@quot;)        
        })()</valueScript>
<validateRule>(function(){                                
                                var idCardNo = getItemValueAsString(@quot;idCardNo@quot;);                                
                                println(@quot;身份证号：@quot;+idCardNo);                                
                                var sclassid = @quot;@quot;; //定义数据库查询到的班级id                                
                                var sidCardNo = @quot;@quot;; //定义数据库查询到的学员的身份证号              
                                var hclassid = new Packages.cn.myapps.common.util.cache.MemoryCacheUtil.getFromPrivateSpace(@quot;classId@quot;, getWebUser());              
                                                        
                                                          
                                var sql = @quot;SELECT ITEM_CLASSID,ID,ITEM_IDCARDNO from tlk_level_class_student where ITEM_IDCARDNO = '@quot;+idCardNo+@quot;'@quot;;                                
                                var datas = queryByDSName(@quot;tms@quot;,sql);     
                                 println(@quot;sql------------@gt;lgynb：@quot;+sql);       
                                if(datas!=null){                                
                                   for(var iterator = datas.iterator();iterator.hasNext();){                                
                                       var map1 = iterator.next();//取值                                
                                       sclassid = map1.get(@quot;ITEM_CLASSID@quot;);                                
                                       sidCardNo = map1.get(@quot;ITEM_IDCARDNO@quot;);                  
                                       ID=map1.get(@quot;ID@quot;);                  
                                     println(@quot;学生ID@quot;+ID)                  
                                     println(@quot;数据库班级id：@quot;+sclassid);                                
                                     println(@quot;数据库身份证号：@quot;+sidCardNo);                                
                                    }                                
                                }                                
                                if (!sclassid.equals(hclassid)){                                
                                    return @quot;身份证号为：@quot;+sidCardNo+@quot;的学员非本班级学员！@quot;;                        
                                }                  
                                                                
                                })</validateRule>
</cn.myapps.runtime.dynaform.dts.excelimport.Column>
<cn.myapps.runtime.dynaform.dts.excelimport.Column>
<id>1638001391750</id>
<name>结业实操成绩</name>
<scale>0</scale>
<x>639</x>
<y>210</y>
<width>142</width>
<height>34</height>
<formName></formName>
<fieldName>graduationOperationScore</fieldName>
<primaryKey>false</primaryKey>
<valueScript></valueScript>
<validateRule></validateRule>
</cn.myapps.runtime.dynaform.dts.excelimport.Column>
<cn.myapps.runtime.dynaform.dts.excelimport.Relation>
<state></state>
<startnodeid>1638001360007</startnodeid>
<endnodeid>1638001391534</endnodeid>
<ispassed>false</ispassed>
<isreturn>false</isreturn>
<condition></condition>
<pointstack>366;193;500;95</pointstack>
<id>1638001469023</id>
<name></name>
</cn.myapps.runtime.dynaform.dts.excelimport.Relation>
<cn.myapps.runtime.dynaform.dts.excelimport.Relation>
<state></state>
<startnodeid>1638001360007</startnodeid>
<endnodeid>1638001391039</endnodeid>
<ispassed>false</ispassed>
<isreturn>false</isreturn>
<condition></condition>
<pointstack>513;217;498;88</pointstack>
<id>1638001472798</id>
<name></name>
</cn.myapps.runtime.dynaform.dts.excelimport.Relation>
<cn.myapps.runtime.dynaform.dts.excelimport.Relation>
<state></state>
<startnodeid>1638001360007</startnodeid>
<endnodeid>1638001391750</endnodeid>
<ispassed>false</ispassed>
<isreturn>false</isreturn>
<condition></condition>
<pointstack>639;210;498;88</pointstack>
<id>1638001475550</id>
<name></name>
</cn.myapps.runtime.dynaform.dts.excelimport.Relation>
</cn.myapps.runtime.dynaform.dts.excelimport.ExcelMappingDiagram>
]]></xml>
  <templatePath>/uploads/exceltemplate/结业成绩录入.xlsx</templatePath>
</impMappingConfigVO>