<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<column id="__5Lt9VhP3AyXfTo4MMQw">
  <name>取消</name>
  <parentId>__Xq3r3eKoddb3a49Mrrg</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <width></width>
  <valueScript><![CDATA[]]></valueScript>
  <hiddenScript><![CDATA[true]]></hiddenScript>
  <beforeScript><![CDATA[]]></beforeScript>
  <parentView>__Xq3r3eKoddb3a49Mrrg</parentView>
  <type>COLUMN_TYPE_OPERATE</type>
  <fieldName></fieldName>
  <flowReturnCss>false</flowReturnCss>
  <imageName>01</imageName>
  <fontColor></fontColor>
  <orderno>41111</orderno>
  <sum>false</sum>
  <total>false</total>
  <isOrderByField>false</isOrderByField>
  <orderType>ASC</orderType>
  <multiLanguageLabel></multiLanguageLabel>
  <actionScript><![CDATA[#include "sysfunction";
(function(){
  println("1--1");
     	var loginno=getWebUser().getLoginno();
	var usid = getUserIdByLoginno(loginno);
  var subject="您参与的保安员等级（五级）实操培训已取消！";
   var appId=getApplication();
   var appName = "考试管理";
   //以上用于站内信
var doc=getCurrentDocument();
//println("doc=---------"+doc);
var docId=doc.getId();
println("1--");
var classStatus = getItemValueAsString("classStatus"); //班级状态
  var className = getItemValueAsString("className"); //班级状态
  println("2--");
if(!"1".equals(classStatus)){  
  return createAlert("班级状态为审核通过才能取消！"); 
}

//println("value=---------"+value);
var sql = "select "+
              "'"+getDomainid()+"' as DOMAINID,"+
              "ID,"+ //用户ID
              "ID as item_ID,"+
              "ITEM_CLASSSTATUS"+
              " from " +sysfunction.DS_TMS+".tlk_grade_card_class_management"+
              " where ID='"+docId+"'";
            //println("sql2---->"+sql);
          var datart = findBySQL(sql);

 // var classStatus=datart.getItemValueAsString("CLASSSTATUS");

 if("1".equals(classStatus)){
  /* var sqls="select * from tlk_level_class_student where ITEM_CLASSID='"+docId+"'";
  println("sqls====="+sqls);

  var datass = queryByDSName("tms",sqls);
  if(datass!=null){
   for(var iterators = datass.iterator();iterators.hasNext();){
       var map2 = iterators.next();//取值
       var idcardno = map2.get("ITEM_IDCARDNO");
     println("idcardno====="+idcardno);
     
  var sqlsa="SELECT * from tlk_grade_registration where ITEM_IDCARDNO='"+idcardno+"'";
  println("sqls====="+sqlsa);

  var datassa = queryByDSName("tms",sqlsa);
  if(datassa!=null){
   for(var iteratorsa = datassa.iterator();iteratorsa.hasNext();){
       var map2a = iteratorsa.next();//取值
       var learnId = map2a.get("ITEM_learnId");
       var name = map2a.get("ITEM_name");
        var trainName = map2a.get("ITEM_trainName");
      println("learnId====="+learnId);
     
   }}
     var sqlsb="select * from t_user where FIELD12='"+idcardno+"'and DOMAINID='"+learnId+"'";
  println("sqlsb====="+sqlsb);

  var datassb = queryByDSName("obpm2",sqlsb);
  if(datassb!=null){
   for(var iteratorsb = datassb.iterator();iteratorsb.hasNext();){
       var map2b = iteratorsb.next();//取值
       var ids = map2b.get("ID");
      println("ids====="+ids);}}
      								var content = "";
     var texts ="";
      				texts += "" + name + "，您参与的由" ;
   				texts += "" + trainName + "举办的等级实操培训已取消，班级名称" ;
  				texts += "" + className + "，请等待培训学校重新安排，有任何问题可直接咨询所属保安公司或培训学校。" ;
  				var appAvatar = "https://bcxin-saas-prod.obs.cn-north-1.myhuaweicloud.com:443/upload%2F2021-11-01%2F1635755240828768236.png";
  				var title = "";
  				var titleImg = "";
  				var actionName = "";
   				var actionUrl = "";
   				 content += "appName=" + appName + "&&;" ; //应用名称
   content += "appId=" + appId + "&&;" ;  //应用id
  content += "appAvatar=" + appAvatar + "&&;" ;  //应用图标
        content += "title=" + title + "&&;" ; //标题
        content += "titleImg=" + titleImg + "&&;" ;  //标题图标
        content += "actionName=" + actionName + "&&;" ;   //操作名称
        content += "actionUrl=" + actionUrl + "&&;" ;   //操作链接
     content += "content=" + texts + ""; 
    println("usid====>"+usid);
    println("ids=====>"+ids);
    println("subject"+subject);
    
    sendMessage(usid,ids,subject,content);
     
    }
}*/
	var deletesql ="delete from tlk_level_class_student where ITEM_CLASSID='"+docId+"'";
	deleteByDSName(sysfunction.DS_TMS,deletesql);
	var updatesql="update tlk_grade_card_class_management set ITEM_CLASSSTATUS='5' where ID='"+docId+"'";
	updateByDSName(sysfunction.DS_TMS,updatesql);
   //println("value=---------"+docId);
 }else{
    return createAlert("无法取消");
 }


})()]]></actionScript>
  <clickSorting>true</clickSorting>
  <sortStandard>00</sortStandard>
  <jumpMapping></jumpMapping>
  <mappingform>__ApOFiTWdSoVEmTPouiH</mappingform>
  <formatType>simple</formatType>
  <decimalsNum>1</decimalsNum>
  <thouSign>false</thouSign>
  <decimalsCurr>1</decimalsCurr>
  <currType>zh_CN</currType>
  <color>rgba(0, 0, 0, 1)</color>
  <fontSize>12</fontSize>
  <groundColor>rgba(255, 255, 255, 0)</groundColor>
  <showIcon>false</showIcon>
  <iconMapping></iconMapping>
  <buttonType>04</buttonType>
  <buttonName>取消</buttonName>
  <visible>true</visible>
  <visible4ExpExcel>false</visible4ExpExcel>
  <visible4Print>true</visible4Print>
  <visible4PagePrint>false</visible4PagePrint>
  <templateForm>__KYetdoxbuPpKmvkVqyw</templateForm>
  <icon></icon>
  <showType>01</showType>
  <mappingField></mappingField>
  <showMoon>false</showMoon>
  <showAsLabel>false</showAsLabel>
  <showAsButton>false</showAsButton>
  <displayType>00</displayType>
  <displayLength></displayLength>
  <showTitle>false</showTitle>
  <isFilter>false</isFilter>
</column>