<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__DzvaFkOx1FUcQ3t71mh">
  <name>internship_record</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());//读缓存*/新的读写缓存函数地址
  var whereStr = "where ITEM_securityCompanyAuditStatus='1' and a.ITEM_idCardNo='"+Q_idCard+"'  ";   
  //var whereStr = "where ITEM_securityCompanyAuditStatus='1' and a.ITEM_idCardNo='"+Q_idCard+"' and b.ITEM_TRAINID = '"+getDomainid()+"'  "
  var sql = "select '"+getDomainid()+"' as domainid, "+//a.formid, a.applicationid,
      "a.ITEM_name," + //姓名
      "a.ITEM_idCardNo," + //身份证
      "a.ITEM_phone," + //手机号
      "a.ITEM_internshipCompany," + //实习保安公司
      "a.ITEM_internshipTime," + //实习日期
      "DATE_FORMAT(a.ITEM_SIGNINTIME,'%Y-%m-%d %H:%i:%s') as ITEM_SIGNINTIME," + //签到时间
      "a.ITEM_signInPlace," + //签到地点
      "DATE_FORMAT(a.ITEM_SIGNBACKTIME,'%Y-%m-%d %H:%i:%s') as ITEM_SIGNBACKTIME," + //签退时间
      "a.ITEM_signBackPlace," + //签退地点
      "a.ITEM_INTERNSHIPDURATION," + //实习时长
      "a.ITEM_SECURITYCOMPANYAUDIT," + //保安公司审核人
      "a.ITEM_TRAININGINSTITUTIONAUDITORS," + //培训机构审核人
      "case a.ITEM_INTERNSHIPRECORDSTATUS when '0' then '未审核'"+
      " when '1' then '审核通过'"+
      " when '2' then '审核不通过'"+ 
      " end as ITEM_INTERNSHIPRECORDSTATUS," + //实习记录状态
      "a.ITEM_sp1," + //穿戴保安服照
      "a.ITEM_sp3," + //实习地点照片
      "a.ITEM_SECURITYCOMPANYNAME," + //保安审核人姓名
      "a.ITEM_TRAININGINSTITUTIONNAME," + //培训公司审核人姓名
      "a.ITEM_sp2," + //实习过程照片
      "a.ITEM_sp4," + //实习视频URL
      "a.ITEM_UNPASSREASON," + //不通过理由
      "a.ITEM_ispass," + 
      "a.item_internId,"+
      "a.id,"+
      "a.id as item_id,"+
       " case a.ITEM_AGREE when '1' then '合格' when '2' then '不合格' end as ITEM_AGREE  ," + //符合状态
      "case a.ITEM_securityCompanyAuditStatus when '0' then '未审核'"+
      " when '1' then '审核通过'"+
      " when '2' then '审核不通过'"+ 
      " end as ITEM_securityCompanyAuditStatus," + //实习记录状态
      "case a.ITEM_trainingInstitutionAuditStatus when '0' then '未审核'"+
      " when '1' then '审核通过'"+
      " when '2' then '审核不通过'"+ 
      " end as ITEM_trainingInstitutionAuditStatus " + //培训机构审核状态
      "from tlk_grade_internship a "+
      "left join "+
      "tlk_grade_registration b on a.item_internId=b.id and a.item_isdelete != '1'  "+whereStr;

  println("----------------12.13--------------------------->"+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>