<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__MQuEvQVlBbyy4G4dNdQ">
  <name>lesson_section_progress</name>
  <parentId>__reEU5vGfDUqwKJQgzNP</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <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>__mJmw0dQGTjHHf1g8aCi</searchFormId>
  <autoCompose>false</autoCompose>
  <permissionType>public</permissionType>
  <filterScript><![CDATA[]]></filterScript>
  <sqlFilterScript><![CDATA[//在表单控件值脚本中获取当前文档对象
(function(){
var idCardNo = getItemValueAsString("idCardNo");                     
var chapterId = getItemValueAsString("chapterId");
var sectionId = getItemValueAsString("sectionId");
var whereStr = " where 1=1 ";         
if(isNotNull(idCardNo)){            
  whereStr += "and a.ITEM_AUTHUSERID = '"+idCardNo+"' ";            
}
if(isNotNull(sectionId)){            
whereStr += "and d.ITEM_sectionId = '"+sectionId+"' ";            
}  
 if(isNotNull(chapterId)){            
whereStr += "and b.ID = '"+chapterId+"' ";            
}            
       

var sql = "select a.ITEM_AUTHUSERID, '"+getDomainid()+"' as domainid,"+
  "d.ID,"+
  "d.ID as ITEM_ID,"+
  "a.ITEM_AUTHUSERNAME," + //授权姓名
    "c.ITEM_SECTIONNAME," + //节名称
    "ifnull(d.ITEM_PROGRESS,'0') ITEM_PROGRESS," + //学习进度
    "ifnull(d.ITEM_ISCOMPLETE,'0') ITEM_ISCOMPLETE," + //是否完成
    "c.ID as ITEM_SECTIONID"+ //节ID
    " from tlk_lesson_auth_base_info a"+
    " LEFT JOIN "+
   	" tlk_lesson_chapter b on b.ITEM_LESSONID = a.ITEM_AUTHLESSONID"+
    " LEFT JOIN "+
    " tlk_lesson_section c on b.ID = c.ITEM_LESSONCHAPTERID"+
    " LEFT JOIN "+
    " tlk_lesson_section_progress d on d.ITEM_SECTIONID = c.ID and d.ITEM_IDCARDNO = a.ITEM_AUTHUSERID "+ whereStr;
    
    println("sql==>" + sql);
    
  return sql;
})()]]></sqlFilterScript>
  <procedureFilterScript><![CDATA[]]></procedureFilterScript>
  <filterCondition><![CDATA[[]]]></filterCondition>
  <commonFilterCondition><![CDATA[[{"field":"idCardNo","isCommonFilter":"true"},{"field":"chapterId","isCommonFilter":"true"}]]]></commonFilterCondition>
  <authorityCondition>[]</authorityCondition>
  <openType>1</openType>
  <editMode>02</editMode>
  <width>0</width>
  <height>0</height>
</ListView>