<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<ListView id="__b0SmXCCp6CwIqCXNbhl">
  <name>协会查看train_plan</name>
  <parentId>__hGBmZIJlszexS9jEYx0</parentId>
  <applicationid>__LgZds5MVHW3o08T7UcX</applicationid>
  <description>培训计划</description>
  <pagination>true</pagination>
  <pageLines>10</pageLines>
  <showTotalRow>true</showTotalRow>
  <refresh>false</refresh>
  <refreshAll>false</refreshAll>
  <newPage>false</newPage>
  <lastModifyTime>2025-04-21T22:58:40.000+08:00</lastModifyTime>
  <readonly>false</readonly>
  <displayType>templateForm</displayType>
  <defaultShowMode>month</defaultShowMode>
  <collapsibleShowMode>normal</collapsibleShowMode>
  <showWaterMark>false</showWaterMark>
  <showActivityColumnType>0</showActivityColumnType>
  <searchFormId>__huK62gZoeRDJL7WusRG</searchFormId>
  <autoCompose>true</autoCompose>
  <relatedForm>__M67R55VbkQxkPEuvJgc</relatedForm>
  <templateForm>__AaCzv6DhxXwvLTBAWW3</templateForm>
  <permissionType>public</permissionType>
  <filterScript><![CDATA[]]></filterScript>
  <sqlFilterScript><![CDATA[(function(){
  
   var whereStr=" "
  var domain_name = getItemValueAsString("domain_name");  
  if(isNotNull(domain_name)){                                        
    whereStr = whereStr + " and p.item_domain_name like '%"+domain_name+"%' "
  }

  var plan = getItemValueAsString("plan");
  if(isNotNull(plan)){                                        
    whereStr = whereStr + " and p.item_plan like '%"+plan+"%' "
  }
  var point_type = getItemValueAsString("point_type");
  if(isNotNull(point_type)){                                        
    whereStr = whereStr + " and p.item_point_type = '"+point_type+"' "
  }
  var train_time = getItemValueAsDate("train_time");
   if(isNotNull(train_time)){                                        
    whereStr = whereStr + " and DATE_FORMAT(p.item_train_start_time, '%Y-%m-%d') <= '"+format(train_time,"yyyy-MM-dd")+"'  and DATE_FORMAT(p.item_train_end_time, '%Y-%m-%d') >= '"+format(train_time,"yyyy-MM-dd")+"' "
  }
  
  var submit_start_time = getItemValueAsDate("submit_start_time");
   if(isNotNull(submit_start_time)){                                        
    whereStr = whereStr + " and DATE_FORMAT(p.item_submit_time, '%Y-%m-%d') >= '"+format(submit_start_time,"yyyy-MM-dd")+"' "
  }
  var submit_end_time = getItemValueAsDate("submit_end_time");
  if(isNotNull(submit_end_time)){                                        
    whereStr = whereStr + " and DATE_FORMAT(p.item_submit_time, '%Y-%m-%d') <= '"+format(submit_end_time,"yyyy-MM-dd")+"' "
  }
  
  var audit_status = getItemValueAsString("audit_status");
   if(isNotNull(audit_status)){                                        
    whereStr = whereStr + " and p.item_audit_status = '"+audit_status+"' "
  }
  
var sql="select '"+getDomainid()+"' as domainid,p.id,p.created,p.formid,p.item_plan,t.item_point_type as item_type,p.item_train_start_time,p.item_train_end_time,"+
    "concat(DATE_FORMAT(p.item_train_start_time, '%Y年%m月%d日'),'~',DATE_FORMAT(p.item_train_end_time, '%Y年%m月%d日')) as item_train_time,"+
    "p.item_audit_status,p.item_audit_info,p.item_submit_time,p.item_domain_name "+
    " from tlk_train_plan p left join tlk_train_point_type t on t.id=p.item_point_type where item_audit_status!='待提交' "+whereStr+
    "order by created desc "
println(sql)
return sql
})()]]></sqlFilterScript>
  <procedureFilterScript><![CDATA[]]></procedureFilterScript>
  <filterCondition><![CDATA[[]]]></filterCondition>
  <commonFilterCondition><![CDATA[[]]]></commonFilterCondition>
  <authorityCondition>[]</authorityCondition>
  <openType>277</openType>
  <editMode>02</editMode>
  <width>0</width>
  <height>0</height>
</ListView>