<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__nwzbY9y2Gxv8OV3V383">
  <name>exam_rule_base_info</name>
  <parentId>__pqTmLeayINBxDKJjS8s</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>__DJpcRLBRS3CJLefevBS</searchFormId>
  <autoCompose>false</autoCompose>
  <relatedForm>__LVBw8O9T8DYlplaKIaG</relatedForm>
  <permissionType>public</permissionType>
  <filterScript><![CDATA[]]></filterScript>
  <sqlFilterScript><![CDATA[//表单某字段值为当前打开文档Id
(function(){
var examRuleName = getItemValueAsString("examRuleName");                  
var createStartDate = getItemValueAsDate("createStartDate");       
var createEndDate = getItemValueAsDate("createEndDate");           
var examType = getItemValueAsString("examType");  
var examLink = getItemValueAsString("examLink"); 
var whereStr = "where 1=1 ";         
                
if(isNotNull(examRuleName)){            
  whereStr += "and a.ITEM_EXAMRULENAME like concat('%','"+examRuleName+"','%') ";            
}            
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(examType)){          
   whereStr += "and a.ITEM_EXAMTYPE = '"+examType+"' ";            
}
if(examLink == '1'){          
   whereStr += "and b.ITEM_EXAMONLINETYPE = '1' and b.ITEM_EXAMOFFLINETYPE = '0' ";            
}else if(examLink == '2'){
   whereStr += "and b.ITEM_EXAMONLINETYPE = '0' and b.ITEM_EXAMOFFLINETYPE = '1' "; 
}else if(examLink == '3'){
  whereStr += "and b.ITEM_EXAMONLINETYPE = '1' and b.ITEM_EXAMOFFLINETYPE = '1' "; 
}

 var sql = 
 "select "+
"'"+ getDomainid() +"' as domainid,"+  
"a.ITEM_EXAMRULENAME," + //考试任务名称
"a.ITEM_EXAMTYPE," + //考试分类
"a.ITEM_CREATEDUSER," + //创建者
"a.CREATED," + //创建时间
"CASE CONCAT(b.ITEM_EXAMONLINETYPE,b.ITEM_EXAMOFFLINETYPE)"+
" WHEN '11' THEN '线上考试+线下考试'"+	
" WHEN '10' THEN '线上考试'"+
" WHEN '01' THEN '线下考试'"+
" ELSE '-' END ITEM_EXAMLINK,"+
"b.ITEM_EXAMONLINETYPE," + //是否线上考试
"b.ITEM_FACEVERIFICATIONTYPE," + //是否人脸验证
"b.ITEM_NOOPSPUTTYPE," + //是否无操作提交
"b.ITEM_OVERTIMESECONDS," + //超时秒数
"b.ITEM_CUTSCREENPUTTYPE," + //是否切屏提交
"b.ITEM_CUTSCREENCOUNT," + //切屏次数
"b.ITEM_CUTSCREENSECONDS," + //切屏秒数
"b.ITEM_ANSWERPERCENT," + //答题百分比
"b.ITEM_EXAMOFFLINETYPE," + //是否线下考试
"b.ITEM_EXAMRULEID," + //规则id
"b.ID AS ITEM_BID,"+
"a.ID AS ITEM_ID,"+
"a.ID"+
" from tlk_exam_rule_base_info a"+
" INNER JOIN tlk_exam_online_condition_info b on a.ID = b.ITEM_EXAMRULEID "+whereStr;
 
return sql;
})()]]></sqlFilterScript>
  <procedureFilterScript><![CDATA[]]></procedureFilterScript>
  <filterCondition><![CDATA[[]]]></filterCondition>
  <commonFilterCondition><![CDATA[[{"field":"examRuleName","isCommonFilter":"true"}]]]></commonFilterCondition>
  <authorityCondition>[]</authorityCondition>
  <openType>1</openType>
  <editMode>02</editMode>
  <width>0</width>
  <height>0</height>
</ListView>