<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__5V36OiS0QkZaqN7nLbx">
  <name>comparison_record2</name>
  <parentId>__PIR6BjNg7pkoWx28hf2</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <pagination>true</pagination>
  <pageLines>5</pageLines>
  <showTotalRow>false</showTotalRow>
  <refresh>false</refresh>
  <refreshAll>false</refreshAll>
  <newPage>false</newPage>
  <readonly>false</readonly>
  <displayType>relatedForm</displayType>
  <defaultShowMode>month</defaultShowMode>
  <collapsibleShowMode>normal</collapsibleShowMode>
  <showWaterMark>false</showWaterMark>
  <showActivityColumnType>0</showActivityColumnType>
  <searchFormId></searchFormId>
  <autoCompose>false</autoCompose>
  <relatedForm></relatedForm>
  <permissionType>public</permissionType>
  <filterScript><![CDATA[]]></filterScript>
  <sqlFilterScript><![CDATA[(function(){
  
  //获取缓存中的所查看的学员的身份证
  var Q_idCard = new Packages.cn.myapps.common.util.cache.MemoryCacheUtil.getFromPrivateSpace("Q_idCard", getWebUser());//读缓存*/新的读写缓存函数地址
 println("idcard-----------------------------------"+Q_idCard);
  //拼接身份证过滤条件   
  var wheresql = "";
  if(isNotNull(Q_idCard) && Q_idCard != ''){
    
      wheresql = " and a.ITEM_AUTHUSERID = '" + Q_idCard +"'";// GROUP BY a.id ";
  }else{
     // wheresql = " GROUP BY a.id ";
  }
  var sql = "select DISTINCT '"+getDomainid()+"' as domainid,"+
    "a.ITEM_AUTHLESSONNAME,"+//课程名称
    "a.ITEM_AUTHUSERNAME," + //授权姓名
    "a.ITEM_AUTHUSERID," + //身份证号码
    "d.id ,"+
    "d.id as Item_ID,"+
    " case d.ITEM_AGREE when '0' then '待审查' when '1' then '符合' when '2' then '不符合' end as ITEM_AGREE  ," + //符合状态
    "(case when d.item_comparisonTime is null then '无记录' when d.item_comparisonTime = '' then '无记录' else d.item_comparisonTime end) as item_comparisonTime," + //记录时间
    "e.ITEM_phone,"+//手机号码
    "e.ITEM_LEARNNAME," + //现职企业
    "(case when d.ITEM_NEW_PROGRESS is null then '0' when d.ITEM_NEW_PROGRESS = '' then '0' else d.ITEM_NEW_PROGRESS end) ITEM_NEW_PROGRESS," + //学习进度
     " d.ITEM_SINCETHEPHOTO_old," + //自拍照旧值 
    " d.ITEM_SINCETHEPHOTO " + //自拍照 
    " from tlk_sectionInfo d"+
    " LEFT JOIN tlk_lesson_auth_base_info a ON d.ITEM_NEW_IDCARD = a.ITEM_AUTHUSERID and d.item_isstudy != '1' and a.item_isdelete != '1' "+
       " LEFT JOIN "+
   	"organizationauth.tlk_lesson_chapter b ON b.ITEM_LESSONID = a.ITEM_AUTHLESSONID"+
    " LEFT JOIN "+
    "tlk_qualify_person_apply e on a.item_authrecordid = e.id where a.ITEM_LEARNSTYLE = 2 and d.ITEM_SINCETHEPHOTO <> '' and d.ITEM_SINCETHEPHOTO <> '[]' " + wheresql;
  
  
println("sql---->"+sql);
return sql;
})()]]></sqlFilterScript>
  <procedureFilterScript><![CDATA[]]></procedureFilterScript>
  <filterCondition><![CDATA[[]]]></filterCondition>
  <commonFilterCondition><![CDATA[[]]]></commonFilterCondition>
  <authorityCondition>[]</authorityCondition>
  <openType>1</openType>
  <editMode>02</editMode>
  <width>0</width>
  <height>0</height>
</ListView>