<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="cn.wise.sc.acquisition.business.mapper.TEquipmentRunMapper">
<select id="getPage" resultType="cn.wise.sc.acquisition.business.model.vo.TEquipmentRunVo">
select tea.EquipmentID,tea.EquipmentName,
ter.Uid,ter.RunDate,ter.RunHour,ter.StopHour,ter.StopType,ter.Driver,ter.Txr,ter.Tag
from T_Equipment_Account tea
left join T_Equipment_Run ter on ter.EquipmentID = tea.EquipmentID
<include refid="where"/>
order by tea.Ccrq desc
</select>
<sql id="where">
<where>
and tea.Zsb = 1
<if test="params.Txr != null and params.Txr != ''">
and ter.Txr = #{params.Txr}
</if>
<if test="params.EquipmentName != null and params.EquipmentName != ''">
and tea.EquipmentName like concat('%', #{params.EquipmentName}, '%')
</if>
<if test="params.ProcessesName != null and params.ProcessesName != ''">
and tea.ProcessesName = #{params.ProcessesName}
</if>
</where>
</sql>
</mapper>
-
竹天卫 authored9741855a