<?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.TEquipmentCheckMapper">
<select id="getPage" resultType="cn.wise.sc.acquisition.business.model.vo.TEquipmentCheckVo">
select tea.EquipmentID,tea.EquipmentName,
tec.Uid,tec.Djbw,tec.Djnr,tec.Djbz,tec.Djzq,tec.Zqlx,tec.Djjg,tec.Ycjl,tec.Djr,tec.Djrq
from T_Equipment_Account tea
left join T_Equipment_Check tec on tec.EquipmentID = tea.EquipmentID
<include refid="where"/>
order by tea.Ccrq desc
</select>
<sql id="where">
<where>
<if test="params.Djr != null and params.Djr != ''">
and tec.Djr = #{params.Djr}
</if>
<if test="params.EquipmentName != null and params.EquipmentName != ''">
and tea.EquipmentName like concat('%', #{params.EquipmentName}, '%')
</if>
</where>
</sql>
</mapper>
-
renchao authored6ee0f7d8