| | |
| | | "http://mybatis.org/dtd/mybatis-3-mapper.dtd"> |
| | | <mapper namespace="org.dromara.eims.mapper.EimsEquStatuMapper"> |
| | | |
| | | <resultMap type="org.dromara.eims.domain.vo.EimsEquStatuVo" id="EquStatuVoResult"> |
| | | </resultMap> |
| | | |
| | | <select id="selectEquStatuPage" resultMap="EquStatuVoResult"> |
| | | SELECT s.*, e.equ_name AS equName, e.asset_no AS assetNo |
| | | FROM eims_equ_statu s |
| | | LEFT JOIN eims_equ e ON s.equ_id = e.equ_id |
| | | <where> |
| | | <if test="bo.equId != null"> |
| | | AND s.equ_id = #{bo.equId} |
| | | </if> |
| | | <if test="bo.beforeChange != null and bo.beforeChange != ''"> |
| | | AND s.before_change = #{bo.beforeChange} |
| | | </if> |
| | | <if test="bo.afterChange != null and bo.afterChange != ''"> |
| | | AND s.after_change = #{bo.afterChange} |
| | | </if> |
| | | <if test="bo.changeUser != null"> |
| | | AND s.change_user = #{bo.changeUser} |
| | | </if> |
| | | <if test="bo.orderStatus != null and bo.orderStatus != ''"> |
| | | AND s.order_status = #{bo.orderStatus} |
| | | </if> |
| | | <if test="bo.params != null and bo.params.beginTime != null and bo.params.endTime != null"> |
| | | AND s.change_date BETWEEN #{bo.params.beginTime} AND #{bo.params.endTime} |
| | | </if> |
| | | <if test="bo.params != null and bo.params.searchValue != null and bo.params.searchValue != ''"> |
| | | AND ( |
| | | e.equ_name LIKE CONCAT('%', #{bo.params.searchValue}, '%') |
| | | OR e.asset_no LIKE CONCAT('%', #{bo.params.searchValue}, '%') |
| | | ) |
| | | </if> |
| | | </where> |
| | | ORDER BY s.change_date DESC |
| | | </select> |
| | | |
| | | </mapper> |