<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<column id="__9HMClJbAACZfTEJXnGA">
  <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>41111111</orderno>
  <sum>false</sum>
  <total>false</total>
  <isOrderByField>false</isOrderByField>
  <orderType>ASC</orderType>
  <multiLanguageLabel></multiLanguageLabel>
  <actionScript><![CDATA[#include "sysfunction";
#include "saasSendMessage";
(function(){
var theoreticalAddress = getItemValueAsString("identificationTheoryPlace"); 
var computerStartDate = getItemValueAsDate("identificationTheoryStartTime");   
var testResultConfirmationStatus = getItemValueAsString("testResultConfirmationStatus"); //成绩确认状态
var dateDiff = Math.floor(computerStartDate.getTime() - getToday().getTime());   //时间差的毫秒数        

var classStatus=getItemValueAsString("classStatus");
//println("考试==>" + computerStartDate.getTime());
//println("现在==>" + getToday().getTime());
if(!"1".equals(classStatus)){  
  return createAlert("只有开班审核通过，才能发送信息！"); 
} 
if(dateDiff < 0){  
  return createAlert("已经开始鉴定考试，无法在发送信息！"); 
}   
if("1".equals(testResultConfirmationStatus)){  
  return createAlert("成绩已确认，无法在发送信息！"); 
}   
var  id=getDomainid();     
var process = getDomainProcess();//获取企业域对象 
var  system_name=process.doView(id);
var trainName = system_name.getName();
var errorStr = "";
 var sql="select '"+getDomainid()+"' as domainid, b.ID, b.ID as ITEM_ID, a.ITEM_NAME, a.ITEM_TRAININGNOTICE,a.ITEM_IDCARDNO from "+sysfunction.DS_TMS+".tlk_level_class_student a"+
  " INNER JOIN "+sysfunction.DS_OBPM+".t_user b on a.ITEM_IDCARDNO = b.FIELD12"+
  " where a.ITEM_CLASSID = '"+getId()+"'";
//println("sql==>" + sql);
 var query = queryBySQL(sql);
if("[]".equals(query)){
    return createAlert("暂无学员！");
}else{
      for(var iterator = query.iterator();iterator.hasNext();){
      doc = iterator.next();
      var userId = doc.getItemValueAsString("id"); 
      var name = doc.getItemValueAsString("name"); 
      var trainingNotice = doc.getItemValueAsString("identificationTestResults"); 
      var idCardNo = doc.getItemValueAsString("idCardNo"); 
      if("0".equals(trainingNotice)|| "".equals(trainingNotice)){
        var json = saasSendMessage(userId,name,trainName,format(computerStartDate,"yyyy-MM-dd HH:mm:ss"),theoreticalAddress);
        var retType = json.retType;
        println("retType==>" + retType);
        if(!"0".equals(retType)){
          errorStr += name + ";";
        }else{
          var updateSql = "update tlk_level_class_student set ITEM_IDENTIFICATIONTESTNOTIFICATION = '1' where ITEM_IDCARDNO = '"+idCardNo+"' and ITEM_CLASSID = '"+getId()+"'";
          updateByDSName(sysfunction.DS_TMS,updateSql);
        }
      }
      //println("userId==>" + userId);
    }
}

if(isNotNull(errorStr)){
  return createAlert(errorStr+"短信发送失败！");
}
})()]]></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(255, 255, 255, 0)</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>__RQzjq1wghqSfYUWCas6</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>