<?xml version="1.0" encoding="utf-8" ?>
<select>
  <selectstr>
SELECT taskid
	,task_type
	,run_mode
	,schedule_time
	,STATUS
	,total_count
	,success_count
	,fail_count
	,skip_count
	,log_msg
	,create_emp
	,create_time
	,start_time
	,end_time
FROM u_task_log
  </selectstr>
  <where>
	<when notempty="@task_type">
		task_type = @task_type
	</when>
	<when notnull="@status">
		status = @status
	</when>
	<when notnull="@schedule_time_begin">
		schedule_time >= @schedule_time_begin
	</when>
	<when notnull="@schedule_time_end">
		schedule_time <= @schedule_time_end
	</when>
	<when notempty="@create_emp">
		create_emp = @create_emp
	</when>
	<when notnull="@create_time_begin">
		create_time <= @create_time_begin
	</when>
	<when notnull="@create_time_end">
		create_time <= @create_time_end
	</when>
  </where>
  <displayfields>
    <field field="pid" compute="getrow()">序</field>
    <field field="task_type" mapper="tasklog_type">类型</field>
    <field field="schedule_time" datatype="datetime">计划时间</field>
    <field field="status">状态</field>
    <field field="total_count" datatype="number">总数</field>
    <field field="success_count" datatype="number">成功数</field>
    <field field="fail_count" datatype="number">失败数</field>
    <field field="skip_count" datatype="number">跳过数</field>
    <field field="log_msg">信息</field>
    <field field="create_emp">建立人</field>
    <field field="create_time" datatype="datetime">建立时间</field>
    <field field="start_time" datatype="datetime">开始时间</field>
    <field field="end_time" datatype="datetime">结束时间</field>
  </displayfields>
</select>