<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__AXqYA1cadmAojMPx0pE">
  <name>train_rule_base_info</name>
  <parentId>__uruvHlLCDEWwPtlZKQ7</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <description><![CDATA[培训任务管理]]></description>
  <pagination>true</pagination>
  <pageLines>10</pageLines>
  <showTotalRow>true</showTotalRow>
  <refresh>false</refresh>
  <refreshAll>false</refreshAll>
  <newPage>false</newPage>
  <readonly>false</readonly>
  <relatedMap><![CDATA[                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                                            ]]></relatedMap>
  <displayType>relatedForm</displayType>
  <defaultShowMode>month</defaultShowMode>
  <collapsibleShowMode>normal</collapsibleShowMode>
  <showWaterMark>false</showWaterMark>
  <showActivityColumnType>0</showActivityColumnType>
  <searchFormId>__j3rjLnaaNZR5xiw3vCY</searchFormId>
  <autoCompose>false</autoCompose>
  <relatedForm></relatedForm>
  <permissionType>public</permissionType>
  <filterScript><![CDATA[]]></filterScript>
  <sqlFilterScript><![CDATA[//表单某字段值为当前打开文档Id
(function(){
var trainRuleName = getItemValueAsString("trainRuleName");                  
var createStartDate = getItemValueAsDate("createStartDate");       
var createEndDate = getItemValueAsDate("createEndDate");           
var trainType = getItemValueAsString("trainType");  
var trainLink = getItemValueAsString("trainLink"); 
var whereStr = "where 1=1 ";         
                
if(isNotNull(trainRuleName)){            
  whereStr += "and a.ITEM_TRAINRULENAME like concat('%','"+trainRuleName+"','%') ";            
}            
if(isNotNull(createStartDate)){            
  whereStr += "and a.CREATED >= '"+format(createStartDate,"yyyy-MM-dd HH:mm:ss")+"' ";            
}            
if(isNotNull(createEndDate)){            
  whereStr += "and a.CREATED <= '"+format(createEndDate,"yyyy-MM-dd HH:mm:ss")+"' ";            
}            
if(isNotNull(trainType)){          
   whereStr += "and a.ITEM_TRAINTYPE = '"+trainType+"' ";            
}
if(trainLink == '1'){          
   whereStr += "and c.ITEM_TRAINONLINETYPE = '1' and d.ITEM_TRAINOFFLINETYPE = '0' ";            
}else if(trainLink == '2'){
   whereStr += "and c.ITEM_TRAINONLINETYPE = '0' and d.ITEM_TRAINOFFLINETYPE = '1' "; 
}else if(trainLink == '3'){
  whereStr += "and c.ITEM_TRAINONLINETYPE = '1' and d.ITEM_TRAINOFFLINETYPE = '1' "; 
}

 var sql = 
 "select "+
"'"+ getDomainid() +"' as domainid,"+  
"a.ITEM_TRAINRULENAME," + //培训名称
"case a.ITEM_TRAINTYPE"+
" when '1' then '企业内训'"+
" when '2' then '企业外训' END ITEM_TRAINTYPE," + //培训分类
"a.ITEM_CREATEDUSER," + //创建者
"a.CREATED,"+
"CASE CONCAT(c.ITEM_TRAINONLINETYPE,d.ITEM_TRAINOFFLINETYPE)"+
" WHEN '11' THEN '线上培训+线下培训'"+	
" WHEN '10' THEN '线上培训'"+
" WHEN '01' THEN '线下培训'"+
" ELSE '-' END ITEM_TRAINLINK,"+
"b.ITEM_ONLINELESSONID," + //课程Id
"b.ITEM_ONLINELESSONPRICE," + //在线课程价格
"c.ITEM_TRAINONLINETYPE," + //是否线上培训
"c.ITEM_ONLINELESSONTYPE," + //是否线上学习课程
"c.ITEM_STUDYREQUIRETYPE," + //学习要求是否必须完成
"c.ITEM_SPEEDPLAYTYPE," + //能否快进播放
"c.ITEM_MULTIPLIERSPEEDPLAYTYPE," + //能否倍速播放
"c.ITEM_TIMINGVERIFYTYPE," + //是否定时确认
"c.ITEM_TIMINGVERIFYINTERVAL," + //定时观看确认间隔
"c.ITEM_FACERECOGNITIONTYPE," + //是否需要人脸识别
"c.ITEM_COLLECTPICTURETYPE," + //是否采集照片
"c.ITEM_COLLECTPICTUREINTERVAL," + //采集照片间隔
"c.ITEM_LIVETYPE," + //是否开启直播
"d.ITEM_TRAINOFFLINETYPE," + //是否线下培训
"d.ITEM_PRACTICETYPE," + //是否需要岗位实习
"d.ITEM_PRACTICECOMPLETETYPE," + //实习是否必须完成
"d.ITEM_PRACTICEMINDAY," + //实习最小天数
"d.ITEM_PRACTICEMAXDAY," + //实习最大天数
"d.ITEM_PRACTICEMINHOUR," + //合格最小小时
"d.ITEM_PRACTICEMAXHOUR," + //实习最大小时
"d.ITEM_PRACTICECHECKTYPE," + //实习是否审核
"d.ITEM_OPENCLASSTYPE," + //是否开班培训
"d.ITEM_OPENCLASSCOMPLETETYPE," + //开班培训是否必须完成
"d.ITEM_INFORMSTUDENTTYPE," + //通知学员方式
"a.ID AS ITEM_ID,"+
"b.ID AS ITEM_BID,"+
"c.ID AS ITEM_CID,"+
"d.ID AS ITEM_DID,"+
"a.ID"+
" from tlk_train_rule_base_info a"+
" INNER JOIN tlk_train_online_lesson_info b on a.ID = b.ITEM_TRAINRULEID"+
" INNER JOIN tlk_train_online_condition_info c on c.ITEM_TRAINRULEID = b.ITEM_TRAINRULEID"+
" INNER JOIN tlk_train_offline_condition_info d on d.ITEM_TRAINRULEID = c.ITEM_TRAINRULEID "+whereStr;
 
return sql;
})()]]></sqlFilterScript>
  <procedureFilterScript><![CDATA[]]></procedureFilterScript>
  <filterCondition><![CDATA[[]]]></filterCondition>
  <commonFilterCondition><![CDATA[[{"field":"trainRuleName","isCommonFilter":"true"}]]]></commonFilterCondition>
  <authorityCondition>[]</authorityCondition>
  <openType>1</openType>
  <editMode>02</editMode>
  <width>0</width>
  <height>0</height>
</ListView>